From 584885c78d9d0546a48a7d2b038ac5395b46a966 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 21 Dec 2018 23:07:41 +0100 Subject: [PATCH 001/368] Make network support optional --- .circleci/config.yml | 2 + Cargo.lock | 651 ++++++++++++++++++++++++------------------- Cargo.toml | 6 +- README.md | 14 + src/cache.rs | 75 ++++- src/error.rs | 3 + src/main.rs | 79 +++++- tests/lib.rs | 75 +++-- 8 files changed, 580 insertions(+), 325 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f432d19..fb96391 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,9 +18,11 @@ jobs: # Build - run: cargo build - run: cargo build --features logging + - run: cargo build --no-default-features # Run tests - run: cargo test + - run: cargo test --no-default-features - save_cache: key: v1-cargo-cache-{{ arch }}-{{ .Branch }} diff --git a/Cargo.lock b/Cargo.lock index db7c19b..16e09e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,11 @@ +[[package]] +name = "MacTypes-sys" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "adler32" version = "1.0.3" @@ -5,10 +13,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "aho-corasick" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -18,7 +26,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "arrayvec" -version = "0.4.7" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -40,7 +48,7 @@ name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -88,14 +96,14 @@ name = "cargo_metadata" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.25" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -126,11 +134,11 @@ dependencies = [ "quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -147,7 +155,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -155,7 +163,7 @@ name = "core-foundation-sys" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -167,35 +175,38 @@ dependencies = [ ] [[package]] -name = "crossbeam-deque" -version = "0.6.2" +name = "crc32fast" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-deque" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-epoch" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-utils" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "crossbeam-utils" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -211,10 +222,10 @@ name = "docopt" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -230,7 +241,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "encoding_rs" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -242,9 +253,9 @@ version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -253,26 +264,38 @@ name = "escargot" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "escargot" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "filetime" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "flate2" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "crc32fast 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -328,7 +351,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -341,24 +364,24 @@ dependencies = [ [[package]] name = "h2" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "string 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "http" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -373,7 +396,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "humantime" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -381,27 +404,27 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.14" +version = "0.12.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -412,7 +435,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.19 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -442,7 +465,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -475,44 +498,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazy_static" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "lazycell" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lazycell" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "libc" -version = "0.2.43" +version = "0.2.45" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libflate" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crc32fast 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lock_api" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -525,11 +545,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.1.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -562,8 +582,8 @@ name = "miniz-sys" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -579,9 +599,9 @@ name = "miniz_oxide_c_api" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -594,9 +614,9 @@ dependencies = [ "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -609,7 +629,7 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -629,16 +649,16 @@ name = "native-tls" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -647,7 +667,7 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -668,23 +688,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num_cpus" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl" -version = "0.10.15" +version = "0.10.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -694,18 +714,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.39" +version = "0.9.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "owning_ref" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -716,7 +736,7 @@ name = "parking_lot" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -725,10 +745,10 @@ name = "parking_lot_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -786,7 +806,7 @@ dependencies = [ "float-cmp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -805,7 +825,7 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "0.4.20" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -832,10 +852,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "0.6.8" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -844,7 +864,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -855,11 +875,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_chacha" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand_core" version = "0.2.2" @@ -873,9 +920,42 @@ name = "rand_core" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_pcg" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "redox_syscall" -version = "0.1.40" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -883,7 +963,7 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -891,23 +971,23 @@ name = "regex" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -920,15 +1000,15 @@ name = "regex-syntax" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -946,22 +1026,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.12 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.13 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.19 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libflate 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -975,7 +1055,7 @@ dependencies = [ [[package]] name = "ryu" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -985,7 +1065,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "same-file" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -996,7 +1076,7 @@ name = "schannel" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1012,17 +1092,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework-sys" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "MacTypes-sys 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1048,41 +1129,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.80" +version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.80" +version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.13 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.32" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_urlencoded" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1097,7 +1178,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1110,7 +1191,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "string" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1120,22 +1201,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.13" +version = "0.15.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tar" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)", "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1148,20 +1229,20 @@ dependencies = [ "clippy 0.0.174 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", - "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "escargot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "predicates 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1175,13 +1256,13 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.0.4" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1199,8 +1280,8 @@ name = "termion" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1209,38 +1290,39 @@ name = "thread_local" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "time" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-fs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-uds 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-uds 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1255,7 +1337,7 @@ dependencies = [ [[package]] name = "tokio-current-thread" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1277,7 +1359,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1287,20 +1369,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-reactor" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1317,29 +1399,29 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-deque 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-timer" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1347,40 +1429,41 @@ dependencies = [ [[package]] name = "tokio-udp" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-uds" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "toml" -version = "0.4.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1395,7 +1478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ucd-util" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1447,7 +1530,7 @@ dependencies = [ [[package]] name = "url" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1457,7 +1540,7 @@ dependencies = [ [[package]] name = "utf8-ranges" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1466,7 +1549,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1495,10 +1578,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "walkdir" -version = "2.2.5" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1509,7 +1592,7 @@ version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1573,19 +1656,20 @@ name = "xattr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "xdg" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] +"checksum MacTypes-sys 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7dbbe033994ae2198a18517c7132d952a29fb1db44249a1234779da7c50f4698" "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" -"checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a" +"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" "checksum ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b3568b48b7cefa6b8ce125f9bb4989e52fbcc29ebea88df04cc7c5f12f70455" -"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" +"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" "checksum assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7ac5c260f75e4e4ba87b7342be6edcecbcb3eb6741a0507fda7ad115845cc65" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" @@ -1595,7 +1679,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" "checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" "checksum cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "be1057b8462184f634c3a208ee35b0f935cfd94b694b26deadccd98732088d7b" -"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" +"checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749" "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" "checksum clippy 0.0.174 (registry+https://github.com/rust-lang/crates.io-index)" = "1b03ded6eba74b16dbeb598be58e874bc72f6cf12f7ccc577b328091e1d4392a" "checksum clippy_lints 0.0.174 (registry+https://github.com/rust-lang/crates.io-index)" = "9b8e508648d6d41040e0061f45fc5562b3af5c8a7d67853f15841fb531c8e984" @@ -1603,19 +1687,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" "checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" "checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" -"checksum crossbeam-deque 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe1b6f945f824c7a25afe44f62e25d714c0cc523f8e99d8db5cd1026e1269d3" -"checksum crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2449aaa4ec7ef96e5fb24db16024b935df718e9ae1cec0a1e68feeca2efca7b8" -"checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015" -"checksum crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c55913cc2799171a550e307918c0a360e8c16004820291bf3b638969b4a01816" +"checksum crc32fast 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e91d5240c6975ef33aeb5f148f35275c25eda8e8a5f95abe421978b05b8bf192" +"checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13" +"checksum crossbeam-epoch 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f10a4f8f409aaac4b16a5474fb233624238fcdeefb9ba50d5ea059aab63ba31c" +"checksum crossbeam-utils 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "41ee4864f4797060e52044376f7d107429ce1fb43460021b126424b7180ee21a" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d8acd393692c503b168471874953a2531df0e9ab77d0b6bbc582395743300a4a" "checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" -"checksum encoding_rs 0.8.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ca20350a7cb5aab5b9034731123d6d412caf3e92d4985e739e411ba0955fd0eb" +"checksum encoding_rs 0.8.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1a8fa54e6689eb2549c4efed8d00d7f3b2b994a064555b0e8df4ae3764bcc4be" "checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" "checksum escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19db1f7e74438642a5018cdf263bb1325b2e792f02dd0a3ca6d6c0f0d7b1d5a5" -"checksum filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "da4b9849e77b13195302c174324b5ba73eec9b236b24c221a61000daefb95c5f" -"checksum flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3b0c7353385f92079524de3b7116cf99d73947c08a7472774e9b3b04bff3b901" +"checksum escargot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ceb9adbf9874d5d028b5e4c5739d22b71988252b25c9c98fe7cf9738bee84597" +"checksum filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a2df5c1a8c4be27e7707789dc42ae65976e60b394afd293d1419ab915833e646" +"checksum flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2291c165c8e703ee54ef3055ad6188e3d51108e2ded18e9f2476e774fc5ad3d4" "checksum float-cmp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "134a8fa843d80a51a5b77d36d42bc2def9edcb0262c914861d08129fd1926600" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" @@ -1625,11 +1710,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797" -"checksum h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7dd33bafe2e6370e6c8eb0cf1b8c5f93390b90acde7e9b03723f166b28b648ed" -"checksum http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "24f58e8c2d8e886055c3ead7b28793e1455270b5fb39650984c224bc538ba581" +"checksum h2 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "1ac030ae20dee464c5d0f36544d8b914a6bc606da44a57e052d2b0f5dae129e0" +"checksum http 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "02096a6d2c55e63f7fcb800690e4f889a25f6ec342e3adb4594e293b625215ab" "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" -"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e" -"checksum hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2f60ae467ef4fc5eba9a34d31648c9c8ed902faf45a217f6734ce9ea64779ac7" +"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" +"checksum hyper 0.12.19 (registry+https://github.com/rust-lang/crates.io-index)" = "f1ebec079129e43af5e234ef36ee3d7e6085687d145b7ea653b262d16c6b65f1" "checksum hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "32cd73f14ad370d3b4d4b7dce08f69b81536c82e39fcc89731930fe5788cd661" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac95d9aa0624e7b78187d6fb8ab012b41d9f6f54b1bcb61e61c4845f8357ec" @@ -1639,14 +1724,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" -"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" -"checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" -"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" -"checksum libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "21138fc6669f438ed7ae3559d5789a5f0ba32f28c1f0608d1e452b0bb06ee936" -"checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a" -"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" +"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" +"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" +"checksum libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)" = "2d2857ec59fadc0773853c664d2d18e7198e83883e7060b63c924cb077bd5c74" +"checksum libflate 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "bff3ac7d6f23730d3b533c35ed75eef638167634476a499feef16c428d74b57b" +"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" +"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b3629fe9fdbff6daa6c33b90f7c08355c1aca05a3d01fa8063b822fcf185f3b" +"checksum memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "db4c41318937f6e76648f42826b1d9ade5c09cafb5aef7e351240a70f39206e9" "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "0a907b83e7b9e987032439a387e187119cddafc92d5c2aaeb1d92580a793f630" "checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed" @@ -1661,11 +1746,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e0a1a39eab95caf4f5556da9289b9e68f0aafac901b2ce80daaf020d3b733a8" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" -"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" -"checksum openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "5e1309181cdcbdb51bc3b6bedb33dfac2a83b3d585033d3f6d9e22e8c1928613" +"checksum num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238" +"checksum openssl 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ec7bd7ca4cce6dbdc77e7c1230682740d307d1218a87fb0349a571272be749f9" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)" = "278c1ad40a89aa1e741a1eed089a2f60b18fab8089c3139b542140fc7d674106" -"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" +"checksum openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)" = "1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6" +"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" @@ -1677,69 +1762,75 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum predicates 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa984b7cd021a0bf5315bcce4c4ae61d2a535db2a8d288fc7578638690a7b7c3" "checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" "checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" -"checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee" +"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09" "checksum pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "378e941dbd392c101f2cb88097fa4d7167bc421d4b88de3ff7dbee503bc3233b" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45" -"checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5" +"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" "checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" +"checksum rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9d223d52ae411a33cf7e54ec6034ec165df296ccd23533d671a28252b6f66a" +"checksum rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "771b009e3a508cb67e8823dda454aaa5368c7bc1c16829fb77d3e980440dd34a" "checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372" "checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db" -"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" +"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +"checksum rand_pcg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "086bd09a33c7044e56bb44d5bdde5a60e7f119a9e95b0775f545de759a32fe05" +"checksum rand_xorshift 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "effa3fcaa47e18db002bdde6060944b6d2f9cfd8db471c30e873448ad9187be3" +"checksum redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)" = "52ee9a534dc1301776eff45b4fa92d2c39b1d8c3d3357e6eb593e0d795506fc2" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" -"checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341" +"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f" "checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" "checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" -"checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" +"checksum regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a2ed29da7a9e1960e1639e7a982e6edc6d49be308a3b02daf511504a16d1" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ab52e462d1e15891441aeefadff68bdea005174328ce3da0a314f2ad313ec837" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7" +"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" -"checksum same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f7794e2fda7f594866840e95f5c5962e886e228e68b6505885811a94dd728c" +"checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" "checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum security-framework 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "697d3f3c23a618272ead9e1fb259c1411102b31c6af8b93f1d64cca9c3b0e8e0" -"checksum security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab01dfbe5756785b5b4d46e0289e5a18071dfa9a7c2b24213ea00b9ef9b665bf" +"checksum security-framework-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "40d95f3d7da09612affe897f320d78264f0d2320f3e8eea27d12bd1bd94445e2" "checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef" -"checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" -"checksum serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "43344e7ce05d0d8280c5940cabb4964bea626aa58b1ec0e8c73fa2a8512a38ce" -"checksum serde_urlencoded 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "aaed41d9fb1e2f587201b863356590c90c1157495d811430a0c0325fe8169650" +"checksum serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)" = "0e732ed5a5592c17d961555e3b552985baf98d50ce418b7b655f31f6ba7eb1b7" +"checksum serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d6115a3ca25c224e409185325afc16a0d5aaaabc15c42b09587d6f1ba39a5b" +"checksum serde_json 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)" = "bdf540260cfee6da923831f4776ddc495ada940c30117977c70f1313a6130545" +"checksum serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d48f9f99cd749a2de71d29da5f948de7f2764cc5a9d7f3c97e3514d4ee6eabf2" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" -"checksum smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "622df2d454c29a4d89b30dc3b27b42d7d90d6b9e587dbf8f67652eb7514da484" +"checksum smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b73ea3738b47563803ef814925e69be00799a8c07420be8b996f8e98fb2336db" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" -"checksum string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00caf261d6f90f588f8450b8e1230fa0d5be49ee6140fdfbcb55335aff350970" +"checksum string 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98998cced76115b1da46f63388b909d118a37ae0be0f82ad35773d4a4bc9d18d" "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" -"checksum syn 0.15.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4439ee8325b4e4b57e59309c3724c9a4478eaeb4eb094b6f3fac180a3b2876" -"checksum tar 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)" = "83b0d14b53dbfd62681933fadd651e815f99e6084b649e049ab99296e05ab3de" +"checksum syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9545a6a093a3f0bd59adb472700acc08cad3776f860f16a897dfce8c88721cbc" +"checksum tar 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "a303ba60a099fcd2aaa646b14d2724591a96a75283e4b7ed3d1a1658909d9ae2" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "55c1195ef8513f3273d55ff59fe5da6940287a0d7a98331254397f464833675b" +"checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2" "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" -"checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" -"checksum tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6e93c78d23cc61aa245a8acd2c4a79c4d7fa7fb5c3ca90d5737029f043a84895" +"checksum time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "847da467bf0db05882a9e2375934a8a55cffdc9db0d128af1518200260ba1f6c" +"checksum tokio 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "a7817d4c98cc5be21360b3b37d6036fe9b7aefa5b7a201b7b16ff33423822f7d" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" -"checksum tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f90fcd90952f0a496d438a976afba8e5c205fb12123f813d8ab3aa1c8436638c" +"checksum tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "331c8acc267855ec06eb0c94618dcbbfea45bed2d20b77252940095273fb58f6" "checksum tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c117b6cf86bb730aab4834f10df96e4dd586eff2c3c27d3781348da49e255bde" "checksum tokio-fs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "60ae25f6b17d25116d2cba342083abe5255d3c2c79cb21ea11aa049c53bf7c75" "checksum tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "7392fe0a70d5ce0c882c4778116c519bd5dbaa8a7c3ae3d04578b3afafdcda21" -"checksum tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4b26fd37f1125738b2170c80b551f69ff6fecb277e6e5ca885e53eec2b005018" +"checksum tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "502b625acb4ee13cbb3b90b8ca80e0addd263ddacf6931666ef751e610b07fb5" "checksum tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad235e9dadd126b2d47f6736f65aa1fdcd6420e66ca63f44177bc78df89f912" -"checksum tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3929aee321c9220ed838ed6c3928be7f9b69986b0e3c22c972a66dbf8a298c68" -"checksum tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3a52f00c97fedb6d535d27f65cccb7181c8dd4c6edc3eda9ea93f6d45d05168e" -"checksum tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "da941144b816d0dcda4db3a1ba87596e4df5e860a72b70783fe435891f80601c" -"checksum tokio-uds 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "df195376b43508f01570bacc73e13a1de0854dc59e79d1ec09913e8db6dd2a70" -"checksum toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4a2ecc31b0351ea18b3fe11274b8db6e4d82bce861bbb22e6dbed40417902c65" +"checksum tokio-threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "56c5556262383032878afad66943926a1d1f0967f17e94bd7764ceceb3b70e7f" +"checksum tokio-timer 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4f37f0111d76cc5da132fe9bc0590b9b9cfd079bc7e75ac3846278430a299ff8" +"checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" +"checksum tokio-uds 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "99ce87382f6c1a24b513a72c048b2c8efe66cb5161c9061d00bee510f08dc168" +"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" "checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" -"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" +"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" @@ -1747,14 +1838,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" -"checksum utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd70f467df6810094968e2fce0ee1bd0e87157aceb026a8c083bcf5e25b9efe4" +"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" +"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" "checksum utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "055058552ca15c566082fc61da433ae678f78986a6f16957e33162d1b218792a" "checksum uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dab5c5526c5caa3d106653401a267fed923e7046f35895ffcb5ca42db64942e6" "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "af464bc7be7b785c7ac72e266a6b67c4c9070155606f51655a650a6686204e35" +"checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" @@ -1765,4 +1856,4 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" -"checksum xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a66b7c2281ebde13cf4391d70d4c7e5946c3c25e72a7b859ca8f677dcd0b0c61" +"checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" diff --git a/Cargo.toml b/Cargo.toml index d4deb05..a8c99bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,17 +28,19 @@ time = "0.1.38" toml = "0.4.6" walkdir = "2.0.1" xdg = "2.1.0" -reqwest = "0.9.5" +reqwest = { version = "0.9.5", optional = true } [dev-dependencies] assert_cmd = "0.10" -escargot = "0.3" +escargot = "0.4" predicates = "1.0" tempdir = "^0.3" utime = "0.2.0" [features] +default = ["networking"] logging = ["env_logger"] +networking = ["reqwest"] [profile.release] lto = true diff --git a/README.md b/README.md index 6c4fa13..dbefa2a 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ To enable the log output, set the `RUST_LOG` env variable: $ export RUST_LOG=tldr=debug + ## Configuration The tldr command can be customized with a config file called `config.toml`. @@ -189,12 +190,25 @@ To run tests: $ cargo test +(Note that integration tests are a bit slow, since they invoke `cargo build` in different configurations.) + To run lints: $ rustup component add clippy $ cargo clean && cargo clippy +## Build Flags + +tealdeer knows the following feature flags: + +- `logging`: This enables logging support through [env_logger](https://docs.rs/env_logger/*/env_logger/) +- `networking`: This enables support for updating the cache from the internet + +By default, only the `networking` feature is enabled. To build tealdeer without +networking support, use the `--no-default-features` Cargo flag. + + ## License Licensed under either of diff --git a/src/cache.rs b/src/cache.rs index d08615f..eef99a7 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -1,15 +1,19 @@ +#[cfg(feature = "networking")] +use std::borrow::Cow; use std::env; use std::fs; use std::io::Read; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; -#[cfg(unix)] +#[cfg(all(unix, feature = "networking"))] use std::os::unix::fs::MetadataExt; +#[cfg(feature = "networking")] use reqwest::{Client, Proxy}; use flate2::read::GzDecoder; use log::debug; use tar::Archive; +#[cfg(feature = "networking")] use time; use walkdir::{DirEntry, WalkDir}; use xdg::BaseDirectories; @@ -17,19 +21,36 @@ use xdg::BaseDirectories; use crate::error::TealdeerError::{self, CacheError, UpdateError}; use crate::types::OsType; +/// A cache update source. +#[derive(Debug)] +pub enum Source { + /// Load the archive from the file system. + File(PathBuf), + + /// Load the archive from the network. + #[cfg(feature = "networking")] + Url(Cow<'static, str>), + + /// No source is defined. + #[cfg(not(feature = "networking"))] + None, +} + #[derive(Debug)] pub struct Cache { - url: String, + /// The cache source. Either an URL or a file path. + source: Source, + /// The target OS type. os: OsType, } impl Cache { - pub fn new(url: S, os: OsType) -> Self + pub fn new(source: S, os: OsType) -> Self where - S: Into, + S: Into, { Self { - url: url.into(), + source: source.into(), os, } } @@ -60,8 +81,20 @@ impl Cache { Ok(xdg_dirs.get_cache_home()) } - /// Download the archive - fn download(&self) -> Result, TealdeerError> { + /// Load the archive from the file system. + fn load_from_file(path: &Path) -> Result, TealdeerError> { + let mut f = fs::File::open(path) + .map_err(|e| UpdateError(format!("Could not open file: {}", e)))?; + let mut buf: Vec = vec![]; + let bytes_read = f.read_to_end(&mut buf) + .map_err(|e| UpdateError(format!("Could not read file: {}", e)))?; + debug!("{} bytes loaded from filesystem", bytes_read); + Ok(buf) + } + + /// Load the archive from the network. + #[cfg(feature = "networking")] + fn load_from_network(url: &str) -> Result, TealdeerError> { let mut builder = Client::builder(); if let Ok(ref host) = env::var("HTTP_PROXY") { if let Ok(proxy) = Proxy::http(host) { @@ -74,13 +107,31 @@ impl Cache { } } let client = builder.build().unwrap_or_else(|_| Client::new()); - let mut resp = client.get(&self.url).send()?; + let mut resp = client.get(url).send()?; let mut buf: Vec = vec![]; let bytes_downloaded = resp.copy_to(&mut buf)?; debug!("{} bytes downloaded", bytes_downloaded); Ok(buf) } + /// Download the archive from the network or load it from a file. + #[cfg(feature = "networking")] + fn load(&self) -> Result, TealdeerError> { + match self.source { + Source::File(ref path) => Self::load_from_file(path), + Source::Url(ref url) => Self::load_from_network(url), + } + } + + /// Load the archive from the file system. + #[cfg(not(feature = "networking"))] + fn load(&self) -> Result, TealdeerError> { + match self.source { + Source::File(ref path) => Self::load_from_file(path), + Source::None => Err(TealdeerError::UpdateError("No update source defined".into())), + } + } + /// Decompress and open the archive fn decompress(&self, reader: R) -> Archive> { Archive::new(GzDecoder::new(reader)) @@ -88,8 +139,8 @@ impl Cache { /// Update the pages cache. pub fn update(&self) -> Result<(), TealdeerError> { - // First, download the compressed data - let bytes: Vec = self.download()?; + // First, load the compressed data + let bytes: Vec = self.load()?; // Decompress the response body into an `Archive` let mut archive = self.decompress(&bytes[..]); @@ -118,7 +169,7 @@ impl Cache { Ok(()) } - #[cfg(unix)] + #[cfg(all(unix, feature = "networking"))] /// Return the number of seconds since the cache directory was last modified. pub fn last_update(&self) -> Option { if let Ok(cache_dir) = self.get_cache_dir() { diff --git a/src/error.rs b/src/error.rs index 60e0756..c2d1a32 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,4 +1,6 @@ use std::fmt; + +#[cfg(feature = "networking")] use reqwest::Error as ReqwestError; #[derive(Debug)] @@ -9,6 +11,7 @@ pub enum TealdeerError { UpdateError(String), } +#[cfg(feature = "networking")] impl From for TealdeerError { fn from(err: ReqwestError) -> Self { TealdeerError::UpdateError(format!("HTTP error: {}", err.to_string())) diff --git a/src/main.rs b/src/main.rs index 06c3f72..459aa3b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,11 +16,14 @@ #[cfg(feature = "logging")] extern crate env_logger; +#[cfg(feature = "networking")] +use std::borrow::Cow; use std::fs::File; use std::io::BufReader; use std::path::{Path, PathBuf}; use std::process; +#[cfg(feature = "networking")] use ansi_term::Color; use docopt::Docopt; use serde_derive::Deserialize; @@ -32,7 +35,7 @@ mod formatter; mod tokenizer; mod types; -use crate::cache::Cache; +use crate::cache::{Cache, Source}; use crate::config::{get_config_path, make_default_config, Config}; use crate::error::TealdeerError::{CacheError, ConfigError, UpdateError}; use crate::formatter::print_lines; @@ -42,6 +45,8 @@ use crate::types::OsType; const NAME: &str = "tealdeer"; const VERSION: &str = env!("CARGO_PKG_VERSION"); const USAGE: &str = " +tealdeer, a fast tldr implementation written in Rust. + Usage: tldr [options] @@ -49,16 +54,17 @@ Usage: Options: - -h --help Show this screen - -v --version Show version information - -l --list List all commands in the cache - -f --render Render a specific markdown file - -o --os Override the operating system [linux, osx, sunos] - -u --update Update the local cache - -c --clear-cache Clear the local cache - -q --quiet Suppress informational messages - --config-path Show config file path - --seed-config Create a basic config + -h --help Show this screen + -v --version Show version information + -l --list List all commands in the cache + -f --render Render a specific markdown file + -o --os Override the operating system [linux, osx, sunos] + -u --update Update the local cache from the network + -U --update-from Update the local cache from the specified URL or path + -c --clear-cache Clear the local cache + -q --quiet Suppress informational messages + --config-path Show config file path + --seed-config Create a basic config Examples: @@ -70,11 +76,19 @@ To control the cache: $ tldr --update $ tldr --clear-cache +You can also manually specify the archive to be used for updating the cache: + + $ tldr --update-from https://github.com/tldr-pages/tldr/archive/master.tar.gz + $ tldr --update-from master.tar.gz + To render a local file (for testing): $ tldr --render /path/to/file.md "; + +#[cfg(feature = "networking")] const ARCHIVE_URL: &str = "https://github.com/tldr-pages/tldr/archive/master.tar.gz"; +#[cfg(feature = "networking")] const MAX_CACHE_AGE: i64 = 2_592_000; // 30 days #[derive(Debug, Deserialize)] @@ -86,6 +100,7 @@ struct Args { flag_render: Option, flag_os: Option, flag_update: bool, + flag_update_from: Option, flag_clear_cache: bool, flag_quiet: bool, flag_config_path: bool, @@ -119,6 +134,7 @@ fn print_page(path: &Path) -> Result<(), String> { } /// Check the cache for freshness +#[cfg(feature = "networking")] fn check_cache(args: &Args, cache: &Cache) { if !args.flag_update { match cache.last_update() { @@ -144,6 +160,14 @@ fn check_cache(args: &Args, cache: &Cache) { }; } +/// Check the cache for freshness +/// +/// No-op when networking support is disabled. +#[cfg(not(feature = "networking"))] +fn check_cache(_args: &Args, _cache: &Cache) { + // No-op when no networking support is enabled. +} + #[cfg(feature = "logging")] fn init_log() { env_logger::init(); @@ -176,6 +200,28 @@ fn get_os() -> OsType { OsType::Other } +#[cfg(feature = "networking")] +fn get_url_source(source: &str) -> Source { + Source::Url(Cow::Owned(source.to_string())) +} + +#[cfg(not(feature = "networking"))] +fn get_url_source(_source: &str) -> Source { + eprintln!("tealdeer has been compiled without networking support,"); + eprintln!("cannot update the cache from a network URL."); + process::exit(1); +} + +#[cfg(feature = "networking")] +fn get_default_source() -> Source { + Source::Url(Cow::Borrowed(ARCHIVE_URL)) +} + +#[cfg(not(feature = "networking"))] +fn get_default_source() -> Source { + Source::None +} + fn main() { // Initialize logger init_log(); @@ -198,8 +244,15 @@ fn main() { None => get_os(), }; + // Validate cache source + let cache_source: Source = match args.flag_update_from { + Some(ref src) if src.starts_with("http") => get_url_source(src), + Some(ref src) => Source::File(PathBuf::from(src)), + None => get_default_source(), + }; + // Initialize cache - let cache = Cache::new(ARCHIVE_URL, os); + let cache = Cache::new(cache_source, os); // Clear cache, pass through if args.flag_clear_cache { @@ -217,7 +270,7 @@ fn main() { } // Update cache, pass through - if args.flag_update { + if args.flag_update || args.flag_update_from.is_some() { cache.update().unwrap_or_else(|e| { match e { CacheError(msg) | ConfigError(msg) | UpdateError(msg) => { diff --git a/tests/lib.rs b/tests/lib.rs index 204c3fb..91e80b5 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -1,11 +1,5 @@ //! Integration tests. -extern crate assert_cmd; -extern crate escargot; -extern crate predicates; -extern crate tempdir; -extern crate utime; - use std::fs::File; use std::io::Write; use std::process::Command; @@ -20,7 +14,6 @@ struct TestEnv { pub config_dir: TempDir, pub input_dir: TempDir, pub default_features: bool, - pub features: Vec, } impl TestEnv { @@ -30,7 +23,6 @@ impl TestEnv { config_dir: TempDir::new(".tldr.test.config").unwrap(), input_dir: TempDir::new(".tldr.test.input").unwrap(), default_features: true, - features: vec![], } } @@ -40,12 +32,6 @@ impl TestEnv { self } - /// Add the specified feature. - fn with_feature>(mut self, feature: S) -> Self { - self.features.push(feature.into()); - self - } - /// Return a new `Command` with env vars set. fn command(&self) -> Command { let mut build = escargot::CargoBuild::new() @@ -53,10 +39,9 @@ impl TestEnv { .current_release() .current_target(); if !self.default_features { - build = build.arg("--no-default-features"); - } - if !self.features.is_empty() { - build = build.arg(&format!("--feature {}", self.features.join(","))); + build = build + .arg("--no-default-features") + .target_dir("target/no-default-features"); } let run = build.run().unwrap(); let mut cmd = run.command(); @@ -257,3 +242,57 @@ fn test_correct_rendering_with_config() { .success() .stdout(similar(expected)); } + +/// Updating from a network URL should not be possible when networking support +/// is not enabled. +#[test] +fn test_update_from_no_networking() { + let testenv = TestEnv::new(); + testenv + .no_default_features() // Disable networking + .command() + .args(&["--update-from", "https://github.com/tldr-pages/tldr/archive/master.tar.gz"]) + .assert() + .failure() + .stderr(contains("compiled without networking support")) + .stderr(contains("cannot update the cache from a network URL")); +} + +/// Updating from an invalid URL should result in an error message. +#[test] +fn test_update_from_invalid_url() { + let testenv = TestEnv::new(); + testenv + .command() + .args(&["--update-from", "httpsss:github.com/tldr-pages/tldr/archive/master.tar.gz"]) + .assert() + .failure() + .stderr(contains("Could not update cache: HTTP error")) + .stderr(contains("URL scheme is not allowed")); +} + +/// Updating from the wrong (non-gzip-archive) URL should result in an error. +#[test] +fn test_update_from_wrong_url() { + let testenv = TestEnv::new(); + testenv + .command() + .args(&["--update-from", "https://tldr.sh/"]) + .assert() + .failure() + .stderr(contains("Could not update cache: Could not unpack compressed data")); +} + +/// When a path is specified that does not exist, an error message should be shown. +#[test] +fn test_update_from_missing_path() { + let testenv = TestEnv::new(); + testenv + .no_default_features() + .command() + .args(&["--update-from", "ajsdfasjdkfljasdf"]) // Invalid path + .assert() + .failure() + .stderr(contains("Could not update cache: Could not open file:")) + .stderr(contains("No such file or directory")); +} From 91c7a412f07c40aea563a16af0849a663b7cee6d Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Mon, 14 Jan 2019 03:28:48 -0500 Subject: [PATCH 002/368] Add support for spaces in commands (#75) For example "git commit". Fixes #74. --- src/main.rs | 5 +++-- tests/lib.rs | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 06c3f72..9784f76 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,7 +44,7 @@ const VERSION: &str = env!("CARGO_PKG_VERSION"); const USAGE: &str = " Usage: - tldr [options] + tldr [options] ... tldr [options] Options: @@ -79,7 +79,7 @@ const MAX_CACHE_AGE: i64 = 2_592_000; // 30 days #[derive(Debug, Deserialize)] struct Args { - arg_command: Option, + arg_command: Option>, flag_help: bool, flag_version: bool, flag_list: bool, @@ -303,6 +303,7 @@ fn main() { // Show command from cache if let Some(ref command) = args.arg_command { + let command = command.join("-"); // Check cache for freshness check_cache(&args, &cache); diff --git a/tests/lib.rs b/tests/lib.rs index 204c3fb..4441236 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -257,3 +257,21 @@ fn test_correct_rendering_with_config() { .success() .stdout(similar(expected)); } + +#[test] +fn test_spaces_find_command() { + let testenv = TestEnv::new(); + + testenv + .command() + .args(&["--update"]) + .assert() + .success() + .stdout(contains("Successfully updated cache.")); + + testenv + .command() + .args(&["git", "checkout"]) + .assert() + .success(); +} From 265ed66d7d61aa41dabccce1cccd9dabbb73427f Mon Sep 17 00:00:00 2001 From: Jason Liquorish Date: Fri, 9 Nov 2018 01:41:23 +0000 Subject: [PATCH 003/368] Add Windows support --- .gitattributes | 4 ++++ Cargo.lock | 35 +++++++++++++++++++++++++++++++++-- Cargo.toml | 3 +-- src/cache.rs | 27 +++++++++++++-------------- src/config.rs | 19 +++++++++---------- src/main.rs | 10 ++++++++-- tests/lib.rs | 4 ++-- 7 files changed, 70 insertions(+), 32 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..953567c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +* text=auto + +*.md eol=lf +*.expected eol=lf diff --git a/Cargo.lock b/Cargo.lock index db7c19b..91a939f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,6 +16,17 @@ name = "ansi_term" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "app_dirs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "arrayvec" version = "0.4.7" @@ -674,6 +685,15 @@ dependencies = [ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ole32-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "openssl" version = "0.10.15" @@ -1085,6 +1105,15 @@ dependencies = [ "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "shell32-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "siphasher" version = "0.2.3" @@ -1144,6 +1173,7 @@ name = "tealdeer" version = "1.1.0" dependencies = [ "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "clippy 0.0.174 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1157,11 +1187,9 @@ dependencies = [ "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1585,6 +1613,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a" "checksum ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b3568b48b7cefa6b8ce125f9bb4989e52fbcc29ebea88df04cc7c5f12f70455" +"checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" "checksum assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7ac5c260f75e4e4ba87b7342be6edcecbcb3eb6741a0507fda7ad115845cc65" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" @@ -1662,6 +1691,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e0a1a39eab95caf4f5556da9289b9e68f0aafac901b2ce80daaf020d3b733a8" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" +"checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" "checksum openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "5e1309181cdcbdb51bc3b6bedb33dfac2a83b3d585033d3f6d9e22e8c1928613" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)" = "278c1ad40a89aa1e741a1eed089a2f60b18fab8089c3139b542140fc7d674106" @@ -1710,6 +1740,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" "checksum serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "43344e7ce05d0d8280c5940cabb4964bea626aa58b1ec0e8c73fa2a8512a38ce" "checksum serde_urlencoded 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "aaed41d9fb1e2f587201b863356590c90c1157495d811430a0c0325fe8169650" +"checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" "checksum smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "622df2d454c29a4d89b30dc3b27b42d7d90d6b9e587dbf8f67652eb7514da484" diff --git a/Cargo.toml b/Cargo.toml index d4deb05..a823f71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,7 @@ path = "src/main.rs" [dependencies] ansi_term = "0.10.2" +app_dirs = "1.2.1" clippy = { version = "0.0.174", optional = true } docopt = "0.8.1" env_logger = { version = "0.5", optional = true } @@ -24,10 +25,8 @@ log = "0.4" serde = "1.0.21" serde_derive = "1.0.21" tar = "0.4.14" -time = "0.1.38" toml = "0.4.6" walkdir = "2.0.1" -xdg = "2.1.0" reqwest = "0.9.5" [dev-dependencies] diff --git a/src/cache.rs b/src/cache.rs index d08615f..052ad3b 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -9,10 +9,10 @@ use std::os::unix::fs::MetadataExt; use reqwest::{Client, Proxy}; use flate2::read::GzDecoder; use log::debug; +use app_dirs::{get_app_root, AppDataType}; +use std::time::{Duration, SystemTime}; use tar::Archive; -use time; use walkdir::{DirEntry, WalkDir}; -use xdg::BaseDirectories; use crate::error::TealdeerError::{self, CacheError, UpdateError}; use crate::types::OsType; @@ -52,12 +52,11 @@ impl Cache { } }; - // Otherwise, fall back to $XDG_CACHE_HOME/tealdeer. - let xdg_dirs = match BaseDirectories::with_prefix(crate::NAME) { - Ok(dirs) => dirs, - Err(_) => return Err(CacheError("Could not determine XDG base directory.".into())), - }; - Ok(xdg_dirs.get_cache_home()) + // Otherwise, fall back to user cache directory. + match get_app_root(AppDataType::UserCache, &crate::APP_INFO) { + Ok(dirs) => Ok(dirs), + Err(_) => Err(CacheError("Could not determine user cache directory.".into())), + } } /// Download the archive @@ -118,14 +117,14 @@ impl Cache { Ok(()) } - #[cfg(unix)] - /// Return the number of seconds since the cache directory was last modified. - pub fn last_update(&self) -> Option { + /// Return the duration since the cache directory was last modified. + pub fn last_update(&self) -> Option { if let Ok(cache_dir) = self.get_cache_dir() { if let Ok(metadata) = fs::metadata(cache_dir.join("tldr-master")) { - let mtime = metadata.mtime(); - let now = time::now_utc().to_timespec(); - return Some(now.sec - mtime); + if let Ok(mtime) = metadata.modified() { + let now = SystemTime::now(); + return now.duration_since(mtime).ok(); + }; }; }; None diff --git a/src/config.rs b/src/config.rs index 787de94..68b39b9 100644 --- a/src/config.rs +++ b/src/config.rs @@ -4,10 +4,10 @@ use std::io::{Error as IoError, Read, Write}; use std::path::PathBuf; use ansi_term::{Color, Style}; +use app_dirs::{get_app_root, AppDataType}; use log::debug; use serde_derive::{Deserialize, Serialize}; use toml; -use xdg::BaseDirectories; use crate::error::TealdeerError::{self, ConfigError}; @@ -190,7 +190,7 @@ impl Config { /// Return the path to the config directory. /// /// The config dir path can be overridden using the `TEALDEER_CONFIG_DIR` env -/// variable. Otherwise, `$XDG_CONFIG_hOME/tealdeer` is returned. +/// variable. Otherwise, the user config directory is returned. /// /// Note that this function does not verify whether the directory at that /// loation exists, or is a directory. @@ -201,14 +201,13 @@ pub fn get_config_dir() -> Result { return Ok(PathBuf::from(value)); }; - // Otherwise, fall back to $XDG_CONFIG_HOME/tealdeer. - let xdg_dirs = match BaseDirectories::with_prefix(crate::NAME) { - Ok(dirs) => dirs, - Err(_) => { - return Err(ConfigError("Could not determine XDG base directory.".into())) - } - }; - Ok(xdg_dirs.get_config_home()) + // Otherwise, fall back to the user config directory. + match get_app_root(AppDataType::UserConfig, &crate::APP_INFO) { + Ok(dirs) => Ok(dirs), + Err(_) => Err(ConfigError( + "Could not determine the user config directory.".into(), + )), + } } /// Return the path to the config file. diff --git a/src/main.rs b/src/main.rs index 9784f76..b7e8305 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,8 +20,10 @@ use std::fs::File; use std::io::BufReader; use std::path::{Path, PathBuf}; use std::process; +use std::time::Duration; use ansi_term::Color; +use app_dirs::AppInfo; use docopt::Docopt; use serde_derive::Deserialize; @@ -40,6 +42,10 @@ use crate::tokenizer::Tokenizer; use crate::types::OsType; const NAME: &str = "tealdeer"; +const APP_INFO: AppInfo = AppInfo { + name: NAME, + author: NAME, +}; const VERSION: &str = env!("CARGO_PKG_VERSION"); const USAGE: &str = " Usage: @@ -75,7 +81,7 @@ To render a local file (for testing): $ tldr --render /path/to/file.md "; const ARCHIVE_URL: &str = "https://github.com/tldr-pages/tldr/archive/master.tar.gz"; -const MAX_CACHE_AGE: i64 = 2_592_000; // 30 days +const MAX_CACHE_AGE: Duration = Duration::from_secs(2_592_000); // 30 days #[derive(Debug, Deserialize)] struct Args { @@ -131,7 +137,7 @@ fn check_cache(args: &Args, cache: &Cache) { Color::Red.paint(format!( "Cache wasn't updated for more than {} days.\n\ You should probably run `tldr --update` soon.", - MAX_CACHE_AGE / 24 / 3600 + MAX_CACHE_AGE.as_secs() / 24 / 3600 )) ); } diff --git a/tests/lib.rs b/tests/lib.rs index 4441236..b22dcc4 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -188,8 +188,8 @@ fn test_show_config_path() { .assert() .success() .stdout(contains(format!( - "Config path is: {}/config.toml", - testenv.config_dir.path().to_str().unwrap(), + "Config path is: {}", + testenv.config_dir.path().join("config.toml").to_str().unwrap(), ))); } From 495c3e97d95bbcc5f9c03a2cf8c6688656aea220 Mon Sep 17 00:00:00 2001 From: Gabriel Martinez Date: Sat, 9 Feb 2019 21:28:36 -0800 Subject: [PATCH 004/368] Support colors on Windows using ansi_term We try to enable ANSI color support on Windows using the new APIs. If that succeeds, we print colors as usual. If it fails, we disable styles completely. --- Cargo.lock | 9 ++++++--- Cargo.toml | 2 +- README.md | 2 +- bash_tealdeer | 2 +- fish_tealdeer | 2 +- src/cache.rs | 1 + src/config.rs | 16 ++++++++++++++-- src/main.rs | 23 +++++++++++++++++------ src/types.rs | 2 ++ 9 files changed, 44 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 91a939f..bb4669c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,8 +13,11 @@ dependencies = [ [[package]] name = "ansi_term" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "app_dirs" @@ -1172,7 +1175,7 @@ dependencies = [ name = "tealdeer" version = "1.1.0" dependencies = [ - "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "clippy 0.0.174 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1612,7 +1615,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a" -"checksum ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b3568b48b7cefa6b8ce125f9bb4989e52fbcc29ebea88df04cc7c5f12f70455" +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" "checksum assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7ac5c260f75e4e4ba87b7342be6edcecbcb3eb6741a0507fda7ad115845cc65" diff --git a/Cargo.toml b/Cargo.toml index a823f71..208e485 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ name = "tldr" path = "src/main.rs" [dependencies] -ansi_term = "0.10.2" +ansi_term = "0.11.0" app_dirs = "1.2.1" clippy = { version = "0.0.174", optional = true } docopt = "0.8.1" diff --git a/README.md b/README.md index 6c4fa13..e80f6ad 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ These are the clients I tried but failed to compile or run: -v --version Show version information -l --list List all commands in the cache -f --render Render a specific markdown file - -o --os Override the operating system [linux, osx, sunos] + -o --os Override the operating system [linux, osx, sunos, windows] -u --update Update the local cache -c --clear-cache Clear the local cache -q --quiet Suppress informational messages diff --git a/bash_tealdeer b/bash_tealdeer index 64efb08..5b7e55a 100644 --- a/bash_tealdeer +++ b/bash_tealdeer @@ -14,7 +14,7 @@ _tealdeer() return ;; -o|--os) - COMPREPLY=( $(compgen -W 'linux osx sunos' -- "${cur}") ) + COMPREPLY=( $(compgen -W 'linux osx sunos windows' -- "${cur}") ) return ;; esac diff --git a/fish_tealdeer b/fish_tealdeer index 9276e9a..8a71d00 100644 --- a/fish_tealdeer +++ b/fish_tealdeer @@ -7,7 +7,7 @@ complete -c tldr -s h -l help -d 'Print the help message.' -f complete -c tldr -s v -l version -d 'Show version information.' -f complete -c tldr -s l -l list -d 'List all commands in the cache.' -f complete -c tldr -s f -l render -d 'Render a specific markdown file.' -r -complete -c tldr -s o -l os -d 'Override the operating system.' -xa 'linux osx sunos other' +complete -c tldr -s o -l os -d 'Override the operating system.' -xa 'linux osx sunos windows other' complete -c tldr -s u -l update -d 'Update the local cache.' -f complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f complete -c tldr -s q -l quiet -d 'Suppress informational messages.' -f diff --git a/src/cache.rs b/src/cache.rs index 052ad3b..41b0f20 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -137,6 +137,7 @@ impl Cache { OsType::Linux => Some("linux"), OsType::OsX => Some("osx"), OsType::SunOs => None, // TODO: Does Rust support SunOS? + OsType::Windows => Some("windows"), OsType::Other => None, } } diff --git a/src/config.rs b/src/config.rs index 68b39b9..c9226cd 100644 --- a/src/config.rs +++ b/src/config.rs @@ -162,7 +162,7 @@ fn map_io_err_to_config_err(e: IoError) -> TealdeerError { } impl Config { - pub fn load() -> Result { + pub fn load(enable_styles: bool) -> Result { debug!("Loading config"); // Determine path @@ -183,7 +183,19 @@ impl Config { RawConfig::new() }; - Ok(Self::from(raw_config)) + Ok(if enable_styles { + Self::from(raw_config) + } else { + Self { + style: StyleConfig { + command_name: Style::default(), + description: Style::default(), + example_text: Style::default(), + example_code: Style::default(), + example_variable: Style::default(), + } + } + }) } } // impl Config diff --git a/src/main.rs b/src/main.rs index b7e8305..8bd2cda 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,7 +59,7 @@ Options: -v --version Show version information -l --list List all commands in the cache -f --render Render a specific markdown file - -o --os Override the operating system [linux, osx, sunos] + -o --os Override the operating system [linux, osx, sunos, windows] -u --update Update the local cache -c --clear-cache Clear the local cache -q --quiet Suppress informational messages @@ -99,13 +99,13 @@ struct Args { } /// Print page by path -fn print_page(path: &Path) -> Result<(), String> { +fn print_page(path: &Path, enable_styles: bool) -> Result<(), String> { // Open file let file = File::open(path).map_err(|msg| format!("Could not open file: {}", msg))?; let reader = BufReader::new(file); // Look up config file, if none is found fall back to default config. - let config = match Config::load() { + let config = match Config::load(enable_styles) { Ok(config) => config, Err(ConfigError(msg)) => { eprintln!("Could not load config: {}", msg); @@ -172,12 +172,18 @@ fn get_os() -> OsType { OsType::OsX } +#[cfg(target_os = "windows")] +fn get_os() -> OsType { + OsType::Windows +} + #[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", - target_os = "dragonfly")))] + target_os = "dragonfly", + target_os = "windows")))] fn get_os() -> OsType { OsType::Other } @@ -204,6 +210,11 @@ fn main() { None => get_os(), }; + #[cfg(target_os = "windows")] + let enable_styles = ansi_term::enable_ansi_support().is_ok(); + #[cfg(not(target_os = "windows"))] + let enable_styles = true; + // Initialize cache let cache = Cache::new(ARCHIVE_URL, os); @@ -279,7 +290,7 @@ fn main() { // Render local file and exit if let Some(ref file) = args.flag_render { let path = PathBuf::from(file); - if let Err(msg) = print_page(&path) { + if let Err(msg) = print_page(&path, enable_styles) { eprintln!("{}", msg); process::exit(1); } else { @@ -315,7 +326,7 @@ fn main() { // Search for command in cache if let Some(path) = cache.find_page(&command) { - if let Err(msg) = print_page(&path) { + if let Err(msg) = print_page(&path, enable_styles) { eprintln!("{}", msg); process::exit(1); } else { diff --git a/src/types.rs b/src/types.rs index 2e2c3b9..4fe5c15 100644 --- a/src/types.rs +++ b/src/types.rs @@ -11,6 +11,7 @@ pub enum OsType { Linux, OsX, SunOs, + Windows, Other, } @@ -20,6 +21,7 @@ impl fmt::Display for OsType { OsType::Linux => write!(f, "Linux"), OsType::OsX => write!(f, "macOS / BSD"), OsType::SunOs => write!(f, "SunOS"), + OsType::Windows => write!(f, "Windows"), OsType::Other => write!(f, "Unknown OS"), } } From a052e48e50962d08c97851a2c676b4a0548e55b3 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 10 Mar 2019 18:29:11 +0100 Subject: [PATCH 005/368] Update README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e80f6ad..60d1dd5 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ![teal deer](deer.png) -|Crate|Linux|macOS| -|:---:|:---:|:---:| -|[![Crates.io][crates-io-badge]][crates-io]|[![Circle CI][circle-ci-badge]][circle-ci]|[![Travis CI][travis-ci-badge]][travis-ci]| +|Crate|Linux|macOS|Windows| +|:---:|:---:|:---:|:-----:| +|[![Crates.io][crates-io-badge]][crates-io]|[![Circle CI][circle-ci-badge]][circle-ci]|[![Travis CI][travis-ci-badge]][travis-ci]|Should work™| A very fast implementation of [tldr](https://github.com/tldr-pages/tldr) in Rust: Simplified, example based and community-driven man pages. From 0879116a45d3b9794a9d0cba40ca9e07052e0f38 Mon Sep 17 00:00:00 2001 From: jdvr Date: Mon, 11 Mar 2019 10:52:12 +0100 Subject: [PATCH 006/368] Add pager support --- Cargo.lock | 39 +++++++++++++++++++++++++++++++++++++++ Cargo.toml | 4 +++- README.md | 12 ++++++++++++ src/config.rs | 20 ++++++++++++++++++++ src/main.rs | 41 ++++++++++++++++++++++++++++++++++++----- tests/config.toml | 3 +++ tests/lib.rs | 18 ++++++++++++++++++ 7 files changed, 131 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bb4669c..9d674de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -262,6 +262,25 @@ dependencies = [ "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "errno" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "escargot" version = "0.3.1" @@ -345,6 +364,11 @@ dependencies = [ "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "gcc" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "getopts" version = "0.2.18" @@ -734,6 +758,15 @@ dependencies = [ "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "pager" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parking_lot" version = "0.6.4" @@ -1184,6 +1217,7 @@ dependencies = [ "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "predicates 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1193,6 +1227,7 @@ dependencies = [ "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1645,6 +1680,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" "checksum encoding_rs 0.8.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ca20350a7cb5aab5b9034731123d6d412caf3e92d4985e739e411ba0955fd0eb" "checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" +"checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" +"checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" "checksum escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19db1f7e74438642a5018cdf263bb1325b2e792f02dd0a3ca6d6c0f0d7b1d5a5" "checksum filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "da4b9849e77b13195302c174324b5ba73eec9b236b24c221a61000daefb95c5f" "checksum flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3b0c7353385f92079524de3b7116cf99d73947c08a7472774e9b3b04bff3b901" @@ -1656,6 +1693,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797" "checksum h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7dd33bafe2e6370e6c8eb0cf1b8c5f93390b90acde7e9b03723f166b28b648ed" "checksum http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "24f58e8c2d8e886055c3ead7b28793e1455270b5fb39650984c224bc538ba581" @@ -1699,6 +1737,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)" = "278c1ad40a89aa1e741a1eed089a2f60b18fab8089c3139b542140fc7d674106" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" +"checksum pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b69ced2bfa977c4541743a7427b89c94120684791a9629941fe6028dccab6528" "checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" diff --git a/Cargo.toml b/Cargo.toml index 208e485..133434a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,12 +22,14 @@ docopt = "0.8.1" env_logger = { version = "0.5", optional = true } flate2 = "1.0" log = "0.4" +pager = "0.15" +reqwest = "0.9.5" serde = "1.0.21" serde_derive = "1.0.21" tar = "0.4.14" toml = "0.4.6" walkdir = "2.0.1" -reqwest = "0.9.5" +xdg = "2.1.0" [dev-dependencies] assert_cmd = "0.10" diff --git a/README.md b/README.md index 60d1dd5..3ff998f 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ These are the clients I tried but failed to compile or run: -o --os Override the operating system [linux, osx, sunos, windows] -u --update Update the local cache -c --clear-cache Clear the local cache + -p --pager Use a pager to page output -q --quiet Suppress informational messages --config-path Show config file path --seed-config Create a basic config @@ -177,6 +178,17 @@ Example customization: Screenshot of customized version +### Display + +Using `display` config you can customize whether the pager should be use by +default or not (default `false`). + + [display] + use_pager = true + +When enabled, `less -R` is used as pager. To override the pager command used, +set the `PAGER` environment variable. + ## Autocompletion diff --git a/src/config.rs b/src/config.rs index c9226cd..d73250b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -108,9 +108,16 @@ struct RawStyleConfig { pub example_variable: RawStyle, } +#[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] +struct RawDisplayConfig { + #[serde(default)] + pub use_pager: bool, +} + #[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] struct RawConfig { style: RawStyleConfig, + display: RawDisplayConfig, } impl RawConfig { @@ -123,6 +130,7 @@ impl RawConfig { raw_config.style.example_code.foreground = Some(RawColor::Cyan); raw_config.style.example_variable.foreground = Some(RawColor::Cyan); raw_config.style.example_variable.underline = true; + raw_config.display.use_pager = false; raw_config } @@ -137,9 +145,15 @@ pub struct StyleConfig { pub example_variable: Style, } +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct DisplayConfig { + pub use_pager: bool, +} + #[derive(Copy, Clone, Debug, PartialEq)] pub struct Config { pub style: StyleConfig, + pub display: DisplayConfig, } impl From for Config { @@ -152,6 +166,9 @@ impl From for Config { example_code: raw_config.style.example_code.into(), example_variable: raw_config.style.example_variable.into(), }, + display: DisplayConfig { + use_pager: false, + }, } } } @@ -193,6 +210,9 @@ impl Config { example_text: Style::default(), example_code: Style::default(), example_variable: Style::default(), + }, + display: DisplayConfig { + use_pager: false, } } }) diff --git a/src/main.rs b/src/main.rs index 8bd2cda..e9bef5a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,6 +25,7 @@ use std::time::Duration; use ansi_term::Color; use app_dirs::AppInfo; use docopt::Docopt; +use pager::Pager; use serde_derive::Deserialize; mod cache; @@ -62,6 +63,7 @@ Options: -o --os Override the operating system [linux, osx, sunos, windows] -u --update Update the local cache -c --clear-cache Clear the local cache + -p --pager Use a pager to page output -q --quiet Suppress informational messages --config-path Show config file path --seed-config Create a basic config @@ -81,6 +83,7 @@ To render a local file (for testing): $ tldr --render /path/to/file.md "; const ARCHIVE_URL: &str = "https://github.com/tldr-pages/tldr/archive/master.tar.gz"; +const PAGER_COMMAND: &str = "less -R"; const MAX_CACHE_AGE: Duration = Duration::from_secs(2_592_000); // 30 days #[derive(Debug, Deserialize)] @@ -93,6 +96,7 @@ struct Args { flag_os: Option, flag_update: bool, flag_clear_cache: bool, + flag_pager: bool, flag_quiet: bool, flag_config_path: bool, flag_seed_config: bool, @@ -124,6 +128,29 @@ fn print_page(path: &Path, enable_styles: bool) -> Result<(), String> { Ok(()) } +/// Set up display pager +fn configure_pager(args: &Args, enable_styles: bool) { + if args.flag_pager { + Pager::with_default_pager(PAGER_COMMAND).setup(); + } else { + let config = match Config::load(enable_styles) { + Ok(config) => config, + Err(ConfigError(msg)) => { + eprintln!("Could not load config: {}", msg); + process::exit(1); + } + Err(e) => { + eprintln!("Could not load config: {}", e); + process::exit(1); + } + }; + + if config.display.use_pager { + Pager::with_default_pager(PAGER_COMMAND).setup(); + } + } +} + /// Check the cache for freshness fn check_cache(args: &Args, cache: &Cache) { if !args.flag_update { @@ -204,17 +231,21 @@ fn main() { process::exit(0); } + // Determine the usage of styles + #[cfg(target_os = "windows")] + let enable_styles = ansi_term::enable_ansi_support().is_ok(); + #[cfg(not(target_os = "windows"))] + let enable_styles = true; + + // Configure pager + configure_pager(&args, enable_styles); + // Specify target OS let os: OsType = match args.flag_os { Some(os) => os, None => get_os(), }; - #[cfg(target_os = "windows")] - let enable_styles = ansi_term::enable_ansi_support().is_ok(); - #[cfg(not(target_os = "windows"))] - let enable_styles = true; - // Initialize cache let cache = Cache::new(ARCHIVE_URL, os); diff --git a/tests/config.toml b/tests/config.toml index 7440a82..5319e7a 100644 --- a/tests/config.toml +++ b/tests/config.toml @@ -15,3 +15,6 @@ underline = false [style.example_variable] underline = true bold = false + +[display] +use_pager = false diff --git a/tests/lib.rs b/tests/lib.rs index b22dcc4..bb1e2d3 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -275,3 +275,21 @@ fn test_spaces_find_command() { .assert() .success(); } + +#[test] +fn test_pager_flag_enable() { + let testenv = TestEnv::new(); + + testenv + .command() + .args(&["--update"]) + .assert() + .success() + .stdout(contains("Successfully updated cache.")); + + testenv + .command() + .args(&["--pager", "tar"]) + .assert() + .success(); +} From 410e96ef7f517440a31a3795d5889de7fb17751f Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 11 Mar 2019 10:53:12 +0100 Subject: [PATCH 007/368] Ensure that all config keys are optional Without this change, a config without a [display] section would fail to parse. --- src/config.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index d73250b..cad267c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -116,7 +116,9 @@ struct RawDisplayConfig { #[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] struct RawConfig { + #[serde(default)] style: RawStyleConfig, + #[serde(default)] display: RawDisplayConfig, } @@ -134,7 +136,7 @@ impl RawConfig { raw_config } -} // impl RawConfig +} #[derive(Copy, Clone, Debug, PartialEq)] pub struct StyleConfig { From 521549372040fe2d384bc1ae55c944e2f3517e59 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 11 Mar 2019 10:59:42 +0100 Subject: [PATCH 008/368] Don't override display config when styles are disabled --- src/config.rs | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/config.rs b/src/config.rs index cad267c..35d2cc6 100644 --- a/src/config.rs +++ b/src/config.rs @@ -188,7 +188,7 @@ impl Config { let config_file_path = get_config_path() .map_err(|e| ConfigError(format!("Could not determine config path: {}", e)))?; - // Load config + // Load raw config let raw_config: RawConfig = if config_file_path.exists() && config_file_path.is_file() { let mut config_file = fs::File::open(config_file_path).map_err(map_io_err_to_config_err)?; @@ -202,24 +202,23 @@ impl Config { RawConfig::new() }; - Ok(if enable_styles { - Self::from(raw_config) - } else { - Self { - style: StyleConfig { - command_name: Style::default(), - description: Style::default(), - example_text: Style::default(), - example_code: Style::default(), - example_variable: Style::default(), - }, - display: DisplayConfig { - use_pager: false, - } - } - }) + // Convert to config + let mut config = Self::from(raw_config); + + // Potentially override styles + if !enable_styles { + config.style = StyleConfig { + command_name: Style::default(), + description: Style::default(), + example_text: Style::default(), + example_code: Style::default(), + example_variable: Style::default(), + }; + } + + Ok(config) } -} // impl Config +} /// Return the path to the config directory. /// From 4304e2e61059a6da131c0cb274469b3693334192 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 11 Mar 2019 11:09:53 +0100 Subject: [PATCH 009/368] Paging: Fix bug that I introduced during merge --- src/config.rs | 2 +- src/main.rs | 31 +++++++++++++++++-------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/config.rs b/src/config.rs index 35d2cc6..dcd68cb 100644 --- a/src/config.rs +++ b/src/config.rs @@ -169,7 +169,7 @@ impl From for Config { example_variable: raw_config.style.example_variable.into(), }, display: DisplayConfig { - use_pager: false, + use_pager: raw_config.display.use_pager, }, } } diff --git a/src/main.rs b/src/main.rs index e9bef5a..668c476 100644 --- a/src/main.rs +++ b/src/main.rs @@ -130,24 +130,27 @@ fn print_page(path: &Path, enable_styles: bool) -> Result<(), String> { /// Set up display pager fn configure_pager(args: &Args, enable_styles: bool) { + // Flags have precedence if args.flag_pager { Pager::with_default_pager(PAGER_COMMAND).setup(); - } else { - let config = match Config::load(enable_styles) { - Ok(config) => config, - Err(ConfigError(msg)) => { - eprintln!("Could not load config: {}", msg); - process::exit(1); - } - Err(e) => { - eprintln!("Could not load config: {}", e); - process::exit(1); - } - }; + return; + } - if config.display.use_pager { - Pager::with_default_pager(PAGER_COMMAND).setup(); + // Then check config + let config = match Config::load(enable_styles) { + Ok(config) => config, + Err(ConfigError(msg)) => { + eprintln!("Could not load config: {}", msg); + process::exit(1); } + Err(e) => { + eprintln!("Could not load config: {}", e); + process::exit(1); + } + }; + + if config.display.use_pager { + Pager::with_default_pager(PAGER_COMMAND).setup(); } } From 535b75dc838e39df5a171687ad90dd9628785397 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 28 Jul 2019 16:31:11 +0200 Subject: [PATCH 010/368] Remove clippy from dependencies --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 133434a..651e3ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,6 @@ path = "src/main.rs" [dependencies] ansi_term = "0.11.0" app_dirs = "1.2.1" -clippy = { version = "0.0.174", optional = true } docopt = "0.8.1" env_logger = { version = "0.5", optional = true } flate2 = "1.0" From ee7c5c1e61b8c6984f882fec6dfe7368ece9044e Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 28 Jul 2019 16:31:53 +0200 Subject: [PATCH 011/368] Run cargo update --- Cargo.lock | 1574 ++++++++++++++++++++++++++++------------------------ Cargo.toml | 2 + 2 files changed, 852 insertions(+), 724 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9d674de..b07407e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "adler32" version = "1.0.3" @@ -5,10 +7,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "aho-corasick" -version = "0.6.8" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aho-corasick" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -16,7 +26,7 @@ name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -27,12 +37,12 @@ dependencies = [ "ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "arrayvec" -version = "0.4.7" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -44,175 +54,185 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "atty" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "autocfg" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "backtrace" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "backtrace-sys" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "base64" -version = "0.9.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bitflags" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bitflags" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "build_const" -version = "0.2.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byteorder" -version = "1.2.7" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "cargo_metadata" -version = "0.2.3" +name = "c2-chacha" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.25" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "clippy" -version = "0.0.174" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "clippy_lints 0.0.174 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "clippy_lints" -version = "0.0.174" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)", - "quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cookie" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cookie_store" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "publicsuffix 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "core-foundation" -version = "0.5.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "core-foundation-sys" -version = "0.5.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] -name = "crc" -version = "1.8.1" +name = "crc32fast" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-deque" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-epoch" -version = "0.6.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-queue" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-utils" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "crossbeam-utils" -version = "0.6.1" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -225,29 +245,29 @@ name = "docopt" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "dtoa" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "either" -version = "1.5.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "encoding_rs" -version = "0.8.12" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -255,11 +275,11 @@ name = "env_logger" version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -268,8 +288,8 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -278,7 +298,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "error-chain" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -286,28 +315,50 @@ name = "escargot" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "failure" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "failure_derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "filetime" -version = "0.2.1" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "flate2" -version = "1.0.4" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide_c_api 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -315,7 +366,7 @@ name = "float-cmp" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -336,12 +387,17 @@ name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -352,7 +408,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.25" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -360,8 +416,8 @@ name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -370,48 +426,60 @@ version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "getopts" -version = "0.2.18" +name = "getrandom" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "h2" -version = "0.1.13" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "http" -version = "0.1.13" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "http-body" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "httparse" -version = "1.3.3" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "humantime" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -419,40 +487,43 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.14" +version = "0.12.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper-tls" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -462,14 +533,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "if_chain" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "indexmap" version = "1.0.2" @@ -480,21 +546,13 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "itertools" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "itoa" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -508,52 +566,32 @@ dependencies = [ [[package]] name = "lazy_static" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "lazycell" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "libc" -version = "0.2.43" +version = "0.2.60" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "libflate" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "lock_api" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -563,25 +601,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "memoffset" -version = "0.2.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "mime" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -589,24 +625,24 @@ name = "mime_guess" version = "2.0.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_codegen 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "miniz-sys" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "miniz_oxide" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -614,43 +650,32 @@ dependencies = [ [[package]] name = "miniz_oxide_c_api" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio" -version = "0.6.16" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "mio-uds" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "miow" version = "0.2.1" @@ -664,19 +689,19 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.48 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -684,9 +709,9 @@ name = "net2" version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -701,15 +726,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num-traits" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "num_cpus" -version = "1.8.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -723,15 +751,15 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.15" +version = "0.10.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -741,18 +769,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.39" +version = "0.9.48" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "owning_ref" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -764,28 +793,28 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot" -version = "0.6.4" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot_core" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -795,33 +824,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "phf" -version = "0.7.23" +version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "phf_shared 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "phf_codegen" -version = "0.7.23" +version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "phf_generator 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "phf_generator" -version = "0.7.23" +version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "phf_shared 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "phf_shared" -version = "0.7.23" +version = "0.7.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -830,19 +859,24 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.14" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "ppv-lite86" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "predicates" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "float-cmp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -861,19 +895,22 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "0.4.20" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "pulldown-cmark" -version = "0.0.15" +name = "publicsuffix" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -881,146 +918,258 @@ name = "quick-error" version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "quine-mc_cluskey" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "quote" -version = "0.6.8" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" -version = "0.5.5" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "rand_core" -version = "0.2.2" +name = "rand" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "rand_core" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "redox_syscall" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "redox_termios" +name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand_chacha" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rand_core" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_jitter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_os" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "redox_syscall" +version = "0.1.56" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "regex" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" -version = "1.0.5" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "regex-syntax" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "regex-syntax" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.2" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "remove_dir_all" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "reqwest" -version = "0.9.5" +version = "0.9.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winreg 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rustc-demangle" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "rustc_version" version = "0.2.3" @@ -1031,29 +1180,24 @@ dependencies = [ [[package]] name = "ryu" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "safemem" -version = "0.3.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "same-file" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "schannel" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1061,32 +1205,28 @@ name = "scopeguard" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "scopeguard" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "security-framework" -version = "0.2.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework-sys" -version = "0.2.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1104,41 +1244,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.80" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.80" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.13 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.32" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_urlencoded" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1157,16 +1297,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "slab" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.6.6" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "spin" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "stable_deref_trait" @@ -1175,8 +1317,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "string" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "strsim" @@ -1185,22 +1330,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.13" +version = "0.15.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "synstructure" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tar" -version = "0.4.17" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1211,23 +1367,23 @@ dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "clippy 0.0.174 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide_c_api 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1235,218 +1391,178 @@ name = "tempdir" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tempfile" -version = "3.0.4" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "termcolor" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "termion" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "thread_local" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "time" -version = "0.1.40" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio" -version = "0.1.11" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-fs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-uds 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "tokio-codec" +name = "tokio-buf" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-current-thread" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-executor" -version = "0.1.5" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-fs" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-io" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-reactor" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-sync" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-tcp" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" -version = "0.1.8" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-deque 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-timer" -version = "0.2.7" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-udp" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-uds" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "toml" -version = "0.4.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1459,9 +1575,17 @@ name = "try-lock" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "try_from" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ucd-util" -version = "0.1.1" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1474,7 +1598,7 @@ dependencies = [ [[package]] name = "unicase" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1490,30 +1614,20 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-width" -version = "0.1.5" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "url" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1523,7 +1637,7 @@ dependencies = [ [[package]] name = "utf8-ranges" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1532,21 +1646,21 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "uuid" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "vcpkg" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1554,28 +1668,23 @@ name = "version_check" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "walkdir" -version = "2.2.5" +version = "2.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "want" -version = "0.0.6" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1586,7 +1695,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1605,10 +1714,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1621,8 +1730,16 @@ name = "wincolor" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winreg" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1639,203 +1756,212 @@ name = "xattr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "xdg" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" -"checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a" +"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" +"checksum aho-corasick 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "36b7aa1ccb7d7ea3f437cf025a2ab1c47cc6c1bc9fc84918ff449def12f5e282" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" -"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" +"checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" "checksum assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7ac5c260f75e4e4ba87b7342be6edcecbcb3eb6741a0507fda7ad115845cc65" -"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" -"checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" -"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" -"checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" -"checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" -"checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" -"checksum cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "be1057b8462184f634c3a208ee35b0f935cfd94b694b26deadccd98732088d7b" -"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" -"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" -"checksum clippy 0.0.174 (registry+https://github.com/rust-lang/crates.io-index)" = "1b03ded6eba74b16dbeb598be58e874bc72f6cf12f7ccc577b328091e1d4392a" -"checksum clippy_lints 0.0.174 (registry+https://github.com/rust-lang/crates.io-index)" = "9b8e508648d6d41040e0061f45fc5562b3af5c8a7d67853f15841fb531c8e984" +"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" +"checksum autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "22130e92352b948e7e82a49cdb0aa94f2211761117f29e052dd397c1ac33542b" +"checksum backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)" = "88fb679bc9af8fa639198790a77f52d345fe13656c08b43afa9424c206b731c6" +"checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" +"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" +"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" +"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" +"checksum cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "ce400c638d48ee0e9ab75aef7997609ec57367ccfe1463f21bf53c3eca67bf46" +"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980" -"checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa" -"checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" -"checksum crossbeam-deque 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe1b6f945f824c7a25afe44f62e25d714c0cc523f8e99d8db5cd1026e1269d3" -"checksum crossbeam-epoch 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2449aaa4ec7ef96e5fb24db16024b935df718e9ae1cec0a1e68feeca2efca7b8" -"checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015" -"checksum crossbeam-utils 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c55913cc2799171a550e307918c0a360e8c16004820291bf3b638969b4a01816" +"checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" +"checksum cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" +"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" +"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" +"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" +"checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" +"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" +"checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d8acd393692c503b168471874953a2531df0e9ab77d0b6bbc582395743300a4a" -"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" -"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" -"checksum encoding_rs 0.8.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ca20350a7cb5aab5b9034731123d6d412caf3e92d4985e739e411ba0955fd0eb" +"checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" +"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" +"checksum encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)" = "4155785c79f2f6701f185eb2e6b4caf0555ec03477cb4c70db67b465311620ed" "checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" "checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" "checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" +"checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" "checksum escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19db1f7e74438642a5018cdf263bb1325b2e792f02dd0a3ca6d6c0f0d7b1d5a5" -"checksum filetime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "da4b9849e77b13195302c174324b5ba73eec9b236b24c221a61000daefb95c5f" -"checksum flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3b0c7353385f92079524de3b7116cf99d73947c08a7472774e9b3b04bff3b901" +"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" +"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" +"checksum filetime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "450537dc346f0c4d738dda31e790da1da5d4bd12145aad4da0d03d713cb3794f" +"checksum flate2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "550934ad4808d5d39365e5d61727309bf18b3b02c6c56b729cb92e7dd84bc3d8" "checksum float-cmp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "134a8fa843d80a51a5b77d36d42bc2def9edcb0262c914861d08129fd1926600" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" +"checksum futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "45dc39533a6cae6da2b56da48edae506bb767ec07370f86f70fc062e9d435869" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" -"checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797" -"checksum h2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7dd33bafe2e6370e6c8eb0cf1b8c5f93390b90acde7e9b03723f166b28b648ed" -"checksum http 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "24f58e8c2d8e886055c3ead7b28793e1455270b5fb39650984c224bc538ba581" -"checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" -"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e" -"checksum hyper 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2f60ae467ef4fc5eba9a34d31648c9c8ed902faf45a217f6734ce9ea64779ac7" -"checksum hyper-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "32cd73f14ad370d3b4d4b7dce08f69b81536c82e39fcc89731930fe5788cd661" +"checksum getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "e65cce4e5084b14874c4e7097f38cab54f47ee554f9194673456ea379dcc4c55" +"checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" +"checksum http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "372bcb56f939e449117fb0869c2e8fd8753a8223d92a172c6e808cf123a5b6e4" +"checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" +"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" +"checksum hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)" = "7cb44cbce9d8ee4fb36e4c0ad7b794ac44ebaad924b9c8291a63215bb44c2c8f" +"checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -"checksum if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac95d9aa0624e7b78187d6fb8ab012b41d9f6f54b1bcb61e61c4845f8357ec" "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" -"checksum itertools 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3f2be4da1690a039e9ae5fd575f706a63ad5a2120f161b1d653c9da3930dd21" -"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" -"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" -"checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" -"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" -"checksum libflate 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "21138fc6669f438ed7ae3559d5789a5f0ba32f28c1f0608d1e452b0bb06ee936" -"checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a" -"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" +"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" +"checksum libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "d44e80633f007889c7eff624b709ab43c92d708caad982295768a7b13ca3b5eb" +"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" +"checksum log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c275b6ad54070ac2d665eef9197db647b32239c9d244bfb6f041a766d00da5b3" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b3629fe9fdbff6daa6c33b90f7c08355c1aca05a3d01fa8063b822fcf185f3b" -"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" -"checksum mime 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "0a907b83e7b9e987032439a387e187119cddafc92d5c2aaeb1d92580a793f630" +"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" +"checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f" +"checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" "checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed" -"checksum miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649" -"checksum miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ad30a47319c16cde58d0314f5d98202a80c9083b5f61178457403dfb14e509c" -"checksum miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28edaef377517fd9fe3e085c37d892ce7acd1fbeab9239c5a36eec352d8a8b7e" -"checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" -"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" +"checksum miniz-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9e3ae51cea1576ceba0dde3d484d30e6e5b86dee0b2d412fe3a16a15c98202" +"checksum miniz_oxide 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5f6d7b3dd914b70db7cef7ab9dc74339ffcadf4d033464a987237bb0b9418cd4" +"checksum miniz_oxide_c_api 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5b78ca5446dd9fe0dab00e058731b6b08a8c1d2b9cdb8efb10876e24e9ae2494" +"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum native-tls 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8e08de0070bbf4c31f452ea2a70db092f36f6f2e4d897adf5674477d488fb2" +"checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e0a1a39eab95caf4f5556da9289b9e68f0aafac901b2ce80daaf020d3b733a8" -"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" -"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" +"checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" +"checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" -"checksum openssl 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "5e1309181cdcbdb51bc3b6bedb33dfac2a83b3d585033d3f6d9e22e8c1928613" +"checksum openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)" = "8152bb5a9b5b721538462336e3bef9a539f892715e5037fda0f984577311af15" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)" = "278c1ad40a89aa1e741a1eed089a2f60b18fab8089c3139b542140fc7d674106" -"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" +"checksum openssl-sys 0.9.48 (registry+https://github.com/rust-lang/crates.io-index)" = "b5ba300217253bcc5dc68bed23d782affa45000193866e025329aa8a7a9f05b8" +"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b69ced2bfa977c4541743a7427b89c94120684791a9629941fe6028dccab6528" -"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" -"checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" +"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" +"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum phf 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "cec29da322b242f4c3098852c77a0ca261c9c01b806cae85a5572a1eb94db9a6" -"checksum phf_codegen 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "7d187f00cd98d5afbcd8898f6cf181743a449162aeb329dcd2f3849009e605ad" -"checksum phf_generator 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "03dc191feb9b08b0dc1330d6549b795b9d81aec19efe6b4a45aec8d4caee0c4b" -"checksum phf_shared 0.7.23 (registry+https://github.com/rust-lang/crates.io-index)" = "b539898d22d4273ded07f64a05737649dc69095d92cb87c7097ec68e3f150b93" -"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" -"checksum predicates 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa984b7cd021a0bf5315bcce4c4ae61d2a535db2a8d288fc7578638690a7b7c3" +"checksum phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" +"checksum phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" +"checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" +"checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" +"checksum pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c1d2cfa5a714db3b5f24f0915e74fcdf91d09d496ba61329705dda7774d2af" +"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" +"checksum predicates 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "53e09015b0d3f5a0ec2d4428f7559bb7b3fff341b4e159fedd1d57fac8b939ff" "checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" "checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" -"checksum proc-macro2 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3d7b7eaaa90b4a90a932a9ea6666c95a389e424eff347f0f793979289429feee" -"checksum pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "378e941dbd392c101f2cb88097fa4d7167bc421d4b88de3ff7dbee503bc3233b" +"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +"checksum publicsuffix 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5afecba86dcf1e4fd610246f89899d1924fe12e1e89f555eb7c7f710f3c5ad1d" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45" -"checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5" -"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" -"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" -"checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372" -"checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db" -"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" -"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" +"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +"checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" +"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +"checksum rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" +"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" +"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +"checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" +"checksum rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" +"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" +"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" -"checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341" -"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" +"checksum regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b23da8dfd98a84bd7e08700190a5d9f7d2d38abd4369dd1dae651bc40bfd2cc" "checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" -"checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" -"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" -"checksum reqwest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ab52e462d1e15891441aeefadff68bdea005174328ce3da0a314f2ad313ec837" +"checksum regex-syntax 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5485bf1523a9ed51c4964273f22f63f24e31632adb5dad134f488f86a3875c" +"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +"checksum reqwest 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)" = "1d0777154c2c3eb54f5c480db01de845652d941e47191277cc673634c3853939" +"checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7153dd96dade874ab973e098cb62fcdbb89a03682e46b144fd09550998d4a4a7" -"checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" -"checksum same-file 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f7794e2fda7f594866840e95f5c5962e886e228e68b6505885811a94dd728c" -"checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56" +"checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" +"checksum schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f6abf258d99c3c1c5c2131d99d064e94b7b3dd5f416483057f308fea253339" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" -"checksum security-framework 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "697d3f3c23a618272ead9e1fb259c1411102b31c6af8b93f1d64cca9c3b0e8e0" -"checksum security-framework-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab01dfbe5756785b5b4d46e0289e5a18071dfa9a7c2b24213ea00b9ef9b665bf" -"checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" +"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" +"checksum security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2" +"checksum security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef" -"checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" -"checksum serde_json 1.0.32 (registry+https://github.com/rust-lang/crates.io-index)" = "43344e7ce05d0d8280c5940cabb4964bea626aa58b1ec0e8c73fa2a8512a38ce" -"checksum serde_urlencoded 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "aaed41d9fb1e2f587201b863356590c90c1157495d811430a0c0325fe8169650" +"checksum serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)" = "d46b3dfedb19360a74316866cef04687cd4d6a70df8e6a506c63512790769b72" +"checksum serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)" = "c22a0820adfe2f257b098714323563dd06426502abbbce4f51b72ef544c5027f" +"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +"checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" "checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" -"checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" -"checksum smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "622df2d454c29a4d89b30dc3b27b42d7d90d6b9e587dbf8f67652eb7514da484" +"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" +"checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" -"checksum string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00caf261d6f90f588f8450b8e1230fa0d5be49ee6140fdfbcb55335aff350970" +"checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" -"checksum syn 0.15.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4439ee8325b4e4b57e59309c3724c9a4478eaeb4eb094b6f3fac180a3b2876" -"checksum tar 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)" = "83b0d14b53dbfd62681933fadd651e815f99e6084b649e049ab99296e05ab3de" +"checksum syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)" = "eadc09306ca51a40555dd6fc2b415538e9e18bc9f870e47b1a524a79fe2dcf5e" +"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" +"checksum tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "b3196bfbffbba3e57481b6ea32249fbaf590396a52505a2615adbb79d9d826d3" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "55c1195ef8513f3273d55ff59fe5da6940287a0d7a98331254397f464833675b" -"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" -"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" +"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +"checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" -"checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" -"checksum tokio 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6e93c78d23cc61aa245a8acd2c4a79c4d7fa7fb5c3ca90d5737029f043a84895" -"checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" -"checksum tokio-current-thread 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f90fcd90952f0a496d438a976afba8e5c205fb12123f813d8ab3aa1c8436638c" -"checksum tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c117b6cf86bb730aab4834f10df96e4dd586eff2c3c27d3781348da49e255bde" -"checksum tokio-fs 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "60ae25f6b17d25116d2cba342083abe5255d3c2c79cb21ea11aa049c53bf7c75" -"checksum tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "7392fe0a70d5ce0c882c4778116c519bd5dbaa8a7c3ae3d04578b3afafdcda21" -"checksum tokio-reactor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4b26fd37f1125738b2170c80b551f69ff6fecb277e6e5ca885e53eec2b005018" -"checksum tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad235e9dadd126b2d47f6736f65aa1fdcd6420e66ca63f44177bc78df89f912" -"checksum tokio-threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3929aee321c9220ed838ed6c3928be7f9b69986b0e3c22c972a66dbf8a298c68" -"checksum tokio-timer 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3a52f00c97fedb6d535d27f65cccb7181c8dd4c6edc3eda9ea93f6d45d05168e" -"checksum tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "da941144b816d0dcda4db3a1ba87596e4df5e860a72b70783fe435891f80601c" -"checksum tokio-uds 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "df195376b43508f01570bacc73e13a1de0854dc59e79d1ec09913e8db6dd2a70" -"checksum toml 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "4a2ecc31b0351ea18b3fe11274b8db6e4d82bce861bbb22e6dbed40417902c65" +"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" +"checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" +"checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" +"checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" +"checksum tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac" +"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" +"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" +"checksum tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2162248ff317e2bc713b261f242b69dbb838b85248ed20bb21df56d60ea4cae7" +"checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" +"checksum tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "90ca01319dea1e376a001e8dc192d42ebde6dd532532a5bad988ac37db365b19" +"checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" +"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" "checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" -"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" +"checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" +"checksum ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa9b3b49edd3468c0e6565d85783f51af95212b6fa3986a5500954f00b460874" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" +"checksum unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" -"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" +"checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" -"checksum utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd70f467df6810094968e2fce0ee1bd0e87157aceb026a8c083bcf5e25b9efe4" +"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" +"checksum utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9d50aa7650df78abf942826607c62468ce18d9019673d4a2ebe1865dbb96ffde" "checksum utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "055058552ca15c566082fc61da433ae678f78986a6f16957e33162d1b218792a" -"checksum uuid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dab5c5526c5caa3d106653401a267fed923e7046f35895ffcb5ca42db64942e6" -"checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" +"checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" +"checksum vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "33dd455d0f96e90a75803cfeb7f948768c08d70a6de9a8d2362461935698bf95" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum walkdir 2.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "af464bc7be7b785c7ac72e266a6b67c4c9070155606f51655a650a6686204e35" -"checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3" +"checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e" +"checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" +"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" +"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" +"checksum winreg 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73f1f3c6c4d3cab118551b96c476a2caab920701e28875b64a458f2ecb96ec9d" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" -"checksum xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a66b7c2281ebde13cf4391d70d4c7e5946c3c25e72a7b859ca8f677dcd0b0c61" +"checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" diff --git a/Cargo.toml b/Cargo.toml index 651e3ad..bca0480 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,9 @@ docopt = "0.8.1" env_logger = { version = "0.5", optional = true } flate2 = "1.0" log = "0.4" +miniz_oxide_c_api = "<=0.2.2" # Dependency of flate2, used to keep compatibility with Rust 1.31 pager = "0.15" +getrandom = "<0.1.6" # Dependency on macOS, used to keep compatibility with Rust 1.31 reqwest = "0.9.5" serde = "1.0.21" serde_derive = "1.0.21" From 4b0c947030c8b70f8037642a52366fce9447668f Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 28 Jul 2019 17:47:14 +0200 Subject: [PATCH 012/368] Require Rust 1.32 (was 1.31) --- .circleci/config.yml | 2 +- .travis.yml | 2 +- Cargo.toml | 3 +-- README.md | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f432d19..5b3e82b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: rust:1.31 + - image: rust:1.32 steps: - checkout # Load cargo target from cache if possible. diff --git a/.travis.yml b/.travis.yml index 3bf39a9..4a81b0e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: rust os: osx rust: - - 1.31.0 + - 1.32.0 - stable cache: cargo script: cargo test diff --git a/Cargo.toml b/Cargo.toml index bca0480..f374a4d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,9 +21,8 @@ docopt = "0.8.1" env_logger = { version = "0.5", optional = true } flate2 = "1.0" log = "0.4" -miniz_oxide_c_api = "<=0.2.2" # Dependency of flate2, used to keep compatibility with Rust 1.31 +miniz_oxide_c_api = "<=0.2.2" # Dependency of flate2, used to keep compatibility with Rust 1.32 pager = "0.15" -getrandom = "<0.1.6" # Dependency on macOS, used to keep compatibility with Rust 1.31 reqwest = "0.9.5" serde = "1.0.21" serde_derive = "1.0.21" diff --git a/README.md b/README.md index 3ff998f..637288b 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ tealdeer has been added to a few package managers: ### From Source (any platform) -tealdeer requires at least Rust 1.31. +tealdeer requires at least Rust 1.32. Debug build with logging enabled: From 135698b5d9c47e9a7654831f5f0e3f4b707309d7 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 28 Jul 2019 16:35:20 +0200 Subject: [PATCH 013/368] Upgrade cargo-toml --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b07407e..fc9432a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1380,7 +1380,7 @@ dependencies = [ "serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1559,7 +1559,7 @@ dependencies = [ [[package]] name = "toml" -version = "0.4.10" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1936,7 +1936,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" "checksum tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "90ca01319dea1e376a001e8dc192d42ebde6dd532532a5bad988ac37db365b19" "checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" -"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" +"checksum toml 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b8c96d7873fa7ef8bdeb3a9cda3ac48389b4154f32b9803b4bc26220b677b039" "checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" diff --git a/Cargo.toml b/Cargo.toml index f374a4d..558a3b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ reqwest = "0.9.5" serde = "1.0.21" serde_derive = "1.0.21" tar = "0.4.14" -toml = "0.4.6" +toml = "0.5.1" walkdir = "2.0.1" xdg = "2.1.0" From 70cea2245d1f9c205b3a930de126115c83462683 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 28 Jul 2019 16:36:42 +0200 Subject: [PATCH 014/368] Upgrade docopt --- Cargo.lock | 45 +++++++-------------------------------------- Cargo.toml | 2 +- 2 files changed, 8 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fc9432a..0731700 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,14 +5,6 @@ name = "adler32" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "aho-corasick" -version = "0.6.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "aho-corasick" version = "0.7.4" @@ -242,14 +234,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "docopt" -version = "0.8.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1084,18 +1076,6 @@ name = "redox_syscall" version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "regex" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "regex" version = "1.2.0" @@ -1108,14 +1088,6 @@ dependencies = [ "utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "regex-syntax" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "regex-syntax" version = "0.6.10" @@ -1325,7 +1297,7 @@ dependencies = [ [[package]] name = "strsim" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1367,7 +1339,7 @@ dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", + "docopt 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1766,7 +1738,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" -"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" "checksum aho-corasick 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "36b7aa1ccb7d7ea3f437cf025a2ab1c47cc6c1bc9fc84918ff449def12f5e282" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" @@ -1794,7 +1765,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" -"checksum docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d8acd393692c503b168471874953a2531df0e9ab77d0b6bbc582395743300a4a" +"checksum docopt 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "db2906c2579b5b7207fc1e328796a9a8835dc44e22dbe8e460b1d636f9a7b225" "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" "checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" "checksum encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)" = "4155785c79f2f6701f185eb2e6b4caf0555ec03477cb4c70db67b465311620ed" @@ -1889,9 +1860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" "checksum regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b23da8dfd98a84bd7e08700190a5d9f7d2d38abd4369dd1dae651bc40bfd2cc" -"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" "checksum regex-syntax 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5485bf1523a9ed51c4964273f22f63f24e31632adb5dad134f488f86a3875c" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" "checksum reqwest 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)" = "1d0777154c2c3eb54f5c480db01de845652d941e47191277cc673634c3853939" @@ -1917,7 +1886,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" +"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" "checksum syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)" = "eadc09306ca51a40555dd6fc2b415538e9e18bc9f870e47b1a524a79fe2dcf5e" "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" "checksum tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "b3196bfbffbba3e57481b6ea32249fbaf590396a52505a2615adbb79d9d826d3" diff --git a/Cargo.toml b/Cargo.toml index 558a3b2..33140e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ path = "src/main.rs" [dependencies] ansi_term = "0.11.0" app_dirs = "1.2.1" -docopt = "0.8.1" +docopt = "<1.1" env_logger = { version = "0.5", optional = true } flate2 = "1.0" log = "0.4" From 8ae19fd32e6fdf3416a0f431275529ad6b0a280b Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 28 Jul 2019 16:38:54 +0200 Subject: [PATCH 015/368] Upgrade env_logger --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0731700..9833e9f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -264,7 +264,7 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.5.13" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1340,7 +1340,7 @@ dependencies = [ "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1769,7 +1769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" "checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" "checksum encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)" = "4155785c79f2f6701f185eb2e6b4caf0555ec03477cb4c70db67b465311620ed" -"checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" +"checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" "checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" "checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" "checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" diff --git a/Cargo.toml b/Cargo.toml index 33140e4..28b35d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ path = "src/main.rs" ansi_term = "0.11.0" app_dirs = "1.2.1" docopt = "<1.1" -env_logger = { version = "0.5", optional = true } +env_logger = { version = "0.6", optional = true } flate2 = "1.0" log = "0.4" miniz_oxide_c_api = "<=0.2.2" # Dependency of flate2, used to keep compatibility with Rust 1.32 From 2d0d621e3dfa70b3465fba75f6b0e1f626f4138d Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 28 Jul 2019 17:05:30 +0200 Subject: [PATCH 016/368] CI: Bump cache key to speed up tests --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5b3e82b..2ac81e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,8 +9,8 @@ jobs: # Multiple caches are used to increase the chance of a cache hit. - restore_cache: keys: - - v1-cargo-cache-{{ arch }}-{{ .Branch }} - - v1-cargo-cache-{{ arch }} + - v2-cargo-cache-{{ arch }}-{{ .Branch }} + - v2-cargo-cache-{{ arch }} # Show versions - run: rustc --version && cargo --version @@ -23,12 +23,12 @@ jobs: - run: cargo test - save_cache: - key: v1-cargo-cache-{{ arch }}-{{ .Branch }} + key: v2-cargo-cache-{{ arch }}-{{ .Branch }} paths: - target - /usr/local/cargo - save_cache: - key: v1-cargo-cache-{{ arch }} + key: v2-cargo-cache-{{ arch }} paths: - target - /usr/local/cargo From 79d5f9f4ed9e25b13f4d13a86208a8f16b68ca07 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 10 Aug 2019 00:18:52 +0200 Subject: [PATCH 017/368] Cargo.toml: Add more includes --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 28b35d3..dec7c98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ name = "tealdeer" readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" version = "1.1.0" -include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "/bash_tealdeer"] +include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "/bash_tealdeer", "/fish_tealdeer"] edition = "2018" [[bin]] From 8dc480e10f1139bda0ed52e580f9758feedd13c5 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 10 Aug 2019 00:21:32 +0200 Subject: [PATCH 018/368] Release v1.2.0 --- CHANGELOG.md | 36 ++++++++++++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed03204..f0583ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,32 @@ Possible log types: - `[security]` to invite users to upgrade in case of vulnerabilities. +### [v1.2.0][v1.2.0] (2019-08-10) + +- [added] Add Windows support ([#77][i77]) +- [added] Add support for spaces in commands ([#75][i75]) +- [added] Add support for Fish-based autocompletion ([#71][i71]) +- [added] Add pager support ([#44][i44]) +- [added] Print detected OS with `-v` / `--version` ([#57][i57]) +- [changed] OS detection: Treat BSDs as "osx" ([#58][i58]) +- [changed] Move from curl to reqwest ([#61][i61]) +- [changed] Move to Rust 2018, require Rust 1.32 ([#69][i69] / [#84][i84]) +- [fixed] Add (back) support for proxies ([#68][i68]) + +Contributors to this version: + +- [@aldanor][@aldanor] +- [@Bassets][@Bassets] +- [@das-g][@das-g] +- [@jcgruenhage][@jcgruenhage] +- [@jdvr][@jdvr] +- [@jedahan][@jedahan] +- [@mystal][@mystal] +- [@natpen][@natpen] + +Thanks! + + ### [v1.1.0][v1.1.0] (2018-10-22) - [added] Configuration file support ([#43][i43]) @@ -59,8 +85,18 @@ Thanks! [v1.0.0]: https://github.com/dbrgn/tealdeer/compare/v0.4.0...v1.0.0 [v1.1.0]: https://github.com/dbrgn/tealdeer/compare/v1.0.0...v1.1.0 +[v1.2.0]: https://github.com/dbrgn/tealdeer/compare/v1.1.0...v1.2.0 [i34]: https://github.com/dbrgn/tealdeer/issues/34 [i43]: https://github.com/dbrgn/tealdeer/issues/43 +[i44]: https://github.com/dbrgn/tealdeer/issues/44 [i47]: https://github.com/dbrgn/tealdeer/issues/47 [i48]: https://github.com/dbrgn/tealdeer/issues/48 +[i57]: https://github.com/dbrgn/tealdeer/issues/57 +[i58]: https://github.com/dbrgn/tealdeer/issues/58 +[i61]: https://github.com/dbrgn/tealdeer/issues/61 +[i68]: https://github.com/dbrgn/tealdeer/issues/68 +[i69]: https://github.com/dbrgn/tealdeer/issues/69 +[i75]: https://github.com/dbrgn/tealdeer/issues/75 +[i77]: https://github.com/dbrgn/tealdeer/issues/77 +[i84]: https://github.com/dbrgn/tealdeer/issues/84 diff --git a/Cargo.lock b/Cargo.lock index 9833e9f..a076c8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1334,7 +1334,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.1.0" +version = "1.2.0" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index dec7c98..42a6d2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT/Apache-2.0" name = "tealdeer" readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" -version = "1.1.0" +version = "1.2.0" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "/bash_tealdeer", "/fish_tealdeer"] edition = "2018" From 3d77af1fa32ccd3bb3b8d54f9f028cd3451164a4 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 10 Aug 2019 00:31:10 +0200 Subject: [PATCH 019/368] CHANGELOG: Fix contributors --- CHANGELOG.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0583ad..b633d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,9 +79,16 @@ Thanks! - First crates.io release -[@equal-l2]: https://github.com/equal-l2 -[@jedahan]: https://github.com/jedahan +[@Bassets]: https://github.com/Bassets [@Voultapher]: https://github.com/Voultapher +[@aldanor]: https://github.com/aldanor +[@das-g]: https://github.com/das-g +[@equal-l2]: https://github.com/equal-l2 +[@jcgruenhage]: https://github.com/jcgruenhage +[@jdvr]: https://github.com/jdvr +[@jedahan]: https://github.com/jedahan +[@mystal]: https://github.com/mystal +[@natpen]: https://github.com/natpen [v1.0.0]: https://github.com/dbrgn/tealdeer/compare/v0.4.0...v1.0.0 [v1.1.0]: https://github.com/dbrgn/tealdeer/compare/v1.0.0...v1.1.0 From ee6547893039424d003b0b92cdb85a82573d3516 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 10 Aug 2019 00:31:34 +0200 Subject: [PATCH 020/368] CHANGELOG: Add missing reference --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b633d0e..176be57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -104,6 +104,7 @@ Thanks! [i61]: https://github.com/dbrgn/tealdeer/issues/61 [i68]: https://github.com/dbrgn/tealdeer/issues/68 [i69]: https://github.com/dbrgn/tealdeer/issues/69 +[i71]: https://github.com/dbrgn/tealdeer/issues/71 [i75]: https://github.com/dbrgn/tealdeer/issues/75 [i77]: https://github.com/dbrgn/tealdeer/issues/77 [i84]: https://github.com/dbrgn/tealdeer/issues/84 From ece174e1fc9c59859b044aedd11af31dfdd722c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Renaud?= Date: Tue, 27 Aug 2019 03:11:06 -0400 Subject: [PATCH 021/368] Add zsh autocompletion (#86) --- README.md | 1 + zsh_tealdeer | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 zsh_tealdeer diff --git a/README.md b/README.md index 637288b..b0e7a42 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,7 @@ set the `PAGER` environment variable. - *Bash*: copy `bash_tealdeer` to `/usr/share/bash-completion/completions/tldr` - *Fish*: copy `fish_tealdeer` to `~/.config/fish/completions/tldr.fish` +- *Zsh*: copy `zsh_tealdeer` to `/usr/share/zsh/site-functions/_tldr` ## Development diff --git a/zsh_tealdeer b/zsh_tealdeer new file mode 100644 index 0000000..93528a0 --- /dev/null +++ b/zsh_tealdeer @@ -0,0 +1,37 @@ +#compdef tldr + +_applications() { + _values 'applications' "${(uonzf)$(tldr --list | sed -e 's/, /\n/g')}" +} + +_tealdeer() { + local I="-h --help -v --version" + integer ret=1 + local -a args + + args+=( + "($I -l --list)"{-l,--list}"[List all commands in the cache]" + "($I -f --render)"{-f,--render}"[Render a specific markdown file]:file:_files" + "($I -o --os)"{-o,--os}'[Override the operating system]:os:(( + linux + osx + sunos + windows + ))' + "($I -u --update)"{-u,--update}"[Update the local cache]" + "($I -c --clear-cache)"{-c,--clear-cache}"[Clear the local cache]" + "($I -p --pager)"{-p,--pager}"[Use a pager to page output]" + "($I -q --quiet)"{-q,--quiet}"[Suppress informational messages]" + "($I)--config-path[Show config file path]" + "($I)--seed-config[Create a basic config]" + '(- *)'{-h,--help}'[Display help]' + '(- *)'{-v,--version}'[Show version information]' + '*:file:_files' + '1: :_applications' + ) + + _arguments $args[@] && ret=0 + return ret +} + +_tealdeer From 15583fc6d0c1a1a01d0a6d378fe951f9b7b7e8ba Mon Sep 17 00:00:00 2001 From: James Doyle Date: Tue, 27 Aug 2019 15:51:35 -0700 Subject: [PATCH 022/368] Use `string replace` instead of `sed` (#87) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems like this was broken on my machine (OSX, 10.14.6) when using the completions. It would strip the `, ` but it would not add a proper newline. Instead it added nothing. So it just become a giant single line. Basically, it didn’t work. With this change, the string gets split properly. Since this is fish shell, the `string replace` command is guaranteed to be there. --- fish_tealdeer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish_tealdeer b/fish_tealdeer index 8a71d00..b9db05b 100644 --- a/fish_tealdeer +++ b/fish_tealdeer @@ -15,7 +15,7 @@ complete -c tldr -l config-path -d 'Show config file path.' -f complete -c tldr -l seed-config -d 'Create a basic config.' -f function __tealdeer_entries - tldr --list | sed -e 's/, /\n/g' + tldr --list | string replace -a -i -r "\,\s" "\n" end complete -f -c tldr -a '(__tealdeer_entries)' From a9f2a4c1328cbba6b4f606afb4437443ab3bde41 Mon Sep 17 00:00:00 2001 From: Korrat Date: Thu, 3 Oct 2019 11:43:24 +0200 Subject: [PATCH 023/368] Add config field for compact output --- src/config.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config.rs b/src/config.rs index dcd68cb..42d5311 100644 --- a/src/config.rs +++ b/src/config.rs @@ -110,6 +110,8 @@ struct RawStyleConfig { #[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] struct RawDisplayConfig { + #[serde(default)] + pub compact: bool, #[serde(default)] pub use_pager: bool, } @@ -149,6 +151,7 @@ pub struct StyleConfig { #[derive(Copy, Clone, Debug, PartialEq)] pub struct DisplayConfig { + pub compact: bool, pub use_pager: bool, } @@ -169,6 +172,7 @@ impl From for Config { example_variable: raw_config.style.example_variable.into(), }, display: DisplayConfig { + compact: raw_config.display.compact, use_pager: raw_config.display.use_pager, }, } From 7f8cbb01e5b133ededf381fde12ed914069bd226 Mon Sep 17 00:00:00 2001 From: Korrat Date: Thu, 3 Oct 2019 11:55:07 +0200 Subject: [PATCH 024/368] Suppress empty lines for compact output --- src/formatter.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/formatter.rs b/src/formatter.rs index 488f8ed..40ec5bf 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -57,7 +57,11 @@ where let mut command = String::new(); while let Some(token) = tokenizer.next_token() { match token { - LineType::Empty => println!(), + LineType::Empty => { + if !config.display.compact { + println!() + } + } LineType::Title(title) => { debug!("Ignoring title"); From 6810693655f2467024781a976b49628447675243 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 3 Oct 2019 23:56:07 +0200 Subject: [PATCH 025/368] Document compact output option in README --- README.md | 15 +++++++++++++-- tests/config.toml | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b0e7a42..a32abe3 100644 --- a/README.md +++ b/README.md @@ -180,8 +180,11 @@ Example customization: ### Display -Using `display` config you can customize whether the pager should be use by -default or not (default `false`). +In the `display` section you can configure the output format. + +#### `use_pager` + +Specifies whether the pager should be used by default or not (default `false`). [display] use_pager = true @@ -189,6 +192,14 @@ default or not (default `false`). When enabled, `less -R` is used as pager. To override the pager command used, set the `PAGER` environment variable. +#### `compact` + +Set this to enforce more compact output, where empty lines are stripped out +(default `false`). + + [display] + compact = true + ## Autocompletion diff --git a/tests/config.toml b/tests/config.toml index 5319e7a..c3a9cd6 100644 --- a/tests/config.toml +++ b/tests/config.toml @@ -18,3 +18,4 @@ bold = false [display] use_pager = false +compact = false From 7460cdac6db8d9c626b690fed5655002f6bb065f Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 4 Oct 2019 01:01:05 +0200 Subject: [PATCH 026/368] Remove unused import --- src/cache.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 41b0f20..ea42af0 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -3,9 +3,6 @@ use std::fs; use std::io::Read; use std::path::PathBuf; -#[cfg(unix)] -use std::os::unix::fs::MetadataExt; - use reqwest::{Client, Proxy}; use flate2::read::GzDecoder; use log::debug; From 74c37193e303fb13302c6829b086cf84e2a9b817 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 4 Oct 2019 01:03:41 +0200 Subject: [PATCH 027/368] Use non-deprecated trim functions --- src/tokenizer.rs | 2 +- src/types.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 7c33740..2e7b394 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -63,7 +63,7 @@ where } self.first_line = false; self.format = TldrFormat::V2; - return Some(LineType::Title(self.current_line.trim_right().to_string())); + return Some(LineType::Title(self.current_line.trim_end().to_string())); } if self.first_line { diff --git a/src/types.rs b/src/types.rs index 4fe5c15..5741a18 100644 --- a/src/types.rs +++ b/src/types.rs @@ -40,23 +40,23 @@ pub enum LineType { impl<'a> From<&'a str> for LineType { /// Convert a string slice to a LineType. Newlines and trailing whitespace are trimmed. fn from(line: &'a str) -> Self { - let trimmed: &str = line.trim_right(); + let trimmed: &str = line.trim_end(); let mut chars = trimmed.chars(); match chars.next() { None => LineType::Empty, Some('#') => LineType::Title( trimmed - .trim_left_matches(|chr: char| chr == '#' || chr.is_whitespace()) + .trim_start_matches(|chr: char| chr == '#' || chr.is_whitespace()) .into(), ), Some('>') => LineType::Description( trimmed - .trim_left_matches(|chr: char| chr == '>' || chr.is_whitespace()) + .trim_start_matches(|chr: char| chr == '>' || chr.is_whitespace()) .into(), ), Some(' ') => LineType::ExampleCode( trimmed - .trim_left_matches(|chr: char| chr.is_whitespace()) + .trim_start_matches(|chr: char| chr.is_whitespace()) .into(), ), _ => LineType::ExampleText(trimmed.into()), @@ -74,17 +74,17 @@ impl LineType { None => LineType::Empty, Some('#') => LineType::Title( trimmed - .trim_left_matches(|chr: char| chr == '#' || chr.is_whitespace()) + .trim_start_matches(|chr: char| chr == '#' || chr.is_whitespace()) .into(), ), Some('>') => LineType::Description( trimmed - .trim_left_matches(|chr: char| chr == '>' || chr.is_whitespace()) + .trim_start_matches(|chr: char| chr == '>' || chr.is_whitespace()) .into(), ), Some('-') => LineType::ExampleText( trimmed - .trim_left_matches(|chr: char| chr == '-' || chr.is_whitespace()) + .trim_start_matches(|chr: char| chr == '-' || chr.is_whitespace()) .into(), ), Some('`') if chars.last() == Some('`') => LineType::ExampleCode( From 94c0e99693bc43dec88a741f0c5b6fd3bc0875e1 Mon Sep 17 00:00:00 2001 From: Bruno Heridet Date: Tue, 29 Oct 2019 13:54:06 +0100 Subject: [PATCH 028/368] Fix typo in error message for flag_seed_config (#91) --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 668c476..8de5ef0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -234,7 +234,7 @@ fn main() { process::exit(0); } - // Determine the usage of styles + // Determine the usage of styles #[cfg(target_os = "windows")] let enable_styles = ansi_term::enable_ansi_support().is_ok(); #[cfg(not(target_os = "windows"))] @@ -314,7 +314,7 @@ fn main() { process::exit(1); } Err(_) => { - eprintln!("Unkown error"); + eprintln!("Unknown error"); process::exit(1); } } From 6ad91a440c50c8d80468aa1565153af3126525a0 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 27 Nov 2019 10:58:21 +0100 Subject: [PATCH 029/368] Update dependencies, increase MSRV to 1.36 (#92) --- .circleci/config.yml | 2 +- .travis.yml | 2 +- CHANGELOG.md | 5 + Cargo.lock | 989 ++++++++++++++++++++----------------------- Cargo.toml | 9 +- README.md | 2 +- 6 files changed, 474 insertions(+), 535 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ac81e2..f542732 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: rust:1.32 + - image: rust:1.36 steps: - checkout # Load cargo target from cache if possible. diff --git a/.travis.yml b/.travis.yml index 4a81b0e..d804029 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: rust os: osx rust: - - 1.32.0 + - 1.36.0 - stable cache: cargo script: cargo test diff --git a/CHANGELOG.md b/CHANGELOG.md index 176be57..cd45670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ Possible log types: - `[security]` to invite users to upgrade in case of vulnerabilities. +### Unreleased + +- [changed] Update dependencies (?) +- [changed] Require at least Rust 1.36 to build (previous: 1.32) + ### [v1.2.0][v1.2.0] (2019-08-10) - [added] Add Windows support ([#77][i77]) diff --git a/Cargo.lock b/Cargo.lock index a076c8c..8c77226 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,12 +2,12 @@ # It is not intended for manual editing. [[package]] name = "adler32" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "aho-corasick" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -15,10 +15,10 @@ dependencies = [ [[package]] name = "ansi_term" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -32,21 +32,13 @@ dependencies = [ "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "arrayvec" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "assert_cmd" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -56,33 +48,33 @@ name = "atty" version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "autocfg" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "backtrace" -version = "0.3.33" +version = "0.3.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace-sys" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -95,7 +87,7 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -109,27 +101,26 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "c2-chacha" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.38" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -137,7 +128,7 @@ name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -155,12 +146,12 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "publicsuffix 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "publicsuffix 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -172,7 +163,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -185,28 +176,28 @@ name = "crc32fast" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-deque" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-epoch" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -223,8 +214,18 @@ name = "crossbeam-utils" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-utils" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -234,14 +235,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "docopt" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -251,26 +251,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "either" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "encoding_rs" -version = "0.8.17" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "env_logger" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -280,8 +280,8 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -290,7 +290,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -298,7 +298,6 @@ name = "error-chain" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -307,58 +306,58 @@ name = "escargot" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "failure" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "failure_derive" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "filetime" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "flate2" -version = "1.0.9" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide_c_api 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "float-cmp" -version = "0.4.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -389,7 +388,7 @@ name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -400,7 +399,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -408,8 +407,8 @@ name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -419,11 +418,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "getrandom" -version = "0.1.6" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -434,18 +434,26 @@ dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hermit-abi" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "http" -version = "0.1.18" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -459,8 +467,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -471,7 +479,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "humantime" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -479,19 +487,19 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.33" +version = "0.12.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -499,9 +507,9 @@ dependencies = [ "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -512,8 +520,8 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -525,21 +533,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "idna" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "indexmap" -version = "1.0.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "iovec" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -558,32 +578,28 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "libc" -version = "0.2.60" +version = "0.2.65" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lock_api" -version = "0.1.5" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -591,6 +607,11 @@ name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "memchr" version = "2.2.1" @@ -598,7 +619,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memoffset" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -606,49 +627,24 @@ dependencies = [ [[package]] name = "mime" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "mime_guess" -version = "2.0.0-alpha.6" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miniz-sys" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "miniz_oxide" -version = "0.2.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miniz_oxide_c_api" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", - "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -658,10 +654,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -684,15 +680,15 @@ name = "native-tls" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.26 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.48 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -701,16 +697,11 @@ name = "net2" version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "nodrop" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "normalize-line-endings" version = "0.2.2" @@ -718,18 +709,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num-traits" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num_cpus" -version = "1.10.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -743,15 +735,15 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.24" +version = "0.10.26" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.48 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -761,52 +753,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.48" +version = "0.9.53" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "owning_ref" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "pager" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot_core" -version = "0.4.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -815,60 +802,30 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "phf" -version = "0.7.24" +name = "percent-encoding" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_codegen" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_generator" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_shared" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "pkg-config" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ppv-lite86" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "predicates" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "float-cmp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "float-cmp 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -887,22 +844,22 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "0.4.30" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "publicsuffix" -version = "1.5.2" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -912,10 +869,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "0.6.13" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -924,10 +881,10 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -935,28 +892,28 @@ name = "rand" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -965,7 +922,7 @@ name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -974,8 +931,8 @@ name = "rand_chacha" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -983,20 +940,20 @@ name = "rand_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_core" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1012,7 +969,7 @@ name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1028,9 +985,9 @@ name = "rand_jitter" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1040,10 +997,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1051,8 +1008,8 @@ name = "rand_pcg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1078,68 +1035,64 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.10" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "remove_dir_all" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "reqwest" -version = "0.9.19" +version = "0.9.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winreg 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc-demangle" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1152,7 +1105,7 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1165,18 +1118,13 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "scopeguard" version = "1.0.0" @@ -1184,18 +1132,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "security-framework" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework-sys" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1216,30 +1164,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.97" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.97" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1249,7 +1197,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1262,11 +1210,6 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "siphasher" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "slab" version = "0.4.2" @@ -1274,17 +1217,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.6.10" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "spin" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "stable_deref_trait" -version = "1.1.1" +name = "smallvec" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1297,28 +1238,28 @@ dependencies = [ [[package]] name = "strsim" -version = "0.7.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.42" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "synstructure" -version = "0.10.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1326,8 +1267,8 @@ name = "tar" version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "filetime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1336,23 +1277,22 @@ dependencies = [ name = "tealdeer" version = "1.2.0" dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide_c_api 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1372,12 +1312,12 @@ name = "tempfile" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1385,7 +1325,7 @@ name = "termcolor" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1393,7 +1333,7 @@ name = "thread_local" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1401,9 +1341,9 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1412,15 +1352,15 @@ version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1430,8 +1370,8 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1439,7 +1379,7 @@ name = "tokio-current-thread" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1449,7 +1389,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1458,35 +1398,35 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-reactor" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-sync" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1495,25 +1435,25 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1524,17 +1464,17 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "toml" -version = "0.5.1" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1552,28 +1492,15 @@ name = "try_from" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ucd-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicase" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicase" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1586,15 +1513,15 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.8" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicode-xid" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1608,9 +1535,14 @@ dependencies = [ ] [[package]] -name = "utf8-ranges" -version = "1.0.3" +name = "url" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "utime" @@ -1618,7 +1550,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1640,13 +1572,18 @@ name = "version_check" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "version_check" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "walkdir" version = "2.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1655,11 +1592,16 @@ name = "want" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "wasi" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "winapi" version = "0.2.8" @@ -1667,7 +1609,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1689,7 +1631,7 @@ name = "winapi-util" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1699,19 +1641,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "wincolor" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "winreg" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1728,7 +1670,7 @@ name = "xattr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1737,120 +1679,116 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] -"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" -"checksum aho-corasick 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "36b7aa1ccb7d7ea3f437cf025a2ab1c47cc6c1bc9fc84918ff449def12f5e282" -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" +"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" +"checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" "checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" -"checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" "checksum assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7ac5c260f75e4e4ba87b7342be6edcecbcb3eb6741a0507fda7ad115845cc65" "checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" -"checksum autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "22130e92352b948e7e82a49cdb0aa94f2211761117f29e052dd397c1ac33542b" -"checksum backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)" = "88fb679bc9af8fa639198790a77f52d345fe13656c08b43afa9424c206b731c6" -"checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" +"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +"checksum backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea" +"checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" +"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -"checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -"checksum cc 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "ce400c638d48ee0e9ab75aef7997609ec57367ccfe1463f21bf53c3eca67bf46" -"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" +"checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" +"checksum cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8" +"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" "checksum cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" -"checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" +"checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" +"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" +"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" -"checksum docopt 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "db2906c2579b5b7207fc1e328796a9a8835dc44e22dbe8e460b1d636f9a7b225" +"checksum docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969" "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" -"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" -"checksum encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)" = "4155785c79f2f6701f185eb2e6b4caf0555ec03477cb4c70db67b465311620ed" -"checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" +"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" +"checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" +"checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" "checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" "checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" "checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" "checksum escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19db1f7e74438642a5018cdf263bb1325b2e792f02dd0a3ca6d6c0f0d7b1d5a5" -"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" -"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" -"checksum filetime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "450537dc346f0c4d738dda31e790da1da5d4bd12145aad4da0d03d713cb3794f" -"checksum flate2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "550934ad4808d5d39365e5d61727309bf18b3b02c6c56b729cb92e7dd84bc3d8" -"checksum float-cmp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "134a8fa843d80a51a5b77d36d42bc2def9edcb0262c914861d08129fd1926600" +"checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" +"checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" +"checksum filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d" +"checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" +"checksum float-cmp 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75224bec9bfe1a65e2d34132933f2de7fe79900c96a0174307554244ece8150e" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "45dc39533a6cae6da2b56da48edae506bb767ec07370f86f70fc062e9d435869" +"checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" -"checksum getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "e65cce4e5084b14874c4e7097f38cab54f47ee554f9194673456ea379dcc4c55" +"checksum getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407" "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -"checksum http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "372bcb56f939e449117fb0869c2e8fd8753a8223d92a172c6e808cf123a5b6e4" +"checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" +"checksum http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "2790658cddc82e82b08e25176c431d7015a0adeb1718498715cbd20138a0bf68" "checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" -"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" -"checksum hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)" = "7cb44cbce9d8ee4fb36e4c0ad7b794ac44ebaad924b9c8291a63215bb44c2c8f" +"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +"checksum hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)" = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" "checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" -"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" +"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +"checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2" +"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" -"checksum libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "d44e80633f007889c7eff624b709ab43c92d708caad982295768a7b13ca3b5eb" -"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" -"checksum log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c275b6ad54070ac2d665eef9197db647b32239c9d244bfb6f041a766d00da5b3" +"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +"checksum libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "1a31a0627fdf1f6a39ec0dd577e101440b7db22672c0901fe00a9a6fbb5c24e8" +"checksum lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e57b3997725d2b60dbec1297f6c2e2957cc383db1cebd6be812163f969c7d586" +"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" -"checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f" -"checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" -"checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed" -"checksum miniz-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9e3ae51cea1576ceba0dde3d484d30e6e5b86dee0b2d412fe3a16a15c98202" -"checksum miniz_oxide 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5f6d7b3dd914b70db7cef7ab9dc74339ffcadf4d033464a987237bb0b9418cd4" -"checksum miniz_oxide_c_api 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5b78ca5446dd9fe0dab00e058731b6b08a8c1d2b9cdb8efb10876e24e9ae2494" +"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" +"checksum mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "dd1d63acd1b78403cc0c325605908475dd9b9a3acbf65ed8bcab97e27014afcf" +"checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" +"checksum miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6f3f74f726ae935c3f514300cc6773a0c9492abc5e972d42ba0c0ebb88757625" "checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e0a1a39eab95caf4f5556da9289b9e68f0aafac901b2ce80daaf020d3b733a8" -"checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" -"checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" +"checksum num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c81ffc11c212fa327657cb19dd85eb7419e163b5b076bede2bdb5c974c07e4" +"checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" -"checksum openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)" = "8152bb5a9b5b721538462336e3bef9a539f892715e5037fda0f984577311af15" +"checksum openssl 0.10.26 (registry+https://github.com/rust-lang/crates.io-index)" = "3a3cc5799d98e1088141b8e01ff760112bbd9f19d850c124500566ca6901a585" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.48 (registry+https://github.com/rust-lang/crates.io-index)" = "b5ba300217253bcc5dc68bed23d782affa45000193866e025329aa8a7a9f05b8" -"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" +"checksum openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)" = "465d16ae7fc0e313318f7de5cecf57b2fbe7511fd213978b457e1c96ff46736f" "checksum pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b69ced2bfa977c4541743a7427b89c94120684791a9629941fe6028dccab6528" -"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" -"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" +"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" +"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" -"checksum phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" -"checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" -"checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" -"checksum pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c1d2cfa5a714db3b5f24f0915e74fcdf91d09d496ba61329705dda7774d2af" -"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" -"checksum predicates 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "53e09015b0d3f5a0ec2d4428f7559bb7b3fff341b4e159fedd1d57fac8b939ff" +"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" +"checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" +"checksum predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a9bfe52247e5cc9b2f943682a85a5549fb9662245caf094504e69a2f03fe64d4" "checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" "checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" -"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum publicsuffix 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5afecba86dcf1e4fd610246f89899d1924fe12e1e89f555eb7c7f710f3c5ad1d" +"checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" +"checksum publicsuffix 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3bbaa49075179162b49acac1c6aa45fb4dafb5f13cf6794276d77bc7fd95757b" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" +"checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" -"checksum rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" +"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" +"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" @@ -1860,35 +1798,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b23da8dfd98a84bd7e08700190a5d9f7d2d38abd4369dd1dae651bc40bfd2cc" -"checksum regex-syntax 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5485bf1523a9ed51c4964273f22f63f24e31632adb5dad134f488f86a3875c" +"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" +"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" -"checksum reqwest 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)" = "1d0777154c2c3eb54f5c480db01de845652d941e47191277cc673634c3853939" -"checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af" +"checksum reqwest 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)" = "2c2064233e442ce85c77231ebd67d9eca395207dec2127fe0bbedde4bd29a650" +"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" +"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" "checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" -"checksum schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f6abf258d99c3c1c5c2131d99d064e94b7b3dd5f416483057f308fea253339" -"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" -"checksum security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2" -"checksum security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56" +"checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" +"checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)" = "d46b3dfedb19360a74316866cef04687cd4d6a70df8e6a506c63512790769b72" -"checksum serde_derive 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)" = "c22a0820adfe2f257b098714323563dd06426502abbbce4f51b72ef544c5027f" -"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" +"checksum serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" +"checksum serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" +"checksum serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)" = "1a3351dcbc1f067e2c92ab7c3c1f288ad1a4cffc470b5aaddb4c2e0a3ae80043" "checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" "checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" -"checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" -"checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" -"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" +"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" +"checksum smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86" "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum syn 0.15.42 (registry+https://github.com/rust-lang/crates.io-index)" = "eadc09306ca51a40555dd6fc2b415538e9e18bc9f870e47b1a524a79fe2dcf5e" -"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" +"checksum strsim 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "032c03039aae92b350aad2e3779c352e104d919cb192ba2fabbd7b831ce4f0f6" +"checksum syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "661641ea2aa15845cddeb97dad000d22070bb5c1fb456b96c1cba883ec691e92" +"checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" "checksum tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "b3196bfbffbba3e57481b6ea32249fbaf590396a52505a2615adbb79d9d826d3" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" @@ -1900,37 +1835,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" "checksum tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac" "checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" -"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" -"checksum tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2162248ff317e2bc713b261f242b69dbb838b85248ed20bb21df56d60ea4cae7" +"checksum tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "c56391be9805bc80163151c0b9e5164ee64f4b0200962c346fea12773158f22d" +"checksum tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d06554cce1ae4a50f42fba8023918afa931413aded705b560e29600ccf7c6d76" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "90ca01319dea1e376a001e8dc192d42ebde6dd532532a5bad988ac37db365b19" +"checksum tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2bd2c6a3885302581f4401c82af70d792bb9df1700e7437b0aeb4ada94d5388c" "checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" -"checksum toml 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b8c96d7873fa7ef8bdeb3a9cda3ac48389b4154f32b9803b4bc26220b677b039" +"checksum toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "01d1404644c8b12b16bfcffa4322403a91a451584daaaa7c28d3152e6cbc98cf" "checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" -"checksum ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa9b3b49edd3468c0e6565d85783f51af95212b6fa3986a5500954f00b460874" -"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -"checksum unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" +"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b561e267b2326bb4cebfc0ef9e68355c7abe6c6f522aeac2f5bf95d56c59bdcf" +"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -"checksum utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9d50aa7650df78abf942826607c62468ce18d9019673d4a2ebe1865dbb96ffde" +"checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" "checksum utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "055058552ca15c566082fc61da433ae678f78986a6f16957e33162d1b218792a" "checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" "checksum vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "33dd455d0f96e90a75803cfeb7f948768c08d70a6de9a8d2362461935698bf95" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" "checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e" "checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" +"checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" +"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" -"checksum winreg 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73f1f3c6c4d3cab118551b96c476a2caab920701e28875b64a458f2ecb96ec9d" +"checksum wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9" +"checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" "checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" diff --git a/Cargo.toml b/Cargo.toml index 42a6d2b..098d068 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,13 +15,12 @@ name = "tldr" path = "src/main.rs" [dependencies] -ansi_term = "0.11.0" +ansi_term = "0.12.0" app_dirs = "1.2.1" -docopt = "<1.1" -env_logger = { version = "0.6", optional = true } -flate2 = "1.0" +docopt = "1" +env_logger = { version = "0.7", optional = true } +flate2 = "1" log = "0.4" -miniz_oxide_c_api = "<=0.2.2" # Dependency of flate2, used to keep compatibility with Rust 1.32 pager = "0.15" reqwest = "0.9.5" serde = "1.0.21" diff --git a/README.md b/README.md index a32abe3..329fedd 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ tealdeer has been added to a few package managers: ### From Source (any platform) -tealdeer requires at least Rust 1.32. +tealdeer requires at least Rust 1.36. Debug build with logging enabled: From 0d00e60af0df4631cee6c9c6067d9d9142b4c73c Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 7 Jan 2020 09:16:40 +0100 Subject: [PATCH 030/368] Tweak the outdated cache warning message (#97) This makes it display in yellow (instead of red) as it's more of a *warning* message than an *error* message. --- src/main.rs | 4 ++-- tests/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8de5ef0..f61efd3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -164,8 +164,8 @@ fn check_cache(args: &Args, cache: &Cache) { } println!( "{}", - Color::Red.paint(format!( - "Cache wasn't updated for more than {} days.\n\ + Color::Yellow.paint(format!( + "The cache hasn't been updated for more than {} days.\n\ You should probably run `tldr --update` soon.", MAX_CACHE_AGE.as_secs() / 24 / 3600 )) diff --git a/tests/lib.rs b/tests/lib.rs index bb1e2d3..292fbac 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -156,14 +156,14 @@ fn test_quiet_old_cache() { .args(&["tldr"]) .assert() .success() - .stdout(contains("Cache wasn't updated for more than ")); + .stdout(contains("The cache hasn't been updated for more than ")); testenv .command() .args(&["tldr", "--quiet"]) .assert() .success() - .stdout(contains("Cache wasn't updated for more than ").not()); + .stdout(contains("The cache hasn't been updated for more than ").not()); } #[test] From 6719acb4f23dd15d53bce607f7b1e684bd098f31 Mon Sep 17 00:00:00 2001 From: Isak Johansson Date: Tue, 17 Dec 2019 08:56:19 +0100 Subject: [PATCH 031/368] Add -m / --markdown option for raw rendering New option to render as markdown, not with ANSI escape codes. This is useful for when you want to open it up in a pager which doesn't support ANSI escape codes by default. In my use case it allows me to open it inside vim without having to use an addon to convert ANSI escape codes to colours. --- src/main.rs | 22 ++++++++++++++++------ tests/lib.rs | 22 ++++++++++++++++++++-- tests/tar-markdown.expected | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 8 deletions(-) create mode 100644 tests/tar-markdown.expected diff --git a/src/main.rs b/src/main.rs index 8de5ef0..b56ab4e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,6 +18,7 @@ extern crate env_logger; use std::fs::File; use std::io::BufReader; +use std::io::BufRead; use std::path::{Path, PathBuf}; use std::process; use std::time::Duration; @@ -64,6 +65,7 @@ Options: -u --update Update the local cache -c --clear-cache Clear the local cache -p --pager Use a pager to page output + -m --markdown Display the raw markdown instead of rendering it -q --quiet Suppress informational messages --config-path Show config file path --seed-config Create a basic config @@ -100,10 +102,11 @@ struct Args { flag_quiet: bool, flag_config_path: bool, flag_seed_config: bool, + flag_markdown: bool, } /// Print page by path -fn print_page(path: &Path, enable_styles: bool) -> Result<(), String> { +fn print_page(path: &Path, enable_markdown: bool, enable_styles: bool) -> Result<(), String> { // Open file let file = File::open(path).map_err(|msg| format!("Could not open file: {}", msg))?; let reader = BufReader::new(file); @@ -121,9 +124,16 @@ fn print_page(path: &Path, enable_styles: bool) -> Result<(), String> { } }; - // Create tokenizer and print output - let mut tokenizer = Tokenizer::new(reader); - print_lines(&mut tokenizer, &config); + if enable_markdown { + // Print the raw markdown of the file. + for line in reader.lines() { + println!("{}", line.unwrap()); + } + } else { + // Create tokenizer and print output + let mut tokenizer = Tokenizer::new(reader); + print_lines(&mut tokenizer, &config); + }; Ok(()) } @@ -324,7 +334,7 @@ fn main() { // Render local file and exit if let Some(ref file) = args.flag_render { let path = PathBuf::from(file); - if let Err(msg) = print_page(&path, enable_styles) { + if let Err(msg) = print_page(&path, args.flag_markdown, enable_styles) { eprintln!("{}", msg); process::exit(1); } else { @@ -360,7 +370,7 @@ fn main() { // Search for command in cache if let Some(path) = cache.find_page(&command) { - if let Err(msg) = print_page(&path, enable_styles) { + if let Err(msg) = print_page(&path, args.flag_markdown, enable_styles) { eprintln!("{}", msg); process::exit(1); } else { diff --git a/tests/lib.rs b/tests/lib.rs index bb1e2d3..74f4a1e 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -193,6 +193,26 @@ fn test_show_config_path() { ))); } +#[test] +fn test_markdown_rendering() { + let testenv = TestEnv::new(); + + testenv + .command() + .args(&["--update"]) + .assert() + .success() + .stdout(contains("Successfully updated cache.")); + + let expected = include_str!("tar-markdown.expected"); + testenv + .command() + .args(&["-m", "tar"]) + .assert() + .success() + .stdout(similar(expected)); +} + fn _test_correct_rendering(input_file: &str, filename: &str) { let testenv = TestEnv::new(); @@ -202,9 +222,7 @@ fn _test_correct_rendering(input_file: &str, filename: &str) { let mut file = File::create(&file_path).unwrap(); file.write_all(input_file.as_bytes()).unwrap(); - // Load expected output let expected = include_str!("inkscape-default.expected"); - testenv .command() .args(&["-f", &file_path.to_str().unwrap()]) diff --git a/tests/tar-markdown.expected b/tests/tar-markdown.expected new file mode 100644 index 0000000..d141430 --- /dev/null +++ b/tests/tar-markdown.expected @@ -0,0 +1,33 @@ +# tar + +> Archiving utility. +> Often combined with a compression method, such as gzip or bzip. +> More information: . + +- Create an archive from files: + +`tar cf {{target.tar}} {{file1}} {{file2}} {{file3}}` + +- Create a gzipped archive: + +`tar czf {{target.tar.gz}} {{file1}} {{file2}} {{file3}}` + +- Extract a (compressed) archive into the current directory: + +`tar xf {{source.tar[.gz|.bz2|.xz]}}` + +- Extract an archive into a target directory: + +`tar xf {{source.tar}} -C {{directory}}` + +- Create a compressed archive, using archive suffix to determine the compression program: + +`tar caf {{target.tar.xz}} {{file1}} {{file2}} {{file3}}` + +- List the contents of a tar file: + +`tar tvf {{source.tar}}` + +- Extract files matching a pattern: + +`tar xf {{source.tar}} --wildcards {{"*.html"}}` From 95fab99e8226be7b0e4d313033b79a212d09d771 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 22 Jan 2020 22:52:44 +0100 Subject: [PATCH 032/368] Add -m command to README and completion files --- README.md | 1 + bash_tealdeer | 2 +- fish_tealdeer | 2 ++ zsh_tealdeer | 5 +++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 329fedd..3bfc42f 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ These are the clients I tried but failed to compile or run: -u --update Update the local cache -c --clear-cache Clear the local cache -p --pager Use a pager to page output + -m --markdown Display the raw markdown instead of rendering it -q --quiet Suppress informational messages --config-path Show config file path --seed-config Create a basic config diff --git a/bash_tealdeer b/bash_tealdeer index 5b7e55a..ba28806 100644 --- a/bash_tealdeer +++ b/bash_tealdeer @@ -6,7 +6,7 @@ _tealdeer() _init_completion || return case $prev in - -h|--help|-v|--version|-l|--list|-u|--update|-c|--clear-cache|--config-path|--seed-config|-q|--quiet) + -h|--help|-v|--version|-l|--list|-u|--update|-c|--clear-cache|-p|--pager|-m|--markdown|--config-path|--seed-config|-q|--quiet) return ;; -f|--render) diff --git a/fish_tealdeer b/fish_tealdeer index b9db05b..880b015 100644 --- a/fish_tealdeer +++ b/fish_tealdeer @@ -10,6 +10,8 @@ complete -c tldr -s f -l render -d 'Render a specific markdown file.' -r complete -c tldr -s o -l os -d 'Override the operating system.' -xa 'linux osx sunos windows other' complete -c tldr -s u -l update -d 'Update the local cache.' -f complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f +complete -c tldr -s p -l pager -d 'Use a pager to page output.' -f +complete -c tldr -s m -l markdown -d 'Display the raw markdown instead of rendering it.' -f complete -c tldr -s q -l quiet -d 'Suppress informational messages.' -f complete -c tldr -l config-path -d 'Show config file path.' -f complete -c tldr -l seed-config -d 'Create a basic config.' -f diff --git a/zsh_tealdeer b/zsh_tealdeer index 93528a0..53f2609 100644 --- a/zsh_tealdeer +++ b/zsh_tealdeer @@ -8,7 +8,7 @@ _tealdeer() { local I="-h --help -v --version" integer ret=1 local -a args - + args+=( "($I -l --list)"{-l,--list}"[List all commands in the cache]" "($I -f --render)"{-f,--render}"[Render a specific markdown file]:file:_files" @@ -21,6 +21,7 @@ _tealdeer() { "($I -u --update)"{-u,--update}"[Update the local cache]" "($I -c --clear-cache)"{-c,--clear-cache}"[Clear the local cache]" "($I -p --pager)"{-p,--pager}"[Use a pager to page output]" + "($I -m --markdown)"{-m,--markdown}"[Display the raw markdown instead of rendering it]" "($I -q --quiet)"{-q,--quiet}"[Suppress informational messages]" "($I)--config-path[Show config file path]" "($I)--seed-config[Create a basic config]" @@ -29,7 +30,7 @@ _tealdeer() { '*:file:_files' '1: :_applications' ) - + _arguments $args[@] && ret=0 return ret } From 7b3f7a6470da991d9caa90ff8a791f1240ae8ce8 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 22 Jan 2020 23:10:30 +0100 Subject: [PATCH 033/368] CI: Switch to GitHub Actions --- .circleci/config.yml | 34 --------------------------- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 7 ------ README.md | 12 ++++------ 4 files changed, 56 insertions(+), 48 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index f542732..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,34 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: rust:1.36 - steps: - - checkout - # Load cargo target from cache if possible. - # Multiple caches are used to increase the chance of a cache hit. - - restore_cache: - keys: - - v2-cargo-cache-{{ arch }}-{{ .Branch }} - - v2-cargo-cache-{{ arch }} - - # Show versions - - run: rustc --version && cargo --version - - # Build - - run: cargo build - - run: cargo build --features logging - - # Run tests - - run: cargo test - - - save_cache: - key: v2-cargo-cache-{{ arch }}-{{ .Branch }} - paths: - - target - - /usr/local/cargo - - save_cache: - key: v2-cargo-cache-{{ arch }} - paths: - - target - - /usr/local/cargo diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d4eaf19 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +on: + push: + schedule: + - cron: '30 3 * * 2' + +name: CI + +jobs: + + test: + name: run tests + strategy: + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + rust: [1.36.0, stable] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + override: true + - name: Build with default features + uses: actions-rs/cargo@v1 + with: + command: build + - name: Build with all features + uses: actions-rs/cargo@v1 + with: + command: build + args: --all-features + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features + + clippy: + name: run clippy lints + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: 1.36.0 + components: clippy + override: true + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d804029..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: rust -os: osx -rust: - - 1.36.0 - - stable -cache: cargo -script: cargo test diff --git a/README.md b/README.md index 329fedd..a8c29cb 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ![teal deer](deer.png) -|Crate|Linux|macOS|Windows| -|:---:|:---:|:---:|:-----:| -|[![Crates.io][crates-io-badge]][crates-io]|[![Circle CI][circle-ci-badge]][circle-ci]|[![Travis CI][travis-ci-badge]][travis-ci]|Should work™| +|Crate|CI (Linux/macOS/Windows)| +|:---:|:---:| +|[![Crates.io][crates-io-badge]][crates-io]|[![GitHub CI][github-actions-badge]][github-actions]| A very fast implementation of [tldr](https://github.com/tldr-pages/tldr) in Rust: Simplified, example based and community-driven man pages. @@ -241,9 +241,7 @@ Thanks to @SShrike for coming up with the name "tealdeer"! [tldr-node-client]: https://github.com/tldr-pages/tldr-node-client -[circle-ci]: https://circleci.com/gh/dbrgn/tealdeer/tree/master -[circle-ci-badge]: https://circleci.com/gh/dbrgn/tealdeer/tree/master.svg?style=shield -[travis-ci]: https://travis-ci.org/dbrgn/tealdeer -[travis-ci-badge]: https://travis-ci.org/dbrgn/tealdeer.svg?branch=master +[github-actions]: https://github.com/dbrgn/tealdeer/actions?query=branch%3Amaster +[github-actions-badge]: https://github.com/dbrgn/tealdeer/workflows/CI/badge.svg [crates-io]: https://crates.io/crates/tealdeer [crates-io-badge]: https://img.shields.io/crates/v/tealdeer.svg From bcdfd5e9a8788c79783f55a766afda123da3f72d Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 22 Jan 2020 23:20:56 +0100 Subject: [PATCH 034/368] Disable pager feature on Windows --- Cargo.toml | 4 +++- README.md | 2 ++ src/main.rs | 10 +++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 098d068..a28c728 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,6 @@ docopt = "1" env_logger = { version = "0.7", optional = true } flate2 = "1" log = "0.4" -pager = "0.15" reqwest = "0.9.5" serde = "1.0.21" serde_derive = "1.0.21" @@ -30,6 +29,9 @@ toml = "0.5.1" walkdir = "2.0.1" xdg = "2.1.0" +[target.'cfg(not(windows))'.dependencies] +pager = "0.15" + [dev-dependencies] assert_cmd = "0.10" escargot = "0.3" diff --git a/README.md b/README.md index a8c29cb..7d61cd1 100644 --- a/README.md +++ b/README.md @@ -192,6 +192,8 @@ Specifies whether the pager should be used by default or not (default `false`). When enabled, `less -R` is used as pager. To override the pager command used, set the `PAGER` environment variable. +NOTE: This feature is not available on Windows. + #### `compact` Set this to enforce more compact output, where empty lines are stripped out diff --git a/src/main.rs b/src/main.rs index f61efd3..7613528 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,6 +25,7 @@ use std::time::Duration; use ansi_term::Color; use app_dirs::AppInfo; use docopt::Docopt; +#[cfg(not(target_os = "windows"))] use pager::Pager; use serde_derive::Deserialize; @@ -83,8 +84,9 @@ To render a local file (for testing): $ tldr --render /path/to/file.md "; const ARCHIVE_URL: &str = "https://github.com/tldr-pages/tldr/archive/master.tar.gz"; -const PAGER_COMMAND: &str = "less -R"; const MAX_CACHE_AGE: Duration = Duration::from_secs(2_592_000); // 30 days +#[cfg(not(target_os = "windows"))] +const PAGER_COMMAND: &str = "less -R"; #[derive(Debug, Deserialize)] struct Args { @@ -129,6 +131,7 @@ fn print_page(path: &Path, enable_styles: bool) -> Result<(), String> { } /// Set up display pager +#[cfg(not(target_os = "windows"))] fn configure_pager(args: &Args, enable_styles: bool) { // Flags have precedence if args.flag_pager { @@ -154,6 +157,11 @@ fn configure_pager(args: &Args, enable_styles: bool) { } } +#[cfg(target_os = "windows")] +fn configure_pager(_args: &Args, _enable_styles: bool) { + eprintln!("Warning: -p / --pager flag not available on Windows!"); +} + /// Check the cache for freshness fn check_cache(args: &Args, cache: &Cache) { if !args.flag_update { From 7a3a5654271661620480d8f9275cbf818a69c7ac Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 23 Jan 2020 11:34:42 +0100 Subject: [PATCH 035/368] README: List tealdeer-bin AUR package --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 30ae93b..d54d421 100644 --- a/README.md +++ b/README.md @@ -111,8 +111,9 @@ Build and install the tool via cargo... tealdeer has been added to a few package managers: -- Arch Linux AUR: [`tealdeer`](https://aur.archlinux.org/packages/tealdeer/) - or [`tealdeer-git`](https://aur.archlinux.org/packages/tealdeer-git/) +- Arch Linux AUR: [`tealdeer`](https://aur.archlinux.org/packages/tealdeer/), + [`tealdeer-bin`](https://aur.archlinux.org/packages/tealdeer-bin/) or + [`tealdeer-git`](https://aur.archlinux.org/packages/tealdeer-git/) - macOS Homebrew: [`tealdeer`](https://formulae.brew.sh/formula/tealdeer) - Nix: [`tealdeer`](https://nixos.org/nixos/packages.html#tealdeer) - Void Linux XBPS: [`tealdeer`](https://github.com/void-linux/void-packages/tree/master/srcpkgs/tealdeer) From 623cf67d2a52a56ed87597642cb421a3cb3b27bb Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 6 Feb 2020 09:13:49 +0100 Subject: [PATCH 036/368] CI: Run on pull requests (#102) * CI: Run on pull requests * fixup! CI: Run on pull requests --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4eaf19..889010f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,8 @@ on: push: + branches: + - master + pull_request: schedule: - cron: '30 3 * * 2' From 055758dba833b816be68b8b352a840b347e793c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Trinidad=20D=C3=ADaz=20Ram=C3=ADrez?= Date: Thu, 6 Feb 2020 08:43:00 -0600 Subject: [PATCH 037/368] Fix clippy warnings (#101) --- src/cache.rs | 27 ++++++----- src/main.rs | 135 +++++++++++++++++++++++++++++---------------------- src/types.rs | 4 +- 3 files changed, 93 insertions(+), 73 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index ea42af0..d645f76 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -2,6 +2,7 @@ use std::env; use std::fs; use std::io::Read; use std::path::PathBuf; +use std::ffi::OsStr; use reqwest::{Client, Proxy}; use flate2::read::GzDecoder; @@ -32,7 +33,7 @@ impl Cache { } /// Return the path to the cache directory. - fn get_cache_dir(&self) -> Result { + fn get_cache_dir() -> Result { // Allow overriding the cache directory by setting the // $TEALDEER_CACHE_DIR env variable. if let Ok(value) = env::var("TEALDEER_CACHE_DIR") { @@ -78,7 +79,7 @@ impl Cache { } /// Decompress and open the archive - fn decompress(&self, reader: R) -> Archive> { + fn decompress(reader: R) -> Archive> { Archive::new(GzDecoder::new(reader)) } @@ -88,10 +89,10 @@ impl Cache { let bytes: Vec = self.download()?; // Decompress the response body into an `Archive` - let mut archive = self.decompress(&bytes[..]); + let mut archive = Self::decompress(&bytes[..]); // Determine paths - let cache_dir = self.get_cache_dir()?; + let cache_dir = Self::get_cache_dir()?; // Make sure that cache directory exists debug!("Ensure cache directory {:?} exists", &cache_dir); @@ -104,7 +105,7 @@ impl Cache { // But renaming a directory doesn't work across filesystems and Rust // does not yet offer a recursive directory copying function. So for // now, we'll use this approach. - self.clear()?; + Self::clear()?; // Extract archive archive @@ -115,8 +116,8 @@ impl Cache { } /// Return the duration since the cache directory was last modified. - pub fn last_update(&self) -> Option { - if let Ok(cache_dir) = self.get_cache_dir() { + pub fn last_update() -> Option { + if let Ok(cache_dir) = Self::get_cache_dir() { if let Ok(metadata) = fs::metadata(cache_dir.join("tldr-master")) { if let Ok(mtime) = metadata.modified() { let now = SystemTime::now(); @@ -145,7 +146,7 @@ impl Cache { let page_filename = format!("{}.md", name); // Get platform dir - let platforms_dir = match self.get_cache_dir() { + let platforms_dir = match Self::get_cache_dir() { Ok(cache_dir) => cache_dir.join("tldr-master").join("pages"), _ => return None, }; @@ -176,7 +177,7 @@ impl Cache { /// Return the available pages. pub fn list_pages(&self) -> Result, TealdeerError> { // Determine platforms directory and platform - let cache_dir = self.get_cache_dir()?; + let cache_dir = Self::get_cache_dir()?; let platforms_dir = cache_dir.join("tldr-master").join("pages"); let platform_dir = self.get_platform_dir(); @@ -206,10 +207,10 @@ impl Cache { .min_depth(1) // Skip root directory .into_iter() .filter_entry(|e| should_walk(e)) // Filter out pages for other architectures - .filter_map(|e| e.ok()) // Convert results to options, filter out errors + .filter_map(Result::ok) // Convert results to options, filter out errors .filter_map(|e| { let path = e.path(); - let extension = &path.extension().and_then(|s| s.to_str()).unwrap_or(""); + let extension = &path.extension().and_then(OsStr::to_str).unwrap_or(""); if e.file_type().is_file() && extension == &"md" { path.file_stem() .and_then(|stem| stem.to_str().map(|s| s.into())) @@ -224,8 +225,8 @@ impl Cache { } /// Delete the cache directory. - pub fn clear(&self) -> Result<(), TealdeerError> { - let path = self.get_cache_dir()?; + pub fn clear() -> Result<(), TealdeerError> { + let path = Self::get_cache_dir()?; if path.exists() && path.is_dir() { fs::remove_dir_all(&path).map_err(|_| CacheError(format!( "Could not remove cache directory ({}).", diff --git a/src/main.rs b/src/main.rs index d2c00f0..89c7e59 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ #![deny(clippy::all)] #![warn(clippy::pedantic)] #![allow(clippy::similar_names)] -#![allow(clippy::stutter)] +#![allow(clippy::module_name_repetitions)] #[cfg(feature = "logging")] extern crate env_logger; @@ -173,9 +173,9 @@ fn configure_pager(_args: &Args, _enable_styles: bool) { } /// Check the cache for freshness -fn check_cache(args: &Args, cache: &Cache) { +fn check_cache(args: &Args) { if !args.flag_update { - match cache.last_update() { + match Cache::last_update() { Some(ago) if ago > MAX_CACHE_AGE => { if args.flag_quiet { return; @@ -198,6 +198,74 @@ fn check_cache(args: &Args, cache: &Cache) { }; } +/// Clear the cache +fn clear_cache(quietly: bool) { + Cache::clear().unwrap_or_else(|e| { + match e { + CacheError(msg) | ConfigError(msg) | UpdateError(msg) => { + eprintln!("Could not delete cache: {}", msg) + } + }; + process::exit(1); + }); + if !quietly { + println!("Successfully deleted cache."); + } +} + +/// Update the cache +fn update_cache(cache: &Cache, quietly: bool) { + cache.update().unwrap_or_else(|e| { + match e { + CacheError(msg) | ConfigError(msg) | UpdateError(msg) => { + eprintln!("Could not update cache: {}", msg) + } + }; + process::exit(1); + }); + if !quietly { + println!("Successfully updated cache."); + } +} + +/// Show the config path +fn show_config_path() { + match get_config_path() { + Ok(config_file_path) => { + println!("Config path is: {}", config_file_path.to_str().unwrap()); + } + Err(ConfigError(msg)) => { + eprintln!("Could not look up config_path: {}", msg); + process::exit(1); + } + Err(_) => { + eprintln!("Unknown error"); + process::exit(1); + } + } +} + +/// Create seed config file and exit +fn create_config_and_exit() { + match make_default_config() { + Ok(config_file_path) => { + println!( + "Successfully created seed config file here: {}", + config_file_path.to_str().unwrap() + ); + process::exit(0); + } + Err(ConfigError(msg)) => { + eprintln!("Could not create seed config: {}", msg); + process::exit(1); + } + Err(_) => { + eprintln!("Unknown error"); + process::exit(1); + } + } +} + #[cfg(feature = "logging")] fn init_log() { env_logger::init(); @@ -272,73 +340,24 @@ fn main() { // Clear cache, pass through if args.flag_clear_cache { - cache.clear().unwrap_or_else(|e| { - match e { - CacheError(msg) | ConfigError(msg) | UpdateError(msg) => { - eprintln!("Could not delete cache: {}", msg) - } - }; - process::exit(1); - }); - if !args.flag_quiet { - println!("Successfully deleted cache."); - } + clear_cache(args.flag_quiet); } // Update cache, pass through if args.flag_update { - cache.update().unwrap_or_else(|e| { - match e { - CacheError(msg) | ConfigError(msg) | UpdateError(msg) => { - eprintln!("Could not update cache: {}", msg) - } - }; - process::exit(1); - }); - if !args.flag_quiet { - println!("Successfully updated cache."); - } + update_cache(&cache, args.flag_quiet); } // Show config file and path, pass through if args.flag_config_path { - match get_config_path() { - Ok(config_file_path) => { - println!("Config path is: {}", config_file_path.to_str().unwrap()); - } - Err(ConfigError(msg)) => { - eprintln!("Could not look up config_path: {}", msg); - process::exit(1); - } - Err(_) => { - eprintln!("Unknown error"); - process::exit(1); - } - } + show_config_path(); } // Create a basic config and exit if args.flag_seed_config { - match make_default_config() { - Ok(config_file_path) => { - println!( - "Successfully created seed config file here: {}", - config_file_path.to_str().unwrap() - ); - process::exit(0); - } - Err(ConfigError(msg)) => { - eprintln!("Could not create seed config: {}", msg); - process::exit(1); - } - Err(_) => { - eprintln!("Unknown error"); - process::exit(1); - } - } + create_config_and_exit(); } - // Render local file and exit if let Some(ref file) = args.flag_render { let path = PathBuf::from(file); @@ -353,7 +372,7 @@ fn main() { // List cached commands and exit if args.flag_list { // Check cache for freshness - check_cache(&args, &cache); + check_cache(&args); // Get list of pages let pages = cache.list_pages().unwrap_or_else(|e| { @@ -374,7 +393,7 @@ fn main() { if let Some(ref command) = args.arg_command { let command = command.join("-"); // Check cache for freshness - check_cache(&args, &cache); + check_cache(&args); // Search for command in cache if let Some(path) = cache.find_page(&command) { diff --git a/src/types.rs b/src/types.rs index 5741a18..f6caa23 100644 --- a/src/types.rs +++ b/src/types.rs @@ -38,7 +38,7 @@ pub enum LineType { } impl<'a> From<&'a str> for LineType { - /// Convert a string slice to a LineType. Newlines and trailing whitespace are trimmed. + /// Convert a string slice to a `LineType`. Newlines and trailing whitespace are trimmed. fn from(line: &'a str) -> Self { let trimmed: &str = line.trim_end(); let mut chars = trimmed.chars(); @@ -56,7 +56,7 @@ impl<'a> From<&'a str> for LineType { ), Some(' ') => LineType::ExampleCode( trimmed - .trim_start_matches(|chr: char| chr.is_whitespace()) + .trim_start_matches(char::is_whitespace) .into(), ), _ => LineType::ExampleText(trimmed.into()), From ed3e4baac513439d557807fd3cfdf4561e90d4b0 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 28 Feb 2020 00:20:17 +0100 Subject: [PATCH 038/368] Fix integration test (#103) It broke because the `tar` tldr page was changed upstream :) --- tests/tar-markdown.expected | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/tar-markdown.expected b/tests/tar-markdown.expected index d141430..069dbc0 100644 --- a/tests/tar-markdown.expected +++ b/tests/tar-markdown.expected @@ -12,6 +12,10 @@ `tar czf {{target.tar.gz}} {{file1}} {{file2}} {{file3}}` +- Create a gzipped archive from a directory using relative paths: + +`tar czf {{target.tar.gz}} -C {{path/to/directory}} .` + - Extract a (compressed) archive into the current directory: `tar xf {{source.tar[.gz|.bz2|.xz]}}` From 2812a0ce99a3daf9948b502e6eb0dd83dddfe02e Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 27 Feb 2020 23:52:33 +0100 Subject: [PATCH 039/368] Run cargo update --- Cargo.lock | 605 ++++++++++++++++++++++++++--------------------------- 1 file changed, 295 insertions(+), 310 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8c77226..9793931 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,10 +7,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "aho-corasick" -version = "0.7.6" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -38,17 +38,18 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "atty" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -57,14 +58,19 @@ name = "autocfg" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "backtrace" -version = "0.3.40" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -73,8 +79,8 @@ name = "backtrace-sys" version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -82,7 +88,7 @@ name = "base64" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -92,7 +98,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byteorder" -version = "1.3.2" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -100,7 +106,7 @@ name = "bytes" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -115,7 +121,7 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.47" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -150,8 +156,8 @@ dependencies = [ "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "publicsuffix 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -163,7 +169,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -181,49 +187,43 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-epoch" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-queue" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crossbeam-utils" -version = "0.6.6" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam-utils" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -239,14 +239,14 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "dtoa" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -256,7 +256,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "encoding_rs" -version = "0.8.20" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -267,11 +267,11 @@ name = "env_logger" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -280,7 +280,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -290,15 +290,15 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "error-chain" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -306,8 +306,8 @@ name = "escargot" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -315,7 +315,7 @@ name = "failure" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -324,9 +324,9 @@ name = "failure_derive" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -336,7 +336,7 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -348,16 +348,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "float-cmp" -version = "0.5.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -408,7 +408,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -418,12 +418,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "getrandom" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -431,34 +431,34 @@ name = "h2" version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hermit-abi" -version = "0.1.3" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "http" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -468,7 +468,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -482,7 +482,7 @@ name = "humantime" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -494,23 +494,23 @@ dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -523,7 +523,7 @@ dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -533,7 +533,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -543,15 +543,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "indexmap" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -559,12 +559,12 @@ name = "iovec" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "itoa" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -583,15 +583,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.65" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lock_api" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -614,7 +614,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.2.1" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -627,7 +627,7 @@ dependencies = [ [[package]] name = "mime" -version = "0.3.14" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -635,13 +635,13 @@ name = "mime_guess" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "miniz_oxide" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -649,14 +649,15 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.19" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -681,12 +682,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.26 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -698,7 +699,7 @@ version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -709,19 +710,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num-traits" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num_cpus" -version = "1.11.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -735,15 +736,15 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.26" +version = "0.10.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -753,14 +754,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.53" +version = "0.9.54" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -769,7 +770,7 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -777,7 +778,7 @@ name = "parking_lot" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -789,7 +790,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -818,14 +819,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "predicates" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "float-cmp 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "float-cmp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -844,7 +845,7 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -855,16 +856,16 @@ name = "publicsuffix" version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quick-error" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -872,7 +873,7 @@ name = "quote" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -881,7 +882,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -893,7 +894,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -907,11 +908,11 @@ dependencies = [ [[package]] name = "rand" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -953,7 +954,7 @@ name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -985,7 +986,7 @@ name = "rand_jitter" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -997,7 +998,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1035,18 +1036,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.3.1" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.12" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1059,32 +1060,32 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.9.22" +version = "0.9.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1110,15 +1111,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "same-file" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "schannel" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1127,7 +1128,7 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1137,7 +1138,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1164,30 +1165,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.103" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.42" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1195,9 +1196,9 @@ name = "serde_urlencoded" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1225,7 +1226,7 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.0.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1238,15 +1239,15 @@ dependencies = [ [[package]] name = "strsim" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "1.0.8" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1256,9 +1257,9 @@ name = "synstructure" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1268,7 +1269,7 @@ version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1286,15 +1287,15 @@ dependencies = [ "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1313,8 +1314,8 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1322,15 +1323,15 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "thread_local" -version = "0.3.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1341,7 +1342,7 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1353,15 +1354,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1376,25 +1377,25 @@ dependencies = [ [[package]] name = "tokio-current-thread" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-executor" -version = "0.1.8" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-io" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1404,25 +1405,25 @@ dependencies = [ [[package]] name = "tokio-reactor" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-sync" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1431,50 +1432,50 @@ dependencies = [ [[package]] name = "tokio-tcp" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-threadpool" -version = "0.1.16" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-timer" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "toml" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1513,10 +1514,10 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1536,7 +1537,7 @@ dependencies = [ [[package]] name = "url" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1550,7 +1551,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1564,12 +1565,7 @@ dependencies = [ [[package]] name = "vcpkg" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "version_check" -version = "0.1.5" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1579,12 +1575,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "walkdir" -version = "2.2.9" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1599,7 +1595,7 @@ dependencies = [ [[package]] name = "wasi" -version = "0.7.0" +version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1628,7 +1624,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1639,15 +1635,6 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "wincolor" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "winreg" version = "0.6.2" @@ -1670,7 +1657,7 @@ name = "xattr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1680,20 +1667,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" -"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" +"checksum aho-corasick 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "d5e63fd144e18ba274ae7095c0197a870a7b9468abc801dd62f190d80817d2ec" "checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" "checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" "checksum assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7ac5c260f75e4e4ba87b7342be6edcecbcb3eb6741a0507fda7ad115845cc65" -"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" +"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" "checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" -"checksum backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea" +"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +"checksum backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e4036b9bf40f3cf16aba72a3d65e8a520fc4bafcdc7079aea8f848c58c5b5536" "checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" +"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" -"checksum cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8" +"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" @@ -1701,26 +1689,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" -"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" -"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" -"checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" -"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" +"checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" +"checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +"checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" +"checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969" -"checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" +"checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" -"checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" +"checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" "checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" "checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" -"checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" +"checksum error-chain 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d371106cc88ffdfb1eabd7111e432da544f16f3e2d7bf1dfe8bf575f1df045cd" "checksum escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19db1f7e74438642a5018cdf263bb1325b2e792f02dd0a3ca6d6c0f0d7b1d5a5" "checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" "checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" "checksum filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d" "checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" -"checksum float-cmp 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75224bec9bfe1a65e2d34132933f2de7fe79900c96a0174307554244ece8150e" +"checksum float-cmp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da62c4f1b81918835a8c6a484a397775fff5953fe83529afd51b05f5c6a6617d" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" @@ -1730,10 +1717,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" -"checksum getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407" +"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -"checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" -"checksum http 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "2790658cddc82e82b08e25176c431d7015a0adeb1718498715cbd20138a0bf68" +"checksum hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8" +"checksum http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" "checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" "checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" @@ -1741,32 +1728,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -"checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2" +"checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" +"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "1a31a0627fdf1f6a39ec0dd577e101440b7db22672c0901fe00a9a6fbb5c24e8" -"checksum lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e57b3997725d2b60dbec1297f6c2e2957cc383db1cebd6be812163f969c7d586" +"checksum libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018" +"checksum lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" -"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" +"checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" "checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" -"checksum mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "dd1d63acd1b78403cc0c325605908475dd9b9a3acbf65ed8bcab97e27014afcf" +"checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" "checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" -"checksum miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6f3f74f726ae935c3f514300cc6773a0c9492abc5e972d42ba0c0ebb88757625" -"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" +"checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" +"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e0a1a39eab95caf4f5556da9289b9e68f0aafac901b2ce80daaf020d3b733a8" -"checksum num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c81ffc11c212fa327657cb19dd85eb7419e163b5b076bede2bdb5c974c07e4" -"checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72" +"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +"checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" -"checksum openssl 0.10.26 (registry+https://github.com/rust-lang/crates.io-index)" = "3a3cc5799d98e1088141b8e01ff760112bbd9f19d850c124500566ca6901a585" +"checksum openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)" = "973293749822d7dd6370d6da1e523b0d1db19f06c459134c658b2a4261378b52" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)" = "465d16ae7fc0e313318f7de5cecf57b2fbe7511fd213978b457e1c96ff46736f" +"checksum openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)" = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" "checksum pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b69ced2bfa977c4541743a7427b89c94120684791a9629941fe6028dccab6528" "checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" "checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" @@ -1774,16 +1761,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" -"checksum predicates 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a9bfe52247e5cc9b2f943682a85a5549fb9662245caf094504e69a2f03fe64d4" +"checksum predicates 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1188bf092c81c18228c383b190c069a8a613c18a046ffa9fdfc0f5fc8fb2da8a" "checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" "checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" -"checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" +"checksum proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435" "checksum publicsuffix 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3bbaa49075179162b49acac1c6aa45fb4dafb5f13cf6794276d77bc7fd95757b" -"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" +"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412" +"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" @@ -1798,73 +1785,71 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" -"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" +"checksum regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" +"checksum regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" -"checksum reqwest 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)" = "2c2064233e442ce85c77231ebd67d9eca395207dec2127fe0bbedde4bd29a650" +"checksum reqwest 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "f88643aea3c1343c804950d7bf983bd2067f5ab59db6d613a08e05572f2714ab" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" -"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" -"checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" -"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" +"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +"checksum schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" +"checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" "checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" "checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" -"checksum serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" -"checksum serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)" = "1a3351dcbc1f067e2c92ab7c3c1f288ad1a4cffc470b5aaddb4c2e0a3ae80043" +"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" +"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" +"checksum serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" "checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" "checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" -"checksum smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86" +"checksum smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -"checksum strsim 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "032c03039aae92b350aad2e3779c352e104d919cb192ba2fabbd7b831ce4f0f6" -"checksum syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "661641ea2aa15845cddeb97dad000d22070bb5c1fb456b96c1cba883ec691e92" +"checksum strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" +"checksum syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "123bd9499cfb380418d509322d7a6d52e5315f064fe4b3ad18a53d6b92c07859" "checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" "checksum tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "b3196bfbffbba3e57481b6ea32249fbaf590396a52505a2615adbb79d9d826d3" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -"checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +"checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" +"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" "checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -"checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" -"checksum tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac" -"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" -"checksum tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "c56391be9805bc80163151c0b9e5164ee64f4b0200962c346fea12773158f22d" -"checksum tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d06554cce1ae4a50f42fba8023918afa931413aded705b560e29600ccf7c6d76" -"checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2bd2c6a3885302581f4401c82af70d792bb9df1700e7437b0aeb4ada94d5388c" -"checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" -"checksum toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "01d1404644c8b12b16bfcffa4322403a91a451584daaaa7c28d3152e6cbc98cf" +"checksum tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" +"checksum tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" +"checksum tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" +"checksum tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" +"checksum tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" +"checksum tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" +"checksum tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" +"checksum tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" +"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" "checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" "checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b561e267b2326bb4cebfc0ef9e68355c7abe6c6f522aeac2f5bf95d56c59bdcf" +"checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -"checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" +"checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" "checksum utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "055058552ca15c566082fc61da433ae678f78986a6f16957e33162d1b218792a" "checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" -"checksum vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "33dd455d0f96e90a75803cfeb7f948768c08d70a6de9a8d2362461935698bf95" -"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" -"checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e" +"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" "checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" -"checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" +"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" +"checksum winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9" "checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" From 04e61080d2fdb8116ff9d6802cbe35f45af8489d Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 28 Feb 2020 00:02:30 +0100 Subject: [PATCH 040/368] Upgrade reqwest This reduces the dependency tree from 333 to 188 entries, mostly because some reqwest features were disabled :) --- Cargo.lock | 945 ++++++++++++++++++--------------------------------- Cargo.toml | 2 +- src/cache.rs | 2 +- 3 files changed, 327 insertions(+), 622 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9793931..6265b41 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,6 +21,11 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "anyhow" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "app_dirs" version = "1.2.1" @@ -53,43 +58,15 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "autocfg" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "backtrace" -version = "0.3.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "base64" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "bitflags" @@ -97,19 +74,14 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "byteorder" -version = "1.3.4" +name = "bumpalo" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.4.12" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "c2-chacha" @@ -129,40 +101,6 @@ name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cookie" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cookie_store" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "publicsuffix 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "core-foundation" version = "0.6.4" @@ -185,49 +123,6 @@ dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "crossbeam-deque" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crossbeam-queue" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "difference" version = "2.0.0" @@ -249,11 +144,6 @@ name = "dtoa" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "either" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "encoding_rs" version = "0.8.22" @@ -293,14 +183,6 @@ dependencies = [ "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "error-chain" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "escargot" version = "0.3.1" @@ -310,26 +192,6 @@ dependencies = [ "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "failure" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "failure_derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "filetime" version = "0.2.8" @@ -398,17 +260,44 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "futures" -version = "0.1.29" +name = "futures-channel" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-core" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "futures-cpupool" -version = "0.1.8" +name = "futures-io" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-sink" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-task" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-util" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -428,19 +317,28 @@ dependencies = [ [[package]] name = "h2" -version = "0.1.26" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -453,23 +351,21 @@ dependencies = [ [[package]] name = "http" -version = "0.1.21" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "http-body" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -487,53 +383,37 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.35" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper-tls" -version = "0.3.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -567,6 +447,14 @@ name = "itoa" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "js-sys" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -586,14 +474,6 @@ name = "libc" version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "lock_api" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "log" version = "0.4.8" @@ -607,24 +487,11 @@ name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "memchr" version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "memoffset" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "mime" version = "0.3.16" @@ -703,6 +570,15 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "nom" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "normalize-line-endings" version = "0.2.2" @@ -773,40 +649,39 @@ dependencies = [ "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "pin-project" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-internal" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pin-utils" +version = "0.1.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "pkg-config" version = "0.3.17" @@ -851,18 +726,6 @@ dependencies = [ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "publicsuffix" -version = "1.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "error-chain 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "quick-error" version = "1.2.3" @@ -888,24 +751,6 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rand" version = "0.7.3" @@ -918,15 +763,6 @@ dependencies = [ "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rand_chacha" version = "0.2.1" @@ -957,14 +793,6 @@ dependencies = [ "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -973,54 +801,6 @@ dependencies = [ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rdrand" version = "0.4.0" @@ -1060,50 +840,38 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.9.24" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-tls 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rustc-demangle" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "ryu" version = "1.0.2" @@ -1126,11 +894,6 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "security-framework" version = "0.3.4" @@ -1150,19 +913,6 @@ dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "serde" version = "1.0.104" @@ -1193,13 +943,13 @@ dependencies = [ [[package]] name = "serde_urlencoded" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1216,26 +966,15 @@ name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "smallvec" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "smallvec" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "string" -version = "0.2.1" +name = "sourcefile" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "strsim" @@ -1252,17 +991,6 @@ dependencies = [ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "synstructure" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "tar" version = "0.4.26" @@ -1288,7 +1016,7 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "predicates 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1349,125 +1077,40 @@ dependencies = [ [[package]] name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-buf" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-executor" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-io" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-reactor" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-sync" -version = "0.1.8" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-tcp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-threadpool" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "tokio-timer" -version = "0.2.13" +name = "tokio-tls" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-util" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1478,6 +1121,11 @@ dependencies = [ "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tower-service" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "treeline" version = "0.1.0" @@ -1488,14 +1136,6 @@ name = "try-lock" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "try_from" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "unicase" version = "2.6.0" @@ -1521,19 +1161,14 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "unicode-segmentation" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "url" -version = "1.7.2" +name = "unicode-xid" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "url" @@ -1555,19 +1190,16 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "uuid" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "vcpkg" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "version_check" version = "0.9.1" @@ -1585,10 +1217,9 @@ dependencies = [ [[package]] name = "want" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1598,6 +1229,103 @@ name = "wasi" version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wasm-bindgen" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wasm-bindgen-webidl" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "web-sys" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "weedle" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" @@ -1669,42 +1397,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" "checksum aho-corasick 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "d5e63fd144e18ba274ae7095c0197a870a7b9468abc801dd62f190d80817d2ec" "checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +"checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" "checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" "checksum assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7ac5c260f75e4e4ba87b7342be6edcecbcb3eb6741a0507fda7ad115845cc65" "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" -"checksum backtrace 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e4036b9bf40f3cf16aba72a3d65e8a520fc4bafcdc7079aea8f848c58c5b5536" -"checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" -"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742" +"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" "checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" "checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" -"checksum cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" -"checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -"checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" -"checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969" "checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" -"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" "checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" "checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" "checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" -"checksum error-chain 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d371106cc88ffdfb1eabd7111e432da544f16f3e2d7bf1dfe8bf575f1df045cd" "checksum escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19db1f7e74438642a5018cdf263bb1325b2e792f02dd0a3ca6d6c0f0d7b1d5a5" -"checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" -"checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" "checksum filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d" "checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" "checksum float-cmp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da62c4f1b81918835a8c6a484a397775fff5953fe83529afd51b05f5c6a6617d" @@ -1714,32 +1429,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" -"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" +"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" +"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" +"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" +"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" +"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -"checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" +"checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" +"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8" -"checksum http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" -"checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" +"checksum http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" +"checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" "checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -"checksum hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)" = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" -"checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" -"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +"checksum hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fa1c527bbc634be72aa7ba31e4e4def9bbb020f5416916279b7c705cd838893e" +"checksum hyper-tls 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" "checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" "checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +"checksum js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018" -"checksum lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" "checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" -"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" "checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" "checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" "checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" @@ -1747,6 +1464,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" +"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" "checksum normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e0a1a39eab95caf4f5556da9289b9e68f0aafac901b2ce80daaf020d3b733a8" "checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" "checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" @@ -1755,95 +1473,82 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)" = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" "checksum pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b69ced2bfa977c4541743a7427b89c94120684791a9629941fe6028dccab6528" -"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +"checksum pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" +"checksum pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" +"checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" +"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" "checksum predicates 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1188bf092c81c18228c383b190c069a8a613c18a046ffa9fdfc0f5fc8fb2da8a" "checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" "checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" "checksum proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435" -"checksum publicsuffix 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3bbaa49075179162b49acac1c6aa45fb4dafb5f13cf6794276d77bc7fd95757b" "checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" "checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" "checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" "checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" "checksum regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" -"checksum reqwest 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "f88643aea3c1343c804950d7bf983bd2067f5ab59db6d613a08e05572f2714ab" -"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" -"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +"checksum reqwest 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a9f62f24514117d09a8fc74b803d3d65faa27cea1c7378fb12b0d002913f3831" "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" "checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" "checksum schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" -"checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" "checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" "checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" -"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" "checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" "checksum serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" -"checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" +"checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" "checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" "checksum smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" -"checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" +"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" "checksum strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" "checksum syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "123bd9499cfb380418d509322d7a6d52e5315f064fe4b3ad18a53d6b92c07859" -"checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" "checksum tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "b3196bfbffbba3e57481b6ea32249fbaf590396a52505a2615adbb79d9d826d3" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" "checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" "checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -"checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -"checksum tokio-current-thread 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -"checksum tokio-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" -"checksum tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -"checksum tokio-reactor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" -"checksum tokio-sync 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" -"checksum tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" -"checksum tokio-threadpool 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" -"checksum tokio-timer 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" +"checksum tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b34bee1facdc352fba10c9c58b654e6ecb6a2250167772bf86071f7c5f2f5061" +"checksum tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7bde02a3a5291395f59b06ec6945a3077602fac2b07eeeaf0dee2122f3619828" +"checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" "checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +"checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" "checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" -"checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" "checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" +"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" "checksum utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "055058552ca15c566082fc61da433ae678f78986a6f16957e33162d1b218792a" -"checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" "checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" "checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" -"checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" +"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" "checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +"checksum wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" +"checksum wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" +"checksum wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8bbdd49e3e28b40dec6a9ba8d17798245ce32b019513a845369c641b275135d9" +"checksum wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" +"checksum wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" +"checksum wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" +"checksum wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" +"checksum web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" +"checksum weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/Cargo.toml b/Cargo.toml index a28c728..126951f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ docopt = "1" env_logger = { version = "0.7", optional = true } flate2 = "1" log = "0.4" -reqwest = "0.9.5" +reqwest = { version = "0.10.3", features = ["blocking", "native-tls"], default-features = false } serde = "1.0.21" serde_derive = "1.0.21" tar = "0.4.14" diff --git a/src/cache.rs b/src/cache.rs index d645f76..1689ec3 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -4,7 +4,7 @@ use std::io::Read; use std::path::PathBuf; use std::ffi::OsStr; -use reqwest::{Client, Proxy}; +use reqwest::{blocking::Client, Proxy}; use flate2::read::GzDecoder; use log::debug; use app_dirs::{get_app_root, AppDataType}; From 3e3403806c6be537c3e6d3d5f402d6753f6d0455 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 28 Feb 2020 00:38:44 +0100 Subject: [PATCH 041/368] Require Rust 1.39 (was 1.36) --- .github/workflows/ci.yml | 4 ++-- CHANGELOG.md | 2 +- README.md | 13 ++++++++++++- src/main.rs | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 889010f..6a580ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - rust: [1.36.0, stable] + rust: [1.39.0, stable] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v1 @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.36.0 + toolchain: 1.39.0 components: clippy override: true - uses: actions-rs/clippy-check@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index cd45670..683bbf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ Possible log types: ### Unreleased - [changed] Update dependencies (?) -- [changed] Require at least Rust 1.36 to build (previous: 1.32) +- [changed] Require at least Rust 1.39 to build (previous: 1.32) ### [v1.2.0][v1.2.0] (2019-08-10) diff --git a/README.md b/README.md index d54d421..903ad2f 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ tealdeer has been added to a few package managers: ### From Source (any platform) -tealdeer requires at least Rust 1.36. +tealdeer requires at least Rust 1.39. Debug build with logging enabled: @@ -211,6 +211,7 @@ Set this to enforce more compact output, where empty lines are stripped out - *Fish*: copy `fish_tealdeer` to `~/.config/fish/completions/tldr.fish` - *Zsh*: copy `zsh_tealdeer` to `/usr/share/zsh/site-functions/_tldr` + ## Development To run tests: @@ -223,6 +224,16 @@ To run lints: $ cargo clean && cargo clippy +## MSRV (Minimally Supported Rust Version) + +Tealdeer will not bump the MSRV requirement in patch versions, but it may +increase it in minor versions. The reason is that many important libraries +(e.g. the Tokio ecosystem, which is a dependency of reqwest, which is used for +downloading the cache) do not follow a static MSRV, but instead follow a +"stable + last n releases" approach. Trying to guarantee the same MSRV across +all minor releases would be a futile attempt. + + ## License Licensed under either of diff --git a/src/main.rs b/src/main.rs index 89c7e59..af48547 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ //! An implementation of [tldr](https://github.com/tldr-pages/tldr) in Rust. // -// Copyright (c) 2015-2018 tealdeer developers +// Copyright (c) 2015-2020 tealdeer developers // // Licensed under the Apache License, Version 2.0 or the MIT license From a594b0013e63d9996db161379492f0ec3e4e24a0 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 28 Feb 2020 01:11:10 +0100 Subject: [PATCH 042/368] Fix clippy warnings (#105) --- src/config.rs | 16 ++++++++-------- src/error.rs | 8 ++++---- src/types.rs | 32 ++++++++++++++++---------------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/config.rs b/src/config.rs index 42d5311..cfa810c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -37,14 +37,14 @@ pub enum RawColor { impl From for Color { fn from(raw_color: RawColor) -> Self { match raw_color { - RawColor::Black => Color::Black, - RawColor::Red => Color::Red, - RawColor::Green => Color::Green, - RawColor::Yellow => Color::Yellow, - RawColor::Blue => Color::Blue, - RawColor::Purple => Color::Purple, - RawColor::Cyan => Color::Cyan, - RawColor::White => Color::White, + RawColor::Black => Self::Black, + RawColor::Red => Self::Red, + RawColor::Green => Self::Green, + RawColor::Yellow => Self::Yellow, + RawColor::Blue => Self::Blue, + RawColor::Purple => Self::Purple, + RawColor::Cyan => Self::Cyan, + RawColor::White => Self::White, } } } diff --git a/src/error.rs b/src/error.rs index 60e0756..805e339 100644 --- a/src/error.rs +++ b/src/error.rs @@ -11,16 +11,16 @@ pub enum TealdeerError { impl From for TealdeerError { fn from(err: ReqwestError) -> Self { - TealdeerError::UpdateError(format!("HTTP error: {}", err.to_string())) + Self::UpdateError(format!("HTTP error: {}", err.to_string())) } } impl fmt::Display for TealdeerError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { - TealdeerError::CacheError(e) => write!(f, "CacheError: {}", e), - TealdeerError::ConfigError(e) => write!(f, "ConfigError: {}", e), - TealdeerError::UpdateError(e) => write!(f, "UpdateError: {}", e), + Self::CacheError(e) => write!(f, "CacheError: {}", e), + Self::ConfigError(e) => write!(f, "ConfigError: {}", e), + Self::UpdateError(e) => write!(f, "UpdateError: {}", e), } } } diff --git a/src/types.rs b/src/types.rs index f6caa23..380b770 100644 --- a/src/types.rs +++ b/src/types.rs @@ -18,11 +18,11 @@ pub enum OsType { impl fmt::Display for OsType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { - OsType::Linux => write!(f, "Linux"), - OsType::OsX => write!(f, "macOS / BSD"), - OsType::SunOs => write!(f, "SunOS"), - OsType::Windows => write!(f, "Windows"), - OsType::Other => write!(f, "Unknown OS"), + Self::Linux => write!(f, "Linux"), + Self::OsX => write!(f, "macOS / BSD"), + Self::SunOs => write!(f, "SunOS"), + Self::Windows => write!(f, "Windows"), + Self::Other => write!(f, "Unknown OS"), } } } @@ -43,23 +43,23 @@ impl<'a> From<&'a str> for LineType { let trimmed: &str = line.trim_end(); let mut chars = trimmed.chars(); match chars.next() { - None => LineType::Empty, - Some('#') => LineType::Title( + None => Self::Empty, + Some('#') => Self::Title( trimmed .trim_start_matches(|chr: char| chr == '#' || chr.is_whitespace()) .into(), ), - Some('>') => LineType::Description( + Some('>') => Self::Description( trimmed .trim_start_matches(|chr: char| chr == '>' || chr.is_whitespace()) .into(), ), - Some(' ') => LineType::ExampleCode( + Some(' ') => Self::ExampleCode( trimmed .trim_start_matches(char::is_whitespace) .into(), ), - _ => LineType::ExampleText(trimmed.into()), + _ => Self::ExampleText(trimmed.into()), } } } @@ -71,28 +71,28 @@ impl LineType { let trimmed = line.trim(); let mut chars = trimmed.chars(); match chars.next() { - None => LineType::Empty, - Some('#') => LineType::Title( + None => Self::Empty, + Some('#') => Self::Title( trimmed .trim_start_matches(|chr: char| chr == '#' || chr.is_whitespace()) .into(), ), - Some('>') => LineType::Description( + Some('>') => Self::Description( trimmed .trim_start_matches(|chr: char| chr == '>' || chr.is_whitespace()) .into(), ), - Some('-') => LineType::ExampleText( + Some('-') => Self::ExampleText( trimmed .trim_start_matches(|chr: char| chr == '-' || chr.is_whitespace()) .into(), ), - Some('`') if chars.last() == Some('`') => LineType::ExampleCode( + Some('`') if chars.last() == Some('`') => Self::ExampleCode( trimmed .trim_matches(|chr: char| chr == '`' || chr.is_whitespace()) .into(), ), - _ => LineType::Other(trimmed.into()), + _ => Self::Other(trimmed.into()), } } } From 3a5c0ce59bebe31e81b4f226e53202c36f6678de Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 28 Feb 2020 01:14:39 +0100 Subject: [PATCH 043/368] Release v1.3.0 --- CHANGELOG.md | 42 ++++++++++++++++++++++++++++++++++++++---- Cargo.lock | 2 +- Cargo.toml | 2 +- RELEASING.md | 2 +- 4 files changed, 41 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 683bbf4..5bf90c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,10 +12,30 @@ Possible log types: - `[security]` to invite users to upgrade in case of vulnerabilities. -### Unreleased +### [v1.3.0][v1.3.0] (2020-02-28) -- [changed] Update dependencies (?) +- [added] New config option for compact output mode ([#89][i89]) +- [added] New -m/--markdown parameter for raw rendering ([#95][i95]) +- [added] Provide zsh autocompletion ([#86][i86]) - [changed] Require at least Rust 1.39 to build (previous: 1.32) +- [changed] Switch to GitHub actions, CI testing now covers Windows as well ([#99][i99]) +- [changed] Tweak the "outdated cache" warning message ([#97][i97]) +- [changed] General maintenance: Upgrade dependencies, fix linter warnings +- [fixed] Fix Fish autocompletion on macOS ([#87][i87]) +- [fixed] Fix compilation on Windows by disabling pager ([#99][i99]) + +Contributors to this version: + +- [@Calinou][@Calinou] +- [@Delapouite][@Delapouite] +- [@james2doyle][@james2doyle] +- [@jesdazrez][@jesdazrez] +- [@korrat][@korrat] +- [@ma-renaud][@ma-renaud] +- [@Plommonsorbet][@Plommonsorbet] + +Thanks! + ### [v1.2.0][v1.2.0] (2019-08-10) @@ -84,20 +104,28 @@ Thanks! - First crates.io release -[@Bassets]: https://github.com/Bassets -[@Voultapher]: https://github.com/Voultapher [@aldanor]: https://github.com/aldanor +[@Bassets]: https://github.com/Bassets +[@Calinou]: https://github.com/Calinou [@das-g]: https://github.com/das-g +[@Delapouite]: https://github.com/Delapouite [@equal-l2]: https://github.com/equal-l2 +[@james2doyle]: https://github.com/james2doyle [@jcgruenhage]: https://github.com/jcgruenhage [@jdvr]: https://github.com/jdvr [@jedahan]: https://github.com/jedahan +[@jesdazrez]: https://github.com/jesdazrez +[@korrat]: https://github.com/korrat +[@ma-renaud]: https://github.com/ma-renaud [@mystal]: https://github.com/mystal [@natpen]: https://github.com/natpen +[@Plommonsorbet]: https://github.com/Plommonsorbet +[@Voultapher]: https://github.com/Voultapher [v1.0.0]: https://github.com/dbrgn/tealdeer/compare/v0.4.0...v1.0.0 [v1.1.0]: https://github.com/dbrgn/tealdeer/compare/v1.0.0...v1.1.0 [v1.2.0]: https://github.com/dbrgn/tealdeer/compare/v1.1.0...v1.2.0 +[v1.3.0]: https://github.com/dbrgn/tealdeer/compare/v1.2.0...v1.3.0 [i34]: https://github.com/dbrgn/tealdeer/issues/34 [i43]: https://github.com/dbrgn/tealdeer/issues/43 @@ -113,3 +141,9 @@ Thanks! [i75]: https://github.com/dbrgn/tealdeer/issues/75 [i77]: https://github.com/dbrgn/tealdeer/issues/77 [i84]: https://github.com/dbrgn/tealdeer/issues/84 +[i86]: https://github.com/dbrgn/tealdeer/issues/86 +[i87]: https://github.com/dbrgn/tealdeer/issues/87 +[i89]: https://github.com/dbrgn/tealdeer/issues/89 +[i95]: https://github.com/dbrgn/tealdeer/issues/95 +[i97]: https://github.com/dbrgn/tealdeer/issues/97 +[i99]: https://github.com/dbrgn/tealdeer/issues/99 diff --git a/Cargo.lock b/Cargo.lock index 6265b41..ad45566 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1004,7 +1004,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.2.0" +version = "1.3.0" dependencies = [ "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 126951f..5af42ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT/Apache-2.0" name = "tealdeer" readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" -version = "1.2.0" +version = "1.3.0" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "/bash_tealdeer", "/fish_tealdeer"] edition = "2018" diff --git a/RELEASING.md b/RELEASING.md index aed6a9b..28ccc28 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -12,7 +12,7 @@ Set variables: Update version numbers: $ vim Cargo.toml - $ cargo update + $ cargo update -p tealdeer Update changelog: From 2030d305c66e815794714715093ae47dd62838ca Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 28 Feb 2020 01:42:12 +0100 Subject: [PATCH 044/368] release-build script: Copy completions and licenses --- release-build.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/release-build.sh b/release-build.sh index 42e2f6d..3538bf4 100755 --- a/release-build.sh +++ b/release-build.sh @@ -21,6 +21,12 @@ declare -a rusttargets=( "arm-unknown-linux-musleabihf" ) +declare -a completions=( + "bash" + "fish" + "zsh" +) + function docker-download { echo "==> Downloading Docker image: messense/rust-musl-cross:$1" docker pull messense/rust-musl-cross:$1 @@ -59,4 +65,13 @@ for target in ${targets[@]}; do done echo "" +for completion in ${completions[@]}; do + echo "==> Copying ${completion} completion" + cp "${completion}_tealdeer" "dist-$VERSION/completions_${completion}" +done +echo "" + +echo "==> Copying licenses" +cp LICENSE-* "dist-$VERSION/" + echo "Done." From 0c24ea0cd4a996c8b9bc41921a41952aeb88529c Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 28 Feb 2020 01:44:45 +0100 Subject: [PATCH 045/368] release-build script: Include "linux" in binary name --- release-build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release-build.sh b/release-build.sh index 3538bf4..26567a4 100755 --- a/release-build.sh +++ b/release-build.sh @@ -49,19 +49,19 @@ mkdir "dist-$VERSION" for i in ${!targets[@]}; do echo "==> Copying ${targets[$i]}" - cp "target/${rusttargets[$i]}/release/tldr" "dist-$VERSION/tldr-${targets[$i]}" + cp "target/${rusttargets[$i]}/release/tldr" "dist-$VERSION/tldr-linux-${targets[$i]}" done echo "" for target in ${targets[@]}; do echo "==> Stripping $target" - docker run --rm -it -v "$(pwd)":/home/rust/src messense/rust-musl-cross:$target musl-strip -s /home/rust/src/dist-$VERSION/tldr-$target + docker run --rm -it -v "$(pwd)":/home/rust/src messense/rust-musl-cross:$target musl-strip -s /home/rust/src/dist-$VERSION/tldr-linux-$target done echo "" for target in ${targets[@]}; do echo "==> Signing $target" - gpg -a --output "dist-$VERSION/tldr-$target.sig" --detach-sig "dist-$VERSION/tldr-$target" + gpg -a --output "dist-$VERSION/tldr-linux-$target.sig" --detach-sig "dist-$VERSION/tldr-linux-$target" done echo "" From ad92ce6765c69aecb4fee31a02f149ff1731e1a3 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 28 Feb 2020 01:49:44 +0100 Subject: [PATCH 046/368] Update license copyright year --- LICENSE-MIT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE-MIT b/LICENSE-MIT index 2249a66..4203759 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright (C) 2015-2018 Danilo Bargen and contributors +Copyright (C) 2015-2020 Danilo Bargen and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in From d68088f94f3de91a6220393a4ef4a0176de6e354 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 28 Feb 2020 12:20:52 +0100 Subject: [PATCH 047/368] README: Add links to FreeBSD and Solus packages --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 903ad2f..7325a97 100644 --- a/README.md +++ b/README.md @@ -114,9 +114,11 @@ tealdeer has been added to a few package managers: - Arch Linux AUR: [`tealdeer`](https://aur.archlinux.org/packages/tealdeer/), [`tealdeer-bin`](https://aur.archlinux.org/packages/tealdeer-bin/) or [`tealdeer-git`](https://aur.archlinux.org/packages/tealdeer-git/) +- FreeBSD: [`sysutils/tealdeer`](https://www.freshports.org/sysutils/tealdeer/) - macOS Homebrew: [`tealdeer`](https://formulae.brew.sh/formula/tealdeer) - Nix: [`tealdeer`](https://nixos.org/nixos/packages.html#tealdeer) -- Void Linux XBPS: [`tealdeer`](https://github.com/void-linux/void-packages/tree/master/srcpkgs/tealdeer) +- Solus: [`tealdeer`](https://packages.getsol.us/shannon/t/tealdeer/) +- Void Linux: [`tealdeer`](https://github.com/void-linux/void-packages/tree/master/srcpkgs/tealdeer) ### From Source (any platform) From a9fa0c7f1ae69bd0b16b393093d7ee61dd5b240b Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 28 Feb 2020 12:29:29 +0100 Subject: [PATCH 048/368] README: Add link to openSUSE package --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7325a97..a527d6a 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ tealdeer has been added to a few package managers: - FreeBSD: [`sysutils/tealdeer`](https://www.freshports.org/sysutils/tealdeer/) - macOS Homebrew: [`tealdeer`](https://formulae.brew.sh/formula/tealdeer) - Nix: [`tealdeer`](https://nixos.org/nixos/packages.html#tealdeer) +- openSUSE: [`tealdeer`](https://software.opensuse.org/package/tealdeer?search_term=tealdeer) - Solus: [`tealdeer`](https://packages.getsol.us/shannon/t/tealdeer/) - Void Linux: [`tealdeer`](https://github.com/void-linux/void-packages/tree/master/srcpkgs/tealdeer) From 39b1d19d6615f8704d079e232508d59f6a99c12e Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 10 Apr 2020 23:49:39 +0200 Subject: [PATCH 049/368] Fix integration tests (#110) The tar tldr page was updated. --- tests/tar-markdown.expected | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/tar-markdown.expected b/tests/tar-markdown.expected index 069dbc0..c28df43 100644 --- a/tests/tar-markdown.expected +++ b/tests/tar-markdown.expected @@ -35,3 +35,7 @@ - Extract files matching a pattern: `tar xf {{source.tar}} --wildcards {{"*.html"}}` + +- Extract a specific file without preserving the folder structure: + +`tar xf {{source.tar}} {{source.tar/path/to/extract}} --strip-components={{depth_to_strip}}` From 5dd9457cf497c4709f17ceb9e698950e59562c34 Mon Sep 17 00:00:00 2001 From: michaeldel Date: Thu, 16 Apr 2020 11:56:14 +0200 Subject: [PATCH 050/368] Make list option comply with official spec (#112) Separate page list with newlines, not with commas. From the official spec: > Additional decoration MAY be printed if the standard output is a TTY. > If not, then the output MUST not contain any additional decorations. > For example a page list MUST be formatted with 1 page name per line > (to enable easy manipulation using standard CLI tools such as grep etc.). --- src/main.rs | 2 +- tests/lib.rs | 43 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index af48547..77fd4e4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -385,7 +385,7 @@ fn main() { }); // Print pages - println!("{}", pages.join(", ")); + println!("{}", pages.join("\n")); process::exit(0); } diff --git a/tests/lib.rs b/tests/lib.rs index 057ba10..3fc35ba 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -6,7 +6,7 @@ extern crate predicates; extern crate tempdir; extern crate utime; -use std::fs::File; +use std::fs::{create_dir_all, File}; use std::io::Write; use std::process::Command; @@ -34,6 +34,15 @@ impl TestEnv { } } + /// Add entry for that environment. + fn add_entry(&self, name: &str, contents: &str) { + let dir = self.cache_dir.path().join("tldr-master").join("pages").join("common"); + create_dir_all(&dir).unwrap(); + + let mut file = File::create(&dir.join(format!("{}.md", name))).unwrap(); + file.write_all(&contents.as_bytes()).unwrap(); + } + /// Disable default features. fn no_default_features(mut self) -> Self { self.default_features = false; @@ -311,3 +320,35 @@ fn test_pager_flag_enable() { .assert() .success(); } + +#[test] +fn test_list_flag_rendering() { + let testenv = TestEnv::new(); + + testenv + .command() + .args(&["--list"]) + .assert() + .failure() + .stderr(contains("Cache not found. Please run `tldr --update`.")); + + testenv.add_entry("foo", ""); + + testenv + .command() + .args(&["--list"]) + .assert() + .success() + .stdout("foo\n"); + + testenv.add_entry("bar", ""); + testenv.add_entry("baz", ""); + testenv.add_entry("qux", ""); + + testenv + .command() + .args(&["--list"]) + .assert() + .success() + .stdout("bar\nbaz\nfoo\nqux\n"); +} From a45c19647f8c14663a3555d266fd6208d619439a Mon Sep 17 00:00:00 2001 From: michaeldel Date: Thu, 16 Apr 2020 21:42:02 +0200 Subject: [PATCH 051/368] Move cache age warning to stderr (#114) Fixes #113 --- src/main.rs | 2 +- tests/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 77fd4e4..38f646e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -180,7 +180,7 @@ fn check_cache(args: &Args) { if args.flag_quiet { return; } - println!( + eprintln!( "{}", Color::Yellow.paint(format!( "The cache hasn't been updated for more than {} days.\n\ diff --git a/tests/lib.rs b/tests/lib.rs index 3fc35ba..810c9ec 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -165,14 +165,14 @@ fn test_quiet_old_cache() { .args(&["tldr"]) .assert() .success() - .stdout(contains("The cache hasn't been updated for more than ")); + .stderr(contains("The cache hasn't been updated for more than ")); testenv .command() .args(&["tldr", "--quiet"]) .assert() .success() - .stdout(contains("The cache hasn't been updated for more than ").not()); + .stderr(contains("The cache hasn't been updated for more than ").not()); } #[test] From 06537c7218cebff8227f7ef1c742648f2cfb8466 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 8 May 2020 22:40:34 +0200 Subject: [PATCH 052/368] Tests: Allow dead code for feature selection (#118) These methods might be useful in the future, so I don't want to remove them even if they're unused. The warnings clutter diffs in CI though. --- tests/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/lib.rs b/tests/lib.rs index 810c9ec..42c4c43 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -44,12 +44,14 @@ impl TestEnv { } /// Disable default features. + #[allow(dead_code)] // Might be useful in the future fn no_default_features(mut self) -> Self { self.default_features = false; self } /// Add the specified feature. + #[allow(dead_code)] // Might be useful in the future fn with_feature>(mut self, feature: S) -> Self { self.features.push(feature.into()); self From ed1ba6beed67455c6d67d1448b497fe653948a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ila=C3=AF=20Deutel?= Date: Wed, 29 Apr 2020 23:10:04 -0700 Subject: [PATCH 053/368] Implement automatic cache updates --- src/config.rs | 26 ++++++++ src/main.rs | 150 ++++++++++++++++++++++------------------------ tests/config.toml | 4 ++ tests/lib.rs | 58 ++++++++++++++++++ 4 files changed, 158 insertions(+), 80 deletions(-) diff --git a/src/config.rs b/src/config.rs index cfa810c..56e8bff 100644 --- a/src/config.rs +++ b/src/config.rs @@ -2,6 +2,7 @@ use std::env; use std::fs; use std::io::{Error as IoError, Read, Write}; use std::path::PathBuf; +use std::time::Duration; use ansi_term::{Color, Style}; use app_dirs::{get_app_root, AppDataType}; @@ -12,6 +13,7 @@ use toml; use crate::error::TealdeerError::{self, ConfigError}; pub const CONFIG_FILE_NAME: &str = "config.toml"; +pub const MAX_CACHE_AGE: Duration = Duration::from_secs(2_592_000); // 30 days fn default_underline() -> bool { false @@ -116,12 +118,22 @@ struct RawDisplayConfig { pub use_pager: bool, } +#[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] +struct RawUpdatesConfig { + #[serde(default)] + pub auto_update: bool, + #[serde(default)] + pub auto_update_interval_hours: u64, +} + #[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] struct RawConfig { #[serde(default)] style: RawStyleConfig, #[serde(default)] display: RawDisplayConfig, + #[serde(default)] + updates: RawUpdatesConfig, } impl RawConfig { @@ -135,6 +147,7 @@ impl RawConfig { raw_config.style.example_variable.foreground = Some(RawColor::Cyan); raw_config.style.example_variable.underline = true; raw_config.display.use_pager = false; + raw_config.updates.auto_update_interval_hours = MAX_CACHE_AGE.as_secs() / 3600; raw_config } @@ -155,10 +168,17 @@ pub struct DisplayConfig { pub use_pager: bool, } +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct UpdatesConfig { + pub auto_update: bool, + pub auto_update_interval: Duration, +} + #[derive(Copy, Clone, Debug, PartialEq)] pub struct Config { pub style: StyleConfig, pub display: DisplayConfig, + pub updates: UpdatesConfig, } impl From for Config { @@ -175,6 +195,12 @@ impl From for Config { compact: raw_config.display.compact, use_pager: raw_config.display.use_pager, }, + updates: UpdatesConfig { + auto_update: raw_config.updates.auto_update, + auto_update_interval: Duration::from_secs( + raw_config.updates.auto_update_interval_hours * 3600, + ), + }, } } } diff --git a/src/main.rs b/src/main.rs index 38f646e..3d8622d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,6 @@ use std::io::BufReader; use std::io::BufRead; use std::path::{Path, PathBuf}; use std::process; -use std::time::Duration; use ansi_term::Color; use app_dirs::AppInfo; @@ -38,7 +37,7 @@ mod tokenizer; mod types; use crate::cache::Cache; -use crate::config::{get_config_path, make_default_config, Config}; +use crate::config::{get_config_path, make_default_config, Config, MAX_CACHE_AGE}; use crate::error::TealdeerError::{CacheError, ConfigError, UpdateError}; use crate::formatter::print_lines; use crate::tokenizer::Tokenizer; @@ -86,7 +85,6 @@ To render a local file (for testing): $ tldr --render /path/to/file.md "; const ARCHIVE_URL: &str = "https://github.com/tldr-pages/tldr/archive/master.tar.gz"; -const MAX_CACHE_AGE: Duration = Duration::from_secs(2_592_000); // 30 days #[cfg(not(target_os = "windows"))] const PAGER_COMMAND: &str = "less -R"; @@ -108,24 +106,11 @@ struct Args { } /// Print page by path -fn print_page(path: &Path, enable_markdown: bool, enable_styles: bool) -> Result<(), String> { +fn print_page(path: &Path, enable_markdown: bool, config: &Config) -> Result<(), String> { // Open file let file = File::open(path).map_err(|msg| format!("Could not open file: {}", msg))?; let reader = BufReader::new(file); - // Look up config file, if none is found fall back to default config. - let config = match Config::load(enable_styles) { - Ok(config) => config, - Err(ConfigError(msg)) => { - eprintln!("Could not load config: {}", msg); - process::exit(1); - } - Err(e) => { - eprintln!("Could not load config: {}", e); - process::exit(1); - } - }; - if enable_markdown { // Print the raw markdown of the file. for line in reader.lines() { @@ -142,59 +127,42 @@ fn print_page(path: &Path, enable_markdown: bool, enable_styles: bool) -> Result /// Set up display pager #[cfg(not(target_os = "windows"))] -fn configure_pager(args: &Args, enable_styles: bool) { - // Flags have precedence - if args.flag_pager { - Pager::with_default_pager(PAGER_COMMAND).setup(); - return; - } - - // Then check config - let config = match Config::load(enable_styles) { - Ok(config) => config, - Err(ConfigError(msg)) => { - eprintln!("Could not load config: {}", msg); - process::exit(1); - } - Err(e) => { - eprintln!("Could not load config: {}", e); - process::exit(1); - } - }; - - if config.display.use_pager { - Pager::with_default_pager(PAGER_COMMAND).setup(); - } +fn configure_pager() { + Pager::with_default_pager(PAGER_COMMAND).setup(); } #[cfg(target_os = "windows")] -fn configure_pager(_args: &Args, _enable_styles: bool) { +fn configure_pager() { eprintln!("Warning: -p / --pager flag not available on Windows!"); } +fn should_update_cache(args: &Args, config: &Config) -> bool { + args.flag_update + || (config.updates.auto_update + && Cache::last_update().map_or(true, |ago| ago >= config.updates.auto_update_interval)) +} + /// Check the cache for freshness fn check_cache(args: &Args) { - if !args.flag_update { - match Cache::last_update() { - Some(ago) if ago > MAX_CACHE_AGE => { - if args.flag_quiet { - return; - } - eprintln!( - "{}", - Color::Yellow.paint(format!( - "The cache hasn't been updated for more than {} days.\n\ + match Cache::last_update() { + Some(ago) if ago > MAX_CACHE_AGE => { + if args.flag_quiet { + return; + } + eprintln!( + "{}", + Color::Yellow.paint(format!( + "The cache hasn't been updated for more than {} days.\n\ You should probably run `tldr --update` soon.", - MAX_CACHE_AGE.as_secs() / 24 / 3600 - )) - ); - } - None => { - eprintln!("Cache not found. Please run `tldr --update`."); - process::exit(1); - } - _ => {} + MAX_CACHE_AGE.as_secs() / 24 / 3600 + )) + ); } + None => { + eprintln!("Cache not found. Please run `tldr --update`."); + process::exit(1); + } + _ => {} }; } @@ -320,14 +288,38 @@ fn main() { process::exit(0); } + // Show config file and path, pass through + if args.flag_config_path { + show_config_path(); + } + + // Create a basic config and exit + if args.flag_seed_config { + create_config_and_exit(); + } + // Determine the usage of styles #[cfg(target_os = "windows")] let enable_styles = ansi_term::enable_ansi_support().is_ok(); #[cfg(not(target_os = "windows"))] let enable_styles = true; - // Configure pager - configure_pager(&args, enable_styles); + // Look up config file, if none is found fall back to default config. + let config = match Config::load(enable_styles) { + Ok(config) => config, + Err(ConfigError(msg)) => { + eprintln!("Could not load config: {}", msg); + process::exit(1); + } + Err(e) => { + eprintln!("Could not load config: {}", e); + process::exit(1); + } + }; + + if args.flag_pager || config.display.use_pager { + configure_pager(); + } // Specify target OS let os: OsType = match args.flag_os { @@ -344,24 +336,17 @@ fn main() { } // Update cache, pass through - if args.flag_update { + let cache_updated = if should_update_cache(&args, &config) { update_cache(&cache, args.flag_quiet); - } - - // Show config file and path, pass through - if args.flag_config_path { - show_config_path(); - } - - // Create a basic config and exit - if args.flag_seed_config { - create_config_and_exit(); - } + true + } else { + false + }; // Render local file and exit if let Some(ref file) = args.flag_render { let path = PathBuf::from(file); - if let Err(msg) = print_page(&path, args.flag_markdown, enable_styles) { + if let Err(msg) = print_page(&path, args.flag_markdown, &config) { eprintln!("{}", msg); process::exit(1); } else { @@ -371,8 +356,10 @@ fn main() { // List cached commands and exit if args.flag_list { - // Check cache for freshness - check_cache(&args); + if !cache_updated { + // Check cache for freshness + check_cache(&args); + } // Get list of pages let pages = cache.list_pages().unwrap_or_else(|e| { @@ -392,12 +379,15 @@ fn main() { // Show command from cache if let Some(ref command) = args.arg_command { let command = command.join("-"); - // Check cache for freshness - check_cache(&args); + + if !cache_updated { + // Check cache for freshness + check_cache(&args); + } // Search for command in cache if let Some(path) = cache.find_page(&command) { - if let Err(msg) = print_page(&path, args.flag_markdown, enable_styles) { + if let Err(msg) = print_page(&path, args.flag_markdown, &config) { eprintln!("{}", msg); process::exit(1); } else { diff --git a/tests/config.toml b/tests/config.toml index c3a9cd6..d700672 100644 --- a/tests/config.toml +++ b/tests/config.toml @@ -19,3 +19,7 @@ bold = false [display] use_pager = false compact = false + +[updates] +auto_update = false +auto_update_interval_hours = 720 diff --git a/tests/lib.rs b/tests/lib.rs index 42c4c43..831d478 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -354,3 +354,61 @@ fn test_list_flag_rendering() { .success() .stdout("bar\nbaz\nfoo\nqux\n"); } + +#[test] +fn test_autoupdate_cache() { + let testenv = TestEnv::new(); + + // The first time, if automatic updates are disabled, the cache should not be found + testenv + .command() + .args(&["--list"]) + .assert() + .failure() + .stderr(contains("Cache not found. Please run `tldr --update`.")); + + let config_file_path = testenv.config_dir.path().join("config.toml"); + let cache_file_path = testenv.cache_dir.path().join("tldr-master"); + + // Activate automatic updates, set the auto-update interval to 24 hours + let mut config_file = File::create(&config_file_path).unwrap(); + config_file + .write("[updates]\nauto_update = true\nauto_update_interval_hours = 24".as_bytes()) + .unwrap(); + config_file.flush().unwrap(); + + // Helper function that runs `tldr --list` and asserts that the cache is automatically updated + // or not, depending on the value of `expected`. + let check_cache_updated = |expected| { + let assert = testenv.command().args(&["--list"]).assert().success(); + let pred = contains("Successfully updated cache"); + if expected { + assert.stdout(pred) + } else { + assert.stdout(pred.not()) + }; + }; + + // The cache is updated the first time we run `tldr --list` + check_cache_updated(true); + + // The cache is not updated with a subsequent call + check_cache_updated(false); + + let (_, orig_mtime) = utime::get_file_times(&cache_file_path).unwrap(); + + // We update the modification and access times such that they are about 23 hours from now. + // auto-update interval is 24 hours, the cache should not be updated + let new_mtime = orig_mtime - 82_800; + utime::set_file_times(&cache_file_path, new_mtime, new_mtime).unwrap(); + check_cache_updated(false); + + // We update the modification and access times such that they are about 25 hours from now. + // auto-update interval is 24 hours, the cache should be updated + let new_mtime = orig_mtime - 90_000; + utime::set_file_times(&cache_file_path, new_mtime, new_mtime).unwrap(); + check_cache_updated(true); + + // The cache is not updated with a subsequent call + check_cache_updated(false); +} From a59182b6ccb129356e3d2f3ae9c92fec618913bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ila=C3=AF=20Deutel?= Date: Fri, 8 May 2020 00:27:37 -0700 Subject: [PATCH 054/368] Use filetime instead of utime to set modification times in tests --- Cargo.lock | 19 ++++--------------- Cargo.toml | 2 +- tests/lib.rs | 19 +++++++++++-------- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ad45566..7aaf94f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -194,7 +194,7 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -996,7 +996,7 @@ name = "tar" version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1012,6 +1012,7 @@ dependencies = [ "docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1022,7 +1023,6 @@ dependencies = [ "tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1180,16 +1180,6 @@ dependencies = [ "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "utime" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "vcpkg" version = "0.2.8" @@ -1420,7 +1410,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" "checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" "checksum escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19db1f7e74438642a5018cdf263bb1325b2e792f02dd0a3ca6d6c0f0d7b1d5a5" -"checksum filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d" +"checksum filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "affc17579b132fc2461adf7c575cc6e8b134ebca52c51f5411388965227dc695" "checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" "checksum float-cmp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da62c4f1b81918835a8c6a484a397775fff5953fe83529afd51b05f5c6a6617d" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" @@ -1533,7 +1523,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" -"checksum utime 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "055058552ca15c566082fc61da433ae678f78986a6f16957e33162d1b218792a" "checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" diff --git a/Cargo.toml b/Cargo.toml index 5af42ff..efd4553 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ assert_cmd = "0.10" escargot = "0.3" predicates = "1.0" tempdir = "^0.3" -utime = "0.2.0" +filetime = "0.2.10" [features] logging = ["env_logger"] diff --git a/tests/lib.rs b/tests/lib.rs index 831d478..5f33f28 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -2,13 +2,14 @@ extern crate assert_cmd; extern crate escargot; +extern crate filetime; extern crate predicates; extern crate tempdir; -extern crate utime; use std::fs::{create_dir_all, File}; use std::io::Write; use std::process::Command; +use std::time::{Duration, SystemTime}; use assert_cmd::prelude::*; use tempdir::TempDir; @@ -160,7 +161,11 @@ fn test_quiet_old_cache() { .success() .stdout(is_empty()); - let _ = utime::set_file_times(testenv.cache_dir.path().join("tldr-master"), 1, 1).unwrap(); + filetime::set_file_mtime( + testenv.cache_dir.path().join("tldr-master"), + filetime::FileTime::from_unix_time(1, 0), + ) + .unwrap(); testenv .command() @@ -395,18 +400,16 @@ fn test_autoupdate_cache() { // The cache is not updated with a subsequent call check_cache_updated(false); - let (_, orig_mtime) = utime::get_file_times(&cache_file_path).unwrap(); - // We update the modification and access times such that they are about 23 hours from now. // auto-update interval is 24 hours, the cache should not be updated - let new_mtime = orig_mtime - 82_800; - utime::set_file_times(&cache_file_path, new_mtime, new_mtime).unwrap(); + let new_mtime = SystemTime::now() - Duration::from_secs(82_800); + filetime::set_file_mtime(&cache_file_path, new_mtime.into()).unwrap(); check_cache_updated(false); // We update the modification and access times such that they are about 25 hours from now. // auto-update interval is 24 hours, the cache should be updated - let new_mtime = orig_mtime - 90_000; - utime::set_file_times(&cache_file_path, new_mtime, new_mtime).unwrap(); + let new_mtime = SystemTime::now() - Duration::from_secs(90_000); + filetime::set_file_mtime(&cache_file_path, new_mtime.into()).unwrap(); check_cache_updated(true); // The cache is not updated with a subsequent call From 2f2fe4dd921b3eb4379f9ca5e67269c190aff2da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ila=C3=AF=20Deutel?= Date: Fri, 8 May 2020 15:08:35 -0700 Subject: [PATCH 055/368] Fix serde default for updates.auto_update_interval_hours --- src/config.rs | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/config.rs b/src/config.rs index 56e8bff..51d9b28 100644 --- a/src/config.rs +++ b/src/config.rs @@ -14,6 +14,7 @@ use crate::error::TealdeerError::{self, ConfigError}; pub const CONFIG_FILE_NAME: &str = "config.toml"; pub const MAX_CACHE_AGE: Duration = Duration::from_secs(2_592_000); // 30 days +const DEFAULT_UPDATE_INTERVAL_HOURS: u64 = MAX_CACHE_AGE.as_secs() / 3600; // 30 days fn default_underline() -> bool { false @@ -118,14 +119,30 @@ struct RawDisplayConfig { pub use_pager: bool, } -#[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] +/// Serde doesn't support default values yet (tracking issue: +/// https://github.com/serde-rs/serde/issues/368), so we need to wrap DEFAULT_UPDATE_INTERVAL_HOURS +/// in a function to be able to use #[serde(default = ...)] +const fn default_auto_update_interval_hours() -> u64 { + DEFAULT_UPDATE_INTERVAL_HOURS +} + +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] struct RawUpdatesConfig { #[serde(default)] pub auto_update: bool, - #[serde(default)] + #[serde(default = "default_auto_update_interval_hours")] pub auto_update_interval_hours: u64, } +impl Default for RawUpdatesConfig { + fn default() -> Self { + Self { + auto_update: false, + auto_update_interval_hours: DEFAULT_UPDATE_INTERVAL_HOURS, + } + } +} + #[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] struct RawConfig { #[serde(default)] @@ -146,8 +163,6 @@ impl RawConfig { raw_config.style.example_code.foreground = Some(RawColor::Cyan); raw_config.style.example_variable.foreground = Some(RawColor::Cyan); raw_config.style.example_variable.underline = true; - raw_config.display.use_pager = false; - raw_config.updates.auto_update_interval_hours = MAX_CACHE_AGE.as_secs() / 3600; raw_config } From 509d450585efe07984110d67072c9156f4fdb3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ila=C3=AF=20Deutel?= Date: Sun, 31 May 2020 17:12:18 -0700 Subject: [PATCH 056/368] Add instructions for configuring auto updates to README --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index a527d6a..3f6857b 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,31 @@ Set this to enforce more compact output, where empty lines are stripped out compact = true +### Automatic updates + +tealdeer can refresh the cache automatically when it is outdated. This +behavior can be configured in the `updates` section and is disabled by +default. + +#### `auto_update` + +Specifies whether the auto-update feature should be enabled (defaults to +`false`). + + [updates] + auto_update = true + +#### `auto_update_interval_hours` + +Duration, since the last cache update, after which the cache will be +refreshed (defaults to 720 hours). This parameter is ignored if `auto_update` +is set to `false`. + + [updates] + auto_update = true + auto_update_interval_hours = 24 + + ## Autocompletion - *Bash*: copy `bash_tealdeer` to `/usr/share/bash-completion/completions/tldr` From 95e6b0520ff23debcdc6aa2455d25acf63b36c21 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 18 Jul 2020 00:24:29 +0200 Subject: [PATCH 057/368] Upgrade assert_cmd and escargot (#123) --- Cargo.lock | 46 ++++++++++++++++++++++++++++++++-------------- Cargo.toml | 4 ++-- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7aaf94f..20dbfd0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,13 +39,14 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "0.10.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wait-timeout 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -128,6 +129,11 @@ name = "difference" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "docopt" version = "1.1.0" @@ -185,9 +191,11 @@ dependencies = [ [[package]] name = "escargot" -version = "0.3.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -581,7 +589,7 @@ dependencies = [ [[package]] name = "normalize-line-endings" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -694,12 +702,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "predicates" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "float-cmp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "normalize-line-endings 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1008,15 +1016,15 @@ version = "1.3.0" dependencies = [ "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "assert_cmd 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "escargot 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1195,6 +1203,14 @@ name = "version_check" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "walkdir" version = "2.3.1" @@ -1389,7 +1405,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" "checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" "checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" -"checksum assert_cmd 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7ac5c260f75e4e4ba87b7342be6edcecbcb3eb6741a0507fda7ad115845cc65" +"checksum assert_cmd 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c88b9ca26f9c16ec830350d309397e74ee9abdfd8eb1f71cb6ecc71a3fc818da" "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" "checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" @@ -1403,13 +1419,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" +"checksum doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" "checksum docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969" "checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" "checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" "checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" "checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" -"checksum escargot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19db1f7e74438642a5018cdf263bb1325b2e792f02dd0a3ca6d6c0f0d7b1d5a5" +"checksum escargot 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74cf96bec282dcdb07099f7e31d9fed323bca9435a09aba7b6d99b7617bca96d" "checksum filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "affc17579b132fc2461adf7c575cc6e8b134ebca52c51f5411388965227dc695" "checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" "checksum float-cmp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da62c4f1b81918835a8c6a484a397775fff5953fe83529afd51b05f5c6a6617d" @@ -1455,7 +1472,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" -"checksum normalize-line-endings 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e0a1a39eab95caf4f5556da9289b9e68f0aafac901b2ce80daaf020d3b733a8" +"checksum normalize-line-endings 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" "checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" "checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" @@ -1470,7 +1487,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" -"checksum predicates 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1188bf092c81c18228c383b190c069a8a613c18a046ffa9fdfc0f5fc8fb2da8a" +"checksum predicates 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "347a1b6f0b21e636bc9872fb60b83b8e185f6f5516298b8238699f7f9a531030" "checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" "checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" "checksum proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435" @@ -1526,6 +1543,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" +"checksum wait-timeout 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" "checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" "checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" "checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" diff --git a/Cargo.toml b/Cargo.toml index efd4553..38edc4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,8 +33,8 @@ xdg = "2.1.0" pager = "0.15" [dev-dependencies] -assert_cmd = "0.10" -escargot = "0.3" +assert_cmd = "1.0.1" +escargot = "0.5" predicates = "1.0" tempdir = "^0.3" filetime = "0.2.10" From 0b277c75157b505427aadf3986c814803c2ab5f6 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 18 Jul 2020 01:06:58 +0200 Subject: [PATCH 058/368] Add test for pager warnings on Windows (#122) --- tests/lib.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/lib.rs b/tests/lib.rs index 5f33f28..1416942 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -415,3 +415,31 @@ fn test_autoupdate_cache() { // The cache is not updated with a subsequent call check_cache_updated(false); } + +#[test] +#[cfg(target_os = "windows")] +fn test_pager_warning() { + let testenv = TestEnv::new(); + testenv + .command() + .args(&["--update"]) + .assert() + .success() + .stdout(contains("Successfully updated cache.")); + + // Regular call should not show a "pager flag not available on windows" warning + testenv + .command() + .args(&["tar"]) + .assert() + .success() + .stderr(contains("pager flag not available on Windows").not()); + + // But it should be shown if the pager flag is true + testenv + .command() + .args(&["tar", "-p"]) + .assert() + .success() + .stderr(contains("pager flag not available on Windows")); +} From 64e2c7b7995db513619d9c9c07671f4ce6f034f3 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin <47574893+niklasmohrin@users.noreply.github.com> Date: Tue, 11 Aug 2020 21:04:48 +0200 Subject: [PATCH 059/368] Update outdated expected output for the markdown test (#128) Fixes #126. --- tests/tar-markdown.expected | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tar-markdown.expected b/tests/tar-markdown.expected index c28df43..9523d6a 100644 --- a/tests/tar-markdown.expected +++ b/tests/tar-markdown.expected @@ -20,9 +20,9 @@ `tar xf {{source.tar[.gz|.bz2|.xz]}}` -- Extract an archive into a target directory: +- Extract a (compressed) archive into the target directory: -`tar xf {{source.tar}} -C {{directory}}` +`tar xf {{source.tar[.gz|.bz2|.xz]}} -C {{directory}}` - Create a compressed archive, using archive suffix to determine the compression program: From 55079b8e776c1088b5d9ba5190ca5731d74bb955 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 21 Aug 2020 21:37:10 +0200 Subject: [PATCH 060/368] Document requirement for libssl-dev Closes #130 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 3f6857b..0307791 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,10 @@ Build and install the tool via cargo... $ cargo install tealdeer +*(Note: You might need to install OpenSSL development headers, otherwise you get +a "failed to run custom build command for openssl-sys" error message. The +package is called `libssl-dev` on Ubuntu.)* + ### From Package Manager tealdeer has been added to a few package managers: From e8dcde4955fe95827d6a3c236f2a2adad102e86e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sun, 30 Aug 2020 15:37:33 +0200 Subject: [PATCH 061/368] Mention the environment variable TEALDEER_CONFIG_DIR in the README (#131) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0307791..218525b 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,10 @@ The configuration file path follows OS conventions. It can be queried with the f $ tldr --config-path +The directory where the configuration file resides may be overwritten by the +environment variable `TEALDEER_CONFIG_DIR`. Remember to use an absolute path. +Variable expansion will not be performed on the path. + ### Style Using the config file, the style (e.g. colors or underlines) can be customized. From 590bb44585f19b3c00c3dea14b561fbbbc3e5c2b Mon Sep 17 00:00:00 2001 From: Kornel Date: Sun, 30 Aug 2020 17:37:27 +0100 Subject: [PATCH 062/368] Switch to maintained app_dirs2 (#124) The app_dirs crate is no longer actively maintained. The app_dirs2 crate is a drop-in replacement. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 38edc4b..f82ae84 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ path = "src/main.rs" [dependencies] ansi_term = "0.12.0" -app_dirs = "1.2.1" +app_dirs = { version = "2", package = "app_dirs2" } docopt = "1" env_logger = { version = "0.7", optional = true } flate2 = "1" From 3597e344cb29e6c99dcc97b19f36b55c79c8e01e Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 30 Aug 2020 18:39:04 +0200 Subject: [PATCH 063/368] Apply rustfmt to codebase Co-authored-by: Atul Bhosale Co-authored-by: Lovecraftian Horror --- src/cache.rs | 20 ++++++++++++-------- src/error.rs | 2 +- src/main.rs | 32 ++++++++++++++++++-------------- src/tokenizer.rs | 2 +- src/types.rs | 6 +----- tests/lib.rs | 35 ++++++++++++++++++++++++----------- 6 files changed, 57 insertions(+), 40 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 1689ec3..2de33bb 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -1,13 +1,13 @@ use std::env; +use std::ffi::OsStr; use std::fs; use std::io::Read; use std::path::PathBuf; -use std::ffi::OsStr; -use reqwest::{blocking::Client, Proxy}; +use app_dirs::{get_app_root, AppDataType}; use flate2::read::GzDecoder; use log::debug; -use app_dirs::{get_app_root, AppDataType}; +use reqwest::{blocking::Client, Proxy}; use std::time::{Duration, SystemTime}; use tar::Archive; use walkdir::{DirEntry, WalkDir}; @@ -53,7 +53,9 @@ impl Cache { // Otherwise, fall back to user cache directory. match get_app_root(AppDataType::UserCache, &crate::APP_INFO) { Ok(dirs) => Ok(dirs), - Err(_) => Err(CacheError("Could not determine user cache directory.".into())), + Err(_) => Err(CacheError( + "Could not determine user cache directory.".into(), + )), } } @@ -228,10 +230,12 @@ impl Cache { pub fn clear() -> Result<(), TealdeerError> { let path = Self::get_cache_dir()?; if path.exists() && path.is_dir() { - fs::remove_dir_all(&path).map_err(|_| CacheError(format!( - "Could not remove cache directory ({}).", - path.display() - )))?; + fs::remove_dir_all(&path).map_err(|_| { + CacheError(format!( + "Could not remove cache directory ({}).", + path.display() + )) + })?; } else if path.exists() { return Err(CacheError(format!( "Cache path ({}) is not a directory.", diff --git a/src/error.rs b/src/error.rs index 805e339..fdac30f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,5 +1,5 @@ -use std::fmt; use reqwest::Error as ReqwestError; +use std::fmt; #[derive(Debug)] #[allow(clippy::pub_enum_variant_names)] diff --git a/src/main.rs b/src/main.rs index 3d8622d..d4fbf5a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,8 +17,8 @@ extern crate env_logger; use std::fs::File; -use std::io::BufReader; use std::io::BufRead; +use std::io::BufReader; use std::path::{Path, PathBuf}; use std::process; @@ -247,11 +247,13 @@ fn get_os() -> OsType { OsType::Linux } -#[cfg(any(target_os = "macos", - target_os = "freebsd", - target_os = "netbsd", - target_os = "openbsd", - target_os = "dragonfly"))] +#[cfg(any( + target_os = "macos", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd", + target_os = "dragonfly" +))] fn get_os() -> OsType { OsType::OsX } @@ -261,13 +263,15 @@ fn get_os() -> OsType { OsType::Windows } -#[cfg(not(any(target_os = "linux", - target_os = "macos", - target_os = "freebsd", - target_os = "netbsd", - target_os = "openbsd", - target_os = "dragonfly", - target_os = "windows")))] +#[cfg(not(any( + target_os = "linux", + target_os = "macos", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd", + target_os = "dragonfly", + target_os = "windows" +)))] fn get_os() -> OsType { OsType::Other } @@ -412,8 +416,8 @@ fn main() { #[cfg(test)] mod test { - use docopt::{Docopt, Error}; use crate::{Args, OsType, USAGE}; + use docopt::{Docopt, Error}; fn test_helper(argv: &[&str]) -> Result { Docopt::new(USAGE).and_then(|d| d.argv(argv.iter()).deserialize()) diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 2e7b394..f9b3837 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -2,8 +2,8 @@ use std::io::BufRead; -use log::warn; use crate::types::LineType; +use log::warn; #[derive(Debug, PartialEq, Eq)] pub enum TldrFormat { diff --git a/src/types.rs b/src/types.rs index 380b770..2c0941e 100644 --- a/src/types.rs +++ b/src/types.rs @@ -54,11 +54,7 @@ impl<'a> From<&'a str> for LineType { .trim_start_matches(|chr: char| chr == '>' || chr.is_whitespace()) .into(), ), - Some(' ') => Self::ExampleCode( - trimmed - .trim_start_matches(char::is_whitespace) - .into(), - ), + Some(' ') => Self::ExampleCode(trimmed.trim_start_matches(char::is_whitespace).into()), _ => Self::ExampleText(trimmed.into()), } } diff --git a/tests/lib.rs b/tests/lib.rs index 1416942..856d537 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -12,9 +12,9 @@ use std::process::Command; use std::time::{Duration, SystemTime}; use assert_cmd::prelude::*; -use tempdir::TempDir; use predicates::boolean::PredicateBooleanExt; use predicates::prelude::predicate::str::{contains, is_empty, similar}; +use tempdir::TempDir; struct TestEnv { pub cache_dir: TempDir, @@ -37,7 +37,12 @@ impl TestEnv { /// Add entry for that environment. fn add_entry(&self, name: &str, contents: &str) { - let dir = self.cache_dir.path().join("tldr-master").join("pages").join("common"); + let dir = self + .cache_dir + .path() + .join("tldr-master") + .join("pages") + .join("common"); create_dir_all(&dir).unwrap(); let mut file = File::create(&dir.join(format!("{}.md", name))).unwrap(); @@ -72,8 +77,14 @@ impl TestEnv { } let run = build.run().unwrap(); let mut cmd = run.command(); - cmd.env("TEALDEER_CACHE_DIR", self.cache_dir.path().to_str().unwrap()); - cmd.env("TEALDEER_CONFIG_DIR", self.config_dir.path().to_str().unwrap()); + cmd.env( + "TEALDEER_CACHE_DIR", + self.cache_dir.path().to_str().unwrap(), + ); + cmd.env( + "TEALDEER_CONFIG_DIR", + self.config_dir.path().to_str().unwrap(), + ); cmd } } @@ -106,11 +117,7 @@ fn test_update_cache() { .success() .stdout(contains("Successfully updated cache.")); - testenv - .command() - .args(&["sl"]) - .assert() - .success(); + testenv.command().args(&["sl"]).assert().success(); } #[test] @@ -205,7 +212,12 @@ fn test_show_config_path() { .success() .stdout(contains(format!( "Config path is: {}", - testenv.config_dir.path().join("config.toml").to_str().unwrap(), + testenv + .config_dir + .path() + .join("config.toml") + .to_str() + .unwrap(), ))); } @@ -279,7 +291,8 @@ fn test_correct_rendering_with_config() { println!("Testfile path: {:?}", &file_path); let mut file = File::create(&file_path).unwrap(); - file.write_all(include_str!("inkscape-v2.md").as_bytes()).unwrap(); + file.write_all(include_str!("inkscape-v2.md").as_bytes()) + .unwrap(); // Load expected output let expected = include_str!("inkscape-with-config.expected"); From 5a2d054ace04012536f8019bcb900a2dcf356ace Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 30 Aug 2020 18:48:24 +0200 Subject: [PATCH 064/368] Update Cargo.lock Should have been part of 590bb44. --- Cargo.lock | 241 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 219 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 20dbfd0..c23d2d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,18 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "addr2line" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gimli 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "adler" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "adler32" version = "1.0.4" @@ -13,6 +26,11 @@ dependencies = [ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "android_log-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "ansi_term" version = "0.12.1" @@ -27,16 +45,21 @@ version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "app_dirs" -version = "1.2.1" +name = "app_dirs2" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "jni 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ndk-glue 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "assert_cmd" version = "1.0.1" @@ -64,6 +87,19 @@ name = "autocfg" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "backtrace" +version = "0.3.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "addr2line 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "object 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "base64" version = "0.11.0" @@ -79,6 +115,11 @@ name = "bumpalo" version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "byteorder" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "bytes" version = "0.5.4" @@ -97,11 +138,28 @@ name = "cc" version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "combine" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ascii 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "core-foundation" version = "0.6.4" @@ -124,6 +182,16 @@ dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "derivative" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "difference" version = "2.0.0" @@ -150,6 +218,11 @@ name = "dtoa" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "either" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "encoding_rs" version = "0.8.22" @@ -189,6 +262,15 @@ dependencies = [ "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "error-chain" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "escargot" version = "0.5.0" @@ -323,6 +405,11 @@ dependencies = [ "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "gimli" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "h2" version = "0.2.1" @@ -455,6 +542,24 @@ name = "itoa" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "jni" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cesu8 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "combine 3.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)", + "jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "js-sys" version = "0.3.35" @@ -522,6 +627,14 @@ dependencies = [ "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "miniz_oxide" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "mio" version = "0.6.21" @@ -568,6 +681,34 @@ dependencies = [ "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ndk" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ndk-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_enum 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ndk-glue" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "android_log-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ndk 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ndk-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ndk-sys" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "net2" version = "0.2.33" @@ -610,14 +751,30 @@ dependencies = [ ] [[package]] -name = "ole32-sys" -version = "0.2.0" +name = "num_enum" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_enum_derive 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "num_enum_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "object" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "openssl" version = "0.10.28" @@ -726,6 +883,14 @@ dependencies = [ "treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "proc-macro2" version = "1.0.9" @@ -880,6 +1045,11 @@ dependencies = [ "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rustc-demangle" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "ryu" version = "1.0.2" @@ -960,15 +1130,6 @@ dependencies = [ "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "shell32-sys" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "slab" version = "0.4.2" @@ -1015,7 +1176,7 @@ name = "tealdeer" version = "1.3.0" dependencies = [ "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "app_dirs2 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "assert_cmd 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1178,6 +1339,14 @@ name = "unicode-xid" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "url" version = "2.1.1" @@ -1203,6 +1372,11 @@ name = "version_check" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "wait-timeout" version = "0.2.0" @@ -1400,32 +1574,43 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] +"checksum addr2line 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" +"checksum adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" "checksum aho-corasick 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "d5e63fd144e18ba274ae7095c0197a870a7b9468abc801dd62f190d80817d2ec" +"checksum android_log-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e" "checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" "checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" -"checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" +"checksum app_dirs2 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a213127e3ec94ab7b7397a23ca4649c0494b8ed576b3fcf834a6569bde87512e" +"checksum ascii 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" "checksum assert_cmd 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c88b9ca26f9c16ec830350d309397e74ee9abdfd8eb1f71cb6ecc71a3fc818da" "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +"checksum backtrace 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)" = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" "checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742" +"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" "checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" "checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" "checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" +"checksum cesu8 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +"checksum combine 3.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +"checksum derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" "checksum docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969" "checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" +"checksum either 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" "checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" "checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" "checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" +"checksum error-chain 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" "checksum escargot 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74cf96bec282dcdb07099f7e31d9fed323bca9435a09aba7b6d99b7617bca96d" "checksum filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "affc17579b132fc2461adf7c575cc6e8b134ebca52c51f5411388965227dc695" "checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" @@ -1444,6 +1629,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +"checksum gimli 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" "checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8" @@ -1457,6 +1643,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" "checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +"checksum jni 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1981310da491a4f0f815238097d0d43d8072732b5ae5f8bd0d8eadf5bf245402" +"checksum jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" "checksum js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" @@ -1467,15 +1655,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" "checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" "checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" +"checksum miniz_oxide 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722" "checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" +"checksum ndk 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "95a356cafe20aee088789830bfea3a61336e84ded9e545e00d3869ce95dcb80c" +"checksum ndk-glue 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d1730ee2e3de41c3321160a6da815f008c4006d71b095880ea50e17cf52332b8" +"checksum ndk-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2b2820aca934aba5ed91c79acc72b6a44048ceacc5d36c035ed4e051f12d887d" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" "checksum normalize-line-endings 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" "checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" "checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" -"checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" +"checksum num_enum 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" +"checksum num_enum_derive 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" +"checksum object 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" "checksum openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)" = "973293749822d7dd6370d6da1e523b0d1db19f06c459134c658b2a4261378b52" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)" = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" @@ -1490,6 +1684,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum predicates 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "347a1b6f0b21e636bc9872fb60b83b8e185f6f5516298b8238699f7f9a531030" "checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" "checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" +"checksum proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" "checksum proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435" "checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" @@ -1506,6 +1701,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" "checksum reqwest 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a9f62f24514117d09a8fc74b803d3d65faa27cea1c7378fb12b0d002913f3831" +"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" "checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" "checksum schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" @@ -1515,7 +1711,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" "checksum serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" "checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" -"checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" "checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" @@ -1539,10 +1734,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" "checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" "checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" +"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum wait-timeout 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" "checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" "checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" From e507343f5df0d14275ade2543de11f95ce512375 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 30 Aug 2020 19:55:38 +0200 Subject: [PATCH 065/368] CI: Run clippy with Rust 1.46 (#132) --- .github/workflows/ci.yml | 2 +- src/cache.rs | 5 ++++- src/config.rs | 6 +++--- src/main.rs | 3 ++- src/types.rs | 4 ++-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a580ac..54c5075 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.39.0 + toolchain: 1.46.0 components: clippy override: true - uses: actions-rs/clippy-check@v1 diff --git a/src/cache.rs b/src/cache.rs index 2de33bb..bc097e8 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -150,7 +150,10 @@ impl Cache { // Get platform dir let platforms_dir = match Self::get_cache_dir() { Ok(cache_dir) => cache_dir.join("tldr-master").join("pages"), - _ => return None, + Err(e) => { + log::error!("Could not get cache directory: {}", e); + return None; + } }; // Determine platform diff --git a/src/config.rs b/src/config.rs index 51d9b28..1b953f1 100644 --- a/src/config.rs +++ b/src/config.rs @@ -8,7 +8,6 @@ use ansi_term::{Color, Style}; use app_dirs::{get_app_root, AppDataType}; use log::debug; use serde_derive::{Deserialize, Serialize}; -use toml; use crate::error::TealdeerError::{self, ConfigError}; @@ -120,8 +119,9 @@ struct RawDisplayConfig { } /// Serde doesn't support default values yet (tracking issue: -/// https://github.com/serde-rs/serde/issues/368), so we need to wrap DEFAULT_UPDATE_INTERVAL_HOURS -/// in a function to be able to use #[serde(default = ...)] +/// ), so we need to wrap +/// `DEFAULT_UPDATE_INTERVAL_HOURS` in a function to be able to use +/// `#[serde(default = ...)]` const fn default_auto_update_interval_hours() -> u64 { DEFAULT_UPDATE_INTERVAL_HOURS } diff --git a/src/main.rs b/src/main.rs index d4fbf5a..196481a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,6 +89,7 @@ const ARCHIVE_URL: &str = "https://github.com/tldr-pages/tldr/archive/master.tar const PAGER_COMMAND: &str = "less -R"; #[derive(Debug, Deserialize)] +#[allow(clippy::struct_excessive_bools)] struct Args { arg_command: Option>, flag_help: bool, @@ -158,11 +159,11 @@ fn check_cache(args: &Args) { )) ); } + Some(_) => {} None => { eprintln!("Cache not found. Please run `tldr --update`."); process::exit(1); } - _ => {} }; } diff --git a/src/types.rs b/src/types.rs index 2c0941e..d7e4548 100644 --- a/src/types.rs +++ b/src/types.rs @@ -55,7 +55,7 @@ impl<'a> From<&'a str> for LineType { .into(), ), Some(' ') => Self::ExampleCode(trimmed.trim_start_matches(char::is_whitespace).into()), - _ => Self::ExampleText(trimmed.into()), + Some(_) => Self::ExampleText(trimmed.into()), } } } @@ -88,7 +88,7 @@ impl LineType { .trim_matches(|chr: char| chr == '`' || chr.is_whitespace()) .into(), ), - _ => Self::Other(trimmed.into()), + Some(_) => Self::Other(trimmed.into()), } } } From a67e7d184a1cc20652a1fa44d4d9837b664d577b Mon Sep 17 00:00:00 2001 From: Atul Bhosale Date: Fri, 15 May 2020 22:43:21 +0530 Subject: [PATCH 066/368] CI: Add cargo fmt step --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54c5075..faafd8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,3 +52,18 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features + + lint: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check From d9b5e495516bdc20e19e9527fd658044bd2c7ac6 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 30 Aug 2020 18:51:28 +0200 Subject: [PATCH 067/368] CI: Always run rustfmt on fixed Rust version Otherwise a new release of rustfmt may break CI without any change to the code. --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faafd8b..3cf2836 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: rust: [1.39.0, stable] runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.rust }} @@ -42,7 +42,7 @@ jobs: name: run clippy lints runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: toolchain: 1.46.0 @@ -53,14 +53,14 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features - lint: - name: Rustfmt + fmt: + name: run rustfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: 1.46.0 override: true - run: rustup component add rustfmt - uses: actions-rs/cargo@v1 From baffd1ea4d5a181eba45c5d91a58aa68d23b9540 Mon Sep 17 00:00:00 2001 From: Lovecraftian Horror Date: Thu, 9 Apr 2020 13:04:03 -0400 Subject: [PATCH 068/368] Apply `enable_styles` config to stale cache warning This change makes the color for the "stale cache" warning follow `enable_styles`, like the rest of the styling. --- src/main.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 196481a..5fa518b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,7 +22,7 @@ use std::io::BufReader; use std::path::{Path, PathBuf}; use std::process; -use ansi_term::Color; +use ansi_term::{Color, Style}; use app_dirs::AppInfo; use docopt::Docopt; #[cfg(not(target_os = "windows"))] @@ -144,15 +144,23 @@ fn should_update_cache(args: &Args, config: &Config) -> bool { } /// Check the cache for freshness -fn check_cache(args: &Args) { +fn check_cache(args: &Args, enable_styles: bool) { match Cache::last_update() { Some(ago) if ago > MAX_CACHE_AGE => { if args.flag_quiet { return; } + + // Only use color if enabled + let warning_style = if enable_styles { + Style::new().fg(Color::Yellow) + } else { + Style::default() + }; + eprintln!( "{}", - Color::Yellow.paint(format!( + warning_style.paint(format!( "The cache hasn't been updated for more than {} days.\n\ You should probably run `tldr --update` soon.", MAX_CACHE_AGE.as_secs() / 24 / 3600 @@ -363,7 +371,7 @@ fn main() { if args.flag_list { if !cache_updated { // Check cache for freshness - check_cache(&args); + check_cache(&args, enable_styles); } // Get list of pages @@ -387,7 +395,7 @@ fn main() { if !cache_updated { // Check cache for freshness - check_cache(&args); + check_cache(&args, enable_styles); } // Search for command in cache From f757389df99b358623013be6d31dcc3b91bee0a4 Mon Sep 17 00:00:00 2001 From: Lovecraftian Horror Date: Thu, 9 Apr 2020 13:44:45 -0400 Subject: [PATCH 069/368] Add flag for specifying color preference --- bash_tealdeer | 4 ++++ fish_tealdeer | 1 + src/main.rs | 16 +++++++++++++--- src/types.rs | 8 ++++++++ zsh_tealdeer | 5 +++++ 5 files changed, 31 insertions(+), 3 deletions(-) diff --git a/bash_tealdeer b/bash_tealdeer index ba28806..874356e 100644 --- a/bash_tealdeer +++ b/bash_tealdeer @@ -17,6 +17,10 @@ _tealdeer() COMPREPLY=( $(compgen -W 'linux osx sunos windows' -- "${cur}") ) return ;; + --color) + COMPREPLY=( $(compgen -W 'always auto never' -- "${cur}") ) + return + ;; esac if [[ $cur == -* ]]; then diff --git a/fish_tealdeer b/fish_tealdeer index 880b015..d571739 100644 --- a/fish_tealdeer +++ b/fish_tealdeer @@ -15,6 +15,7 @@ complete -c tldr -s m -l markdown -d 'Display the raw markdown instead of ren complete -c tldr -s q -l quiet -d 'Suppress informational messages.' -f complete -c tldr -l config-path -d 'Show config file path.' -f complete -c tldr -l seed-config -d 'Create a basic config.' -f +complete -c tldr -l color -d 'Controls when to use color.' -xa 'always auto never' function __tealdeer_entries tldr --list | string replace -a -i -r "\,\s" "\n" diff --git a/src/main.rs b/src/main.rs index 5fa518b..0886285 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,7 +41,7 @@ use crate::config::{get_config_path, make_default_config, Config, MAX_CACHE_AGE} use crate::error::TealdeerError::{CacheError, ConfigError, UpdateError}; use crate::formatter::print_lines; use crate::tokenizer::Tokenizer; -use crate::types::OsType; +use crate::types::{ColorOptions, OsType}; const NAME: &str = "tealdeer"; const APP_INFO: AppInfo = AppInfo { @@ -69,6 +69,7 @@ Options: -q --quiet Suppress informational messages --config-path Show config file path --seed-config Create a basic config + --color Control when to use color [always, auto, never] [default: auto] Examples: @@ -104,6 +105,7 @@ struct Args { flag_config_path: bool, flag_seed_config: bool, flag_markdown: bool, + flag_color: ColorOptions, } /// Print page by path @@ -294,6 +296,8 @@ fn main() { .and_then(|d| d.deserialize()) .unwrap_or_else(|e| e.exit()); + println!("{:?}", args); + // Show version and exit if args.flag_version { let os = get_os(); @@ -313,9 +317,15 @@ fn main() { // Determine the usage of styles #[cfg(target_os = "windows")] - let enable_styles = ansi_term::enable_ansi_support().is_ok(); + let ansi_support = ansi_term::enable_ansi_support().is_ok(); #[cfg(not(target_os = "windows"))] - let enable_styles = true; + let ansi_support = true; + + let enable_styles = match args.flag_color { + ColorOptions::Always => ansi_support, + ColorOptions::Auto => ansi_support, + ColorOptions::Never => false, + }; // Look up config file, if none is found fall back to default config. let config = match Config::load(enable_styles) { diff --git a/src/types.rs b/src/types.rs index d7e4548..c0dfb27 100644 --- a/src/types.rs +++ b/src/types.rs @@ -27,6 +27,14 @@ impl fmt::Display for OsType { } } +#[derive(Debug, Eq, PartialEq, Copy, Clone, Deserialize)] +#[serde(rename_all = "lowercase")] +pub enum ColorOptions { + Always, + Auto, + Never, +} + #[derive(Debug, Eq, PartialEq)] pub enum LineType { Empty, diff --git a/zsh_tealdeer b/zsh_tealdeer index 53f2609..4eff79f 100644 --- a/zsh_tealdeer +++ b/zsh_tealdeer @@ -25,6 +25,11 @@ _tealdeer() { "($I -q --quiet)"{-q,--quiet}"[Suppress informational messages]" "($I)--config-path[Show config file path]" "($I)--seed-config[Create a basic config]" + "($I --color)"{--color}'[Controls when to use color]:when:(( + always + auto + never + ))' '(- *)'{-h,--help}'[Display help]' '(- *)'{-v,--version}'[Show version information]' '*:file:_files' From be79c924f645725a92f72c1dec56b3fe4a05f7e1 Mon Sep 17 00:00:00 2001 From: Lovecraftian Horror Date: Thu, 9 Apr 2020 15:03:40 -0400 Subject: [PATCH 070/368] Disable styling for `--color auto` when `NO_COLOR` is set --- src/main.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 0886285..f1673e9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,7 @@ #[cfg(feature = "logging")] extern crate env_logger; +use std::env; use std::fs::File; use std::io::BufRead; use std::io::BufReader; @@ -296,8 +297,6 @@ fn main() { .and_then(|d| d.deserialize()) .unwrap_or_else(|e| e.exit()); - println!("{:?}", args); - // Show version and exit if args.flag_version { let os = get_os(); @@ -322,8 +321,12 @@ fn main() { let ansi_support = true; let enable_styles = match args.flag_color { + // Always use styling as long as there is `ansi_support` ColorOptions::Always => ansi_support, - ColorOptions::Auto => ansi_support, + // Disable if: + // * NO_COLOR env var is set to anything: https://no-color.org/ + ColorOptions::Auto => ansi_support && env::var_os("NO_COLOR").is_none(), + // Disable styling ColorOptions::Never => false, }; From bc04e1ac0062c0593f05c6ea9445e7419242c751 Mon Sep 17 00:00:00 2001 From: Lovecraftian Horror Date: Thu, 9 Apr 2020 15:14:16 -0400 Subject: [PATCH 071/368] Disable styling for `--color auto` if the output is being piped --- Cargo.lock | 1 + Cargo.toml | 1 + src/main.rs | 11 ++++++++--- tests/lib.rs | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c23d2d3..feeec7d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1178,6 +1178,7 @@ dependencies = [ "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs2 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "assert_cmd 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "escargot 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index f82ae84..7246dba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ path = "src/main.rs" [dependencies] ansi_term = "0.12.0" app_dirs = { version = "2", package = "app_dirs2" } +atty = "0.2" docopt = "1" env_logger = { version = "0.7", optional = true } flate2 = "1" diff --git a/src/main.rs b/src/main.rs index f1673e9..98e1407 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,6 +25,7 @@ use std::process; use ansi_term::{Color, Style}; use app_dirs::AppInfo; +use atty::Stream; use docopt::Docopt; #[cfg(not(target_os = "windows"))] use pager::Pager; @@ -323,9 +324,13 @@ fn main() { let enable_styles = match args.flag_color { // Always use styling as long as there is `ansi_support` ColorOptions::Always => ansi_support, - // Disable if: - // * NO_COLOR env var is set to anything: https://no-color.org/ - ColorOptions::Auto => ansi_support && env::var_os("NO_COLOR").is_none(), + // Enable styling if: + // * There is `ansi_support` + // * NO_COLOR env var isn't set: https://no-color.org/ + // * The output stream is stdout (not being piped) + ColorOptions::Auto => { + ansi_support && env::var_os("NO_COLOR").is_none() && atty::is(Stream::Stdout) + } // Disable styling ColorOptions::Never => false, }; diff --git a/tests/lib.rs b/tests/lib.rs index 856d537..b2b2aa5 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -253,7 +253,7 @@ fn _test_correct_rendering(input_file: &str, filename: &str) { let expected = include_str!("inkscape-default.expected"); testenv .command() - .args(&["-f", &file_path.to_str().unwrap()]) + .args(&["--color", "always", "-f", &file_path.to_str().unwrap()]) .assert() .success() .stdout(similar(expected)); @@ -299,7 +299,7 @@ fn test_correct_rendering_with_config() { testenv .command() - .args(&["-f", &file_path.to_str().unwrap()]) + .args(&["--color", "always", "-f", &file_path.to_str().unwrap()]) .assert() .success() .stdout(similar(expected)); From 1b8062e0afbc31c82ceb30f2a76299e8752c113e Mon Sep 17 00:00:00 2001 From: Lovecraftian Horror Date: Fri, 10 Apr 2020 23:22:05 -0400 Subject: [PATCH 072/368] Switch `--color always` to force styling --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 98e1407..70e520d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -322,8 +322,8 @@ fn main() { let ansi_support = true; let enable_styles = match args.flag_color { - // Always use styling as long as there is `ansi_support` - ColorOptions::Always => ansi_support, + // Attempt to use styling if instructed + ColorOptions::Always => true, // Enable styling if: // * There is `ansi_support` // * NO_COLOR env var isn't set: https://no-color.org/ From dc6af5ad6ca5db698101e9306d9189b66c7fb2e5 Mon Sep 17 00:00:00 2001 From: Lovecraftian Horror Date: Sat, 11 Apr 2020 12:39:56 -0400 Subject: [PATCH 073/368] Add integration tests for the auto/never color options --- tests/inkscape-default-no-color.expected | 28 ++++++++++++++ tests/lib.rs | 47 +++++++++++++++++++++--- 2 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 tests/inkscape-default-no-color.expected diff --git a/tests/inkscape-default-no-color.expected b/tests/inkscape-default-no-color.expected new file mode 100644 index 0000000..d0eec4c --- /dev/null +++ b/tests/inkscape-default-no-color.expected @@ -0,0 +1,28 @@ + + An SVG (Scalable Vector Graphics) editing program. + Use -z to not open the GUI and only process files in the console. + + Open an SVG file in the Inkscape GUI: + + inkscape filename.svg + + Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): + + inkscape filename.svg -e filename.png + + Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): + + inkscape filename.svg -e filename.png -w 600 -h 400 + + Export a single object, given its ID, into a bitmap: + + inkscape filename.svg -i id -e object.png + + Export an SVG document to PDF, converting all texts to paths: + + inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path + + Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: + + inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit + diff --git a/tests/lib.rs b/tests/lib.rs index b2b2aa5..350b9f4 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -241,7 +241,12 @@ fn test_markdown_rendering() { .stdout(similar(expected)); } -fn _test_correct_rendering(input_file: &str, filename: &str) { +fn _test_correct_rendering( + input_file: &str, + filename: &str, + expected: &'static str, + color_option: &str, +) { let testenv = TestEnv::new(); // Create input file @@ -250,10 +255,9 @@ fn _test_correct_rendering(input_file: &str, filename: &str) { let mut file = File::create(&file_path).unwrap(); file.write_all(input_file.as_bytes()).unwrap(); - let expected = include_str!("inkscape-default.expected"); testenv .command() - .args(&["--color", "always", "-f", &file_path.to_str().unwrap()]) + .args(&["--color", color_option, "-f", &file_path.to_str().unwrap()]) .assert() .success() .stdout(similar(expected)); @@ -262,13 +266,46 @@ fn _test_correct_rendering(input_file: &str, filename: &str) { /// An end-to-end integration test for direct file rendering (v1 syntax). #[test] fn test_correct_rendering_v1() { - _test_correct_rendering(include_str!("inkscape-v1.md"), "inkscape-v1.md"); + _test_correct_rendering( + include_str!("inkscape-v1.md"), + "inkscape-v1.md", + include_str!("inkscape-default.expected"), + "always", + ); } /// An end-to-end integration test for direct file rendering (v2 syntax). #[test] fn test_correct_rendering_v2() { - _test_correct_rendering(include_str!("inkscape-v2.md"), "inkscape-v2.md"); + _test_correct_rendering( + include_str!("inkscape-v2.md"), + "inkscape-v2.md", + include_str!("inkscape-default.expected"), + "always", + ); +} + +#[test] +/// An end-to-end integration test for direct file rendering with the `--color auto` option. This +/// will not use styling since output is not stdout. +fn test_rendering_color_auto() { + _test_correct_rendering( + include_str!("inkscape-v2.md"), + "inkscape-v2.md", + include_str!("inkscape-default-no-color.expected"), + "auto", + ); +} + +#[test] +/// An end-to-end integration test for direct file rendering with the `--color never` option. +fn test_rendering_color_never() { + _test_correct_rendering( + include_str!("inkscape-v2.md"), + "inkscape-v2.md", + include_str!("inkscape-default-no-color.expected"), + "never", + ); } /// An end-to-end integration test for rendering with constom syntax config. From 4f078e9511575cebcadce41f5a24d6d627df698b Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 31 Aug 2020 17:17:17 +0200 Subject: [PATCH 074/368] README: Update usage section The color option was missing. Fixes #135 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 218525b..dc3400c 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ These are the clients I tried but failed to compile or run: -q --quiet Suppress informational messages --config-path Show config file path --seed-config Create a basic config + --color Control when to use color [always, auto, never] [default: auto] Examples: From 504639b6a6d097b8da381a1f8990a0561f557d9d Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 3 Sep 2020 08:09:38 +0200 Subject: [PATCH 075/368] Run cargo update (#133) This includes a security fix of the bumpalo crate: https://rustsec.org/advisories/RUSTSEC-2020-0006 --- Cargo.lock | 929 ++++++++++++++++++++++++++--------------------------- Cargo.toml | 1 + 2 files changed, 452 insertions(+), 478 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index feeec7d..cdcde6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,14 +13,9 @@ name = "adler" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "adler32" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "aho-corasick" -version = "0.7.9" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -36,14 +31,9 @@ name = "ansi_term" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "anyhow" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "app_dirs2" version = "2.3.0" @@ -51,7 +41,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "jni 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "ndk-glue 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -66,7 +56,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "wait-timeout 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -77,14 +67,14 @@ name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "autocfg" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -94,7 +84,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "addr2line 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "object 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -102,7 +92,7 @@ dependencies = [ [[package]] name = "base64" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -112,7 +102,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bumpalo" -version = "3.2.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -122,20 +112,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bytes" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "c2-chacha" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "cc" -version = "1.0.50" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -162,16 +144,16 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.6.4" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "core-foundation-sys" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -187,9 +169,9 @@ name = "derivative" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -208,14 +190,14 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "dtoa" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -225,7 +207,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "encoding_rs" -version = "0.8.22" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -238,19 +220,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "errno" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -259,7 +241,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -268,7 +250,7 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -277,44 +259,44 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.57 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "filetime" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "flate2" -version = "1.0.13" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "float-cmp" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -351,42 +333,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures-channel" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "futures-core" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures-io" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures-sink" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures-task" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "once_cell 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "futures-util" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -401,7 +387,7 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -412,46 +398,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "h2" -version = "0.2.1" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "heck" -version = "0.3.1" +name = "hashbrown" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hermit-abi" -version = "0.1.8" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "http" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -459,8 +445,8 @@ name = "http-body" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -478,37 +464,37 @@ dependencies = [ [[package]] name = "hyper" -version = "0.13.2" +version = "0.13.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hyper-tls" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -518,15 +504,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "indexmap" -version = "1.3.2" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -534,12 +521,17 @@ name = "iovec" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ipnet" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "itoa" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -551,7 +543,7 @@ dependencies = [ "combine 3.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)", "jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -562,10 +554,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "js-sys" -version = "0.3.35" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -584,12 +576,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.67" +version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "log" -version = "0.4.8" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -612,21 +604,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "mime_guess" -version = "2.0.1" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "miniz_oxide" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "miniz_oxide" version = "0.4.1" @@ -637,7 +621,7 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.21" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -645,10 +629,10 @@ dependencies = [ "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -659,25 +643,25 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "native-tls" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.30 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -698,8 +682,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "android_log-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "ndk 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "ndk-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -711,21 +695,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "net2" -version = "0.2.33" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nom" -version = "4.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -735,19 +710,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num-traits" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num_cpus" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -765,9 +740,9 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -775,17 +750,22 @@ name = "object" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "once_cell" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "openssl" -version = "0.10.28" +version = "0.10.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -795,14 +775,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.54" +version = "0.9.58" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -810,8 +790,8 @@ name = "pager" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "errno 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -821,52 +801,52 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pin-project" -version = "0.4.8" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-internal 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pin-project-internal" -version = "0.4.8" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pin-project-lite" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pin-utils" -version = "0.1.0-alpha.4" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pkg-config" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ppv-lite86" -version = "0.2.6" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "predicates" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "float-cmp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "float-cmp 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "normalize-line-endings 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -893,10 +873,10 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.9" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -906,10 +886,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "1.0.2" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -918,10 +898,10 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -930,18 +910,18 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_chacha" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -984,23 +964,23 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.3.4" +version = "1.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.13 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.14" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1008,41 +988,41 @@ name = "remove_dir_all" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "reqwest" -version = "0.10.3" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.24 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-tls 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-tls 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", + "winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1052,7 +1032,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ryu" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1060,63 +1040,65 @@ name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "schannel" -version = "0.1.17" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework" -version = "0.3.4" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework-sys" -version = "0.3.3" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde" -version = "1.0.104" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.104" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.48" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1124,9 +1106,9 @@ name = "serde_urlencoded" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1136,14 +1118,15 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "smallvec" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "sourcefile" -version = "0.1.4" +name = "socket2" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "strsim" @@ -1152,22 +1135,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "1.0.16" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tar" -version = "0.4.26" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1182,15 +1165,16 @@ dependencies = [ "docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "escargot 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1212,11 +1196,11 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1224,7 +1208,7 @@ name = "termcolor" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1237,50 +1221,56 @@ dependencies = [ [[package]] name = "time" -version = "0.1.42" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tinyvec" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "tokio" -version = "0.2.12" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-tls" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-util" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1288,7 +1278,7 @@ name = "toml" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1296,6 +1286,24 @@ name = "tower-service" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "tracing" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tracing-core" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "treeline" version = "0.1.0" @@ -1303,7 +1311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "try-lock" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1311,7 +1319,7 @@ name = "unicase" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1324,20 +1332,15 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tinyvec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "unicode-segmentation" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "unicode-xid" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1360,17 +1363,12 @@ dependencies = [ [[package]] name = "vcpkg" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "version_check" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1383,7 +1381,7 @@ name = "wait-timeout" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1392,8 +1390,8 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1401,8 +1399,8 @@ name = "want" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "try-lock 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1410,101 +1408,80 @@ name = "wasi" version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "wasm-bindgen" -version = "0.2.58" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.57 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.58" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.8" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.58" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.58" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.58" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "wasm-bindgen-webidl" -version = "0.2.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "web-sys" -version = "0.3.35" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "weedle" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1514,7 +1491,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1533,10 +1510,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi-util" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1546,10 +1523,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winreg" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1566,7 +1543,7 @@ name = "xattr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1577,190 +1554,186 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum addr2line 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" "checksum adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" -"checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" -"checksum aho-corasick 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "d5e63fd144e18ba274ae7095c0197a870a7b9468abc801dd62f190d80817d2ec" +"checksum aho-corasick 0.7.13 (registry+https://github.com/rust-lang/crates.io-index)" = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" "checksum android_log-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e" "checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -"checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" "checksum app_dirs2 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a213127e3ec94ab7b7397a23ca4649c0494b8ed576b3fcf834a6569bde87512e" "checksum ascii 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" "checksum assert_cmd 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c88b9ca26f9c16ec830350d309397e74ee9abdfd8eb1f71cb6ecc71a3fc818da" "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +"checksum autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" "checksum backtrace 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)" = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" -"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" +"checksum base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742" +"checksum bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" "checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" -"checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" -"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" +"checksum bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" +"checksum cc 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)" = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381" "checksum cesu8 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" "checksum combine 3.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" -"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" -"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" +"checksum core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +"checksum core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" "checksum derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" "checksum docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969" -"checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" +"checksum dtoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" "checksum either 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" -"checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" +"checksum encoding_rs 0.8.24 (registry+https://github.com/rust-lang/crates.io-index)" = "a51b8cf747471cb9499b6d59e59b0444f4c90eba8968c4e44874e92b5b64ace2" "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -"checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" +"checksum errno 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6eab5ee3df98a279d9b316b1af6ac95422127b1290317e6d18c1743c99418b01" "checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" "checksum error-chain 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" "checksum escargot 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74cf96bec282dcdb07099f7e31d9fed323bca9435a09aba7b6d99b7617bca96d" -"checksum filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "affc17579b132fc2461adf7c575cc6e8b134ebca52c51f5411388965227dc695" -"checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" -"checksum float-cmp 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da62c4f1b81918835a8c6a484a397775fff5953fe83529afd51b05f5c6a6617d" -"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +"checksum filetime 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "3ed85775dcc68644b5c950ac06a2b23768d3bc9390464151aaf27136998dcf9e" +"checksum flate2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "766d0e77a2c1502169d4a93ff3b8c15a71fd946cd0126309752104e5f3c46d94" +"checksum float-cmp 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1267f4ac4f343772758f7b1bdcbe767c218bbab93bb432acbf5162bbf85a6c4" +"checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" -"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" -"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" -"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" -"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" -"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" +"checksum futures-channel 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" +"checksum futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" +"checksum futures-io 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" +"checksum futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" +"checksum futures-task 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" +"checksum futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" "checksum gimli 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" -"checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" -"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -"checksum hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8" -"checksum http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" +"checksum h2 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" +"checksum hashbrown 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" +"checksum hermit-abi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" +"checksum http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" "checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" "checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -"checksum hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fa1c527bbc634be72aa7ba31e4e4def9bbb020f5416916279b7c705cd838893e" -"checksum hyper-tls 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa" +"checksum hyper 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb" +"checksum hyper-tls 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -"checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" +"checksum indexmap 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c" "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +"checksum ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" +"checksum itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" "checksum jni 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1981310da491a4f0f815238097d0d43d8072732b5ae5f8bd0d8eadf5bf245402" "checksum jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" -"checksum js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" +"checksum js-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)" = "85a7e2c92a4804dd459b86c339278d0fe87cf93757fae222c3fa3ae75458bc73" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018" -"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +"checksum libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)" = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" +"checksum log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" "checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" -"checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" -"checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" +"checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" "checksum miniz_oxide 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722" -"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" +"checksum mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)" = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" +"checksum native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" "checksum ndk 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "95a356cafe20aee088789830bfea3a61336e84ded9e545e00d3869ce95dcb80c" "checksum ndk-glue 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d1730ee2e3de41c3321160a6da815f008c4006d71b095880ea50e17cf52332b8" "checksum ndk-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2b2820aca934aba5ed91c79acc72b6a44048ceacc5d36c035ed4e051f12d887d" -"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +"checksum net2 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)" = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" "checksum normalize-line-endings 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" -"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" -"checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" +"checksum num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" +"checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" "checksum num_enum 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" "checksum num_enum_derive 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" "checksum object 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" -"checksum openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)" = "973293749822d7dd6370d6da1e523b0d1db19f06c459134c658b2a4261378b52" +"checksum once_cell 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" +"checksum openssl 0.10.30 (registry+https://github.com/rust-lang/crates.io-index)" = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)" = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" +"checksum openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)" = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" "checksum pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b69ced2bfa977c4541743a7427b89c94120684791a9629941fe6028dccab6528" "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -"checksum pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" -"checksum pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" -"checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" -"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" -"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" -"checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" -"checksum predicates 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "347a1b6f0b21e636bc9872fb60b83b8e185f6f5516298b8238699f7f9a531030" +"checksum pin-project 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)" = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" +"checksum pin-project-internal 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)" = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" +"checksum pin-project-lite 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" +"checksum pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +"checksum pkg-config 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)" = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" +"checksum ppv-lite86 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" +"checksum predicates 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96bfead12e90dccead362d62bb2c90a5f6fc4584963645bc7f71a735e0b0735a" "checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" "checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" "checksum proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -"checksum proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435" +"checksum proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" "checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +"checksum quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" +"checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" "checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" "checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" -"checksum regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" +"checksum redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)" = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +"checksum regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" +"checksum regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" -"checksum reqwest 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a9f62f24514117d09a8fc74b803d3d65faa27cea1c7378fb12b0d002913f3831" +"checksum reqwest 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)" = "e9eaa17ac5d7b838b7503d118fa16ad88f440498bf9ffe5424e621f93190d61e" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" -"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" +"checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" "checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -"checksum schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" -"checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" -"checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" -"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" -"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" -"checksum serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" +"checksum schannel 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +"checksum security-framework 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" +"checksum security-framework-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" +"checksum serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)" = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5" +"checksum serde_derive 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)" = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" +"checksum serde_json 1.0.57 (registry+https://github.com/rust-lang/crates.io-index)" = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" "checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" -"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" +"checksum socket2 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" "checksum strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" -"checksum syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "123bd9499cfb380418d509322d7a6d52e5315f064fe4b3ad18a53d6b92c07859" -"checksum tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "b3196bfbffbba3e57481b6ea32249fbaf590396a52505a2615adbb79d9d826d3" +"checksum syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9" +"checksum tar 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "489997b7557e9a43e192c527face4feacc78bfbe6eed67fd55c4c9e381cba290" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" "checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" "checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tokio 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b34bee1facdc352fba10c9c58b654e6ecb6a2250167772bf86071f7c5f2f5061" -"checksum tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7bde02a3a5291395f59b06ec6945a3077602fac2b07eeeaf0dee2122f3619828" -"checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" +"checksum time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +"checksum tinyvec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" +"checksum tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" +"checksum tokio-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" +"checksum tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" "checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" "checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" +"checksum tracing 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6d79ca061b032d6ce30c660fded31189ca0b9922bf483cd70759f13a2d86786c" +"checksum tracing-core 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "4f0e00789804e99b20f12bc7003ca416309d28a6f495d6af58d1e2c2842461b5" "checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" -"checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" +"checksum try-lock 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" "checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" -"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" -"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +"checksum unicode-normalization 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" +"checksum unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" -"checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" -"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" -"checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" +"checksum vcpkg 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" +"checksum version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum wait-timeout 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" "checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" "checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +"checksum wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" "checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -"checksum wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" -"checksum wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" -"checksum wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8bbdd49e3e28b40dec6a9ba8d17798245ce32b019513a845369c641b275135d9" -"checksum wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" -"checksum wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" -"checksum wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" -"checksum wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" -"checksum web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" -"checksum weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" +"checksum wasm-bindgen 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "f0563a9a4b071746dd5aedbc3a28c6fe9be4586fb3fbadb67c400d4f53c6b16c" +"checksum wasm-bindgen-backend 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "bc71e4c5efa60fb9e74160e89b93353bc24059999c0ae0fb03affc39770310b0" +"checksum wasm-bindgen-futures 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)" = "95f8d235a77f880bcef268d379810ea6c0af2eacfa90b1ad5af731776e0c4699" +"checksum wasm-bindgen-macro 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "97c57cefa5fa80e2ba15641578b44d36e7a64279bc5ed43c6dbaf329457a2ed2" +"checksum wasm-bindgen-macro-support 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" +"checksum wasm-bindgen-shared 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "93b162580e34310e5931c4b792560108b10fd14d64915d7fff8ff00180e70092" +"checksum web-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)" = "dda38f4e5ca63eda02c059d243aa25b5f35ab98451e518c51612cd0f1bd19a47" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +"checksum winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80" +"checksum winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" +"checksum winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" "checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" diff --git a/Cargo.toml b/Cargo.toml index 7246dba..642765f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,6 +39,7 @@ escargot = "0.5" predicates = "1.0" tempdir = "^0.3" filetime = "0.2.10" +remove_dir_all = "=0.5.2" # Only used to ensure compatibility with 1.39 (#133) [features] logging = ["env_logger"] From fd9e36277f1004aba0edf28667e06788aa45e973 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 3 Sep 2020 22:46:53 +0200 Subject: [PATCH 076/368] Disable clippy::too_many_lines warning --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 70e520d..532c678 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,6 +12,7 @@ #![warn(clippy::pedantic)] #![allow(clippy::similar_names)] #![allow(clippy::module_name_repetitions)] +#![allow(clippy::too_many_lines)] #[cfg(feature = "logging")] extern crate env_logger; From 2a2a4cdda5883d4d578b167a1cf810f64e896f13 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 3 Sep 2020 23:06:47 +0200 Subject: [PATCH 077/368] README: Add links to Fedora and NetBSD packages --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index dc3400c..3739c85 100644 --- a/README.md +++ b/README.md @@ -119,8 +119,10 @@ tealdeer has been added to a few package managers: - Arch Linux AUR: [`tealdeer`](https://aur.archlinux.org/packages/tealdeer/), [`tealdeer-bin`](https://aur.archlinux.org/packages/tealdeer-bin/) or [`tealdeer-git`](https://aur.archlinux.org/packages/tealdeer-git/) +- Fedora: [`tealdeer`](https://src.fedoraproject.org/rpms/rust-tealdeer) - FreeBSD: [`sysutils/tealdeer`](https://www.freshports.org/sysutils/tealdeer/) - macOS Homebrew: [`tealdeer`](https://formulae.brew.sh/formula/tealdeer) +- NetBSD: [`sysutils/tealdeer`](https://pkgsrc.se/sysutils/tealdeer) - Nix: [`tealdeer`](https://nixos.org/nixos/packages.html#tealdeer) - openSUSE: [`tealdeer`](https://software.opensuse.org/package/tealdeer?search_term=tealdeer) - Solus: [`tealdeer`](https://packages.getsol.us/shannon/t/tealdeer/) From 5a9cde733b435f55d39581dae34db24e8c5118e1 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 3 Sep 2020 23:21:25 +0200 Subject: [PATCH 078/368] Release v1.4.0 (#136) --- CHANGELOG.md | 33 +++++++++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bf90c5..750bc66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,27 @@ Possible log types: - `[security]` to invite users to upgrade in case of vulnerabilities. +### [v1.4.0][v1.4.0] (2020-09-03) + +- [added] Configurable automatic cache updates ([#115][i115]) +- [added] Improved color detection and support for `--color` argument and + `NO_COLOR` env variable ([#111][i111]) +- [changed] Make `--list` option comply with official spec ([#112][i112]) +- [changed] Move cache age warning to stderr ([#113][i113]) + +Contributors to this version: + +- [Atul Bhosale][@Atul9] +- [Danny Mösch][@SimplyDanny] +- [Ilaï Deutel][@ilai-deutel] +- [Kornel][@kornelski] +- [@LovecraftianHorror][@LovecraftianHorror] +- [@michaeldel][@michaeldel] +- [Niklas Mohrin][@niklasmohrin] + +Thanks! + + ### [v1.3.0][v1.3.0] (2020-02-28) - [added] New config option for compact output mode ([#89][i89]) @@ -105,27 +126,35 @@ Thanks! [@aldanor]: https://github.com/aldanor +[@Atul9]: https://github.com/Atul9 [@Bassets]: https://github.com/Bassets [@Calinou]: https://github.com/Calinou [@das-g]: https://github.com/das-g [@Delapouite]: https://github.com/Delapouite [@equal-l2]: https://github.com/equal-l2 +[@ilai-deutel]: https://github.com/ilai-deutel [@james2doyle]: https://github.com/james2doyle [@jcgruenhage]: https://github.com/jcgruenhage [@jdvr]: https://github.com/jdvr [@jedahan]: https://github.com/jedahan [@jesdazrez]: https://github.com/jesdazrez +[@kornelski]: https://github.com/kornelski [@korrat]: https://github.com/korrat +[@LovecraftianHorror]: https://github.com/LovecraftianHorror [@ma-renaud]: https://github.com/ma-renaud +[@michaeldel]: https://github.com/michaeldel [@mystal]: https://github.com/mystal [@natpen]: https://github.com/natpen +[@niklasmohrin]: https://github.com/niklasmohrin [@Plommonsorbet]: https://github.com/Plommonsorbet +[@SimplyDanny]: https://github.com/SimplyDanny [@Voultapher]: https://github.com/Voultapher [v1.0.0]: https://github.com/dbrgn/tealdeer/compare/v0.4.0...v1.0.0 [v1.1.0]: https://github.com/dbrgn/tealdeer/compare/v1.0.0...v1.1.0 [v1.2.0]: https://github.com/dbrgn/tealdeer/compare/v1.1.0...v1.2.0 [v1.3.0]: https://github.com/dbrgn/tealdeer/compare/v1.2.0...v1.3.0 +[v1.4.0]: https://github.com/dbrgn/tealdeer/compare/v1.3.0...v1.4.0 [i34]: https://github.com/dbrgn/tealdeer/issues/34 [i43]: https://github.com/dbrgn/tealdeer/issues/43 @@ -147,3 +176,7 @@ Thanks! [i95]: https://github.com/dbrgn/tealdeer/issues/95 [i97]: https://github.com/dbrgn/tealdeer/issues/97 [i99]: https://github.com/dbrgn/tealdeer/issues/99 +[i111]: https://github.com/dbrgn/tealdeer/issues/111 +[i112]: https://github.com/dbrgn/tealdeer/issues/112 +[i113]: https://github.com/dbrgn/tealdeer/issues/113 +[i115]: https://github.com/dbrgn/tealdeer/issues/115 diff --git a/Cargo.lock b/Cargo.lock index cdcde6d..ef5e290 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1156,7 +1156,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.3.0" +version = "1.4.0" dependencies = [ "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs2 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 642765f..86af621 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT/Apache-2.0" name = "tealdeer" readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" -version = "1.3.0" +version = "1.4.0" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "/bash_tealdeer", "/fish_tealdeer"] edition = "2018" From b0153c7e4cb04dabe207659c79340c63f02eacbf Mon Sep 17 00:00:00 2001 From: Francesco <55460785+BachoSeven@users.noreply.github.com> Date: Fri, 4 Sep 2020 11:34:07 +0200 Subject: [PATCH 079/368] Fix zsh completion for --color argument (#138) Fixes #137. --- zsh_tealdeer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh_tealdeer b/zsh_tealdeer index 4eff79f..aa0eb46 100644 --- a/zsh_tealdeer +++ b/zsh_tealdeer @@ -25,11 +25,11 @@ _tealdeer() { "($I -q --quiet)"{-q,--quiet}"[Suppress informational messages]" "($I)--config-path[Show config file path]" "($I)--seed-config[Create a basic config]" - "($I --color)"{--color}'[Controls when to use color]:when:(( + "($I)--color[Controls when to use color]:when:(( always auto never - ))' + ))" '(- *)'{-h,--help}'[Display help]' '(- *)'{-v,--version}'[Show version information]' '*:file:_files' From 95fdddd68eafd04908cbe14c2ac12027d2d10d7c Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 4 Sep 2020 11:35:36 +0200 Subject: [PATCH 080/368] Fix mixed indentation in zsh completion file --- zsh_tealdeer | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/zsh_tealdeer b/zsh_tealdeer index aa0eb46..2c8e284 100644 --- a/zsh_tealdeer +++ b/zsh_tealdeer @@ -11,29 +11,29 @@ _tealdeer() { args+=( "($I -l --list)"{-l,--list}"[List all commands in the cache]" - "($I -f --render)"{-f,--render}"[Render a specific markdown file]:file:_files" - "($I -o --os)"{-o,--os}'[Override the operating system]:os:(( - linux - osx - sunos - windows + "($I -f --render)"{-f,--render}"[Render a specific markdown file]:file:_files" + "($I -o --os)"{-o,--os}'[Override the operating system]:os:(( + linux + osx + sunos + windows ))' - "($I -u --update)"{-u,--update}"[Update the local cache]" - "($I -c --clear-cache)"{-c,--clear-cache}"[Clear the local cache]" - "($I -p --pager)"{-p,--pager}"[Use a pager to page output]" - "($I -m --markdown)"{-m,--markdown}"[Display the raw markdown instead of rendering it]" - "($I -q --quiet)"{-q,--quiet}"[Suppress informational messages]" - "($I)--config-path[Show config file path]" - "($I)--seed-config[Create a basic config]" - "($I)--color[Controls when to use color]:when:(( - always - auto - never + "($I -u --update)"{-u,--update}"[Update the local cache]" + "($I -c --clear-cache)"{-c,--clear-cache}"[Clear the local cache]" + "($I -p --pager)"{-p,--pager}"[Use a pager to page output]" + "($I -m --markdown)"{-m,--markdown}"[Display the raw markdown instead of rendering it]" + "($I -q --quiet)"{-q,--quiet}"[Suppress informational messages]" + "($I)--config-path[Show config file path]" + "($I)--seed-config[Create a basic config]" + "($I)--color[Controls when to use color]:when:(( + always + auto + never ))" - '(- *)'{-h,--help}'[Display help]' - '(- *)'{-v,--version}'[Show version information]' - '*:file:_files' - '1: :_applications' + '(- *)'{-h,--help}'[Display help]' + '(- *)'{-v,--version}'[Show version information]' + '*:file:_files' + '1: :_applications' ) _arguments $args[@] && ret=0 From d2b5614f1a4d91ed4c1c2135105b9f176cfe8759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20A=2E=20Muci=C3=B1o?= Date: Thu, 3 Sep 2020 22:24:51 -0500 Subject: [PATCH 081/368] Replace deprecated tempdir crate with tempfile crate (#139) Fixes #134. --- Cargo.lock | 1175 ++++++++++++++++++++++++-------------------------- Cargo.toml | 2 +- tests/lib.rs | 10 +- 3 files changed, 566 insertions(+), 621 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef5e290..dab479a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,1736 +4,1681 @@ name = "addr2line" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" dependencies = [ - "gimli 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gimli", ] [[package]] name = "adler" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" [[package]] name = "aho-corasick" version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" dependencies = [ - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] [[package]] name = "android_log-sys" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e" [[package]] name = "ansi_term" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9", ] [[package]] name = "app_dirs2" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a213127e3ec94ab7b7397a23ca4649c0494b8ed576b3fcf834a6569bde87512e" dependencies = [ - "jni 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ndk-glue 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jni", + "ndk-glue", + "winapi 0.3.9", + "xdg", ] [[package]] name = "ascii" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" [[package]] name = "assert_cmd" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c88b9ca26f9c16ec830350d309397e74ee9abdfd8eb1f71cb6ecc71a3fc818da" dependencies = [ - "doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wait-timeout 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "doc-comment", + "predicates", + "predicates-core", + "predicates-tree", + "wait-timeout", ] [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", + "winapi 0.3.9", ] [[package]] name = "autocfg" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" dependencies = [ - "addr2line 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "object 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", ] [[package]] name = "base64" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" [[package]] name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bumpalo" version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" [[package]] name = "byteorder" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "bytes" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "cc" version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381" [[package]] name = "cesu8" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "combine" version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" dependencies = [ - "ascii 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", ] [[package]] name = "core-foundation" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" dependencies = [ - "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys", + "libc", ] [[package]] name = "core-foundation-sys" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" [[package]] name = "crc32fast" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", ] [[package]] name = "derivative" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" dependencies = [ - "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "difference" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" [[package]] name = "doc-comment" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "docopt" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "regex", + "serde", + "strsim", ] [[package]] name = "dtoa" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" [[package]] name = "either" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" [[package]] name = "encoding_rs" version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a51b8cf747471cb9499b6d59e59b0444f4c90eba8968c4e44874e92b5b64ace2" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", ] [[package]] name = "env_logger" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" dependencies = [ - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty", + "humantime", + "log", + "regex", + "termcolor", ] [[package]] name = "errno" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eab5ee3df98a279d9b316b1af6ac95422127b1290317e6d18c1743c99418b01" dependencies = [ - "errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "errno-dragonfly", + "libc", + "winapi 0.3.9", ] [[package]] name = "errno-dragonfly" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" dependencies = [ - "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc", + "libc", ] [[package]] name = "error-chain" version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" dependencies = [ - "backtrace 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace", + "version_check", ] [[package]] name = "escargot" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74cf96bec282dcdb07099f7e31d9fed323bca9435a09aba7b6d99b7617bca96d" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.57 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "log", + "serde", + "serde_json", ] [[package]] name = "filetime" version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed85775dcc68644b5c950ac06a2b23768d3bc9390464151aaf27136998dcf9e" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "redox_syscall", + "winapi 0.3.9", ] [[package]] name = "flate2" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "766d0e77a2c1502169d4a93ff3b8c15a71fd946cd0126309752104e5f3c46d94" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "crc32fast", + "libc", + "miniz_oxide", ] [[package]] name = "float-cmp" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1267f4ac4f343772758f7b1bdcbe767c218bbab93bb432acbf5162bbf85a6c4" dependencies = [ - "num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits", ] [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foreign-types" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types-shared", ] [[package]] name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "fuchsia-zircon-sys", ] [[package]] name = "fuchsia-zircon-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "futures-channel" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" dependencies = [ - "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", ] [[package]] name = "futures-core" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" [[package]] name = "futures-io" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" [[package]] name = "futures-sink" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" [[package]] name = "futures-task" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" dependencies = [ - "once_cell 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "once_cell", ] [[package]] name = "futures-util" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" dependencies = [ - "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "futures-io", + "futures-task", + "memchr", + "pin-project", + "pin-utils", + "slab", ] [[package]] name = "gcc" version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" [[package]] name = "getrandom" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] name = "gimli" version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" [[package]] name = "h2" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", ] [[package]] name = "hashbrown" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", ] [[package]] name = "hermit-abi" version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" dependencies = [ - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "http" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "fnv", + "itoa", ] [[package]] name = "http-body" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "http", ] [[package]] name = "httparse" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" [[package]] name = "humantime" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" dependencies = [ - "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error", ] [[package]] name = "hyper" version = "0.13.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", - "socket2 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project", + "socket2", + "time", + "tokio", + "tower-service", + "tracing", + "want", ] [[package]] name = "hyper-tls" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-tls", ] [[package]] name = "idna" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "indexmap" version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "hashbrown", ] [[package]] name = "iovec" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" dependencies = [ - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "ipnet" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" [[package]] name = "itoa" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" [[package]] name = "jni" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1981310da491a4f0f815238097d0d43d8072732b5ae5f8bd0d8eadf5bf245402" dependencies = [ - "cesu8 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "combine 3.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)", - "jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cesu8", + "combine", + "error-chain", + "jni-sys", + "log", + "walkdir", ] [[package]] name = "jni-sys" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85a7e2c92a4804dd459b86c339278d0fe87cf93757fae222c3fa3ae75458bc73" dependencies = [ - "wasm-bindgen 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen", ] [[package]] name = "kernel32-sys" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8", + "winapi-build", ] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" version = "0.2.76" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" [[package]] name = "log" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", ] [[package]] name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "memchr" version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" [[package]] name = "mime" version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mime_guess" version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" dependencies = [ - "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mime", + "unicase", ] [[package]] name = "miniz_oxide" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722" dependencies = [ - "adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "adler", ] [[package]] name = "mio" version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", ] [[package]] name = "miow" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", ] [[package]] name = "native-tls" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.30 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", ] [[package]] name = "ndk" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a356cafe20aee088789830bfea3a61336e84ded9e545e00d3869ce95dcb80c" dependencies = [ - "jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ndk-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_enum 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "jni-sys", + "ndk-sys", + "num_enum", ] [[package]] name = "ndk-glue" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1730ee2e3de41c3321160a6da815f008c4006d71b095880ea50e17cf52332b8" dependencies = [ - "android_log-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "ndk 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ndk-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "android_log-sys", + "lazy_static", + "libc", + "log", + "ndk", + "ndk-sys", ] [[package]] name = "ndk-sys" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2820aca934aba5ed91c79acc72b6a44048ceacc5d36c035ed4e051f12d887d" [[package]] name = "net2" version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "winapi 0.3.9", ] [[package]] name = "normalize-line-endings" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num-traits" version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", ] [[package]] name = "num_cpus" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" dependencies = [ - "hermit-abi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", ] [[package]] name = "num_enum" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" dependencies = [ - "derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num_enum_derive 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "derivative", + "num_enum_derive", ] [[package]] name = "num_enum_derive" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" dependencies = [ - "proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "object" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" [[package]] name = "once_cell" version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" [[package]] name = "openssl" version = "0.10.30" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "cfg-if", + "foreign-types", + "lazy_static", + "libc", + "openssl-sys", ] [[package]] name = "openssl-probe" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] name = "openssl-sys" version = "0.9.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" dependencies = [ - "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] name = "pager" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b69ced2bfa977c4541743a7427b89c94120684791a9629941fe6028dccab6528" dependencies = [ - "errno 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "errno", + "libc", ] [[package]] name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pin-project" version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" dependencies = [ - "pin-project-internal 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-internal", ] [[package]] name = "pin-project-internal" version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" dependencies = [ - "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "pin-project-lite" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" [[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.18" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" [[package]] name = "ppv-lite86" version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" [[package]] name = "predicates" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bfead12e90dccead362d62bb2c90a5f6fc4584963645bc7f71a735e0b0735a" dependencies = [ - "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "float-cmp 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "normalize-line-endings 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "difference", + "float-cmp", + "normalize-line-endings", + "predicates-core", + "regex", ] [[package]] name = "predicates-core" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" [[package]] name = "predicates-tree" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" dependencies = [ - "predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "predicates-core", + "treeline", ] [[package]] name = "proc-macro-crate" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "toml", ] [[package]] name = "proc-macro2" version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" dependencies = [ - "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid", ] [[package]] name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" dependencies = [ - "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", ] [[package]] name = "rand" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", + "libc", + "rand_chacha", + "rand_core", + "rand_hc", ] [[package]] name = "rand_chacha" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ - "ppv-lite86 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86", + "rand_core", ] -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", ] [[package]] name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core", ] [[package]] name = "redox_syscall" version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "regex" version = "1.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" dependencies = [ - "aho-corasick 0.7.13 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", ] [[package]] name = "regex-syntax" version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" [[package]] name = "remove_dir_all" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" dependencies = [ - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9", ] [[package]] name = "reqwest" version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9eaa17ac5d7b838b7503d118fa16ad88f440498bf9ffe5424e621f93190d61e" dependencies = [ - "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.24 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-tls 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", - "winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "lazy_static", + "log", + "mime", + "mime_guess", + "native-tls", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_urlencoded", + "tokio", + "tokio-tls", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", ] [[package]] name = "rustc-demangle" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" [[package]] name = "ryu" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" [[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util", ] [[package]] name = "schannel" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "winapi 0.3.9", ] [[package]] name = "security-framework" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", ] [[package]] name = "security-framework-sys" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" dependencies = [ - "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys", + "libc", ] [[package]] name = "serde" version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5" dependencies = [ - "serde_derive 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" dependencies = [ - "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "serde_json" version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" dependencies = [ - "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa", + "ryu", + "serde", ] [[package]] name = "serde_urlencoded" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" dependencies = [ - "dtoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa", + "itoa", + "serde", + "url", ] [[package]] name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "socket2" version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "redox_syscall", + "winapi 0.3.9", ] [[package]] name = "strsim" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" [[package]] name = "syn" version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9" dependencies = [ - "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] name = "tar" version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "489997b7557e9a43e192c527face4feacc78bfbe6eed67fd55c4c9e381cba290" dependencies = [ - "filetime 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime", + "libc", + "redox_syscall", + "xattr", ] [[package]] name = "tealdeer" version = "1.4.0" dependencies = [ - "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "app_dirs2 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "assert_cmd 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "escargot 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "filetime 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "predicates 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term", + "app_dirs2", + "assert_cmd", + "atty", + "docopt", + "env_logger", + "escargot", + "filetime", + "flate2", + "log", + "pager", + "predicates", + "remove_dir_all", + "reqwest", + "serde", + "serde_derive", + "tar", + "tempfile", + "toml", + "walkdir", + "xdg", ] [[package]] name = "tempfile" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "rand", + "redox_syscall", + "remove_dir_all", + "winapi 0.3.9", ] [[package]] name = "termcolor" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" dependencies = [ - "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util", ] [[package]] name = "thread_local" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", ] [[package]] name = "time" version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi 0.3.9", ] [[package]] name = "tinyvec" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" [[package]] name = "tokio" version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "fnv", + "futures-core", + "iovec", + "lazy_static", + "memchr", + "mio", + "num_cpus", + "pin-project-lite", + "slab", ] [[package]] name = "tokio-tls" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" dependencies = [ - "native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls", + "tokio", ] [[package]] name = "tokio-util" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" dependencies = [ - "bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "tokio", ] [[package]] name = "toml" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" dependencies = [ - "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", ] [[package]] name = "tower-service" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" [[package]] name = "tracing" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d79ca061b032d6ce30c660fded31189ca0b9922bf483cd70759f13a2d86786c" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-core 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "log", + "tracing-core", ] [[package]] name = "tracing-core" version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f0e00789804e99b20f12bc7003ca416309d28a6f495d6af58d1e2c2842461b5" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", ] [[package]] name = "treeline" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" [[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" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check", ] [[package]] name = "unicode-bidi" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", ] [[package]] name = "unicode-normalization" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" dependencies = [ - "tinyvec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tinyvec", ] [[package]] name = "unicode-xid" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" [[package]] name = "unreachable" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "void", ] [[package]] name = "url" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" dependencies = [ - "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "idna", + "matches", + "percent-encoding", ] [[package]] name = "vcpkg" version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" [[package]] name = "version_check" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "wait-timeout" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" dependencies = [ - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "walkdir" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ - "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file", + "winapi 0.3.9", + "winapi-util", ] [[package]] name = "want" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "try-lock 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log", + "try-lock", ] [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wasm-bindgen" version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0563a9a4b071746dd5aedbc3a28c6fe9be4586fb3fbadb67c400d4f53c6b16c" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.57 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "serde", + "serde_json", + "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc71e4c5efa60fb9e74160e89b93353bc24059999c0ae0fb03affc39770310b0" dependencies = [ - "bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95f8d235a77f880bcef268d379810ea6c0af2eacfa90b1ad5af731776e0c4699" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97c57cefa5fa80e2ba15641578b44d36e7a64279bc5ed43c6dbaf329457a2ed2" dependencies = [ - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro-support 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "quote", + "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" dependencies = [ - "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93b162580e34310e5931c4b792560108b10fd14d64915d7fff8ff00180e70092" [[package]] name = "web-sys" version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dda38f4e5ca63eda02c059d243aa25b5f35ab98451e518c51612cd0f1bd19a47" dependencies = [ - "js-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys", + "wasm-bindgen", ] [[package]] name = "winapi" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" [[package]] name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-build" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9", ] [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winreg" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" dependencies = [ - "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.9", ] [[package]] name = "ws2_32-sys" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8", + "winapi-build", ] [[package]] name = "xattr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" dependencies = [ - "libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "xdg" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum addr2line 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" -"checksum adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" -"checksum aho-corasick 0.7.13 (registry+https://github.com/rust-lang/crates.io-index)" = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" -"checksum android_log-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e" -"checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -"checksum app_dirs2 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a213127e3ec94ab7b7397a23ca4649c0494b8ed576b3fcf834a6569bde87512e" -"checksum ascii 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" -"checksum assert_cmd 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c88b9ca26f9c16ec830350d309397e74ee9abdfd8eb1f71cb6ecc71a3fc818da" -"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" -"checksum backtrace 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)" = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" -"checksum base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" -"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" -"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -"checksum bytes 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" -"checksum cc 1.0.59 (registry+https://github.com/rust-lang/crates.io-index)" = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381" -"checksum cesu8 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" -"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum combine 3.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" -"checksum core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" -"checksum core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" -"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum derivative 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" -"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" -"checksum doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" -"checksum docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969" -"checksum dtoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" -"checksum either 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" -"checksum encoding_rs 0.8.24 (registry+https://github.com/rust-lang/crates.io-index)" = "a51b8cf747471cb9499b6d59e59b0444f4c90eba8968c4e44874e92b5b64ace2" -"checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -"checksum errno 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6eab5ee3df98a279d9b316b1af6ac95422127b1290317e6d18c1743c99418b01" -"checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" -"checksum error-chain 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" -"checksum escargot 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74cf96bec282dcdb07099f7e31d9fed323bca9435a09aba7b6d99b7617bca96d" -"checksum filetime 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "3ed85775dcc68644b5c950ac06a2b23768d3bc9390464151aaf27136998dcf9e" -"checksum flate2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "766d0e77a2c1502169d4a93ff3b8c15a71fd946cd0126309752104e5f3c46d94" -"checksum float-cmp 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1267f4ac4f343772758f7b1bdcbe767c218bbab93bb432acbf5162bbf85a6c4" -"checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures-channel 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" -"checksum futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" -"checksum futures-io 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" -"checksum futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" -"checksum futures-task 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" -"checksum futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" -"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" -"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -"checksum gimli 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" -"checksum h2 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" -"checksum hashbrown 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" -"checksum hermit-abi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" -"checksum http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" -"checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" -"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -"checksum hyper 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb" -"checksum hyper-tls 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" -"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -"checksum indexmap 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c" -"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -"checksum ipnet 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" -"checksum itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" -"checksum jni 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1981310da491a4f0f815238097d0d43d8072732b5ae5f8bd0d8eadf5bf245402" -"checksum jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" -"checksum js-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)" = "85a7e2c92a4804dd459b86c339278d0fe87cf93757fae222c3fa3ae75458bc73" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)" = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" -"checksum log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" -"checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" -"checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -"checksum miniz_oxide 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722" -"checksum mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)" = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" -"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" -"checksum ndk 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "95a356cafe20aee088789830bfea3a61336e84ded9e545e00d3869ce95dcb80c" -"checksum ndk-glue 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d1730ee2e3de41c3321160a6da815f008c4006d71b095880ea50e17cf52332b8" -"checksum ndk-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2b2820aca934aba5ed91c79acc72b6a44048ceacc5d36c035ed4e051f12d887d" -"checksum net2 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)" = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" -"checksum normalize-line-endings 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" -"checksum num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" -"checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -"checksum num_enum 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" -"checksum num_enum_derive 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" -"checksum object 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" -"checksum once_cell 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" -"checksum openssl 0.10.30 (registry+https://github.com/rust-lang/crates.io-index)" = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" -"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)" = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" -"checksum pager 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b69ced2bfa977c4541743a7427b89c94120684791a9629941fe6028dccab6528" -"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -"checksum pin-project 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)" = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" -"checksum pin-project-internal 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)" = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" -"checksum pin-project-lite 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" -"checksum pin-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -"checksum pkg-config 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)" = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" -"checksum ppv-lite86 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" -"checksum predicates 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96bfead12e90dccead362d62bb2c90a5f6fc4584963645bc7f71a735e0b0735a" -"checksum predicates-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" -"checksum predicates-tree 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" -"checksum proc-macro-crate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -"checksum proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" -"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -"checksum quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" -"checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -"checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" -"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)" = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" -"checksum regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" -"checksum regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" -"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" -"checksum reqwest 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)" = "e9eaa17ac5d7b838b7503d118fa16ad88f440498bf9ffe5424e621f93190d61e" -"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" -"checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" -"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -"checksum schannel 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" -"checksum security-framework 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" -"checksum security-framework-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" -"checksum serde 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)" = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5" -"checksum serde_derive 1.0.115 (registry+https://github.com/rust-lang/crates.io-index)" = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" -"checksum serde_json 1.0.57 (registry+https://github.com/rust-lang/crates.io-index)" = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" -"checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" -"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum socket2 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" -"checksum strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" -"checksum syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9" -"checksum tar 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "489997b7557e9a43e192c527face4feacc78bfbe6eed67fd55c4c9e381cba290" -"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -"checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" -"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -"checksum time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" -"checksum tinyvec 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" -"checksum tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" -"checksum tokio-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" -"checksum tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" -"checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" -"checksum tracing 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6d79ca061b032d6ce30c660fded31189ca0b9922bf483cd70759f13a2d86786c" -"checksum tracing-core 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "4f0e00789804e99b20f12bc7003ca416309d28a6f495d6af58d1e2c2842461b5" -"checksum treeline 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" -"checksum try-lock 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" -"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" -"checksum unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" -"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" -"checksum vcpkg 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" -"checksum version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum wait-timeout 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" -"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -"checksum wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" -"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -"checksum wasm-bindgen 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "f0563a9a4b071746dd5aedbc3a28c6fe9be4586fb3fbadb67c400d4f53c6b16c" -"checksum wasm-bindgen-backend 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "bc71e4c5efa60fb9e74160e89b93353bc24059999c0ae0fb03affc39770310b0" -"checksum wasm-bindgen-futures 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)" = "95f8d235a77f880bcef268d379810ea6c0af2eacfa90b1ad5af731776e0c4699" -"checksum wasm-bindgen-macro 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "97c57cefa5fa80e2ba15641578b44d36e7a64279bc5ed43c6dbaf329457a2ed2" -"checksum wasm-bindgen-macro-support 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" -"checksum wasm-bindgen-shared 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "93b162580e34310e5931c4b792560108b10fd14d64915d7fff8ff00180e70092" -"checksum web-sys 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)" = "dda38f4e5ca63eda02c059d243aa25b5f35ab98451e518c51612cd0f1bd19a47" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -"checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" -"checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" +checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" diff --git a/Cargo.toml b/Cargo.toml index 86af621..8d5b6be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ pager = "0.15" assert_cmd = "1.0.1" escargot = "0.5" predicates = "1.0" -tempdir = "^0.3" +tempfile = "3.1.0" filetime = "0.2.10" remove_dir_all = "=0.5.2" # Only used to ensure compatibility with 1.39 (#133) diff --git a/tests/lib.rs b/tests/lib.rs index 350b9f4..125e749 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -4,7 +4,7 @@ extern crate assert_cmd; extern crate escargot; extern crate filetime; extern crate predicates; -extern crate tempdir; +extern crate tempfile; use std::fs::{create_dir_all, File}; use std::io::Write; @@ -14,7 +14,7 @@ use std::time::{Duration, SystemTime}; use assert_cmd::prelude::*; use predicates::boolean::PredicateBooleanExt; use predicates::prelude::predicate::str::{contains, is_empty, similar}; -use tempdir::TempDir; +use tempfile::{Builder, TempDir}; struct TestEnv { pub cache_dir: TempDir, @@ -27,9 +27,9 @@ struct TestEnv { impl TestEnv { fn new() -> Self { TestEnv { - cache_dir: TempDir::new(".tldr.test.cache").unwrap(), - config_dir: TempDir::new(".tldr.test.config").unwrap(), - input_dir: TempDir::new(".tldr.test.input").unwrap(), + cache_dir: Builder::new().prefix(".tldr.test.cache").tempdir().unwrap(), + config_dir: Builder::new().prefix(".tldr.test.conf").tempdir().unwrap(), + input_dir: Builder::new().prefix(".tldr.test.input").tempdir().unwrap(), default_features: true, features: vec![], } From 30b7c5febc2f51bd4db824f80586ba4b140fff26 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 4 Sep 2020 12:25:37 +0200 Subject: [PATCH 082/368] Release v1.4.1 (#140) --- CHANGELOG.md | 16 ++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 750bc66..14718ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,18 @@ Possible log types: - `[security]` to invite users to upgrade in case of vulnerabilities. +### [v1.4.1][v1.4.1] (2020-09-04) + +- [fixed] Syntax error in zsh completion file ([#138][i138]) + +Contributors to this version: + +- [Francesco][@BachoSeven] +- [Bruno A. Muciño][@mucinoab] + +Thanks! + + ### [v1.4.0][v1.4.0] (2020-09-03) - [added] Configurable automatic cache updates ([#115][i115]) @@ -127,6 +139,7 @@ Thanks! [@aldanor]: https://github.com/aldanor [@Atul9]: https://github.com/Atul9 +[@BachoSeven]: https://github.com/BachoSeven [@Bassets]: https://github.com/Bassets [@Calinou]: https://github.com/Calinou [@das-g]: https://github.com/das-g @@ -143,6 +156,7 @@ Thanks! [@LovecraftianHorror]: https://github.com/LovecraftianHorror [@ma-renaud]: https://github.com/ma-renaud [@michaeldel]: https://github.com/michaeldel +[@mucinoab]: https://github.com/mucinoab [@mystal]: https://github.com/mystal [@natpen]: https://github.com/natpen [@niklasmohrin]: https://github.com/niklasmohrin @@ -155,6 +169,7 @@ Thanks! [v1.2.0]: https://github.com/dbrgn/tealdeer/compare/v1.1.0...v1.2.0 [v1.3.0]: https://github.com/dbrgn/tealdeer/compare/v1.2.0...v1.3.0 [v1.4.0]: https://github.com/dbrgn/tealdeer/compare/v1.3.0...v1.4.0 +[v1.4.1]: https://github.com/dbrgn/tealdeer/compare/v1.4.0...v1.4.1 [i34]: https://github.com/dbrgn/tealdeer/issues/34 [i43]: https://github.com/dbrgn/tealdeer/issues/43 @@ -180,3 +195,4 @@ Thanks! [i112]: https://github.com/dbrgn/tealdeer/issues/112 [i113]: https://github.com/dbrgn/tealdeer/issues/113 [i115]: https://github.com/dbrgn/tealdeer/issues/115 +[i138]: https://github.com/dbrgn/tealdeer/issues/138 diff --git a/Cargo.lock b/Cargo.lock index dab479a..76cbdf3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1252,7 +1252,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.4.0" +version = "1.4.1" dependencies = [ "ansi_term", "app_dirs2", diff --git a/Cargo.toml b/Cargo.toml index 8d5b6be..41eaf0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT/Apache-2.0" name = "tealdeer" readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" -version = "1.4.0" +version = "1.4.1" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "/bash_tealdeer", "/fish_tealdeer"] edition = "2018" From 151d014f5d0e48b6988774b9d41d0e8f241c510b Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 13 Oct 2020 09:45:21 +0200 Subject: [PATCH 083/368] Fix expected output for tar test (#144) --- tests/tar-markdown.expected | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tar-markdown.expected b/tests/tar-markdown.expected index 9523d6a..c4a28b1 100644 --- a/tests/tar-markdown.expected +++ b/tests/tar-markdown.expected @@ -34,7 +34,7 @@ - Extract files matching a pattern: -`tar xf {{source.tar}} --wildcards {{"*.html"}}` +`tar xf {{source.tar}} --wildcards "{{*.html}}"` - Extract a specific file without preserving the folder structure: From 9236f0d4a7566969c94f30d66873cb0c7e170915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Sun, 1 Nov 2020 00:17:21 +0100 Subject: [PATCH 084/368] Add support for ANSI code and RGB colors (#148) Fixes #147. --- README.md | 14 +++++++++++--- src/config.rs | 4 ++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3739c85..be622c9 100644 --- a/README.md +++ b/README.md @@ -174,12 +174,12 @@ Possible styles: Currently supported attributes: -- `foreground` (color string, see below) -- `background` (color string, see below) +- `foreground` (color string, ANSI code, or RGB, see below) +- `background` (color string, ANSI code, or RGB, see below) - `underline` (`true` or `false`) - `bold` (`true` or `false`) -The currently supported colors are: +The currently supported color strings are: - `black` - `red` @@ -190,6 +190,14 @@ The currently supported colors are: - `cyan` - `white` +ANSI color codes are also supported: + + foreground = { ansi = 4 } + +Finally, colors can also be configured by their RGB representation: + + background = { rgb = { r = 255, g = 255, b = 255 } } + Example customization: Screenshot of customized version diff --git a/src/config.rs b/src/config.rs index 1b953f1..68ef37e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -34,6 +34,8 @@ pub enum RawColor { Purple, Cyan, White, + Ansi(u8), + RGB { r: u8, g: u8, b: u8 }, } impl From for Color { @@ -47,6 +49,8 @@ impl From for Color { RawColor::Purple => Self::Purple, RawColor::Cyan => Self::Cyan, RawColor::White => Self::White, + RawColor::Ansi(num) => Self::Fixed(num), + RawColor::RGB { r, g, b } => Self::RGB(r, g, b), } } } From e35dd5e30c762aa4b9d4d226457a0144213e2bd5 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 1 Nov 2020 00:26:19 +0100 Subject: [PATCH 085/368] README: Simplify color docs --- README.md | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index be622c9..50a9e65 100644 --- a/README.md +++ b/README.md @@ -179,24 +179,11 @@ Currently supported attributes: - `underline` (`true` or `false`) - `bold` (`true` or `false`) -The currently supported color strings are: +Colors can be specified in one of three ways: -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `purple` -- `cyan` -- `white` - -ANSI color codes are also supported: - - foreground = { ansi = 4 } - -Finally, colors can also be configured by their RGB representation: - - background = { rgb = { r = 255, g = 255, b = 255 } } +- Color string (`black`, `red`, `green`, `yellow`, `blue`, `purple`, `cyan`, `white`) +- 256 color ANSI code (e.g. `foreground = { ansi = 4 }`) +- 24-bit RGB color (e.g. `background = { rgb = { r = 255, g = 255, b = 255 } }`) Example customization: From ddeb81b24906fca757cdd493da60a504963b2eb5 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 1 Nov 2020 01:26:19 +0100 Subject: [PATCH 086/368] Add mdbook documentation --- README.md | 184 +----------------- docs/.gitignore | 1 + docs/book.toml | 6 + docs/src/SUMMARY.md | 10 + docs/src/config.md | 43 ++++ docs/src/config_display.md | 23 +++ docs/src/config_style.md | 40 ++++ docs/src/config_updates.md | 26 +++ docs/src/deer.png | Bin 0 -> 65420 bytes docs/src/deer.svg | 52 +++++ docs/src/installing.md | 63 ++++++ docs/src/intro.md | 13 ++ .../src/screenshot-custom.png | Bin docs/src/usage.md | 9 + src/main.rs | 37 +--- src/usage.docopt | 34 ++++ 16 files changed, 328 insertions(+), 213 deletions(-) create mode 100644 docs/.gitignore create mode 100644 docs/book.toml create mode 100644 docs/src/SUMMARY.md create mode 100644 docs/src/config.md create mode 100644 docs/src/config_display.md create mode 100644 docs/src/config_style.md create mode 100644 docs/src/config_updates.md create mode 100644 docs/src/deer.png create mode 100644 docs/src/deer.svg create mode 100644 docs/src/installing.md create mode 100644 docs/src/intro.md rename screenshot-custom.png => docs/src/screenshot-custom.png (100%) create mode 100644 docs/src/usage.md create mode 100644 src/usage.docopt diff --git a/README.md b/README.md index 50a9e65..4015047 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # tealdeer -![teal deer](deer.png) +![teal deer](docs/src/deer.png) |Crate|CI (Linux/macOS/Windows)| |:---:|:---:| @@ -56,83 +56,17 @@ These are the clients I tried but failed to compile or run: [PHP client](https://github.com/BrainMaestro/tldr-php). -## Usage +## Docs (Installing, Usage, Configuration) - tldr [options] - tldr [options] +User documentation is available at ! - Options: - - -h --help Show this screen - -v --version Show version information - -l --list List all commands in the cache - -f --render Render a specific markdown file - -o --os Override the operating system [linux, osx, sunos, windows] - -u --update Update the local cache - -c --clear-cache Clear the local cache - -p --pager Use a pager to page output - -m --markdown Display the raw markdown instead of rendering it - -q --quiet Suppress informational messages - --config-path Show config file path - --seed-config Create a basic config - --color Control when to use color [always, auto, never] [default: auto] - - Examples: - - $ tldr tar - $ tldr --list - - To control the cache: - - $ tldr --update - $ tldr --clear-cache - - To render a local file (for testing): - - $ tldr --render /path/to/file.md +The docs are generated using [mdbook](https://rust-lang.github.io/mdBook/index.html). +They can be edited through the markdown files in the `docs/src/` directory. -## Installing +## Development -### Static Binaries (Linux) - -Static binary builds (currently for Linux only) are available on the -[GitHub releases page](https://github.com/dbrgn/tealdeer/releases). -Simply download the binary for your platform and run it! - -Builds for other platforms are planned. - -### Cargo Install (any platform) - -Build and install the tool via cargo... - - $ cargo install tealdeer - -*(Note: You might need to install OpenSSL development headers, otherwise you get -a "failed to run custom build command for openssl-sys" error message. The -package is called `libssl-dev` on Ubuntu.)* - -### From Package Manager - -tealdeer has been added to a few package managers: - -- Arch Linux AUR: [`tealdeer`](https://aur.archlinux.org/packages/tealdeer/), - [`tealdeer-bin`](https://aur.archlinux.org/packages/tealdeer-bin/) or - [`tealdeer-git`](https://aur.archlinux.org/packages/tealdeer-git/) -- Fedora: [`tealdeer`](https://src.fedoraproject.org/rpms/rust-tealdeer) -- FreeBSD: [`sysutils/tealdeer`](https://www.freshports.org/sysutils/tealdeer/) -- macOS Homebrew: [`tealdeer`](https://formulae.brew.sh/formula/tealdeer) -- NetBSD: [`sysutils/tealdeer`](https://pkgsrc.se/sysutils/tealdeer) -- Nix: [`tealdeer`](https://nixos.org/nixos/packages.html#tealdeer) -- openSUSE: [`tealdeer`](https://software.opensuse.org/package/tealdeer?search_term=tealdeer) -- Solus: [`tealdeer`](https://packages.getsol.us/shannon/t/tealdeer/) -- Void Linux: [`tealdeer`](https://github.com/void-linux/void-packages/tree/master/srcpkgs/tealdeer) - -### From Source (any platform) - -tealdeer requires at least Rust 1.39. - -Debug build with logging enabled: +Creating a debug build with logging enabled: $ cargo build --features logging @@ -144,110 +78,6 @@ To enable the log output, set the `RUST_LOG` env variable: $ export RUST_LOG=tldr=debug - -## Configuration - -The tldr command can be customized with a config file called `config.toml`. -Creating the config file can be done manually or with the help of tldr: - - $ tldr --seed-config - -The configuration file path follows OS conventions. It can be queried with the following command: - - $ tldr --config-path - -The directory where the configuration file resides may be overwritten by the -environment variable `TEALDEER_CONFIG_DIR`. Remember to use an absolute path. -Variable expansion will not be performed on the path. - -### Style - -Using the config file, the style (e.g. colors or underlines) can be customized. - -Possible styles: - -- `description`: The initial description text -- `command_name`: The command name as part of the example code -- `example_text`: The text that describes an example -- `example_code`: The example itself, except the `command_name` and `example_variable` -- `example_variable`: The variables in the example - -Currently supported attributes: - -- `foreground` (color string, ANSI code, or RGB, see below) -- `background` (color string, ANSI code, or RGB, see below) -- `underline` (`true` or `false`) -- `bold` (`true` or `false`) - -Colors can be specified in one of three ways: - -- Color string (`black`, `red`, `green`, `yellow`, `blue`, `purple`, `cyan`, `white`) -- 256 color ANSI code (e.g. `foreground = { ansi = 4 }`) -- 24-bit RGB color (e.g. `background = { rgb = { r = 255, g = 255, b = 255 } }`) - -Example customization: - -Screenshot of customized version - -### Display - -In the `display` section you can configure the output format. - -#### `use_pager` - -Specifies whether the pager should be used by default or not (default `false`). - - [display] - use_pager = true - -When enabled, `less -R` is used as pager. To override the pager command used, -set the `PAGER` environment variable. - -NOTE: This feature is not available on Windows. - -#### `compact` - -Set this to enforce more compact output, where empty lines are stripped out -(default `false`). - - [display] - compact = true - - -### Automatic updates - -tealdeer can refresh the cache automatically when it is outdated. This -behavior can be configured in the `updates` section and is disabled by -default. - -#### `auto_update` - -Specifies whether the auto-update feature should be enabled (defaults to -`false`). - - [updates] - auto_update = true - -#### `auto_update_interval_hours` - -Duration, since the last cache update, after which the cache will be -refreshed (defaults to 720 hours). This parameter is ignored if `auto_update` -is set to `false`. - - [updates] - auto_update = true - auto_update_interval_hours = 24 - - -## Autocompletion - -- *Bash*: copy `bash_tealdeer` to `/usr/share/bash-completion/completions/tldr` -- *Fish*: copy `fish_tealdeer` to `~/.config/fish/completions/tldr.fish` -- *Zsh*: copy `zsh_tealdeer` to `/usr/share/zsh/site-functions/_tldr` - - -## Development - To run tests: $ cargo test diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..7585238 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +book diff --git a/docs/book.toml b/docs/book.toml new file mode 100644 index 0000000..ae63f23 --- /dev/null +++ b/docs/book.toml @@ -0,0 +1,6 @@ +[book] +authors = ["Danilo Bargen"] +language = "en" +multilingual = false +src = "src" +title = "Tealdeer User Manual" diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md new file mode 100644 index 0000000..6201678 --- /dev/null +++ b/docs/src/SUMMARY.md @@ -0,0 +1,10 @@ +# Summary + +[Introduction](./intro.md) + +- [Installing](./installing.md) +- [Usage](./usage.md) +- [Configuration](./config.md) + - [display](./config_display.md) + - [style](./config_style.md) + - [updates](./config_updates.md) diff --git a/docs/src/config.md b/docs/src/config.md new file mode 100644 index 0000000..3aee010 --- /dev/null +++ b/docs/src/config.md @@ -0,0 +1,43 @@ +# Configuration + +Tealdeer can be customized with a config file called `config.toml`. Creating +the config file can be done manually or with the help of `tldr`: + + $ tldr --seed-config + +The configuration file path follows OS conventions. It can be queried with the +following command: + + $ tldr --config-path + +On Linux, this will usually be `~/.config/tealdeer/config.toml`. + +## Override Config Directory + +The directory where the configuration file resides may be overwritten by the +environment variable `TEALDEER_CONFIG_DIR`. Remember to use an absolute path. +Variable expansion will not be performed on the path. + +## Example + +```toml +[display] +compact = false +use_pager = true + +[style.command_name] +foreground = "red" + +[style.example_text] +foreground = "green" + +[style.example_code] +foreground = "blue" + +[style.example_variable] +foreground = "blue" +underline = true + +[updates] +auto_update = true +``` diff --git a/docs/src/config_display.md b/docs/src/config_display.md new file mode 100644 index 0000000..6d16805 --- /dev/null +++ b/docs/src/config_display.md @@ -0,0 +1,23 @@ +# display + +In the `display` section you can configure the output format. + +## `use_pager` + +Specifies whether the pager should be used by default or not (default `false`). + + [display] + use_pager = true + +When enabled, `less -R` is used as pager. To override the pager command used, +set the `PAGER` environment variable. + +NOTE: This feature is not available on Windows. + +## `compact` + +Set this to enforce more compact output, where empty lines are stripped out +(default `false`). + + [display] + compact = true diff --git a/docs/src/config_style.md b/docs/src/config_style.md new file mode 100644 index 0000000..255a44b --- /dev/null +++ b/docs/src/config_style.md @@ -0,0 +1,40 @@ +# style + +Using the config file, the style (e.g. colors or underlines) can be customized. + +Screenshot of customized version + +## Style Targets + +- `description`: The initial description text +- `command_name`: The command name as part of the example code +- `example_text`: The text that describes an example +- `example_code`: The example itself (except the `command_name` and `example_variable`) +- `example_variable`: The variables in the example + +## Attributes + +- `foreground` (color string, ANSI code, or RGB, see below) +- `background` (color string, ANSI code, or RGB, see below) +- `underline` (`true` or `false`) +- `bold` (`true` or `false`) + +Colors can be specified in one of three ways: + +- Color string (`black`, `red`, `green`, `yellow`, `blue`, `purple`, `cyan`, `white`): + + Example: + + foreground = "green" + +- 256 color ANSI code (*Tealdeer v1.5.0+*) + + Example: + + foreground = { ansi = 4 } + +- 24-bit RGB color (*Tealdeer v1.5.0+*) + + Example: + + background = { rgb = { r = 255, g = 255, b = 255 } } diff --git a/docs/src/config_updates.md b/docs/src/config_updates.md new file mode 100644 index 0000000..ac9a59b --- /dev/null +++ b/docs/src/config_updates.md @@ -0,0 +1,26 @@ +# updates + +## Automatic updates + +tealdeer can refresh the cache automatically when it is outdated. This +behavior can be configured in the `updates` section and is disabled by +default. + +### `auto_update` + +Specifies whether the auto-update feature should be enabled (defaults to +`false`). + + [updates] + auto_update = true + +### `auto_update_interval_hours` + +Duration, since the last cache update, after which the cache will be +refreshed (defaults to 720 hours). This parameter is ignored if `auto_update` +is set to `false`. + + [updates] + auto_update = true + auto_update_interval_hours = 24 + diff --git a/docs/src/deer.png b/docs/src/deer.png new file mode 100644 index 0000000000000000000000000000000000000000..ebc9c9d102a0f8f5459116d03d8415385be1e8aa GIT binary patch literal 65420 zcmX_n1z3~c8}`QN?#|K8=#&~IElBr3y1PMYw1{*_h=fQZN>0&%f-q_*tsp7g{mtM1 z`@UV*u3dZgzGvq>?>WzNKlgo~R3if|5<*5o002OuqYZro004zBZ&Q3+%#m_p;7`m4 zcA%P$DL&>Eh3^cK;;^cmeBpgN z=`=K_S_D7K7O}~VQJd*b&3r#1Q|js}en>eC`nci3+4&>)FK;2Cx%&9KdCt`f~k=GCl2q>!VRaI{-_wSx5wwYF8;^_*q8n0j1xiiH*x4O~ z>62DVahVIY<0Tc4QKV7vI|ffa!%6E|4I1!?%@E3->2AK_)fEL?&O3d)kn4m6*W`&jg9uX<)OS63s_O=ic2^E*u%Pp z?V`C~l4Sp#&<>on?IK2;gAJUcvmJr-$5hB5EX16pMWl9`*0j*SF4UONH8(Ua;J{e_ zwPNbvJwG>u63$C-7kR22rJ`Fq=8&p4IOj|7pvyt;=;5y|6>AN& zWAv-wK+=yJw2J$Nl(-{>FXP-_j1!rRfQd&dTsv>R|b-f6zms%I+T?A*ZNob z=gQTUsHjG7G9kU6a4Xtaa2o`G9K}K$-_1;Y`qzX_TDpX`k8I@;q682t7UETrjzi>E z`u%pO-B|sunY0)0-*kRtS3Z{Z(ira|wMO^;RQJLYv2W4CUvZjvKy!bDh;(SdvJ(05 zL8`Iv(}5t0aC}}EhttFT2Fq((`Hlik6=neh@>litCMUl%hS>qSvEo09uhTW|0^+op z^|=;Vb2?sRy&?EFsYkdgS4AcleIEeP{h%PsDsb>_OTjV1z0u_B&`;BxUi z*fqKEfoBlB2-ckh`HuqrrS?WRXzXRc{IBl&Ia#xRJ(6cdzN!vRBq#?;ziRY)Nu62m zvJyT};oVOe1u}Ki!<>TkC^4mTL|a7t>-T8NVZ4Z14gev^d103l+N2L_L+|)wuam;; z@SfK`0DxnG_E@!m0!aALRfAf0$C)wTi_Fe_P`E{p?soEY(2dE14q$A`uff<)g&T1& zimmMR9mTj|+&6M<+${i@csxyQTO~@iqufXLp>DS4UVJCMskoK@Vo*S!GE@+FruVb3 z_!+|Cttb>s1{e}|f@(qc@Q}c4aNAY`nI1&`Pb!EN6VKqxM%PxVA7>GdG8jm0%Bm<{ zGm35Z;Q;xgk7x37=sUFbQWqR6gUm|tbX_onIm}`h57RTVzoM_xGromYYDKU#3rVk&o zv9zY=d5*AyT}M;kf3qNlPI}Rt4!b+DV_GU?nps}6 ziPhIHii?$6&p1~WB9a3&q}6p@kKmfeB@RNaj=MXZ<4rw239-I~&v=3>J znkUXYP~msDJxGh=h;za%D|SKE;##Oh2K|6Quj+kRm2aHtngTQgS;$o1bf>)1J?Cjq z_{_la=Qx56A?WO^xFXYWVbAw*ZX~WJPMSWD*6;e^*&_Cj1nspTD67_*GJN4u*{&gb9vd@Z;7uGb=%>4F9^cL!~%(|KumDZ=Q?tlEXU0W)iG4A zUkcN(>A4^^7HL7Egc}81<%CK%3DJf10eo#M1Anr?DhmPkoU#CWm{<}e| zI2Sjb2$_{=2iWw51^_?F?o03n(3Ik}UQ;%9vh;I8<96v>>`IS!;FPd{a6 zj;YPLl?LWt&yFLHrLlQ90%*Yl_hhp;Ib){g%Akdor>&0~Ce9VeVDdRda>udnk$x4- zIft3O>wv|0(fazIY`6ZN(ogBpSLqsgq{+Wz$&5@S&@Z3RfBJR)_4`|}QnWa@080i- zt6C>b84x`o{!%wC9C4-sX<>#%fJA@E_W6|ximlry{|xkXkb$OA@V~BD@r2THR!!05 zZ09iw=Gexsiam+VD9VPbE7~P@62YP6l~q;IyZyfov^G6{hJSX7;#4HcoRAXy_`)w*t6-fMHY(fb zjZ+#2Sxtr7dAHb$v=nx97<^v!Mu~oI?W`xS*6MP)JPLw-`*3$9P0Y}Sog+C=GO~?q zp{O*nw&^0tn!+9TOn`W|yd!A=`Oy{=%TdYV|Deg_&<6|dSSJ(LtGr?XAKxDDrbPgG zIVVfj&}ZOrhtaoCuzJ7HdYI9j7za)ERQL&jkoO$>DVVp3E z9&M|l1vRi5iR?*lZ1k*ejAG1miO^}@O}mqg#u2ipPiZh&xx8;rOV*|Z=aIz%oFe~#^`3bcV8BaV3{_Q?J207?2oASS%~OoyP|v^EXp%5% zwJ>koP4B#}V6_xs91n<-e!oYlR_POFry$uA9Xp*n05}g2eE@tN$59k%7OH>oK#ebWR2i)UrXic}r zh-`I!M~x%eW=dDhR)VJ$>=mF{I6UAsZt$P4qByvM?5)f(@)Mgg@Ap#boJagtj58Pv z`GVLEFE;K7%^!egpw%f3yCIu|(?fz`kHFTjQ9FxBSrqHIt`?PYmx{u#3=r$*LW8@4 zQ$w3j$ribW;!6rJ1c~HjOMP z!-DWpoQjH-$f^ki_)s+>DRFS0U7T<>nl&c@4Sv@FMB%}FKFyiLSN5OXFt6xKcCvSW zlI)6&CCllF{|O&G>tcjvftEOhg-gPsfGr%q4x(0wpv;Z>K9R4>Q#wVl45I-*eE=*v4hg9`sijFjQkpeGA5v3kC@0#zlJAoz0<<$}6d2Q2y8)qfky_ z!*I{5nm+&x2DczU-_hM_up~Umr*qn^`Mf%moBvMm@FD>*0xwPMR0i@^+vTSZ%hXk= z;r}3Y`-8WvIv?Oo)^YUGyt;gfzHyNx?0I+IXGO`SQw4N?oIy5EmF72`F$2a!B7{YT zyE+#oH{;?{i&0DrfRB~cnpj0}UTKuY@tADKiAxNbSY9ekY`&pCX8CoH3Gcvq%^4sG ze%XAY#HiFwlb2`ixErj(i0)5+P2mhQ1k6?=J!bPthrmapj9%Ao&L+OWB6V-?=Rx;4 z<+x4Qq`0JjZpTr*#@(?whDKt5T4kvJ;#ED-Hpc)KvjGV9C>?@%+^2|ePyg@O>I6xI z{);`SL*^Fo{}7LX<1f|-FRLe13J8DwTP4en{$fOB3|w(CUr8wc5@Kna41}J!(o>RzL3uN zGJu&EZ+sqC>V2O@e=nIwX*rg`XaBih;V-eS9Y>F$;CAEeEd|YtO>O<}zwWM4z#nv( z*59$ufa?yU*%sFX+cjv0`cBm~bLhJ-{%4=&x?0~c4;96C#yae}BJ|xB-1Wt{1PE=; zc~4TnMSHJmwd(5SrtT-KC_JwL=RhR}sRm*76cMXxK|0#K#GTix-2)frooY7{7%(Tu z$jgTaUdH1AkZZAx^y}2?$!Zy>}a~Vza~69kYMb35BM%O$0lVa;_?28(8)+ma1@c6hF<9+X{)+vuFx zFBEKXKN3OYN2H-qLY4h8enTmKSl9VUa(z>I*2ZF%!B9Y40sPAuW`(s#XW@)fr3)kH z65`^+mSCTqv?xhq)k4m!h3xI{qg2B$L)=Dv$Q;NUDDGL1LZ9ZS;t6EOus;0~1&$O# zj`5Qe1q4*gb*Yk<)cfic#GXLVB3KU){biahEVEQH0)@P3mY z3kkE+n9O&9%fiFx0}0U&_I!N}?UrT*nVVzZc-&vb<`mjBWx1Vjt$>nAtmD%3q#3UX zF-tUU*kZZ5828ocr7~JDLf?DBes8L7WWHU6q+AB~R;?`4fIuQHG_IZEGN3Fo7*pP& zpkJLF$n)|fAet!t-<@u8U2NqA`?Z$T(-CY}Nodhv$!`4dNKlRmz2XH4G$8I_#!muI zWzDteInT6(U-$Ro;8^f;1IY+5x_q$BB|jsB=vHaN0q941|QHgU(y{`q!kgd8h?4U zxDIf=$Xwg=^8HWK)wkH1k4#ShhZn+#53*zTzrv^DbT+^JDxx<5 zX85cTyCc{T5^y~z%%#Xefe_|n_4RR==3114>&jzhSL*UE(9Dbskch%^+c5i}`CfKw zOPRaR*P8ukhtQQpf+wY+!RGhjI~5URhE`zn98kewHyiVpKyPXvUf1U&}`&K|&pOqv5903Yx28)f109gvFi| z4lFOsMN4iSOHO;N>#3OmstL+!rHLy8 zx-fiLzQe8rf@bZH(sW%{^%jnO1rfeA$OUfGU+fu^#`tzhY+XTdUo#*u@{!#g(65e7 zyf9;xc~LvF>M*b?f}GIhceh6WZ1>Z7J6*{LZZ!Hrx!e*#w6@Or*xI9pbvBYd5D&da z^I{#lkrhU&Iz_Xm0jgsIbminp(S>2ba3ycOUtE3&>;9v~UPcm2~#eIjxs=h`J6;WNonI^g& zW7AQK4qA+P30>z5zynAAlD)2aQxzR2hTa2s;V)>pZ>d2EZzHuI^kc!Xd?#90>k;l5 z^b?LXvr~^s*~sgWbA8b>8M1%=z~b$r@-q1mU5SHik^wjU2(^r#z*(hfw&ib`dBZ@9 z9K$_Rg< zy>|MzyqbT4_*$1doKDK@++p;KMI@D2=ICf`eSpyWxw2ny#4xC+uGSMRX@&)yj$SfBa=XGvBn9{u%#mU+&bgGP`+uxStat*z3yM( zbE9bgrb>wVT6it!+;P_tA>G(;Vwk6zhPsixE&a%9q0kb-mNSMhwus~tD-*FDBT;OO zo1suQ9|yeqGS?LsSy%soz(SL&?W~4QKYn-+;fSce`?jRE!rIV)fz_Olb$qBMaH_5@ z40MtH&Rgl|h*YE2wud}B7TBBiq|Uy*_)%FId`NTap)}^)@j;WVF?u4lG-+culkv3#iff`35t=wC=<%xF z<{0Aq}&Fb8D&}$3WX_(fU749bN;eDnp@q=y{QApn47h$#A zk5o**+bkv1t85eR{&cxMrbHP=mE-a4TL>uT%UpGQspo(m?Tqk53F`;hCgBMuwLn$3d`4$UWt-Hwv^=dR-Y;2LswR<9wy!6n zi9F2*AZ&?;GCc3oCziNKK0&5*Nb4NeZ?_J*XZo@?1mJ66I;Fe#Kk}VeUE|9wBG;ma zpcop#bfr3meZ|?dR*Ziv2p^{p_T)iE@+&;np2a zEW9*9z1!c%I>5?(*`OPhcCWct;^$HUgcJvx1GPfOD*w>?RG%!U*2--r}D&EveU3 z8=jo|8!cY{f!k>K`}6$ylltjw%h`qI^0cf3_{I5&9n@#<(far@)@*cYZ*LiuI}?V$ zH)6{ffvg)sk1ltbVaA!SO^mXCe~YbX{id;|g~=lTml))^Mxxp^u;6!iGx{MjZw8GD z28dZ&!pJ|6m$BYr>wPTz1?PH09;617_669QZE8-JVsI-3p$2N^TQe$|I*?qB1r_3x z6^JjedyFlHGdxsi98>j%gY{li-dmCWw9Xoon+j#zv2;iAJ5hN2Fzp~a8!FVflbSN( zv`nR~s5Q2`luB}Of!BC ztVmG~>b_;sad1s0=|*a#=Hs&*@xeHFmI2F|16-##=I^GSqoaan)%DKQR1Z4_>P!yC zeb06Zz>N1j9BRi!yOXxDs2y>28RK~RuCD7H@s9_WzLa4Y#KqXNl{qXM^zB#(y_Z3& zxg5V*nzTb(`K9Zg8Ag-7YpC%>tgZd!tJgd%IkOX@#v}|3^Ap{{3K?JVB7mfoD2mM& z=O8F)L#RlOcdBM~^{?zmq1RU@2lAGd`_Ic3Gdntj3TalLF!(t2ONhEsThd+s zTjPl@{gOi7SmZxh=&?!-3=E__yLO-dKQ91!iG)7m1KrGITJ>onhAY(Mc&_QbwYV8c zd?1xG41$-Yb`E|WRm{Qk_(EUK?qgv#it<$tlbw7aWm9%t)yJ1A9D->`hN_9F)-x;S zjYk+tl}S#0ME#Wn@&qw=t*tv>8g}C`-2(@K$iw|=h8nmYQV4u6`Qw`jA|ofv#1KDt zD%?hmyUE)v`zbs=?}q$wFOav`(3rEKb|qwKvUJT`XmHOS@U>+3B%0bS`;*|!cH*jW z*{O`t*DZIr;@=dkClvuI1mEKOP~C_tjHsWovt$?%p?q|_!4W{z9cP>@V&q)0uNw<} zab{0xeEvnH4XT{av+{1p{T>=IfEg2SHi0&=!x9= zegQYH{drjw9vE8wj7N~veN+a%jlGtxmoQ+N*!*Sjru(=79f8vzcqW@AK`>r2@d~MH ze$%hP{W?~4Bs2y`lRcnzS!xqU((}%6o2#*zeS(CaAxHQouq=I;*?#t3Du||&TK^!b zcyyGAUOp%%_Wmg(+tK?0lKNTs9rnyjsKaPrCy{LT?+D)F9}z-UucBRGUDOyAjOOj) zcD6_0&cg!8RLj|fW~`;P05}@*nh9;7F(8JACHh-7w7Ip?10F-6RVj|Fh+i{ydobx` z&v>O67Alh? zKmtVodoVOti6EYwGUTSdO8@pvXLI@9BuL}XYg%DDL!b~nKsK}64anJ#a^Kym(=yF6 zqa_AYepq~Iu$+ign+Fa!>Jh_YkjG942UD6)7v=dC4R4u%`%@U`d}`*E`=3dK?)%0i zPF{aF@lg14zY7>z|HCs5Mhugo;RfiDxJtTXDKqO!%tzv5p2hc@OY7g=AjrDw)F{B=?$D_{r*w1Bm=fS9Nqt^n-&Fp;;w7TYKq{+X+%#7PrN2 zxN1Va#1lQzk^IGUY4J;z@6-3#vI&n*+KB&oTo}}a^0j1b9-7QZroD0;#pySQ6g2HU zfML>V<~Vi7k8|$|ct?lE`@JHJQ17?MSgTXVw{+%4yy+|%T2G&|Zx+2GFto&A+gg$` z{86v`uaOm_X8SPJ@~wgqs2zJoj%kH=@Y8V4ZWO44YHQ2&3i8IrlQ}^>iL)n}D*fAnw_hJJ8 zy#)SHIL<6fHX$R=YSlNoYVsnp9w|m822ZIk&?NF~72O&}(FPxte+~dN2LFi;cx`A) z62%a1GX$TXU*KHOW{yO`p9GKdaKd079;Ar5Xk*pSlX*>cX^P3n0-^2BC``J=C`PUC z+RxI4WH%pf7)c(ACl3FFR!6s`ZU5swUK1 zLrU+hp4#8sid6f!&~zmG(;r}g|G>STLQo?VtX2V9Q2Ve$_Elk@O&Q$vE1^q>GM#gM?liiZGmCo;8rmCcmUDY~oY2V&j zlPV@a_MLXgRHTs3FmH3yE)RlYJ3m?Q@}>ABSw%fjpJi+McdzNG;#A1E!>%dxHzo$E z^L4z~-uAx>rxL<`0#rhI#Pd$@d(jjhSVA>5rDtZ8Q11)V^DkxZf=!dA3wO3A|76YR z1DXDLh2nyfkR4g-B&MR0_uDvahmaY9h?A>3otU2Qp#!CD-vr!4b$^vA$8jGQ4 z){>zD9Bmi4VBOoG1ar*tZuCxyaQ%aLty5h>P^zW|);>OJ(p2K6lM+cSZTv8;PosQn zzq5WHOP6)bg=S6cbgg1IVm)Qr6FJ)7je(j?$J^^-By@5VGlp^b7;LDS`AOQXYHjB3 zO*-oH23x-%fn8UBtG;aw;VLFN zRSLGUCBp(~>w0d4q90_-6Z~}+xQ%VD6ny%}E$#s*ETf~N1U`gU4Qcd zqUZ?;`)zwaV(9uAVS3W;Cn7VAhrHG`!WqA4Oh?luOZN`bVcVNR{f8Y2LEAEtxU+ zk#4&$K80Y2{hH}7^{m)UHkDlUssG)cuG(ouGDiPp9Yd?&L21DOblq2>)B^ppxMh#Z z(~x!L>Ldm<4bO^GaK~$b^N(De_taqqscW5>Qv2#za;S)N?yK+ay8mQ(iNy zRR)L8)D`55i7eI+1awg`DofnO;8h|$XtSosG7G%p4De#1=A_FSwJ}DsL90{il4k$B zX>s|fkkp^!rUS!~Y0aIdBxu6z$7MRfr@j^npv>r`IGKr?`Y|r6*qL8dQ=dVo{kxeu ziih-7XJJdZ^d_W1)vzHi=(~^pP0-pz21H4sT2G}^qNklmN7nyF20GuKu&SsL9{#`& z04}MTv$4DzXx7Hw$Ye-=GRSMyXP*G!oIqUI#LkN%mg>53+?@F94uKXb5m$Eo4>$2% zn8)lLa2`VYIJm)9Ip$~T2y}Q*i3&vASzQ0_?q2Nt=Zpmk6D2&PGd#gL-F|Ib&I|X7 zTYt!1m>HAZrB>_b>o`h3o!g+6l!h6*)wv_4N1584|qzWw4R*00=9hyr=z0vi^@hGP}6q%2a` zCVl9S73Fby*~S&HzrQmKiZ9m}dPmeE!@wZg_-5YL`oB2-yd^|5XvWvDf->jB^dB8z zjH~DLvAQcqfL!tS{(~Ts3$JkE(1-8m4TcKMg6@hnZ0Cb z{^wi9ceDJf!e^RV@*+1ttVoswji)^iB}0;cg3Y%^%c1Mp+x+gCPq)UL7FkV{tl0ume?jz(eF<(S z?|Gu=%yj-iOe@lPEb{DgJa)>W#0~CZEo#mqYGjm(ZNtYUw@^0! zN`$I$F=4FCmGk%IP#?D5(3~f~z;+@;tI}l9`JLAMf{Y%yK4z`L8}+FAb^bYKRdiJo zwx(J_@c#)9fSgDO4_jDvM~7f*h}JeST9uyakZov!ho+>;zwx01De?tia9c`<=FqS7 zBO>PWDi!9!uMDTbqgo{9>f&)a&}xv|dds5Spbtz21AkuS zFzs_>EDps%^Sp8i(W*_bt|&U!>!DBZkB`RUa$G5?~#5Nb}Mbl*!7 zo|`y}Hx;iX_L>Au3Xpf)Wr5oyNk8iAk_%c)sEAZi@qoY=Fj3#a!y_5 z*sPoqfw2t@K3ah_v=wi{3G%DDEpT@|Bv^(R)MRgH!97*Nd*dhLWh<~1NofD!kRP=X z)Rx~s{N+V63+c^@OqDF_F6vkgxscttIAPPebGwG-;lL;z*sq>r#IBV{4-a{#(T%!| z6KOw)K;t>k5A^u4uGo4oW`g?o<;x0C9E0RZdW$e}c-2IuTi1I0w2WCr(TNGUJBh{Q zl=3UsP&8`cO-Wq+=Jb(zWALR0mpF!avy$`)!2^@v;LI|7d?Cip z{uu6+-RbHuYD;gDw4txYojI;bB}a#WQy9enNH4X`FD}9R$e6<0?{y|B>TS8(RlGbn zOM+o`H;J*xwN7;XoEb$2GtgW!^zcAR_%3n4_0(%iA4*0@q4Tk3D^0%dS?pX`Su%8r zOEi^`c&QnT0rG_v$a5SKi||ot?}LhQMZ%LBytDV{VA zKe}IV7;TpwvxDDga0QU%4DZIkh{^eJoNi8MFB8?4v1FV^<=~}PT}!pNiReFHv9Per z60~tsSn_rCzwaQvSoAP}o2S}04B7G zoZn>Ij5zY_CdbGvepxZtys`6So2Kg3nl&`!^{ZE72?G4}uU*G|F|q=)DSS** zErG1RxLnEAx^GgUs{9|bKkmIh& zCh?{`)Q5|)58HDHHcB4LcqVs1+Cn@tCQnC#JU?hgvr**5V_4G9jh1+oZwIVkyOfht zFL{(>Su2+86k`Y&cfLW}=Lb|v4E3O|=CXA&)n@eG80CB%j~_HMv3Da6$I|Z#qx{aB ze&6it_%EOo6Xi%u0M3%?9)8ld=utrXkS(MQtEHvMLol0B;EJRtgN0%_+8h&`8W^Px zBR_VkPXMm%>!71BH{MO)w9Y3X;8jk6Os5?wx&f|9_GOOFXmFD3BGqWq&F0(?8gsty zXrA#C*VDDqos0${2)AiZyI!Km9I<`69b%g`d_N5q`iBO-$7?foJDuan$!Ymvd}Z5x z5B_5-$^gB|!%pBteoMIOjfE))~B7m7vnszQBR9VQURn40X>$Y7T<|vQ{;mK zNu*a66+Zw_K9lM|3PlYEycpbc%BzM73KI+N} z2Xq4|(Z57s0uGR$D_ehLs&gW3x*N#3qL>l>Onc4IY`ryu`DfPlcB-3dAoB$UNz}NC z3Dw1Pg*|BKi&qwrNKfwL>3gx39!|p7pr)Z*}P2NH{@xg z)Er12?&8ve`>%woN3|7_#aa88riLx4h>JIUnIrb_$Wm$lZYvpfXAh0>K2hA}j?O@) z-(mNw==xzSQ6>V$)`Y`eWsezyU~3u0eIw=#7e(K|mA_JBK6LJed>xP` z1+tv(J>_c6&YA`fUejMEPZ3Gc=)}44U+HxbYgxzZiR6*%pd|SdX(i|tmh9&PKXN3JF^ouSa20JBqN}^XMSP0 zsG)-XaKa19oFceQ_j3vN?L=+X0}}7KQPo$>Ipx%Jo>a5N#bp#l@vF>O)EwdsXPsRC z!3KVEe%z*mmwj5A$W~Kx%vK7m5{<-Y)qeS^2`W@TL2Y!xi>L>9-o?c@URkSu(>C%d z2`cQ_1O8fN`GO>uJp{m^jZf@TjNF)Px^OZ4gA=q(Y~7;~Lr6%m=)d_vnL}q*$kR|z zm<@SJk*Wt~?8Ei+h3dvERW~J^dNFTAEADGZHvdJeo%8=&g*%M;N4+@TlLS8cJB2OD zW)!7$j#qn>gW}bPzsl7~e^JeRAlcwtJ$-wLFW20&oQZ_u zVhkv4>?BM~@8DHZg2u!!Ot?M3ED1uQu4?@fdwx+-gg+}U^PLy>kk3P(Juoh5^`FC#{tQ%kAvU(FMo zx(=bKwwo42;DjyZA%6C^GA1^ioVq(SUV%8{7rzd_A1Dv4dJ`u9g*d5Sbyd-}u1Q3- zXW?(RCQMN1@6+Ku`gXFz3rBbcJ9Rf3VAfVM{E`8olQ{U2ukJ=(+ChsZ7tUr7D91(8T>V$o7;Y(eM4_0keN3ZlUsP5@?S*h z>@O+*>dtjmP9^3utn2LF_HK~un+9KLojAUwLN$QN=T)dWeZSZzvD&odpS4W3mDbfI> zIrXMMm+MF|`uc&MVmU!+eE!L(+U`h9UEPYw`#spn-%C<%?sPu>%Tl{Oft%U(=X)Ir zbN2_#)0J0=&!5jyisE8&Kcd@Vw2)a65+srFfkhUx8)w2H{DIYKfo{Z=fm_+qX^caE zR&TE|WF6bX!{@l~`4tA%{g!nl&sKh@iR^THv@sIL!8#ikijhwT7M0uxq0!)+9+bs| zCL$N!I~E6&a&{K_SlCQnl)hmZWOW89mr1v1oG08c=APbZInx7RRLiGu_Q`ak%>by6 zO3!r^Jb!Irbvcv(lc=a^_f#;TskHPvWZla&cBHE46c9KebQ?iLs7frz?qJJ)B;?0# zmC?(MWX|rCF)^>W0r@c@OL1=CoxU88bR_49V88zvfZK2?jpUJGpI1YjMxo#wylq=o z%+}E9=^)kPHlC_(vw5JD?AS-lnY@|qu5InH4F&X!>AUe8oekzAwNn#@6qotQmk!`A zpuN-Rxy3ae_|2X^Uz>~-yiaMHoCdgD8GmYs5}7V?J3J4MaSZzXLuq34yzF*X=5wJc z6ue5=^FO|}%KyzQ$}}m;bnlOF$H^L52F4i5R)zB=w5bKFP{o-_^5cm@Mo~)V_^Pbd zO8BnFzz^^SOi!?Jky#42B7WOD4o7y(KXGuXNQ@)1txa0R9?ELajig0TXM7mSt{29o z<(zC$$g09^Vr$_RBZYMXFupAfGqkl=iz+t=&+L+02IH|ph1ZFHWt{`&2YBwYLz3dLj*c{qts)4vg=Y5u=T8*gWCD!_i ztckX+pv#XIoI7f7PUzjszT>Rys)f7z>!P3f9F$yj^k3dM4OYxHZ9XP;!eL5tX#O$M zmj-{~JkDckeBz|h>eTat$O-hjv+E5USI~?Y|EZ?ax4qHh>s7@PFLsqUzKh#G#}S8E zA+AqcU0uflzimW~jbtzt3|6Q<773Lmko_L5Mo@kZK2SiKQeyA&^IbS3wMl|Mj2XRl zAm56ITw}30dedB9HjAA1LFID_x>_ber)FiKDeubTle-C4AmE%g^bc;XPxP%x%ml4k zUt@G&mh8OZ%mYPBOWsE&5;*!^0|p^y#-`?M2|TT$m5zm5X~vHN0FGfI^4^!>6&=P* z>DsMC5{7ttA(>OTMtPIDEoaWqF|{?GfIz&%d0#q;^h~WaD@o^DGNj_pdneX8R%)Cl z72j%#REXb)Bvpc6ed;ntt!2)=^`7<<1(pL}!$uVwrF@_kksU>mR2>mNXjr)O zS$CDvhmG~4o!@-)&=5ppZ`X`!sk5VSH#j!cty09hma(O=x^r@;g5^jWlVRR!CWDNo zPuF8sTqWsF>*r&vS3-`CvK$V7YsF!9(^PTgzN}CbRdtqt@;HnNHAdrbJJMEFcP~NH z0d&>38MDBbPNSH;ti0R1H*paTx`&Dh8{c`0gw!%Oy)ufjI?bz?TOPi6cL?5o%nFZq zSOKzCf1wFs`|cZ^9g#>gR#>CUYrpd2phn-e!7O1W&8(3Cnx*lH_1Enq+I#a}i02Lx*?;YxfWcb|8UDUl0gYmU2L z=p}}gF0lUYJ9}gS9(*~krNq9jnA=S-im{N}w#>8}v&dpyEay;<0SX;nus8Nm!9;NK zoiKH^DP{Kg$GJm3rQhDuGH6!%@ z?ePmFipU}n@6TmO{*G-sduYlAPY*;c{z#9AaT)CaeTgV&Yg z@#Axp1GHaN&SY|f*VZz9qE&1N&aVv9S# zAA&{v()0(PLvzcN;M?0>5T2~gS*Ou0gWnhA9cu%S29}u)<`(VH73t|7%usUxG8m?^ z=H}YtZKCd*H1pcSZo(SNo>y7wo=kKLM?eW&~MIZx|Eyh9mp3E?V}i@TMqMfH~E zi;@^tE!AabxATxpI$4Hm)BIzHdrp!in6PnUM}Q~ z&-W}!WhWuIUH<4dW7LAWpKvx#i!xRs=ne!U!RfxR3zH5n+@#-ka**;*GLTpZm_ zL_@=gb7zMla1alt%VF4d0|HJI z_cW!5>QTFYHU2iJ2>tzvlswFby?_J3>RtK*a-n5uCzkFX@jy`Px@(|A`3{qv18L8T zymrmD0tq>5;YDFdHt{BhfBSYC`fpVx|IK`%GWwBs+Jfj)zD`r`jm*^4lmkjPFrFqo zC(nQ^;l4w~1oVoBnh5BI$n50AYqfA%SczIIoP7|BmTxF&9Y-fTFzBx#7pe`zF}PtU zhxU47>5Px4KIQifq}}Q-4ySC$9vS| zul9V!jTB4PH8kc`y5}#i2!Cmc!QCk4WU+wN-klbugv*+Q4!|qv(#5o$z zOY)7ok{uS8jp&P^l1qn3^P*#3H0Ng#KxbV9YrUHYg%=;BFR#W8OM?hXCG9vZSYN%< zxM-&9eyO~-B+VfEEh(Lmx{}>rdF#&S`XgvS9NN`{q{^a>$kBT>6o_7Ri?|^l%iIs5 zu_`0@O_YMO&MDiLhOGg&&43_9PPo>B(1`aA&yEp4T%H=RX>r0}^`#XBe$_u#1L~-W zhzQZTKwWm z4h)xm3kA4AOaETLu>K6z9;*j6SP`1V8q(VO^t(bltE+2~Dg8>qbB$NuNWtPCa>Z{i zvkhuAbYvLx!4cn3OJ{8F>;3q%REraTa_{{XmF%@fvBENY<~AP*Nt4yE>(duB&bDNy zKOJ%jlsk^jS4gL=w{&<-xPbViI@OS$93E%DEu3dzg>-0u$OkGSs7`%&17bJx729d- z!E@xgtaAa$-yNlKj6?DGpJ*>}zk+%CB4sM*(=o_9elr5X3#&dAWaQ3sO%Oo}%Za#T z_7|K_^xb)@GD>&DM5vpR>*t;EaIBz4RDir8DP0u>y5gxM?DJIsogUY(5o7iXz%t|^ z3>8R{0}`lRLiZBIBuV&8K*P!k3kz$5+^@_i{Ct==Q4lWn_;M=O3f!y$av~ewEH4s& z7gCz6`z@@t-g>ky{JKZL9}MM595;`d2~4xW`XPR;@pEih;GNL>h^fQUNTwsym}Jq- zg7ZL3LXx!V+wns~eZz@Q`$u@VUqjyAoiudpKx#(c6%fXlcSjzG=i(*BYT70uR^a+A zMn3C5(e)+2W4OB=&YZoAw2vBqobn38OC+W*CM+#MCg`rEppo88U!w+g)KWI+Jsd+O zSH|%{yovhuyDWcX6$i&c|1l10b7Pix)P;_WfNkyWB)f;HeqOYb-LPZ>A#w~`;JCi> z$ayaD(|6BAyHbq=TU6mFFFHfN7UJ1v$59_CD3 z$dFy(5EuSR3d1}zG;*Nw{&+$UB?-{ECmOxUjEY}9jM06-LIP5fz52_<3z!hKze~uI zhYNE|QqJ6ni2a(TYm{k9{;#h$G(W~3eTYWCykNegqM&?~@O?uFHqQ{z72GiNeWM9B zhpFVv68y#`3PYjM{Jh|<6AeOpRx@4eXgaPoWW2e=${0A?Y41j|w2E_|KZ9;)ik?Y! zRSGJNdJ^6!$qQ~7@`n)zx#%zAED*`rO|=moA8vWUzD&icoZzX=W9>a+OJg%v~0GndkM9y!i zrFl}wbg0>yKstkfPV6qXt>}HNprJ!(wX1Sca5M?|RLkszq!GC1HyDJ>fuLqFt@_#g zU@Cw0!XXvVY>?po&5B@AE{efw^NRYA~O+%MRLsu6#0SvVD)PV#$(VV+9=C%#f zn=M=4c9M#?lEptMrtTM}GBE`H3C29%k`R5~{vG&@uX4gB0dR)WUAkpH`=D#Vi9>Rx zejBZ&dcPP2OT4UkSjaA9L>WO!UEA!y!}YHp*{FdVjCjwI3LgRsl4F0GkLEX8$86WZ zRTGn7%351@Y~d0+@pHVAwpW6_)*y!8X3l%{QOol3_CR(G*}!lshn3ftpcWh<*u=Q=m!Cntwsyd|lSbe}uB6=H?!_g`Ch#*h z_O(+n9%xMIiyZ^K)y^zNptU3-#F$hKuoXRN+|b4bVF7CXk&nz-9!SG#6|eaJ6)#n% z)YYuu2FS@YlZ&rtmL7^RjIn~%P6A!hAH47+)b6{=ThHXHB*f!L?$n&P*8awq@%N=) z#&h$h|FhC5efK3Bwc#&Uwo)MX|`qjovHEUs9>-C8y}RL!sh(>BNOe^gAOM7 zL!P@&29A@QP^)v}SRw461I9rdGg^TkNLeh2%DHZ3Fqi8hF`W0lFamWhmoFZq;!CLZ z1Xn3~dioCyJrCG9(>U)hpJ3jQO1O7X%h=y{k4phn&3Z>VbtA@lM-X)*UYo=iVA!E> za{~PS1uV1~= zos5sb5ANo4%w^B8GTQ8vUE9=}4qP4W@WutyfwO;mqBM8MC9v#T@_TwY`1pLqVMQaj zJA`-odx0ylTRm)xJJ@~2w~iMsRLs4MZG}S>%#CdBK>l9wLzXnPT(}?2wPC|Ryp(q1NVo1rt5IhOeOLaB>7oR760~^f@;pKq3z*{~30&IW z3agh}@=d#Dq3X-h`*o`Qd;9Q0aOITW8^_N=#LF1Vx69t51`txuC2((6u;irwLRPBO z;2otc$?55R@WUxG-Mx@E2x7f}Pm;ncKwNVV_m+1}TtXc+VQ1jIvivW=pe^@?C>lKA zqIPG?)4raRm&XYbYZj}k)6>+*St-7}?C0JU_*exb-KvBJx3Qs5W0R*op-_C+fK=B2 zcuaXIu}UiFS3XlA(a(C(F`xMDmL*`yk?eGE4r0IeG{{qx5k%|=YWFy_^M3eDd-+?L zGCOcrNH||{c4qVfv*hred(J<&q7Qy>unBG*`{ATPc|x)I3`UE)@8ii|Xu{IR9C8Rz z&ZbRDv897Is|?xQ-sfVK0Xe4SC)T?=!TZ;Fgue{|hObgo?OKyKr?_Plhhr~x*RW$U ze`a-yeTSs=MF_{yjrr|}H|Txe+=6pZAmZIiMw19v4bb)jgc&ZAI6QKn{D(qmjn5@$ zn6#x6ySqra%_;d<3&e?ULLauRpd9-m+SZMvsteiDw$X8~g|nyQ#;&^m1Uv0OS1@z8 zeQ9BmaY-PgbxvxOTbPRXH`U?@7#E&qWtcc#D+ev;fayy4XIIZb&qrF^CVc)mgGkY% zU!U6D*Z;}fc@&7;aZWzbwxyoi)hbMq+s6$Ej;_@APTE#xya#^b2vXR5u_9=VDXp!4 zwRL{~`(5s!&S%(LX@Q=xVzzDW`{omzBT*S+q)8=(IbaQ{;h%GiTccZsHvqZ(pnY(_ z7LDeX?fIC%{pDkFbo8qv?l3+`I$3@@H>Em7G4NOY8&aD^!28cLK&v)5$Xw9e%xls3 z`DLz8pRepg@m|{H^>@4|?XM~v#e)7?h4;RXHbEkCf_$w?UZNe-=8eR#f6Pbh%gPan zw!CUCUYh9eOeWD*ZaXJ-dQN5P<%z#aPxNjv0MRkmM{;88>R>z2m9xceX`rJNcv` zuirWAG{u3dj-B>*i|e^-8jLgNv9jCZ-(^MpIp(sCA`3m5d%pyTp5b?$Th0udVLYRs zr21xtE0`k*W3>~U1g(5*+G1UkmhLD_Oi%CsN~5fM|4J3B8tRC|F@TS zAFBo{Y-dLg$W}wwj?Z9;zX{;ZD;}SQh&TG=2nNWLzV&72$~j|{cqNm1wWBt}G1{oW zriFb!pWZ?H5Y8Q~o4=GxH$Z1=DV+CEh+r#<RucRmu~C-`a20 zpLbGj`}5+L{Iu-mJ~5t=M22P^JHf;rgw@q>?UDokq^qVHv_$MP z*3ZuVP|}&OpH~|>vm%~2I`Q>L@2y1N!xQ=LOrULQdPshvU4gIdp6Q&o8L z0$fIca2%?{Ky~b2gMZQbWsEie)2?Wm+9b0X`Bt*%aV3)U#Z_7yeH7Ml_cc4CCM_N@ za=YgE-ID}vIg)Y!z^sd~MP1^0Wa0WfsN=ZP9}PqDYus52!iU?&O!fE5A5pZ6i)>#$ zni@5M=8^-v{5AWHosduvGI9jE!nH_~cE4ro;(G6JvMcEkYl9xDzf1`!shoq8z==}% zbbs!3vxgt$N|(MuZZfDvx=aGVIOZG!t*BgFbfVcbR^PrjeNYru)B zWlSem;1eFJT1$Y>vRqvB0=MADjX?m#S|xpR`j1&>B(Bj{6{N9!47oO*K-GcamgL@; zv(7ZVAl0gR1iwJy#&t#{nJ5`Y#`Me}??M0pB64w0!XfiQur3is?TLa(oSGBGjz3P}#xA*(%MVb;LiTg~EDwh^$GTlQ zjxR=^@*XPa&gq1&PIO`yBlM3EH!mn9Jw(s^m+GE!WmzI^jqiHW;H%sPH+)3T{_XDD zaz+5+5O8yl3NXkqV;LFu=mBJwbN}5@1bgwPI^?W7!ropg4Z~)53(t3b$++QW`Q>yX z79)U={nqGm5-LEf?u;0%g+o$FwBCkqXfrHRSDHmfL?)}KC>R~HF0<{pp#n}US6~2u zCC3sPocr9wQ%2Vol<2OmD);JvspqZjp}A7{OFweDW#r9IcK2asj8@WnaGHL4wj$4A z_1q!jhQ9=6NA@~e%@kwJ%$h`dXPaESD5C`X1w~BCZZL_Sfudu~q_(j($YX`z?OGrs zTl!Drq?c+4roCx{`(O{uKI7oJ14ysGWLx)QXN9GegNo|tyO|@Ef3PxYCR;~qaQ7W{ zl?*Ba+o@*FxZz?GKgzKvR_+M_(&cl5xGTKdYMc;;ok!;tr9nP&12fYnYu4*Nlh6T? z2|xmk*@JMuFZ)^No;SeYvGPpPC=7m4PuSXW1%+okwpPaa3=X(_SKCYZNza;Ha^W z8WCx8J!3&C2M_5DU4XPDMhQ$a$)T!vba=y$9D-OCKDHHDeHmR{BU@VzWMQDIP>)6Z z{Tp`!QS?l&Y?Piz`Gzw%J~IF`s&^W(#@hh*a^CvBx<;a?+ zQI(~l2Qk`-thD2HT8v`L>?>^A@g||ABvA=h6q8Oi1%8&$am*6}v=L?n1_@1$et_gNyqn(3Nh|h(lt{q~){X{i`a%-yg+$u2@{y5TKgV zp7EgyRTIeyVYp+2)niK?=PQ%|_!hKV*$7e`QWN+PqK^&)@6r@3E%UiehqJX9XP&&; z#XabG2>IWI73;Ykqur|Ih3`X1wK)zaN)FbbI#tdsz+fBbp!_7ismkZ`lnrHIVLh)VOG2TDqM|%Py?N zqrq#6vvmG6v!(FaW*N3I4eE*!)kAG=7K#7r*jLTxmk)O$>@v)^lJv`hJ#vDbK4e<)1uhNsveW z_71MT4?U^1seE^3l*`J6fYNdYHdtL?YpMR-t9M%{n51V5{&yK0JQzr;hYj>bw*Fm8 zHj0TB2U>|*!#<^P#>J0)N(mmweb>m3i77W&V7+fY{Q!CW)486hxh^qgu)A!9Sw*bE zFAPXUciJ@2%T6lx_c;Li>P_-@j^QRl!m{a)>&Orevs06s_Wnc_;8R@oyED7+v`;ob zsb)qhrfaAOf4c+KTijikIkEtm#)RqYhySzBupBU4kJ#l>qjV>?7Z`Nj|u{UcRuoYzxwe_2wMov1wB zCJ2^v9w?;+DZqR2P)Z<-KLP9`A-j9_4D8X6V|A&&+{vlS-q`PpUfSC^lCtf>fVrGr z%~X08u{KlGrTd0K-XtsrS$*KeR!!;_J3sMZff%f-&1G{u#q!)FnzN>1w-}&NMJ#`$ z19#&#q0v8(Zdg^a~rhjtc)>EfDrIq_fnIy`79DzY+ zre+Aqxws>Ae4Hzk#eG*;g^l;4v#nk1!5!g$r^IWIf&yb>OMhghp$`R{t{!TO`s00- zXRG&}Z`N&vZo9>i&IaX56DPgG9H?f-3}8EE6AZVoo)dyY^o}yG)5vmB@16$6Dk?e- z-ZHo%GvQ`vc)}8CuM`=c@M2a`HWYGefW-NE>lsS$OXY3U_<)$pkf+cXBSC&Im!h`Usa(-=yO`hwx zK(ZP{fC_@|skxqd?(M6FrJk*AmON_kUPX`o$@t-zLFPN|=sLZo+pmT31`WoM3%Szt z1qDXzH3bpeCb&(ARvaGPR{(Yt!5jr>t;;TrYrE3p3nGn`>F^2)3oBn|fjR*k_FQL< z>lLVNH&$susQ<((>`&3k1st6B9e^ zv0lZARV>Vl9&vxvrKHGjDg|V=s|g+VyfR#-xX$xx=LL(3_tCp5qobp-f0sORPBgqW zj1Jrb+RxGNQZk_M?FG4DS$GO&3F2V>jc364V*ykt@rIYoedLjQnDmKh(G1LRN>D-8?7q41+iD}1jZ&wtr0Cll;`^}52q3B< ziZikv5gs1Co?fzcw4lua<@TnM-Y=lY>rAtJ@gV27h2TYn1f2k=C{1ncV?^KkA{}eF z_z}iLg&f7rZI%WzqkS0&z4?1g;h`7(T7oxx@Mjtx)J6n{rU#O8W7MXmkm9md*nz$~ z2!~?ZE=Y(cn|dLdYXx!Kr%t>o8*9gg{qLPeQ85$?0LaaTQ5^kdBpoY)!W#jj#Seay zbd(({Us|ww(tx=ii#btWYeJoRuGm-jf#H~H&x@=3SD3EK&Kvq$cqGWkaL>o2sD1#c zClyJ)iPGv4l&TpnUi@yOV^W~(4vM3QP;PjJb{uoYNrST6XeSyQE;`T1Bw=SnN?MH1 zxm)Q@y^?csHUD$aX`DsLGHORPC)$D6-%OwyBOWoMS~zk zqoL+_3UBOfLlG7R3Cc=N5u4r@#TL6R+OeLiL%pa9E~}7UIEXn zNC)AN6f!@F>Sg$#-$>y^(q}Byy}jptx-Q@B7a%LP1Mqde??u1-)t3-sb2wk=Y1)ZP zDlaHl#tr{DRic2DIIZElt9nEE_x@s$&7}FxIg?4uUp@8R8{0`8aAsCB=X_cu|f#L zw9_}F`95h~NBnWjkZu{+aeF0))-- zM+J|an5cPJ5*6*)iUP6LFn)d{%}#L6Qj_hs7Hb>v$)D_THv=m3u5;R0%>#1!WXg?J zrj*+#nZl0_NK%!=zbCM=I)6(8;?NT&)fEofIRmI_W`e~=Kcj9!& zl1FY)z|yOjyl5zjpF=bZRzYyxg!{W>=TaZxhgxqR;%;-l7y%f(+Ku{b=j zZx$+~2pRohPK$u?=+H245F8J0$Ky0#EHHY>E#5CpaipylTU;a@6<`AYCiD~k8nkEC zLOCgj;0g)*tVn46gd8WUyt2K3XLn$;}8kK`fs5NOMjK&b_~heY*1nV*=R`g6h{2|Lu4PE?-LdzfU&U1^({ zk9<*cu`?rmr{j}T8?HLxJ0rI*hH(DXu0A`|bX{J<*Qa}w{Y*Nl%qwei&OPW9A*1b7hw z1|8CSQU`otO1lIn!7C!Dat{(+5*17W5G09EW4IIDIJ@^Z3#KMxa>}(J+rXDWYI<$# zXX5M#ZEdC1Z}sG^t1D_c(~ep5{A{5@Sf#(n(y<(!(~UAysgYTiC4LC6S5sH$qYj z-2hkTiL2sYBL$~7D7FglGhf~EsyIkNHP3!;$dDH<{jI(o4IMW@C*ypjvSI@^~K!?VvD7=qIj$+d#x z_QH!2Oct~kDMM*-fBpbC%7bLUlG~t^@0@kQ=yKsvY>R(vQDJ(9@ z!HG035+;0qm|M@}-HEZgme8VShG z!uN0AZbSbqBm8BW;@{v$po+Y`RP9dtTy<+{4(sLRr{DT6o^;ZJE-8VQ2QRUR1UNjY zyUzdNXX^P=S%BdCG>k+rZ+h;e2?;8s;tW4;cy~D=u+;gYAIgrxc;kmRd`ocy+LFEe z+)qoh)lWJ9u92YH1wcwYPTThl9J~QEN8ekbEg0YNDsG@0Kxe+rpadTf8uqKnp<)zm8}1(_EH13 zQ5mPYbj#R(1+>^FjEvY9oCTEihU3a^WAPVPiLP@MFfMQ(&NRK2nL#eBEMmst+$JWC z6BIYpPdR;i@_fY3q`xUSbiiUiky0iSCQ>TV4ZBWNl!ANG0CvDEh!-HoQDY>?b*Fkk zKalXHa)U4p0=_)7uumBGd4aA3sum!T_ULp`a(1ZQY%q~h#PO`bzlCcz`oJ9h8JC(F>MH@54w zCAgb`56uq}xogWfG9P#;-uTLVHj4+=g8;jQqsyCK;TO>NNv^9CG53`VB)ujU1cXGb zA68{BEUYeRynATW?`3;ouaD-x%1{Ya=NnzjVF3D}2zSF#Cbe0BZvf>vXWpb4YVeZ}eeHE6X&6ThD&@XntBfis{zR!MdhLg6qG%E-=7q-Hu{qJ8@Vjn2k z4Lp!M@jUjW6cc#~V#lZO-2R`~%^uy?)Y+|)_EfaCeSq+~Q> z&4wQb!6^TPeIAC9=gVew;^0Z=N15+=NUw_KRHC1;Wy0ZOic86`Go!dAGx?01#HJ7cM`a{Dfp6MO^qNnCZ$}r{suwvBQhwVDJ6;oaC?hlU?I~?q4xG zu^jt08KIO)SN_5&!YLkYQL(W`Q?DK9!l42QNPv-k<_f-?==DJV4hdcET`u1+pu*)? ztyb+z0}EDs!~yjWRD-V3WPIabHPJffTDFRRk2_0Zt4|SuX*9tUYhc3E-Hz?Vnw~BX z*Mc987}=vh=Nx!dc}pWhX+2XM2XrMk2qO4VD+t&0yjMgrAC5QQnnmX%DsR2D!*{u2 zy#l#bB0Qf%YscFFCx&=N8AbfStmoQt=s)Jp(a?XBprnwByoS7&RBqSkVMb`07#ZX> zOwDzXT<7{3sqH{{a`Gg^z@6NS?~$@bcp>~*1O;j{AQy45j)d}JLY<|*PJgI0w#TW2BhJy$8aOY$b zjryv%WC@->w5iwG!0q&uH=_u%RY<{Yq;Em?DT zs}`mKYud?mbwggR%d?+0$#p=aWs{R#HX-F7n^;()e^1@0-EAZy?(Q+)TVze8w<%(U z;+B@S28UachB->Dju+}@=60tGhGm9^eSmPEo7*f@vE{3!^SXDcA*&>OUPSzSzmlJv4O7Or9^rnhzadGIj;^Xg{CVV%=IJN`AEHBMn@mz&J#O(W) zy^um2|1MQ^!hIV&ns9ot&k+$GI>8AxN6PXj!(Ua7OIQY(sAR#$gDKBcJN&h90f+Lq zWEgXUOx!1>5I+}ERxUb?%l$s4)MG+E43)TBB~{cz*)7-(Y0doI+-MBc?^H5?nM9H8 zw%bswQQY^+clqf&3GI<36 z*5OTHB@l%1!&`D5B8w&p*GB={f?vK%8c#1Hh6fx+=aO&mhDEG_f?PN$7~&0{LP}XU ziRIqgd|GZEUqOLrcPlp8Y(>d&7T;ybApLtn2Yy+AkrLi6+cuf&Y@Sn+E~L5HqH}`} zG7B(vqlx%+VWhsIiYkkWhb}D0)zI0rF%t5FAkfkg{TKr(3_3gmR(oGlTs{jQAji$F7^tn;pam^%_1rJHr*;DL z2!2WlBz_ElGRNH+u6A%~LMoix?-oCHD$_y?1Fe2${?;9*xu# zMMaWsa3JvkfC_-eBqV|qkg^&~lKj3fGws>YfZdXl$s@VfXH(B*d35y`@fV{;M!arB z|9tyaVPE;zxS}!d5u4_-?U)N(hEWt8^4Fi`p^Jxydjq3luH{L`tRYGrzVY0GGo`A5 zYjzIHuc<>r!xt|RD8bX`t&Aw$djn$}#T{7S)k)D~y5#rg07&cONvM_hf#J-4CW`%G zR@8OtBsexbP;G2X=BiDR^!+q_F}%4ZVMO@^mvew_9L{Lfnv_-z2QQC+;mN0}u*%cY zQ1Ba^8d$L5>(CJU=4E2$ejlZ;ZxGf1%G} z^1J4OVf;E8Qa|4&Dq|zD4+sm{3Zt>Sg~)T1VY{SiNVXJ3b~iVTN=mP=+SPxN%sv=2 zK@3mJtaABM@(0EP%1r&6>2vcJ8S=5W2Z4<-T*P+B)Kf0$<*D;ihDJSGpDfC$tF7?Q zexB(cwgJ(g9aFDjUBHQ`EaMLpih*3BxcgyyCYyczMO&(_)Q8KRHoy=j^q<|Zy;exL zgG5fsKOBmDcbJS)mDRhB{64nS-7Wd#owfF;yQOBh?(BHCY**r@py1$_#?5Hk+Ub|| z&Kf(bGMQVKifeV5eC!J6r(G&RY&-1!w5N+!`H9v}eVNy&0Zt(HfJF}#2(KeEAL-M7 zLa17xaNXB9*oUQd#sQD#^bO^;1q3F= z!=;yyKk_-@+c$V)$||dir?b^S=77j5IO7ii%C&SI%yXxEEOk^IHLLZJ$ICsqb66s$ zo>aojMZfp|sMAU9jhJi3+QAU0}M_k4*ZLUCvI1pSEJ zic`D9Uv_AT3P!-54s(Z4uGYxROkSLaNWjF3myitr62$p>y*W7m{>&|kkPuR$-6~yL zHqJpjx5%`{^F7)E%J>h{&lA*9b;=W_wWEOzI8B(iza?G)<5=ppW1y{S9L#G(-TJ0i zOJnBr72pD(nL;0b!b<$CA>c8*ie9yF%|F0jK`C>1-kMydO!W9e@b(ut(NJ5s#VQxS zzLa}6a%ZhZ_e>DNVjQC<7`xd06IcnUgoE+xmnE_2X9U|3o}gb^>IyXYgib4@?=aTY zNouUFG;ovWzP>Nn{7H(6M2b}yjbO#c{$qt4fvNZ7PYa-zV%BHv^t1a}7ALm{>lY<= z<`^|y5>e++T<(Wfp7m2nM~5BEsHHVcY{y7@xrug1_&}zkGyl&E`)d*}(&%6Nvqs*C ze2WchkPE%VKJ8`7@|jffq%S6p`N-P@S8e0kkJ94EBvWgmMKp*SZ1}fyA?)#^ePH_< zJ-vvQX*)f59B6DCm~cJrBvv|~aVP$k`c1GHAQW`*Z6qAh5_rKUwoxGd;&ygkW5DR> zHRLBpLM|8hPjiW>9#u)=;R@UKwRsJ&bFYx}e8N1`a}qi{pFGOxlB~s<_YD;1 z^nID}-b(X1axW^ipKwX-I=Z7}UnNniI`R##k1&oB{!aaaHOuv07!6@4A%hGNWXt3c zjEnppGzbNr1PE&IRbW0Yv)neHt@yO9Q1_4U|+OY>L(@3x9X;E;;zzqwFL)JT50o?Qnhg zFy*I=G}Aq1)q>^q>tWm!seoLZC=(TDTiuCR?fEo;xD;#J5#L#xKd21w&m;Ubk>nrM zX(SLL9Y1PbIm!-bCvl>;Sg20PgI=r3aP;3@;d+4}!WtS}7!WMLD6q4_H7YwQ=fYut zLG=o-UcLlQWky1hez_AK{9;B3RIq1@>Sn9GqV>cm*$ zCQu~|FoargfJZHM$dW1Hq$*)f{QOGRa0+PYZ<17A!^f&)1&742NVS0}t@m868ZbRuet{vlBryX3yojXncRT8Rf>Pigkr9}&PZyiy8(PjTM~93} z#rAFxV|N3GHv6w1R5*ZSfR&8DGdQ}mf-V}ALy)Mry~n7rxyy<0S3<8^oxaaEbRckN zZMyFTugs71CK*o>u-u@!W{fTK)eiltIpUod6q}epFR66L>iZSm_4;#as(jU}@GHm5 zR{r2ivh_+9G-jTbZ@cS*C+SI=K4a)4!JJq*tfVCo7k2hMAQCCiZS~gE%3lf7H%Nm8&TK4`Shtm`$x@MBcE&Y7K^-R*xlvp5TYJ!me4o0^cd47}j8JW}oYZ6Ye-1@na0kogZZZT4M+ z`$hnf$>M}#LO2|2j3Sa-DE{~`7xkVssOZP@D?ldz@n&ys8bJS;;?2(3ifd1H%Tpbf z2YGGpQ5knI{aP2q+-D(C;`1`i5zbRLC%%Cxepc2 zzHgMl8(Iw~ZpA%c*faKyLc`rLxpr0NWxqM@Yq32N$Wc!{yN*(Yx}90r{8?86O+Wi4 z4X7jht+45{W!*3ZCr%M@>jLhZsQz)VP8+@u={x*&iHO6)r%GKyDm{8_pIVWWTa?};L)NhTi|#^ZzL7dyj(8|u5o)uTJ^T{i|b`+=&c zP<;_>yB~S0*M(pHY*eGz3~24Zz-G-Ov$tY^QR-#zkNG>t_PZK|`YNcAXFOd6btv1 z^CjH0zM3x@Cvv;ksD#Jn=u{&DaV9v!lp1&R*oTR#S21($s)bcxR4r7}vECZmGN2o& zl2^DZ4)jb;q*7la2K)f2=x{Z7m*j6+MJ#CnJI|b&)$23wbo?wTr1_(Y*4>LEG>=@n z*4e;5vaW4{eBQ0o9uxVy3f7)V*M^s7`B5afR5iDz!H7_)W9O6bk zk=`3)X62?B3ogoYJm!mC9Hsv-uI{rAG4TK30*rEC!OFN%<|98ig#1|y4BCz&NTHMt z!tL2-;&w(du0xJEu9CmLVNv)?ZC~)E44p#zU+Kr7Vxi##tCK68xB5O5A;@pLg{99i zJNz|w3>d&n-tFH1x81LwF+)4;|41Fla=vi_QteL9NBrN#`;qlhFJy^?t2sxE!5fA$ z0+QRZ$vw+t#jaD#IVUV{@B%JK28um>zH)502p68})io{(n(qM9{0zI&Xm*Z?hLbqB zpSoHoYd(Z)W`LTg1ztZ;AyXT1d`aZUD-i5bRS%Q+)A$kGv*c0buE$rV{Lg#FM~R(5 z73g(}i3QPr%BG!(bJD9dQQ3xyv^Z$>OhvIiSR?14n`yQ7CS){X&!YktjS$v1wkbV1 z*3pH=S)#8N@x#)-tf#5L%aehD!yA>)9tD+7`pes$3uDrIy7wA1w-r5W^Ga17_6t6L zqX`SF$1qfT5Q$lDO_qZz{ATNLea=YBBKafns6p?och~mr`n?>j8PY?G8!bB|#QzX; zejEHLax&&M<}$YDD-ICe=jK+Ih0b6a{FEUl#HaOI0M(mDSizTf&QZ=_(La{-2Jzy) zeIL=4mXOdWU-;-@45+2YJlE(1iEmj;vc-@+3GDvJ9-xLlJ_eYNM6jQBa1UjQ69W;= zJKFt5HK@wDVD*DGK7*^(?#N#PLa~8jO|wRJi+8|Q;5Q$I=JJI@sNW}Pb68Bw0C^iS z8^Iq<+`?EjLVd?-Y=yVbss$IJnm8cpH~UCKju*vle47$9a7-Ter=&y>=Yjs{47HZ# z1E!=^L3T~Syu-X@ZG0`2tSs+jSYh4+3VWPrg7r-foVUY2J8f_aL87UrX(QL|Xj69c zLuh*%XI}4%@4}B*1TTSC-_i!GJYEF0a(DwDW=Ov-+s=YLNT%Qzc_!@yNBrR z#miAKpis)Pf3KJ3{FWM&kBS^Civ-(t-l~UtFk2>Ru0qAwTuB4{-`9S9qt+^t`~7E~B=NVl?qlRNBZ?Z_m?_d(@1-=I zGba~1q(WA9|J2nrNfYEkMq(A@Y)%O-dgBo8?+g;J(tp~rASA@3OR^wVZ#f~|80$}) zUcK_Go?R)5cRWe>fUnkn<(*`7emXieO7RUES5ox!^2uD;H$aB0ADB)4d*4o5g7l4Q zZY?ez@#UM_Q9%Ef-|+hFaQ@Rp@@YaYtYsz`z{2YB&MHq+?BE>M2RRcNfuh`hqULyW z42lH|`ONn(#gIsg>wUKiKdAy!>sn#?(}!jaef)=`z-7RvdiV5tWjREYeIE7=(tZJMh0(i(S3$~C9ilG~`C zoVegAs@|cokBlMj((<4u@&H6-$!$yPv1izK=|e+Fsp;`Am+$)|xBWL>Gck&M?oxl3 zDmSqe1p}qwyxk&o;=<38l2l{Z0HBzGttl>30rq%FfJvg?yVqyO(50jlX=?GNQhO#} zUMd|Pipw`t|M;rT$4N|;8}^XZvjs3%@XA*47E0r`Xp2pCF*TyN(W@M$#=3H{51{oa zP3*{QW~Gm#0xj59=M@oi=2=KemA42itc*@?FXijA?S4nNUZG-lYyehnvhDH9K7lvk z%j1a(4!N3z1%?7QMDFRc`+7Se@a9TiP2)b&(7>tO%Q9JjBm`Zb_<)^&lw`=oix%Ki z8cEBQojW}I{JWx}==1t4GmCeYX8w26_K1hPBpx{5DU z&xY*;Hpv2(8A6bY1UQ}0`*;DZj6J{Viyu$@*0TAC=6++Z#P16Ku-6yCzPryoSEm3L zhnZ6%Y+6k@w@VNJ zl$1*3H9wk^lv3q=ULSpU*uxGaJ6QG*@Htx@p!CU9b93{5|HZA&s%Df!^5#CFpy~^y zq31f`sAD}1)r%xIv70Gn=wZ#BRK$;AXaHFgqG1b*H2TAj$=5rH7Jos293mkfy)XFD z>ocl+o@_szZG;<|p_6FgsJFzdf3`CRFrtAQ>!2O$HgJs;l+TSet~ycpWE)hY9L z9(YQk4_uiCx5Ma?0AB;2YsC@M)IpZye5-W{J^hu)$P1}RJ>%70wz}e=Cy*cE$}~wAD@3-wPNEM$gP+34xbukW96L}>urOhOaj7iyWZR@K;q27bavdL`J7_wi zUq)N1cFX(z4ISqo&bk>`!)6K^N&Sgrc)B%;w7Ux(@L6Ns=WoRW&pL+Rm{+tq?>sZY zik=~swP9gm{0~iM85LFg^dr!oZNZ@XnjMoud?fHc+^U3kQr`!t3l4`+W{44;@BxSxmWWKIm~nO;;2`e z&P>0OWXWf4C+8eTqM-LL9f`r{t(0Q{RBPRNadAOQ;)ATzLNA<7<&8Jbe%H4BTZ zMAx+Ppf8EJxow`ugLm3q%;7#8Ta8FU?jOMvZi5MY9KXyTxP_tfG}s{YBp<6I;RZ+Au<0n`r>0w*2ieT-3tU8r&uu z!9tK_u7!53RJ{{7!Heim*)g=P*Pdd3+l9)*C`at{9M%=q-M&lKdi@kBdg?H84()hx zR++uI$gurtC1$rj%VA(T_z6}t5lg_dn%;LRTcUSJ7W+2&)J;V)SMHD;SB)+1E5f-g zmv*^uZgGA-bm;eQmlNgqU$0A50HKMi=B|Vleb+OZd*G_|2OArTGt}99t%kbvso(zw=Z=q@>Bx|PthUvc#oBj`91-n2* zX#RPP4jKys-j%gWnWq=d+&ay8joy_(7nxYe<&v*v_EWa zJypD<-Jct16T`9?T#O$-Y~7}mjM{Cs{PHMZbL)!R;S)mn*z1LD0e}!4tjw+JzeS`~ z#=7pbD>@W2%}Q1L+%u7|{KX7~4{aaE{iC4j4g+ibd(t*Al2r)`ii22}e>Z>wml0DJ zL#Z16!iS3Xc65{Ptr-UDS8HjhHoDL4Jm8%V5Ls2*pn=50iNKIjQTpU8Tv+v3#`&I_ zHu+ioHFsPbkmj2}>W^ds7-C~IQFhAgf%$rw+wK^bdT)$ZRBLN=Hr8yZ_n$PqU2ZHu zUsyhJ-jZ8~;D=lNC$*Mti=oUv=rHroVRGbOX9Lsb1bZ}OC(Sy(`TUBM?`X&?3pK8O2P9LU9PbT@r{A(GZGX1Jtj z@1pGpuh+@>&8uCH{HX}GRI{Re9|EVb@;diARxd`SFZ{;EcP4;13P(hwyr{}W#?-xf zaFJ-pnLQYl(RRM>*0n>N0yu~l!=O@OK*mGw>$Ww0-AExB0XBI={S0At;!_5jazO>a2YH7YgEIOH-emRFoB z0?bg_#KdxdwZlFmhwZUr%VwT{OVuy??`eNe?e{8d$9X)|AEORj*q1P5z@f$cVL_vl zZa$clVhx|_NMNG>z1g(PzIu~(+KLQ;rA?gXV6B}>lgx3?V#-PRr<|q4%n2Iy*mNHx znwH(+xPS%U#9j~FlQn;!wZ@sKz*Ip@a-#dotDQgyR;o<;CvCU=Z#j4=Gb9U=r$WS; z0BcaPj;Oz1^za>j`O`PLC;e*JY9)y`5EO;Nmwjidz3Td<4+y!8?Mo>6;DKH5?giDf7Ii_jlbmDeM?M_FPU6 z%!13MfTGZK(F2>xB+)l;{?x+P;N7f}tq3Bh$BW=OmOI)tAxm{n(R$n~OK?{Z2%D)vJHsgi)uuMSp0sxwZU0 zAPpHJ7cGl3aHKxttri&|Y;JBTsG3XRVklzD^Whn25~YRr=lyitWeNqy=<252zx&Ev z-i5t?8CZa?k#4}Ex5Gd50r?&n=MsG%%K$s+8D72Mj=i}5-%Xzze$6%z7*88MYjwO( zQD*46(zE!J*Wx>?&TD0505>5<{8hP|x>%>-9o9hKd*|=uP|bH6^>AJlTc+@JDRm7E zH8$^mN@Lv@R^|z}s4Jprl9|UAp8FqtI&R`1MnKNKU9Ra2@GUDVzk~p6R(3c}WskqT_m+Nf;K$D5kqhJV{0lPJ29cfzH7kxczU6-$qp+YcN1{$#S`~J_luICoI z8`0HOHtLO@h3v@B;lMabJtC9?IOJn#Fb_8Z-?4mZdTU}{91gKI6K?!RRY&{FGaoDP zkE0oWStI;;OY zEtbuvVdT1($6$A(bHmSFm>+BGY$O2R!0^;7RO0q z4rggRuJV3%Q|I_$3K?{`r!1URu+WKf%BhU8bvYb29q1dcv zB~%jff;01h$ekUOJW1*pR9Y*rge#shkG5v{#d%7fZ@flZ_)fsl(YvhvoMxTo*RYR@ zKznK!x8B$H(ED2NfA1KS{BBj@%fB9OzZ6GyyEH!er&dMTzH%64M|P9=eE}xE^38O% z!DQ9unksy|VyaHz#jkb*Rgxa^d;@WGv;<8Qxkd77%sEk`_=oQ|;e$5=7ykTT{8jC? zfj~0f`YCLXSNZ+^miH;(uU3$J9BhbzSmPstVu0E#foUx_E30_asKK^rRMENQAXGEd+w84;i8^eO7rFR zf=pAh4B*PxAmnZm4Shn@XfA5FWr_j*;mV&1!_ZUu;|&ABa4(y`-hKl~$FE(EfBJn( zBgV*YnzS-DLv+3_WmHH6Vd)up(|LJ4D_*sqD79FKvFcsKG{(ADIUbkUKKzl7f53h> zqVc;Wfw42}@RCi(FH_x9J%pZiPZsM%-(nZ6{1wW#50C|?S39_u9$nFY{>0y2&8b^W z+1c-&_%-5$3%q4`fh10@THO8oQrYA*&7|x~C?)9MQDd|2^>q-^k=nzqV~0u$&z z87`HtFBay2+)-YCu3z3lp`WW11v^KrDq91mWG9%klOvdeRVr0Mp@(vq8U0be4tSVA z0c9^=-<-5anRzKID3GwTKfW%1qudekj1mZ8{1x!cz>yKuvhxTmb9b`Mo}lGK54}dx z9~?3%mLIsu&rq)^Y`H?T*UR%oM?I3(BF?ug;7&zU?G5SWZ<5#V=QjOz+x>?j34S;> zqKbpMfu8s7EVO-h1z}g_>mL&QGMFncYglPzV#>;%u>2~RN>4}eBCuYrU7 zBX2L>z(&85#&$RPpO$OBR3x+vAsPjiI2K?Z+Ud?1X1o4WytviX`OlFf@QDQeJsBKR zq^)+p?k88Q{M=7X#_j2>`fg*cVs}#=i56}Zl5k5c9$8crFn;n*%?C=sAb`f#b^5vt zAE(X#5ExQL1@A1NO6IF7VbY?^_1(BZC}g`l2W#SzJZE;7S#w?Ue|)2#Fwx}tH7<4@ z^qJ@*f1X&o$qJd(<(}5r`AyTSF)wbK(l;vhh_j# z`3ms>v%FHjcwu%zSpw{11Yu=Z~7#%xbU3iRH%so0m0wlBTFBDm6D_w7TjhpWjod{7nG3fFHN@EM8Z-Q}*LQ2)&N zcSGE8W8Dq}Khj-nhqU3xoO~mqWn$!?!{_jK6E99NKEGQfGcRFe*B?Y9RB<6x2#Llj z*7!+XfOWFW7n3!$_pOfS70p;j46|>lX79&5sj>FZnBA+=$^%SE7D?6UQkN%_J?s#N zDl5$O`%N9O&zriOTd{lNJJ(#pt=kee*6YY+3YpBe7Xd*~Go3cAjpK$GsSaNI`LW+wVEL|2;?51@=Cb}kd&|5Z zyL;TD&J*-H=#d(fk{t^qP!MdB zVrL&~?szlD?2A3HoY0IV9vvROiJI(rr)$7+nM@dUfO4D%EAypz1(4DbUvn4_WIVp) z%FyO+CTsV1Be=vGuo*F}5SiYjzK9$y=>^?+KtK+E?!{0obq$2W%gU6I!N9u8#7V|v z!$6vG&B!PA0MK9NN}FI&+8i=u3Oq1&h~L+OOu?P^e`6`S(`j8dNSl2Csxj+F9uRgx z=D&E@Yy;82+jRpX3&oO<)!jnj&kB&@)bs-^et@V@fxZkNA~9^9V-Aa1#Q-{pEW}poQc;SD zT3(WYB{we&Jom6+g-M*)6%H0CrusnPPW984$O^^0V^y8o3!{BT0+sJqP2^BaQtkr< zx2Z25ErRydj zj2?V>iP@(#-v_*KE82mC!HnHdM(R|>E$}+9mK0~tgN>GNbNm8^l@h|k)j&ExkCgy* ztkWxbWe?PKD@Gw-tDE89Ukgg$Rh#h1AHwNuTv`e5qX;lJxo$>P zaZ46@xC3C_eUI^z-=J$WTavhT#VBKRC!_UL>f*sD3?-|W8Ize26rN=S8iTOe!Nq!5 zM;Dbl7O1uZw0kxBZtHE6asZd4x_*Ctp>9q3)>0AAj>2A)KH+DU25w-CvoQKPWavMG zEiF%;oZbuX-oqpKr{=6GX1$V5x8=`RLIIzsC9gXmH3E`P%%(10p=6O_e znV15edpqPIe2Y`hka#ZU+zH zS5#wC@yyhbL%4A1aICy^YOJ>jSfBs1%U3}^xq(fUvMcfkDMeqOsk-z18X^L`3*H~# zRcqd+o_Peri()wzx5@Hy39*}g@ozg}8VDI0LL;U^FU0;{e@?y^WAf?RfoO^=;3!(8 z1~K8`1uF`L2fikWULc96J-FK)Lz0?1&ENS@;NhRL z;B=vjdPa>$0MIxRjF=+61GiYnHF8mD9OcT*v+FM{9^OE)<@dr-d8NXvf5wHFYb+ta zL*-TVb2csxG7A9vET+p`^qZ!{7)z_@mADO~nt``xh{6`mbSwuDbVGHk^=;+${R~J8j-nwbkEFD#d&{CV_^QmRQg{*kZ8Mz}qjjD%Z^|M4+DW0oi6k`zg=Wi%3n1S{Awc!pR4N>gfmZOKlt_V%N=8pXjv z^FoISL&TMlysc`}W=hZA1YP~#Uu%NCXOqiW6e&ZsB~!TEJRt>TJM6+P!Kj^kj0zEt zuhv0-&WXl1mK+vk-!YPt2Wku6qQA<49x+0sLH{G3MNEKPb8RYW_tsqt6jHbBt&x4bRIT>t$k3FeQ* z|KPiy1vv`v@W(n>N1bGiXQi;#H#a*ZCLQCXM zYv@T%hHKO9i&C&?ADICJUf>!ckr6`+Nq`6ne~TXD{JEepZ~^@%T@k~d>w(U1$}Mg) zu#K)_)Yjq*g72>t6ow^!Xvd6_)uBkAa)+<`2@@wMzs^=IK3)-45AUGcPIivjB`mIV z^v)By^3kKmOR-Kc$th)P_uQNBzi_=5q_N?5FUuS&`kr5_vpPiq4PXWBZZCJUqJ8}O z*;ND|4_K^VO4$WggoRpn7Si=!aLDu{)w&&U<#b9` zXlbAl#zrkAc^lRIUR{Ie-OztnW!i~L;0dX}N- zEvJ>;vSwKn#ye+hk8(rNe*4SgFx)k^+u8)1*XDl}vH4vX0D^STz!Cp_S*|Pevl#%V zGZ3=q={q21M735Q&^-b|pOn$-f)-9}#DNgXW z02`wmV~P|?^#YgE?|4Ub?oV{clLs$yvdV#l**?q*t3+6Ndsy`Sy`gUjIm`uBc&1n zkgCnG6tqLYT}0uGaIyI@y^eM7o{(#;nz&P?yoes*j7V@jmiK$JQRksr>K+GUz>tb# ztA4~%@}ynsDJ}HCyG4ZIccJk#5H&tFvYl>)p z_%Nu+1u=5C+*@@8zf_?La{zWt1~Q5#`oZ+?zxs&OC^orXy~M2YS%9L@Yn-kgSDAT&JZtz^V09$>Ney1feHlx2 z-d@ac&0oZr97X_ncQU0jnMI~$?eK_?<7LtO0;m~^TdJ9wk4 zj2+T{gI#QCG)_BIi=<16FpT^K8B?jwFDs(G0rHsTr14rxwiJ+obw5kcU(oqKUA9y* zxC&=6dZ@HqNp2|H^hS0s@)*#2&K6#>(N{ejM z%*n`SuTd`O565vp-U^FvloI_K2hM9f7XiUxv;AOLTeZ;1{#ObA_fx zyw_~BuqMMAvo>`|97$%lYyNd9;)vPP_m&N^V?ENcCq81m?hZ;3r=4fSY>25>(kMe| z1!f9T>v-!T(=xk82pOO&8kH2CqG(>PaOh`Ofm*H5J>5|p=EQ?IPW1mPqcxV7FSQ*R zucMlmPtrCz<1-5T_7FEn#E$dL^@YVSdV6y>&Dz|YgC^!c;PE#{r{a|+=O1v*LK&Ri z+n-**<~MaT!Ot09eT4znisx;6sM*PAP)4!FQP?k?n4TR)Zl2xZV#~f{3D1~TQW zf2;H-|8cs%8VC%VWav^o-mS%uMy!zAJjH?oiZma!>aN8XIeZld&Ug4P7x%CMNdZ|4 z@t5Mh>DPPWW4yvY?z8V72|bf8WrdgWLcxZ}&}TdBvr#4b-_b+cdw3m0ccppwp8Xk- ztm)p$#@Q1{$#j#0g8%0N7#QR%)G($FrBF|)@m{;BB(E0C3@IOOzEKb;I~;epxU;n< z?kHTaAT$+z#0IhEIBW#@uEr)I{m8kg{_<~ckBQ7R0VIxPb*J%(tPb7un_%QDjL??d zGw%ZtRiYF} z=H)J?WHrP1LF)KVw(&Y79el5Lln@N)58+_r_7CMI$T9d)!jKBG6i%SH#kek>&^Gek zT?SxcbC&2ipq{pe?Vg4$5tGP!HHNQSS)mMQ_ATlhlvbPf2>j0nD04;Ek^Q_@a4}Pd zl5k7gTy9EXem?D{)e^QreDs5B`yH&K$8oZR^x#m&x;}*UBmFFYu2T`g#o4X}JdjdW zs7dHwO)=3Cejo8dIT?31WVX5&0Ee^K@?@pX8`qR=70;<0aFJ52J1d57 z?@eUuScZUqt#S8dumEjpLZxW76`KdJLf83b$JDezoZ3Bo1u*jaPu(T)AWJTyVZ_*a zYsgJ!5=L*{B%RPkf3-C{h-3UO_>C!ducN$l#>lJl8l)JsgCx&~P2nuf2__vg+slET z9v4@eDdr|#tXdm$$^@6B(86St-(rW%%5SL)eiHGRK-P})&8flx0nij`{BA#PID6AI z%LC<}60c~-%FW@khvz6?p(9>(%(ob&u#Ov@sA!NC*1(9oac??zd|T_*ClyFphwHqf z-|xD?T@`FE4Pw$aGQ!B2;fBT%xEomn z>HgUV%@OipeEYG;2-|(Rd@X$%o^6jY+oc4Wh-vef^VtRH8is&ZR7cgx!PDvDg}P@a zxt*JU{MMfxD~e>MsMCBczuPEa7sFk$Gob39xpWt2b2H6vpXy?-%@$B5J<5Zcba2Ck z0l}E@{GV3+`fG|Nj!Q<6P3Q-pH;UU{s$MkrzIhl!LuYFI;S7+LbWT3x3?>}|QyPV6 zMXQOZlUM8S!jT0AVSE$EL8K(j_DsTD{bw5&IZ4yMke%d|=>>MU_(u^#+ItyLK1rzb zaObEwF-^>2od|l6k zk9u;Et~BK&iK{1j1ekD5NJo|uutSOJ9H*9$m4yTP(y@MB8L(uAu3c0%@Xd=G8~tq*JO*t1pZa!wW){%%8lc~Zt1C3=ha_Z1 z4XO3AIHds8`Ftf?$u3J&X-(n9Z!G0t2hv#S*irfLu2b`gBLsD4ftf|0gZ;|0B^T#D zrSQ<>6vcs<3U-~owwkMxr`Z+ZVy83#RG!;QR!i&UdT@dto{a^harzCspQEGqshOO7 zdFm*qy8jLnKElB$N5S<(n2NTmuX9Fxx6m2e>?CCu?ew)`Xh^PHPxipt1yEtwj-k_D zkb)eFn)~R+<>%0k|Jcpd9gw_#ZL&abbAS`>5Q>NR?M>l`=H0(I1K#m49-}{PpwkEn zDp9tQ&8fS!J`O}2M>MY$<_|K;zoeij1#D~alVA?k8;lqqcI|IVQSOt+jjgo%l}K&zIC zRW&$f2(@I&3?PiB89z%OHSJw*^c#iDt^1;;4561y9TH;%;VzvW7gHL38u7pWhRxmG zL3YMkKX3i#JYsxfTdD4v@lwMJyomUh2J>Xn`+5SWKQvQ-VV}kD29dt z%nd|cA;9(o)hk;ybRbPu@l|5=yyIYe|M9s1abIfF8(AYP>dlh7N(C_bBEZS1nign* zIr?;DxBYy0KaKKV^HRP*rz)^KSVaOQ^_R0pXTwpkA$GNJQAWywrG5TABf53t1e(xh zW3<#|XJ!MVGU8i&(`qF9&GI4Po0hm4$E!IT^yiV+9O~Oolwi)QBK_ibS3=ub64j zM+!STkJv%%4ZjQE@!*|7ygQoD)69V$_{#Z@e%Lfp7U`a2&t1i{k(Ia8kqjTVInOs~ zVL&J7TU-izLjz=tD)-JXXq$o(B&Z2bmQb-%)mK98L35wfJJA56<#CY zlHYOx-~l&gL+T-9SGWlhHKyPV!0C{$JGD$wf9qu6#zz$7* zr^Fye3JQ`Iyx`H2*X$2>hv|F2mjBN4PtP0!*1}wd#V4R1OsnKbYscP>6=^+z4o!Cx zw$eKhl?IJ!i6*%}*JcBH%+Fk{q_eA<+%s@+xuE~0%D<;YBn07tHrjgupzK_+Ee0=6 zSaB>M?0(u_CR0-e2H#_b_>fERw;LA2?ZU!2+9nI)lmZq}o~90@%B$X{{|J5axDAtN z8Y%ZL_jyeOId(IhyeWw>sL+)%g&c?y{6_7HX>!>Cz|eb`c+BJ^-RshJ;>1zKg{LJU z-!mt8f@&H#Ydq}6MfWw!(4Lq=*JASQ7yphm#pYQ|SATiFYhtrp^MRG)^%pez zc4kkMEKIKts&B()D_zmJ-&WTow70LCIQU^6D~6Be)j-5+Qp5T)rr`aIHkiR=l5WwZ z8OaTyR8}KXC*SDC*RSwrWn+hMtA%Sm?&3!+E^2C7PZVv=drq~i9B9Sg^QmmT$0Bk) zC`g-=_q^hF?D`i&n4SD$CMUFd`T4szz=M?td?pt@lTG4& z`>+*06F`0ON&jyk6Cd|l=&v1%WBR63PD*{1mKUn|M14R+74CT_vhFcgGEX_9E}6;f zOPHcQxi4;KN2c=vxcqd{h>s6uq=D_ZK|nM398xSM){SRa;+p|$!mebjf2kBL{GX-F_ZPzfkb}v%a?Xu!CbT=KOY6#^?8)pNJ`uJh~>ZAy&0AXc_i>?+En} z-BTHefWPKqSf~1I^#z$>4lZMh!J$oNQf~zTx-dH5`Zg$IGE*4%R8QXnFyU@It~|voPBwjw1M@G~w1hAP(pXGfSn}(~NgERZ zy*%4rblUOg;>^D2B#buFs3=YwO*x;VSXj%kBP7pT)J&0>0Ah<{8bX5^D6ibF1DvA( z)8aKpjP>!_`FDnK?bX}qxl^t8`)}AtrSx?ElUWn%*>|pv2V070997Wvp(CfX1Dxb~ zN0e+Sy}SUn`Ws?{cgJfe3Wk<*kZeNkMt%JYj<#Rfna70(vDGmabMfQO4&viqJQvY+ zH~r{PLw;n8hdIcPqH#9R#`YOO?`g*wY);rbL1H_>g6Zc=1zyv#6&xY52vsMu+mOQM zYKnghz*oofC6z8GLyyvTiZ{>E!8@v+YOSHn^HJ{0kf|G&m65sk z)IvbAYiQ+kddDMyu7#VBP}RnzEPIABu$yG10XPEjfV`vKr=L~0;i>i4bgGL-T)_%X z-V2$QET%$0g4_oinE^miHvuR}iezAj_&`qL$H{Be#xAPR=l|3Rk&6Kn0*}MMBCIS> z+^4j+XHU@1V#4X8Tyu+%x+9q$w6nnwZjmgQCutp6;Z^wLWU8)G5)m-Va0$0cq&I)m zJb$njJA_xAYPr_}*JtOrPeMcrTijn<%&~+ecb=th-eMJhZ$gCyoj^Wf$9))MLazID zbkrPc`>v{iQl`wO3Q#iQ)hG-NnaE<`j?{X8F%24B~38N&Ec*6i~4yPYO=d~t&*}G zde0?n+E+e*Zf1f9Sw31|OD^(^zmQaHecQD+=VrdnEPX0av2!1`m$Qmy<#Tt{czJ9V zeV`&U)E8Sik}rqRoHoaw=*Z^x`AhOn9FIl$oBUuv-V$^#T2Kuf&;qSf#BC`D2TAW8 zZuUJ;7k9c61_qRL=&D2}5Cz+Nn0sH=ZG_EWvHVSPOYe36I7=+bh9v*_vtOc@{BA_+ z^7vlDy(qgofW#}rkGvFv9BpcE$%jxF`Zm#CiY$!lKzk}5))dD~jrxG?G=|K;uJab1 zT?N3VxNND}HY4pYJ_k~E_8)%NCb?1xgUO(@1NF5oIaK}7LIdOS*g+z%cuhwM6S z*?7TUhIYF<3Wn}GtQlIfsZOG`*5}6C_X|shQ75N%$XQqX78XhQC#?DmJ*~WuC*#Vh z(?YkkskawDltlVxiyHnKiY_4{yMnM$YjwCZQ*7?!^%AYkF4HJsm^gQX#K zqF79k?S-b&)=S_WV+}N|VN1cNk~cGSHvC0J)*8Jj2}$xDYWIbSVb)fbsxO@1bPfDB zZ2!y$^IOw`Hf-7XWcy!zwVVIF_k9zvUt`QZ~4?cL`)^lhRI-~Pt zcXM2Flo6S@w|mC&3l@?a7YAB*kv@eO)NDI>uHRA!I)4~HHWV*v6c}(06P1(Y$k))R zwMfc|1?pQ3DOIKg`o#S=8WS4}HmJbI1Lh5MDQvTV z;0zau<#`%R*4!KcAFSQe@o@*f!08!6rHCKJ6)$^oU8^XqDXY!34~CkCLWmlK>OMB< zZ%efIibADusuj#b@h;fE*2>Y^RIUWcqFJz{wc`>RMInJ5ig*8>*pc)Jnb=41LxiLL z$N1|(fzRsef)MTgj4$K-f5<=Y`BS>1fdmS#%I0*V?=K=F4kc;HX7R?9V}fjuwA3Cn zjw7$)F!AHU+;GDMmR-IS2mAjRDiyj^amvPX`f*1GZ(5BbqWug!S`ep?$UI|&q+9+){Ww8^$LC$Y6JxVOik_A_K|HY^RAN8}Xbj5=q(O z9ftOPR}G#(iqDmG9A^UMdgnp|&Wbjh1WgL=cI zGRcq0@KATGm}V+Dfm&CCxB_mWqy!XFfHT^^$mCCLO=?EQHkXmC= z;u>5x&Z@SsGj{WwA{W!EH{XW)hBD#mNBJ~FE z;q~4~u>_u%_=|HCJ3Gz~KiLyCGxho&Zh-(iN?g2Q0}v2KvjM_Az?~-g@82I;r(dz~ z<-}SRBi4z9hi_@&sbfq0nMV=eG1iZ$vjfZZ0R=q%s*(tyA*fzdD^&{nNqvil(zhSu zrb`VF=-_R*rj?U5X+?hEV)dWo0r+8-a~BJ7oY)3PWfr*gj{fkd`PXLH#!` zMB*b@m~}td-de73sXmiSWFx>zFfC11$YE9ObX9+Od37W3>DH`5dwLdFE}C71dn+2V zF0Hg}azWUD8$QRZMf^}O^xpgeo@SqYCC@PMUGd#U%gJ?o?p?1l9$p@6?&?DBDXrji zd^$|AahmGvJNDN~|I}IZd7d-Q0uObznDK?C+KHKK@VYx>QZtvd3ngp&DnO7>|*d?O2$SmX7nQ@+fKdz|sFYdR=jh$psEbP#zzn1r0B3t~_5*4U` z$VxZk7+dNx>1B_sEMkoQwse27cKg;sA>x-R{3tnTURuR&yKs6MkzgOwQJA#sgsx9K zv0<0OIe{WYni7%2d#-4Ol`^F8uPfPJ{l5MF3t6Jd>(V&5O14^QS)ph25y1g#Q`roO za=de3j0ID?Zr-9W(W3f$kUj%T4#saaXM6N}4+ z@W}MTIqL-1HnP~<9Nyutky??u#j;9Uk_j{;zzQtOM>_RAfK6C^M?)p`4U*RAe_S(qGdu9VeRyj@}|Yy_c{xlaMrgV*%TEiwj5S1`#ag>I9x z&S=_(UXB7Uvz(0%6P4Ct`ZB%Ix;^7)=<&l53` zrE@=ya3>(+)V4qWGgT*QoBvGn4-Xo{+)756G*@iHncl0&-clJo?_KeR38RNuI8~a_ zX4Pl#D6#pab-e>IO&r#LY@nEetD5m|RWi1zihS-=DQakIZwjZ=WcSh=snipW50ePj zE|w<7EaUh0FVzfOthJa6%Iwhx60_e3`hga?GLyl@sLfRI5CD9pTDV;I#Fw|UPSI28 zQE-99D>5aG<1#~4Yze%w1@mLDYI1c>W|S)$HRGVp+#t@4`)-ssDVB&@c2U*%9*;V2 zCOrH(&dfkELbcm2Sm7tz*3wLkC!-s&ik-U^c`;B*z+d`QCZPTjYNGpsh}m0B(?_l}mU-!xKCKf`9kUWxU7) zs==r)ivc71qhSRCWky4!Woe!63r-yb43fF~24Iv@czhWF6|Qq&82Y*wqBFU-SEXoz zoh=nL&xc;&RoFdo@?30DgwP8+@SL#J>~@j??7(YYhA#fa~bt(<0BArRwhQx=W2) z(E-igMF$;@E7m=(M8Ub4lSk5UD{@o)`fBl4lB%st6MH<`vyeiXk-?LU1tb}l$DN(Q ziXffP&lSp=!>4E5ZLXjs`vAs)w~@`91(*0lE`Fzx;E)_)+W4rGu|l-|Eb1vDCm$t0 z^}~W(WD?A;8C!|J>N}huBIrVTu=Y@`jG>>mDO#MtH}I>8`}_Tt>A4sMVT4W8Ubw5= zFm7pd;sS~jaFpfsU5vh$70i|WqGn4EvV#NSE-)csM3~drcNM@{(w3NdZ-h}b8Z}B& zM;a@O(StUv@_n2Fa>`EXN3eDp-^^KzI7mS@`mX9?_(iW9ezSF2|Dcipb9qteiY$D* zc?SUnY~GKJ-vzzbI64;fd2$;!dQe0>qHOzwspl_;eJoPhlIv#*jl){qeu`?LC@|{? z7)m3xpd6BWsQR3oWP2zCbeMqA^iB41%uMW_gD|n!e}3jOFrxsjfoWnrrOy(UfE;4h z1se`IVWZ8BZw3@Q=;~4u46QGm@=NR{)-Ik_H+Eamo+&)LLQ5GsswVsgfEs@Z$51s0 zP%yqCRMmOH!ocVeg?|qp$~sXr&`wbA`@VbtW?m+(+!AmO-DOBTwbWV?De~LG8w?|b zVi#}|R<(tQ*baSODzyKa3~I=D#u7I3n?A1?m5*>?@77W~YbmNu;Ky7J0~4XW_rIxm zLKod%D=1dRp9r0SyKcy#pSTz~pa8`2M0O2>PZClA7mu}PkDKF3N1I$Py*UvpSWYdR zVpR`um6d^gYZTC=y+Bl_oe_=kKf6Ge6G!gRAXbe=-QX>DwS#%GV0yBAhvHR@c{Sp? zRKeDZmX;qYnk4xKo1g?`LY5V0R>An-cc_HP@p(sRTK%=JaK)of;mW{p zL$D=PTACk4^^{>z?(h%j^_&93*&9$w)tAEUJLjh0bch`O@hYtlKPMCw*ytxt(XGge z2Bpkn*-) zvKu@Nwc11X)}Imy@xPIS-{# zf7ihu(}`wgCzjAj5_B{LG!~bgu5P)}03mkVNkO)gziRMe{TLkP7Eehl0zk zk01NUw6TkhYotFj1d(o>J>-Ayl3c6py@^5f8E?Bt{`_T4S$kB+euP@_yTNM$bNV$A zkJ6t|IwdNY*z|`r%)}BcPOId@KL^n}lg$>e%1MKp)PMdj@>)8ow(11#%#8|;PEW!1 zBqk=OY+ggIuciDEo050>L z#^1DD>Y&i)7Nb|%jX^|CO665S05>d#2`hXgngPHzp9l>9;@0?^3s}%K{BDPZ%|9-v z9{zS1$D5GENFM?tQ^?8bm(Q|xwFYm#6!oq{ZVqm!FX(42uy|c7?3!e8Vm3>Dt8Hl_ z9)%9ZBzU$*WOP7#0ev0+YWg!$>#o5GxAeeEDnqQ^+b1CtP(u~Hy9=ENA~yAO9q~^V zi11<+aHA9v$(=~F2{3?GE861H#uAR20lT*FhK5Iy%-EriMHA*Lw{h$mNeT?tTDXWW z?QCtZi*!(KGnInV&uxbVIS|@U;@Z zs{YJ9o=|h%9C88%pY`)>04rKi;yv*T&WnTTCh7mSJ`LlIbu>>n(KOLIn}o6J$qV11 z4ZO{?m3$w7$isCAjuISeDevkMsFO1>(GvLxI}rNzZfnS8B67zmtPv+lTbX9BKns5r z@+hQWF!bLDkALn&aRM#=!wL(phs6lEV|HJE@MZ!rYFOD z6^BU0n@vB5HbK#Y|EMIA)V3ZX8@)Zc^{2kd7M0lk+F|s>$|f??wtA1+QvS*wv~ku= zYhhgYsiG24`p6XpS4n#scP7G`{AJ``s`GjaE;iO;OGr3K$GosMm^D!WGQkY^b`x( zQ0F+On>6@b{qH+-K=*gle*28)w~ z0M9yY7tdA2y8_zOfhxOOgfU3q1U^EBd@>x;!WQdLb%+AQ| zCKVA&QqIn}M(OGSfMvW*6zwtI_}98DRLWKVF=7M08tfr=UsJTNE^9pFS>~vZMOZd9 zY~<=L;Q=D<%yxDRI-lH%t{)=qI}-}1p#i~97i>j|jx3ho_ zrJ6D8!5om`oALE;H;Bu|;fBZMgoC>|_FzS+|D+%_%3F|zh5;u^-8&wT7C zhX{&<9<6`AU_|EtuJ^R;|7uj)g7jls@Us7N&m}N@IVn&FblSs!4fA$3MLYAAQyfV; zfXD5>3pXxn#X}=<`Fw^7vJ|w}#D+Y{8_kwS{zw)pv4-8`FfBW*LWJ+C1J-z8X55EQ zmN|mGWq~#nTqz&BoZPz6)=s1DYX8=Gt0EphGy9pc8q+wtMk+SyS(vDQ4BoUj@o5mU zkmB4Hax!9?UU*_Yu*gtbAN%`VRrKChX#Pm87CEVsc7xvSYGBxN5e{GEo}SK97k@xp zc;#*+Jz`QgUcvqd85je*XO`>tmtCP?=M0vN#i@=cRhEgx^od=;A{W%Nx<~u9*r|&iLsS(@eTR{Ik|8ieOJg!$I;`2 zbTCb{ny8)KO|kNsHS9}{a>W~KmeSIWj_xI0J;B`NWxS>!a`^vsbQTUxwQU%OjfT

=6h5s;7uVRVjEn37ThBy@C_Fa!z7@4VmsfbE>K=R9%W*LD3E z<=x$5l9Cwo437NQ0wA-A`sGP_yJ0yFs#2Kej&tPb?$20z@o<*%ZwFkWik&!i0!n9R zMV{B*bZ$?wZu4@JM6yesnmX?@JK6MA(yQ^kY5bBb%r;#xO=5m{jnu1`ihdgLmrPAl zGhp}<(83$g$EadtfFphg?}VV>ue6Pfq}tZEy+oTknSbIUYX>i@N;3a~Lmt@Hyq`b+ z!1jL7Z^1}nbz8Q_%OuIg zKDB_mK?G%+lphX%ylx`J+dj^<7ui`_}T`L?d1%_u{3Rm3b)R8n)0130>UB39ySj<*p3fF@nE{Qj{uIf}BC zBx5AoDdDDLuc3!T@{ut{p9^~(Wu%u`jHG3wjzp2#l!q++Q91$lR11fnlR;9Bumg?t zqj}5cLyTIub5g2=yc9s_CzOEYuZW4G$jnv&u6njn0}^x`<8Cz)<);{vf>B( zZ!PJVf+QVUpJLZSUm)}}9nibWS!1cFWH$NJy;HJTuZ68{JWcsWUXOL%Tq}KzbFgU^ z`!wA|fvZgriWWV~!%XgFc+Py3?Jdnx-#JD0lf-Vt5#aXts-bc0H-o|lQ7gx1I;^~h zU65`zI=5#nt#A$1r4&uy?&A2DHtMQelweCgi`*5(kGXux%OoQ7Z)qH+4l*Xqzco0u zL6o0IfB*(dJ$4vDR~KN0CboN-@$r?CyE}L36zS*~WC+N-QG&sK;+}IdrK;|MqV^|` z10I`+970Y{0cGcp#Frjd*ayX|jn1-!`S?~_hX?-7Q|y=q%_-rl_x zm6h~!1F|+hn`RU2a6U39#S8esdmT!8VHOc5Kb=y7rvBC4r+Um9=tE>S z-8_}ltK$4v-?Sd!myo&^522zXL#wOzBP10cR9? zo~6*m=^*MOGAL<^Pbl2;a7y+2ivLtx8l=M#AO%XKHwUJe*S*Owp zW4Ke65bI`i!K~Jml9Ix9uS_;0fe;tU)PV`-z46~SKlI)4d}+Sq1Tz1Uue*EfGEdx+-X}W=Q^oDMhTzePn*kNKz>vmJoH!4Zr(AyRTn!78L=z^;;qk3 zQgu?OkFj*hpT)3NQ*O8YyVn45WH?J?qeVx&G>t6*B?ybmi0%+Q1<$ZG)tygO%nfX9 z97aASVm8-x-YwR54g1wUs*S|W@oX>`>% zZ=b@P|9D=C%R@{}7Y+29Kz32)YQ;Zvl7ZnGUT2X~xefD?HOPAus>d(x1=gwpjCI2u zi!`~qTy6YCRds$DX;)!-*>;dWVHp38&8mO@BQg^PE-55j_(+3JA#HX(TB`^Yd;VB5G z(UD0? z$ae{k^6u%YFyq9H?QXd+bQ+^ThM=n7M_m1#lsWD~DV47Mu zhfyP(CW~atAz_0DbFs5?%X0&HvTwYd*FNCoo@S@&B1^>BEa+bfuj!k>rh5`8lz<-Z zSCqxlAFf_Gu&ZE2@TEN`Y(7{Huh5MUPx8*g&6om7C|bJ=v`sp*$=I&TLDOpRFET<7 zVkgk~UV;etue8ur;1d1;vfFmwx%mfotb$tO1XU7@wAa8}0xaAfiWY4w!W?U6{7QH4 z6x4SAigrv`w?48+*2XWQqT*?Cm|Q}_F-Z!FNlL%j%8ib7;K*0tW{kXc^6Wzk?J&1p zp*mA*wwZ_NXK9{7p3#sMo47H1;h$ibeJUk&^~7Wz&MmiitY5e^@2|ue8f<*LQ>#s@ ziSseeQSZk+BcM5Z_70$A8R!dR*tN~)?fMO&urV6I=W_a$QuaxF?GnI5LRY@?A%URo z{d?}K`)XKXY&n}R*kLp1j#L8g3d>aDMg-A{{0I$W8XQaq z4?k1r7C(V{vCr##J!`xFP{#15g~LK$))eOz=(+fJ74dh{hM65Pig1%xBtW_Zi6Lp? zEskqENR1Rduq@fF`nqXFJtr<(W$KFD>$S}VPLbO);G~01`t8z6jp8HN7KUq1U~iYg z+T!f;Ip2?@%>CFWLHV8tkwRzYGj{f&oGH=@1I2agFZBv3jbx{`O41wt4oNm+O4D=hq>aH1r8BCe9!uLJ~&mX8QHTOj-61jJ5t~G z>GQ2(N*)2DqK1aINc42MROV8cTVkzh{?`xk?nf?{3!F|y5Iqr#G5jFQ08w}ijmv1& z%bW?kx~FlzE+#x~aU{jjyG(fFC7oA!St6H;KRiH2p#;zEa#f#w?&1wfQ(=qhQ_-H> z)f3rpG1Sx18C9d`in_kGQ$Ox}zy8NfgKNK)zJ4WRSCVcSoiO_DqZAEoY&Ww2d(kxM z>=H6J2Dq(XHYwG^DCNu(leKyFR1JHggYjMlD*DyV;&LGe%8ycI9|;pkoE+^%zJvp+HvRr{TOEF<1i=yRq-QCa*IG4Jv)8O zMBg>*g89Xu*8t}gP9#ZlP~;~D9o7O_%|IDD@^)djJg!Gu>o=pZbaJvEh3zCu^d%I; z^5VG!iXtSJian;AgI2yAH!>sO5d5F>%n{d9tR9M3ertsK-)tSec?Mz8zw}v7XIXvX21^(E-czj6B`KA;JLLgqI2hc{a*VGo{Tw5PCM!27R*5&4vq6+LCY~6>m zEaM{nZEY{dj(m@J#K@eyn+gu|buajKbGBN=zY$E-EK<^~-% zK9&b6MmR}ibX(VkQSej-1FjcR%KuFsI*~@jf0GCj359k7l?9Y52%9*)AZ8kWmxpqk z6=+51>S>!f=Z_)37wl;qU3)OlrI*K{F0PmAhtEXRGQWICW~M z)Kj4qP8}kfBMB~wUe0%$F|Tl55f_8S0$0X}XiuiCXO2iV*5tmAWcC@zi#ZuF#>8mczyC=_b(0(b>+7NMn@+> zlbC4=cPxV@!S<-(JOxIxP&<4*dDA=2Zluz@8#D;9$JwAH!zo-5eudbkA zfNMPiv78W?uw|{)wCVS_=-sW3*-&;8Zv$*F_i*az1>j(2_W)|M^URQ2{7%;O-&`jw z*0{%?MMVB|@P+wiY|GM~QH?q@`rsd-r$771oGqbfXMW`fk(!7hBDc1DRV#`x!JtP* zxVNagyW+N#TJD(sOuhIAO?$^aKv1ccW&ey2LVy*>vPT#)Jep0%?>bgSQ11sPbxlX) zHXuTjcQUiZ3M!Y#lK%hR(~#6My{WpnMDQFOsItA+G&Pm)y`@qRr$8>wyp9LFyk!j@ z1Wh;@YC<~#zE#BJMa3!;>BCJIDGm*p3U93=IGtBz8Ll7z2pv{ImRzXznbsa!gNfXx zbC^EW)fW+pL9x4PEE~`e)o4k^?BH}{h_}3!dvwEV-gZ`1c`Jq zb;sMEX*$IhHey2U_;g?!_aJKJR8-BoKBQ@33_%7=4`3+T308~3u)d*bM;PL!s zv?LoUqh*D3O-I+pWoN?y&1A#P?@0ir$K=|Ypn3z6DzVURmwx`dSKgj~Zmx&TTV-@w zDuSWug1Dvzi1zzs@=Eb@s3Fe2irSi1R`(PWl^(DORLrqo%|gtiX`5yHYETS|IK=`R zgt_bzB6U%E#af{d-0`a3d-AgB%V~Vv@6vhvgh&SLl+8&gpG4(2@y`u0Go}gSgJ&X$ z0@B=n)chJDd`(e-#w+t|O~9*$%~K8QO!Imcw6VJ*yFHmV3T(y^+KA#GvO`2fX7A8a zZA4Fe58J1@s46LnjjQ+e)5LZ9MoZ?P7NA-w6a?3{`AFD7;0W~v&Xhu1`<-$hzn*=SK>qj%Z^_w?V!xQ4Q{;$WC8ooA^ewK#)6w2Pgo*{;z zMaymAkAV8Z6OO${9c;aF@rMnyP)e6{j*>79q2@Ym-PpMESh!%>w|18GlP$lZ+S&NS z8R0r2MiqLwO{r9fCh_~&#{D&ylvb@C&H7WwCVH1<;kN}1Kp^Zrw( zAYSUjXjL#KKymp88Lq3xd26jzGTO1yZn}O_i}+!3BRcI=kSORa|K4k+Va5Pf|Ap@^ z`j#aIzKq|(RkxgWdODz^8t`t3i=C@?4=jTh>mAux-7pEfoml*WO(A`PLj8B*nd|+# zqKrR8nVO!OoEY)T7HRkEWi>zWL0xIZYVbOXQK*BgGY(ASC;o16D$A!osV4}re)4>J zY_2`pg*mt$iV+fS+{PFnOxK2A(H{?I!>pxU(UIJ^+1~S5c#8F5e(x>l3L9!{U}XjQ zovMEDEs#C|VB^`KhOheKkA!ww9nwBk2F`(3t;ZR-GJ+UH&2qWF{ZxHN965(;H;PFb zB)k2S+?O0%9}ah>MOHqdqz4lz)6E`{R;z8zusb#qG?B06Yl%fr54W30)#uqIzV6B? z&3<}qb7X-?Hd&;Y;9ly89nSsgpeTv;(y9)E^-}z~=B4v9Xbbi7K8Qu}aJ~rx*p*_Z zfGribf|ZG}?zPgHtEVS$^_i!-oLM#>sN30A?j(pm6)Pt$e0xhyWr9;r^n|Wn_L{#* zYIErITdj7?3MK1vD5o0s2Vu3%n`*^!-Xac#Zue|B{F9qM5}6Ri*c>2pFDZN|^ zGN#ySpl=P|BpE4zm%hfHKi#&_TaEPRYxd_2k@K_7Ds_=zZ*TRy>tuY!h%|VJhXay) z1BSE@Sy}p4;mo9%I+K)Fu9!duDKyTb%A~hA{>d-!Urd6`$!33rZ{hB0)`{a-Mg5ntz)|;U#oj>ZBWl;x;at1O z#YoMLDfRGPKsA-WMnu1)uPq}L%rWY%J5KReUuT{Wp`SoWN?=4zz>n>r@@nk$)aW#@ zob|Bdc17a2qu%Aa(IdB?R372+4L(~FvK5BV19%l4UMuSj<;T29AqjABBuRt_>3-*+ z>h+njFsUB>wRJr~-A50z{h5l5pz5JEHF!1GyL90y5&IDWV8}$iq}b1!j(R0$hT6Bp zV~kEvvBx;DQ?D=mLh~lG*&UxRLpOp%Xb9@f-L1*;eLSy+qri`I$eehIglLhx|CY{< zR0u1hQ13`4JK+3fztucYhmsbBj9VWGl4BV<`ttvtJyn{tHkg{>uyGVs3S*9q^_e1P z)ijtqz#a#q%Hpt3Fy?zf=8*#V;wN`L^jb<8EY1EnMdILR3BaTC_}Y9QQi3{Y;1Vlk zdW+6HJaA3_hOrBMzx)1^od4GJYWJD!o88~@-^wSgDS!txmdgsgBA}vL1ZxU$z{}6v z3@Ki%?1=IW63Rn{%%c<1g()yJUvKv@+?qit{@f`E?{L^Qzj@``CPxFr>g1oo2|kJa zl|9n2CHPGhz z>o#gyuD7wuX#AzrUBNZ@%g%eRM~p=nOYtpLRb+`yCNkoevUPU^CMxXj_nTU)n=bfL zg6OrKR`8FU^9p^_cKLOKbRSJoAz%GY!{yjCruD)13LGPrjMi59@0W00_NLZlLi%Lp z>Ej@;vZO(txYopa3Gj)zRga@U#w!LW8e~0=VR-g7JA$${ZEbsN%RCysuJtcZ8%RrA z1Oc`dZLaKf3QwHrxX&F7V!Y(9nlt5g}X{E`<$Px1NroBYAD zUSDt*yVSLxh!(r@ibnnHn*IZ@C}<*(Ksyi9`X~tDsrRVhcPsr9dpe;s6soTxI9HBg zz}B(Er$a^vvrvvY!I3h7va?`vG$w!;w^xbX^el=bvUZvtt=6_SBJxwYtpGv3k3)$W zx!GzFotTTq&ksnnf}KJ>AFcU^goi6L_vhvasZPDT=y)n=uw_#sm@$&*%)E&N&*N~w zb-8?5PWXh#_;+xv3led^t2{a+#TS1wh}3fh9JLPP-(IGCpfDLC!m6|xr@Rc8)mF2) z-wf-+{Oj8Mr%k#Dd#Gd%gLxQb@#ixx*+2RWy98w&-De9R8k-}T1h<91+fSTApRZzK zU@*fqlobrgU5JSlqs1CCayqbn(ja@11Cw$FQHUi?N|V&g3aVfXLcNvw^@NIA-#{FO zgb%?&^VFDXGo}5m#}6Ua4&`Ucy$W*|ricsocE)6NrV}VngcWXBGTQ2Q+T;+5Ok+Sl z;}@+D?#Vc^_eI2rk@r(J}hKK;C^;;euD4Wa{xn!ayE&8ZNONle^*;q(%jcKUJ?&Mqbv0BvD| zmUHpT1cDoTMNrfpEG2|PM9N#jhPCg!9=TBKd_!pk9llID zw*n&k1K7pL@3@uAhc|D&Ofw1q-I1aWqKwMX=^fI>=P3Vj(L%{Di7v^n?2hn6Eh-o= z01?WQC)-RP%E}1!FCLDZnGP$hHwNDQh=D+PVpJ|T$R&Q{b)vz>WQpcc`J*IIfNP^l zgyDfTDL>Xt^z{+7q#A>O(TYdX zmMT-Kmy#j@4Y6(3ltesGE=?0AoQi zBFh*9RJw^XGw-p8H4XM+RqZ!qYp<{6N+3ogwi^RTZeCYieSNX*Z6<(II)-8Lu^W7h z`O@44s(kl?V0OJIAcs+TT6kru#(EB#2ik9son@Lcqo4w@N}JndVv z9DyVY0%b5o8sNn;L#dNX{I0E(*uDwATl&ON;(MFj(lX{GNf1IcZ>eG}uo~jS>Ec>j zpesc87U^G6VvP%68!)0HE75aJHpyfX3F=!52&<+G{IY4+1Ox{80hbY%_ie6a+Zw@5uKOPOSvo_cjXfGBzVh16Kx3 zdLZ-6k=OnlrQD=Q+j052P-3o6O(%>zJfnJWnYfV#Whfv}%$66w44OL*fXX7y8Y(Nc zen767T}Fwp%7A(-FzI3Hr{tx;mjSrOwZ* zHiJBEj*3ifbd^6yt)D*iB7ug#LL&_w!^D9JVhdwUGV4V%Ma}*WxKCjVTRAM&|KV58 zmhxXX%mAh2ngwAE3X_f=q0@P{UFLU1q1mE^3wq&onPrzLyu(zdEtUxW94{O`jMALO zTQfimrtZ9S-tWB%!-o#DwUC}`_$jc9?MrkDhDJDkAG>)hCN>6y_trt^^`uDvX+f3U zks6|yw2O89i#T|}Zk$^nwQ3unb<6ekVPv4gueYdUACUvtT_ob{xT?bbK)3I;%p-5M zqRV;Jx;b{YK%SJ5UtFyWZNGnur9GolV?TAQa~E**kjz)<6GKJrh^7RMeli>HH&f8a zu>u=7t?1_`+e8Z2;$8Gq#V<>Qz=XM{*a>G+GN-8i_0ORtD$CyCG;F z?xe~@;~Mi9LPo8#%COWM4~uD)8v(D7Q3>I;0|f*26+w;4N-gXQETWWp7Qs~W4T?b2ZIn4e3b2~2jsF=U{l|#x z!CGa3{KjC686j7;^xKrniHa&TX>~9T38()vxrvieHPzL^0-ex@&O=bs8_!`R8#5=Uqln1}?bveQrTuc{Jre>O5xyLtG3bh@hDij*^sGE}(r$E& zP@0-Q(PcX&fQI8v4(8V4$3GCrvwI87-!EHu3h^*oX7HTZT?j z_ayT8`HkWf0_0|7pUrp=P|Q;aphS?A>h~Y!1gHXt~q$s6vll;`^Ou8*=Z*TR>LGI>G`#dp$r8AYIlWqyuPh> zFjTbKVxsQ0D*aO4%JPuvDvhNr#hm(IsD+BP>c zn99ztqI6iYW4MbIc^7Og-OUw8N-P&KGU+t=3U_wvAX>5*skpVTS}f4Qa3Yw}mFpEq z4vmgr(4z=qZTgnFkGIwsxFT|O|KzXfQKamm%Vn_Z8ucvF5W65%w*MdOgSViU=$qmn z+6k~Y%0$NPJ&+Xi#eRsE@%!v^Qh@7dJCM*jV7m%}2d*@7aR(KvZ-wOSb}(IsAi+TD zRI5&OTKCNf=DSp35=k3!Yv%6UMnwaM`@^vCbb%AO5}!k(OQK1&EhcD&RX1$i5`mA% z4qO3+gkxc2s~MO|OvrS2Thl1xbpHvDqdu2P_Ij50ww#WkxXbaJv+c_(B0CQbLG)vw z(CIhx56FUSzOb2fvn(EQguDs+Nq@PFTlNuUyvHE{rpgtWTKW!m%1+`bp||6ih8zah zSt#FJoOK>|??~yTGUOl+=725V`2hUvW5g>8(ea6Bb$g-tqV=IL{GkH1XSXLqmXoYc zASP+TEEp`-N5hbV#^=MH(}F*6jb1Or-c859N<5~IFC*EM@;$wV(LDuQXoV}${8)sb zz61T(tQY3i!i0;NV9sQ~XiC5Mx{0g-Y7m?L92oaODRAq*T?{g6GQ4`;k}ou87ze zMT5k_w|3(KdjkbnDJm1+GW8~^NnD60RsXpqN2uxX|Knp#A!riVyYnRRMVtYlpqb>N zlPnP{33ZRjyU1NV)x<_Q3tyf>oAUMcNaIKzs58F9*34sf3lq>Ri3EKCdXd;X2tnV? zkBRESP;}O#pw9Tcp0EY=iGPc3(b7>v6TtRG*80EE1S znJ+gvSvk5@FejSPvG7Q5%uBUhKV#+jXFt$HtSRcwGa{tF=$IpL|rWn0F*1C!Q z%RY~dPL+V!!^n@3jHjn*Y@Ah-kJX0B5(}c?>7^!S|BZ5rS|C6MR2I|U$a)Iy&SZ&q z0rh0?v2wou7%U8jJC^bM^GPsY*!wX%5JcR``n~E?Mgv-}R0cH1wNrX|)rfCwqHXu} zp0V4hL50Eo^Vay(uL1aR_(qVpoqHs&-ZN~mR*KkTMQJpEA(Gv=ucqzxQp?NKTqb3sNAeQd)S?;sDUMB> z@*1#Zanc5ITMNlgz|cjE2Mhrp#gi~!Sz2GqzEpzE+0-L7APe4f>-iQ@*&FVHY}nik z<~gQu8E7AiUgY*rcxNGE_vs%2{NbqGKYS+yi5d6BQ6q4eeh7-9 z(4|1B7q4!>6E|KCrHX?8m|@ZXs(4fkfoV?&`XF!5#S^0Iwd$%{#{>lJ%kC)^$K`)k z*!s;KV7bQfED43e^WukILR;`MjuUPp?R^!*(uM(0EU@%rv(hgUgyOVLXO*m$=Fewv zqtOw^O+M2#I5(s;Cpcoomfn-A-#x}L0BCGtrMIK60^Nq+RdA)7juA}g8D3{nem?mu z;{!;{y}Rp-qpY%1C3aWKchVhb$TJ68LZG<%hJW9HsLHv|YACX^FKxyOJ@FBgeGnFg*9goIP^ zAT~!P8!CJ6FP$`ewd2WyFqUD2(^@efBkRRKwRkPXQzaI}!Vh`RN2doDDY7fRMu$@_ z!v#UzcH`s#g=a*o3WaOc#@kd-P|!O&=jSE6P(j-Ho)n3Aadm?S&tziC2b9wjht zEVL6^QdNs3jOPb!B&?mbc)&G;H!5;!IBvLHf_$s)3iS4D+E?DnQc)e@$97XBe@Q23 zP>Wb5t@e>EVOR<-KQ7uX2f=16YH1GY`iL?p^wdH~+T4xSkipbcCehP-8+gjhSn?A3 zIbFqWzNeEQKuPQ=R7td2tP|GzsgmQw)Yk`T!#k_ol^&s7eP6v=+S{RG(vz^XL=|Y6 z)!luRFzBzqxrTY%i<7_TA{u{+=eybSJ+#AhscYCyi^x^2l+Z>XRfHaBYigJTQ}XC} zxS!x3e7P$Bfdk@GnMg_2dg$!z2%j+U}aiH zPQo0zFsKeV%M{U1*BIyBPwQ1;?dT5Z_cj~O!uMKXin|j)aCNfCCX0%Aro3G+jcdC9 zsth6>R{8R12!%}b31#ptIFP-hG;}SD$Ejjwle$qoIP_E#U(j6&C|chmwh{~Ys+?QV z=NG^H!JdChX%_27=53~|5{-&XO&Co{rVokl^yetmAz3K>GJQr%9B(z!)={~;Yyffd zeFEYG^td$u9>S4n&xL3m6XY)n_9ouDM{Y5_D;8v@SV*xql z@873mJ~o}qeZxLq6rGP31oJmuKh~wD=YN&rg0zVIK49S9UDDJ3-ha-}IsTdr$Yw1X zx@?_Z8|tFSP{QS6P_RbdehTcdFQ9iy>r_d+SLY#S2 zRcsMH|4%90=ylmh(@jj2%C_z^t!-nxVWhXJxS+EZJQ0Ab$nR{o)sG}o+~-NmxKjR{ z@>Hyg@ymj&mt0VglF(39_qB#E_>QIQ&fO$oJ5nNY3bu0L*Ae(pWxkaRqp(`G#9Q0Y?wVO_J`qJfd0ERTBt zc2WNs^r}~-@MCeAl(XPpRYB!3dgND>i<+)UGB2hw|~Z3I9#-d!6xJEKH*n_rUYx@erKU@5xKd-ZAH;j81u%8k03~ zcHPfh-9P%!S2n_|!`jCUu*%uxJ6{EwkdufNr7a=lm9M!uO&6HHP|;!Tvq-tkAT$^o zNPuwSl14-W!1u3n#>PGJBhd&lT9Fj5EB#9p8|@hvQ2kO<85DC;uEn!3{Gku=e%E6> zVFU4^kp!aGpA^^P1Y+9B4xmW8F(gYx6EdfRZ=}1sEFz94wI2oQAX!f-p=^2+WQGPP zs=3j2@V$b^@gRgDe}04|&4Zv(++2T4A?4ps6+1zYfLh{LZ8p-AKkA1ohn<}1`sN{) z1UbiMhPBl`3+jG=dDBV6vjpi6sa652NPBxr8W=Co{l69M`6E}y>2+oy`LSk%i(xIF zqF63#?V5JVKZg1FGBX=bUmuIfZq28maRf7YuqWjH;WXu682VgKEub>^qV~vFvFJvq zc);V(o0pXU`ZNZJm~BtKnf5FHG}SkZGA66`Vi*aZ9yt;}r1hj|i<_B=1|0Tp|I!Zs zC(t56=3D$YeziXxWqoL!9kN#WZc! z9-Y?J*S#$ZLi5CtXl1C9g|aI@&!?)cvt&K7w^F{CMx{1usrzv+QuE&wI?29&hE1#Z za$dS@ng__n>kTJ4X#7VwG>-e>UEv+GpI_IW?PsEMvBzb^bI%$o{>9#d0R8moDRqng z(YnbExwY_)p<3`ys)?LdfK)NfB=9kC6UCyZc4BVm^y#TNUKDOM@inbk`8`X+#*n{B z4=+80Fp5rd`8-^{8h5q4x7OA$uwGHS-jSOxqzixLmj*0iCB3uyipuQtH3*6p>t?7i zy(`jl0=@E-$w^Au)yKK@M+7Rrz;9MiMby)tWtUs{4(Hm)eI2e<5X*kzt0Wm=U++a# z^Qlf1ei||P4mU*O=EAYr|A@{65W@=w$iv^eY=rdA?cp#B-GnO?Jo&-MqyONfC%bDc z-b?H9!cxb){P}>buk3CQ8a|rZMRKrWO7OR;n&`uam=RZ6k+0{89d&mdGl=J|J(~~lUb}wz+#dz9u*n*U{m%gPAdAOdlBJf{QHJ6fKiDhI5-EkkaZ zH%SvO{;oW|WCSairg`i{u0D+u&NjJGd4G{F0O0bZ7KMDBTo@4SZoL3PW{}pWt<@)5 z-ALwy8*syi)U4VZ)x#v-kSaV+mJD94;GSE`1=zVcfdq+zxjuODoSm1U3D>#vB~r`X z1Q-IU+7T)`ydPs#2Pfre7G#{5S8wA2VAayJg~~W{iqv*mVmw-lHb*NkZYC#ALLmpD z`FnDs<-^Ee{Mci_TkXlszl^*3Kyqlz->)|DqabS`%6u|HWC8o!kx!vq|Hk?#5~kYZ z_wA;#thaq|PgQ8@PIS;&Qw93{jS?A~gz#IX6TBfUe~_c2Awp0A-XvF6{q$`581yqWJ}GsH5*?aiZ|H{Nwp!5{ju1n@qoe5l?KkW5t+I-Uu2nhGL-{ko|>AkRov;51r zMC!!*GWgTYQZ{XQ_^TdrI~U=~hDQVr?gB$@sqiijt;G9YOi}krH?9>de<1FHA$NaN zUj)Iz&4s6L+9hZfe7NV(APlDBNtB)KnEIV|9?j9*my$o+NET3po3^Vw&L)VKb#b`{ ziV!jVBvQ5~7ZnbYPW=nf&FzdC`w4(~yaU)Z{=2%Lc3LaTydiG19#`_+6Y3(X`r{Z^ zOl<;X1`G=1$w#R>9!JS8iedW@p+%ZgxZ{_XiOjdc~=(cr71RHAN9HJ zxMJbxL94I>-B2Coy!AK`GkQJ|qln`wwQnC40*=S=rF&iK2> z1OxVE#<;mgDqC8_huqTPi`}ahQxn{HPq1#`=a3*zVm>9YJSF{lX96fE+YE!4yEr>~ zwyYO!xAc%)pkylSVi-_1P1w{fSEDeYXwPSs@JIak%owwk%(*Kn+ze-L0ro3^_|NVY zrBIBa*%XqNrzs2km%;D`&l@T2yY3OI^Sg06v6rPL>O*<5J?3bjr94;LyHcgGg@1`I z9qB4}=7-VVS&Qc&9Y`U;T)*pa+6g$@0XbP{|U;Rqp~ zd9!(1T|f7|fWDcVpD6(j(CDAoHV0vu3*wEhd|A3&rSR+BA@>{yTqz%HjtElly?0#- zib<^@MO8a#!gA!v^;XVB@=c8_Wr3F1Qb&J7XD;c*1^N_f^*H`z)`jElI>Y*3QFPDA zNw%-U2$Ec0@QUr-C1s3IXwrzX`a$yl2}v9k_r;Ro)fG*6r=^~Bn(S;92~P2f3R%-`kmwZA^&4kS|7-+SIs@pXhO^|1o9_g{kh=@zk*oh z>$GyCM0jlkaOweSP6bZB`ZFL;X8?m`Gp=}gCg(|39IZN*rkq%GQ*MS@gz4^5ScjSQ zp?6|D5-9Y;e`)#lPbien2eE&waGm~l{`iF5%#JtuWeWcyeHh^U`XI0j1_C>7>yKeU zhB5icrhB$#Y1f8;MA*Egwb*{-9TmfsGfsxE6ZQm2{&w!|Qt9hlK@8b}+<=qM3$(H! qD<7EW9R~S3+?L%?#yIZu4{AicZ* literal 0 HcmV?d00001 diff --git a/docs/src/deer.svg b/docs/src/deer.svg new file mode 100644 index 0000000..b686b4b --- /dev/null +++ b/docs/src/deer.svg @@ -0,0 +1,52 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/docs/src/installing.md b/docs/src/installing.md new file mode 100644 index 0000000..8f98b62 --- /dev/null +++ b/docs/src/installing.md @@ -0,0 +1,63 @@ +# Installing + +There are a few different ways to install Tealdeer: + +- Through [packet managers](#packet-managers) +- Through [static binaries](#static-binaries-linux) +- Through [cargo install](#through-cargo-install) +- By [building from source](#build-from-source) + +Additionally, when not using system packages, you can [manually install +autocompletions](#autocompletion). + +## Packet Managers + +Tealdeer has been added to a few package managers: + +- Arch Linux AUR: [`tealdeer`](https://aur.archlinux.org/packages/tealdeer/), + [`tealdeer-bin`](https://aur.archlinux.org/packages/tealdeer-bin/) or + [`tealdeer-git`](https://aur.archlinux.org/packages/tealdeer-git/) +- Fedora: [`tealdeer`](https://src.fedoraproject.org/rpms/rust-tealdeer) +- FreeBSD: [`sysutils/tealdeer`](https://www.freshports.org/sysutils/tealdeer/) +- macOS Homebrew: [`tealdeer`](https://formulae.brew.sh/formula/tealdeer) +- NetBSD: [`sysutils/tealdeer`](https://pkgsrc.se/sysutils/tealdeer) +- Nix: [`tealdeer`](https://nixos.org/nixos/packages.html#tealdeer) +- openSUSE: [`tealdeer`](https://software.opensuse.org/package/tealdeer?search_term=tealdeer) +- Solus: [`tealdeer`](https://packages.getsol.us/shannon/t/tealdeer/) +- Void Linux: [`tealdeer`](https://github.com/void-linux/void-packages/tree/master/srcpkgs/tealdeer) + +## Static Binaries (Linux) + +Static binary builds (currently for Linux only) are available on the +[GitHub releases page](https://github.com/dbrgn/tealdeer/releases). +Simply download the binary for your platform and run it! + +## Through `cargo install` + +Build and install the tool via cargo... + + $ cargo install tealdeer + +*(Note: You might need to install OpenSSL development headers, otherwise you get +a "failed to run custom build command for openssl-sys" error message. The +package is called `libssl-dev` on Ubuntu.)* + +## Build From Source + +Debug build with logging enabled: + + $ cargo build --features logging + +Release build without logging: + + $ cargo build --release + +To enable the log output, set the `RUST_LOG` env variable: + + $ export RUST_LOG=tldr=debug + +## Autocompletion + +- *Bash*: copy `bash_tealdeer` to `/usr/share/bash-completion/completions/tldr` +- *Fish*: copy `fish_tealdeer` to `~/.config/fish/completions/tldr.fish` +- *Zsh*: copy `zsh_tealdeer` to `/usr/share/zsh/site-functions/_tldr` diff --git a/docs/src/intro.md b/docs/src/intro.md new file mode 100644 index 0000000..fcacfe3 --- /dev/null +++ b/docs/src/intro.md @@ -0,0 +1,13 @@ +# Tealdeer: Introduction + +![teal deer](deer.png) + +Tealdeer very fast implementation of [tldr](https://github.com/tldr-pages/tldr) +in Rust: Simplified, example based and community-driven man pages. + +This documentation shows how to install, use and configure Tealdeer. + +## Links + +- [GitHub Project Page](https://github.com/dbrgn/tealdeer) +- [TLDR Pages Project](https://tldr.sh/) diff --git a/screenshot-custom.png b/docs/src/screenshot-custom.png similarity index 100% rename from screenshot-custom.png rename to docs/src/screenshot-custom.png diff --git a/docs/src/usage.md b/docs/src/usage.md new file mode 100644 index 0000000..c8fa308 --- /dev/null +++ b/docs/src/usage.md @@ -0,0 +1,9 @@ +# Usage + +Tealdeer is straightforward to use, through the binary named `tldr`. + +You can view the available options using `tldr --help`: + +``` +{{#include ../../src/usage.docopt}} +``` diff --git a/src/main.rs b/src/main.rs index 532c678..cf4d130 100644 --- a/src/main.rs +++ b/src/main.rs @@ -52,42 +52,7 @@ const APP_INFO: AppInfo = AppInfo { author: NAME, }; const VERSION: &str = env!("CARGO_PKG_VERSION"); -const USAGE: &str = " -Usage: - - tldr [options] ... - tldr [options] - -Options: - - -h --help Show this screen - -v --version Show version information - -l --list List all commands in the cache - -f --render Render a specific markdown file - -o --os Override the operating system [linux, osx, sunos, windows] - -u --update Update the local cache - -c --clear-cache Clear the local cache - -p --pager Use a pager to page output - -m --markdown Display the raw markdown instead of rendering it - -q --quiet Suppress informational messages - --config-path Show config file path - --seed-config Create a basic config - --color Control when to use color [always, auto, never] [default: auto] - -Examples: - - $ tldr tar - $ tldr --list - -To control the cache: - - $ tldr --update - $ tldr --clear-cache - -To render a local file (for testing): - - $ tldr --render /path/to/file.md -"; +const USAGE: &str = include_str!("usage.docopt"); const ARCHIVE_URL: &str = "https://github.com/tldr-pages/tldr/archive/master.tar.gz"; #[cfg(not(target_os = "windows"))] const PAGER_COMMAND: &str = "less -R"; diff --git a/src/usage.docopt b/src/usage.docopt new file mode 100644 index 0000000..d2ad807 --- /dev/null +++ b/src/usage.docopt @@ -0,0 +1,34 @@ +Usage: + + tldr [options] ... + tldr [options] + +Options: + + -h --help Show this screen + -v --version Show version information + -l --list List all commands in the cache + -f --render Render a specific markdown file + -o --os Override the operating system [linux, osx, sunos, windows] + -u --update Update the local cache + -c --clear-cache Clear the local cache + -p --pager Use a pager to page output + -m --markdown Display the raw markdown instead of rendering it + -q --quiet Suppress informational messages + --config-path Show config file path + --seed-config Create a basic config + --color Control when to use color [always, auto, never] [default: auto] + +Examples: + + $ tldr tar + $ tldr --list + +To control the cache: + + $ tldr --update + $ tldr --clear-cache + +To render a local file (for testing): + + $ tldr --render /path/to/file.md From e24d86c900f4d49037483e1a549ddd4957e30c3a Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 1 Nov 2020 01:27:31 +0100 Subject: [PATCH 087/368] Deploy docs through CI --- .github/workflows/gh-pages.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..35f17b3 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,25 @@ +name: github pages + +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: '0.4.4' + + - run: cd docs && mdbook build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/book From dff8da40a52cc750c9e07acf0d0b6622c9dc6faf Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 1 Nov 2020 01:52:01 +0100 Subject: [PATCH 088/368] Docs: Add screenshot to intro page --- README.md | 2 +- docs/src/intro.md | 4 ++-- .../src/screenshot-default.png | Bin 3 files changed, 3 insertions(+), 3 deletions(-) rename screenshot-default.png => docs/src/screenshot-default.png (100%) diff --git a/README.md b/README.md index 4015047..5b1bfd4 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A very fast implementation of [tldr](https://github.com/tldr-pages/tldr) in Rust: Simplified, example based and community-driven man pages. -Screenshot of tldr command +Screenshot of tldr command If you pronounce "tldr" in English, it sounds somewhat like "tealdeer". Hence the project name :) diff --git a/docs/src/intro.md b/docs/src/intro.md index fcacfe3..71ebce0 100644 --- a/docs/src/intro.md +++ b/docs/src/intro.md @@ -1,10 +1,10 @@ # Tealdeer: Introduction -![teal deer](deer.png) - Tealdeer very fast implementation of [tldr](https://github.com/tldr-pages/tldr) in Rust: Simplified, example based and community-driven man pages. +![Screenshot](screenshot-default.png) + This documentation shows how to install, use and configure Tealdeer. ## Links diff --git a/screenshot-default.png b/docs/src/screenshot-default.png similarity index 100% rename from screenshot-default.png rename to docs/src/screenshot-default.png From 6d07e78613859b461de2e89ea0c611d5b3bb64af Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 8 Nov 2020 13:15:52 +0100 Subject: [PATCH 089/368] Remove xdg dependency (#152) It's not being used anymore. --- Cargo.lock | 1 - Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 76cbdf3..f6cee68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1274,7 +1274,6 @@ dependencies = [ "tempfile", "toml", "walkdir", - "xdg", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 41eaf0e..783d471 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,6 @@ serde_derive = "1.0.21" tar = "0.4.14" toml = "0.5.1" walkdir = "2.0.1" -xdg = "2.1.0" [target.'cfg(not(windows))'.dependencies] pager = "0.15" From c33c146a174296cb16f83a722b006633c441ed29 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 14 Nov 2020 23:55:49 +0100 Subject: [PATCH 090/368] Docs: Add README --- docs/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docs/README.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..7b63a06 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,8 @@ +# Tealdeer Docs + +To build the docs, install [mdbook](https://github.com/rust-lang/mdBook). + +You can build the HTML with `mdbook build`. + +To serve the docs on `localhost:3000` and watch for changes, use `mdbook +serve`. From 931a5fc13c9d259f341b2dc19ffb82d9119541a7 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 15 Nov 2020 00:00:11 +0100 Subject: [PATCH 091/368] Docs: Document location of cache directory --- docs/src/config.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/src/config.md b/docs/src/config.md index 3aee010..38e367b 100644 --- a/docs/src/config.md +++ b/docs/src/config.md @@ -18,7 +18,15 @@ The directory where the configuration file resides may be overwritten by the environment variable `TEALDEER_CONFIG_DIR`. Remember to use an absolute path. Variable expansion will not be performed on the path. -## Example +## Override Cache Directory + +Similarly, the cache directory where the pages are downloaded to, also follows +OS conventions. On Linux, it will usually be at `~/.cache/tealdeer/`. The path +can be overwritten using the environment variable `TEALDEER_CACHE_DIR`. +Remember to use an absolute path. Variable expansion will not be performed on +the path. + +## Config Example ```toml [display] From b1a08af00a66148fdbb72c4b9382ee55628d12c8 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 15 Nov 2020 00:03:15 +0100 Subject: [PATCH 092/368] Link to docs in Cargo.toml --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 783d471..930c2d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,7 @@ license = "MIT/Apache-2.0" name = "tealdeer" readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" +documentation = "https://dbrgn.github.io/tealdeer/" version = "1.4.1" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "/bash_tealdeer", "/fish_tealdeer"] edition = "2018" From c632407a25a5f5a2f2df6a61c9ddf98318c6d214 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 15 Nov 2020 00:03:48 +0100 Subject: [PATCH 093/368] README: Move up link to docs --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5b1bfd4..a492120 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,14 @@ In case you're in a hurry and just want to quickly try tealdeer, you can find st binaries on the [GitHub releases page](https://github.com/dbrgn/tealdeer/releases/)! +## Docs (Installing, Usage, Configuration) + +User documentation is available at ! + +The docs are generated using [mdbook](https://rust-lang.github.io/mdBook/index.html). +They can be edited through the markdown files in the `docs/src/` directory. + + ## Goals High level project goals: @@ -56,14 +64,6 @@ These are the clients I tried but failed to compile or run: [PHP client](https://github.com/BrainMaestro/tldr-php). -## Docs (Installing, Usage, Configuration) - -User documentation is available at ! - -The docs are generated using [mdbook](https://rust-lang.github.io/mdBook/index.html). -They can be edited through the markdown files in the `docs/src/` directory. - - ## Development Creating a debug build with logging enabled: From 0c75e340076389f7aab2931fe972a39fe4a7d87a Mon Sep 17 00:00:00 2001 From: tveness Date: Wed, 13 Jan 2021 22:32:02 +0000 Subject: [PATCH 094/368] Fix tar markdown rendering test (#159) tldr-pages repository changed file https://github.com/tldr-pages/tldr/blob/master/pages/common/tar.md and so test was failing --- tests/tar-markdown.expected | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/tests/tar-markdown.expected b/tests/tar-markdown.expected index c4a28b1..913077f 100644 --- a/tests/tar-markdown.expected +++ b/tests/tar-markdown.expected @@ -4,38 +4,34 @@ > Often combined with a compression method, such as gzip or bzip. > More information: . -- Create an archive from files: +- [c]reate an archive from [f]iles: `tar cf {{target.tar}} {{file1}} {{file2}} {{file3}}` -- Create a gzipped archive: +- [c]reate a g[z]ipped archive from [f]iles: `tar czf {{target.tar.gz}} {{file1}} {{file2}} {{file3}}` -- Create a gzipped archive from a directory using relative paths: +- [c]reate a g[z]ipped archive from a directory using relative paths: -`tar czf {{target.tar.gz}} -C {{path/to/directory}} .` +`tar czf {{target.tar.gz}} --directory={{path/to/directory}} .` -- Extract a (compressed) archive into the current directory: +- E[x]tract a (compressed) archive [f]ile into the current directory: `tar xf {{source.tar[.gz|.bz2|.xz]}}` -- Extract a (compressed) archive into the target directory: +- E[x]tract a (compressed) archive [f]ile into the target directory: -`tar xf {{source.tar[.gz|.bz2|.xz]}} -C {{directory}}` +`tar xf {{source.tar[.gz|.bz2|.xz]}} --directory={{directory}}` -- Create a compressed archive, using archive suffix to determine the compression program: +- [c]reate a compressed archive from [f]iles, using [a]rchive suffix to determine the compression program: `tar caf {{target.tar.xz}} {{file1}} {{file2}} {{file3}}` -- List the contents of a tar file: +- Lis[t] the contents of a tar [f]ile [v]erbosely: `tar tvf {{source.tar}}` -- Extract files matching a pattern: +- E[x]tract [f]iles matching a pattern: `tar xf {{source.tar}} --wildcards "{{*.html}}"` - -- Extract a specific file without preserving the folder structure: - -`tar xf {{source.tar}} {{source.tar/path/to/extract}} --strip-components={{depth_to_strip}}` From 1db4b409bc74b8db47cf2e9d6b0db4a845390f79 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Mon, 10 Aug 2020 22:27:05 +0200 Subject: [PATCH 095/368] Add support for multiple languages (#125) The implementation follows the tldr-pages client spec: https://github.com/tldr-pages/tldr/blob/master/CLIENT-SPECIFICATION.md#language Fixes #96 --- src/cache.rs | 56 +++++++++++++++++----------- src/main.rs | 96 +++++++++++++++++++++++++++++++++++++++++++++++- src/usage.docopt | 27 +++++++------- 3 files changed, 142 insertions(+), 37 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index bc097e8..9023aaf 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -2,7 +2,7 @@ use std::env; use std::ffi::OsStr; use std::fs; use std::io::Read; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use app_dirs::{get_app_root, AppDataType}; use flate2::read::GzDecoder; @@ -142,41 +142,53 @@ impl Cache { } } + /// Check for pages for a given platform in one of the given languages. + fn find_page_for_platform( + name: &str, + cache_dir: &Path, + platform: &str, + language_dirs: &[String], + ) -> Option { + language_dirs + .iter() + .map(|lang_dir| cache_dir.join(lang_dir).join(platform).join(name)) + .find(|path| path.exists() && path.is_file()) + } + /// Search for a page and return the path to it. - pub fn find_page(&self, name: &str) -> Option { - // Build page file name + pub fn find_page(&self, name: &str, languages: &[String]) -> Option { let page_filename = format!("{}.md", name); // Get platform dir - let platforms_dir = match Self::get_cache_dir() { - Ok(cache_dir) => cache_dir.join("tldr-master").join("pages"), + let cache_dir = match Self::get_cache_dir() { + Ok(cache_dir) => cache_dir.join("tldr-master"), Err(e) => { log::error!("Could not get cache directory: {}", e); return None; } }; - // Determine platform - let platform = self.get_platform_dir(); + let lang_dirs: Vec = languages + .iter() + .map(|lang| { + if lang == "en" { + String::from("pages") + } else { + format!("pages.{}", lang) + } + }) + .collect(); - // Search for the page in the platform specific directory - if let Some(pf) = platform { - let path = platforms_dir.join(&pf).join(&page_filename); - if path.exists() && path.is_file() { - return Some(path); + // Try to find a platform specific path first. + if let Some(pf) = self.get_platform_dir() { + let pf_path = Self::find_page_for_platform(&page_filename, &cache_dir, pf, &lang_dirs); + if pf_path.is_some() { + return pf_path; } } - // If platform is not supported or if platform specific page does not exist, - // look up the page in the "common" directory. - let path = platforms_dir.join("common").join(&page_filename); - - // Return it if it exists, otherwise give up and return `None` - if path.exists() && path.is_file() { - Some(path) - } else { - None - } + // Did not find platform specific results, fall back to "common" + Self::find_page_for_platform(&page_filename, &cache_dir, "common", &lang_dirs) } /// Return the available pages. diff --git a/src/main.rs b/src/main.rs index cf4d130..611a08a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,6 +17,7 @@ #[cfg(feature = "logging")] extern crate env_logger; +use std::collections::HashSet; use std::env; use std::fs::File; use std::io::BufRead; @@ -74,6 +75,7 @@ struct Args { flag_seed_config: bool, flag_markdown: bool, flag_color: ColorOptions, + flag_language: Option, } /// Print page by path @@ -255,6 +257,46 @@ fn get_os() -> OsType { OsType::Other } +fn get_languages( + env_lang: Result, + env_language: Result, +) -> Vec { + // Language list according to + // https://github.com/tldr-pages/tldr/blob/master/CLIENT-SPECIFICATION.md#language + + if let Ok(lang) = env_lang { + let language = env_language.unwrap_or_default(); + let mut locales: Vec<&str> = language.split(':').collect(); + locales.push(&lang); + locales.push("en"); + + let mut lang_list = Vec::new(); + let mut found_languages = HashSet::new(); + + for locale in &locales { + if locale.len() >= 5 && locale.chars().nth(2) == Some('_') { + // Language with country code + let lang = &locale[..5]; + if found_languages.insert(lang) { + lang_list.push(lang); + } + } + if locale.len() >= 2 && *locale != "POSIX" { + // Language code + let lang = &locale[..2]; + if found_languages.insert(lang) { + lang_list.push(lang); + } + } + } + + return lang_list.iter().map(|&s| String::from(s)).collect(); + } + + // Without the LANG environment variable, only English pages should be looked up. + vec!["en".into()] +} + fn main() { // Initialize logger init_log(); @@ -382,8 +424,15 @@ fn main() { check_cache(&args, enable_styles); } + let languages = if let Some(ref lang) = args.flag_language { + // Language overwritten by console argument + vec![lang.clone()] + } else { + get_languages(std::env::var("LANG"), std::env::var("LANGUAGE")) + }; + // Search for command in cache - if let Some(path) = cache.find_page(&command) { + if let Some(path) = cache.find_page(&command, &languages) { if let Err(msg) = print_page(&path, args.flag_markdown, &config) { eprintln!("{}", msg); process::exit(1); @@ -409,7 +458,7 @@ fn main() { #[cfg(test)] mod test { - use crate::{Args, OsType, USAGE}; + use crate::{get_languages, Args, OsType, USAGE}; use docopt::{Docopt, Error}; fn test_helper(argv: &[&str]) -> Result { @@ -428,4 +477,47 @@ mod test { let argv = vec!["cp", "--os", "lindows"]; assert!(!test_helper(&argv).is_ok()); } + + #[test] + fn test_language_missing_lang_env() { + let lang_list = get_languages(Err(std::env::VarError::NotPresent), Ok("de:fr".into())); + assert_eq!(lang_list, vec!["en"]); + let lang_list = get_languages( + Err(std::env::VarError::NotPresent), + Err(std::env::VarError::NotPresent), + ); + assert_eq!(lang_list, vec!["en"]); + } + + #[test] + fn test_language_missing_language_env() { + let lang_list = get_languages(Ok("de".into()), Err(std::env::VarError::NotPresent)); + assert_eq!(lang_list, vec!["de", "en"]); + } + + #[test] + fn test_language_preference_order() { + let lang_list = get_languages(Ok("de".into()), Ok("fr:cn".into())); + assert_eq!(lang_list, vec!["fr", "cn", "de", "en"]); + } + + #[test] + fn test_language_country_code_expansion() { + let lang_list = get_languages(Ok("pt_BR".into()), Err(std::env::VarError::NotPresent)); + assert_eq!(lang_list, vec!["pt_BR", "pt", "en"]); + } + + #[test] + fn test_language_ignore_posix_and_c() { + let lang_list = get_languages(Ok("POSIX".into()), Err(std::env::VarError::NotPresent)); + assert_eq!(lang_list, vec!["en"]); + let lang_list = get_languages(Ok("C".into()), Err(std::env::VarError::NotPresent)); + assert_eq!(lang_list, vec!["en"]); + } + + #[test] + fn test_language_no_duplicates() { + let lang_list = get_languages(Ok("de".into()), Ok("fr:de:cn:de".into())); + assert_eq!(lang_list, vec!["fr", "de", "cn", "en"]); + } } diff --git a/src/usage.docopt b/src/usage.docopt index d2ad807..4a70c86 100644 --- a/src/usage.docopt +++ b/src/usage.docopt @@ -5,19 +5,20 @@ Usage: Options: - -h --help Show this screen - -v --version Show version information - -l --list List all commands in the cache - -f --render Render a specific markdown file - -o --os Override the operating system [linux, osx, sunos, windows] - -u --update Update the local cache - -c --clear-cache Clear the local cache - -p --pager Use a pager to page output - -m --markdown Display the raw markdown instead of rendering it - -q --quiet Suppress informational messages - --config-path Show config file path - --seed-config Create a basic config - --color Control when to use color [always, auto, never] [default: auto] + -h --help Show this screen + -v --version Show version information + -l --list List all commands in the cache + -f --render Render a specific markdown file + -o --os Override the operating system [linux, osx, sunos, windows] + -L --language Override the language settings + -u --update Update the local cache + -c --clear-cache Clear the local cache + -p --pager Use a pager to page output + -m --markdown Display the raw markdown instead of rendering it + -q --quiet Suppress informational messages + --config-path Show config file path + --seed-config Create a basic config + --color Control when to use color [always, auto, never] [default: auto] Examples: From e5d359b9351fde134444411e64ad0f9c339f37cd Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 29 Jan 2021 00:08:23 +0100 Subject: [PATCH 096/368] Language tests: Group into module --- src/main.rs | 76 ++++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/src/main.rs b/src/main.rs index 611a08a..ac874f2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -478,46 +478,50 @@ mod test { assert!(!test_helper(&argv).is_ok()); } - #[test] - fn test_language_missing_lang_env() { - let lang_list = get_languages(Err(std::env::VarError::NotPresent), Ok("de:fr".into())); - assert_eq!(lang_list, vec!["en"]); - let lang_list = get_languages( - Err(std::env::VarError::NotPresent), - Err(std::env::VarError::NotPresent), - ); - assert_eq!(lang_list, vec!["en"]); - } + mod language { + use super::*; - #[test] - fn test_language_missing_language_env() { - let lang_list = get_languages(Ok("de".into()), Err(std::env::VarError::NotPresent)); - assert_eq!(lang_list, vec!["de", "en"]); - } + #[test] + fn missing_lang_env() { + let lang_list = get_languages(Err(std::env::VarError::NotPresent), Ok("de:fr".into())); + assert_eq!(lang_list, vec!["en"]); + let lang_list = get_languages( + Err(std::env::VarError::NotPresent), + Err(std::env::VarError::NotPresent), + ); + assert_eq!(lang_list, vec!["en"]); + } - #[test] - fn test_language_preference_order() { - let lang_list = get_languages(Ok("de".into()), Ok("fr:cn".into())); - assert_eq!(lang_list, vec!["fr", "cn", "de", "en"]); - } + #[test] + fn missing_language_env() { + let lang_list = get_languages(Ok("de".into()), Err(std::env::VarError::NotPresent)); + assert_eq!(lang_list, vec!["de", "en"]); + } - #[test] - fn test_language_country_code_expansion() { - let lang_list = get_languages(Ok("pt_BR".into()), Err(std::env::VarError::NotPresent)); - assert_eq!(lang_list, vec!["pt_BR", "pt", "en"]); - } + #[test] + fn preference_order() { + let lang_list = get_languages(Ok("de".into()), Ok("fr:cn".into())); + assert_eq!(lang_list, vec!["fr", "cn", "de", "en"]); + } - #[test] - fn test_language_ignore_posix_and_c() { - let lang_list = get_languages(Ok("POSIX".into()), Err(std::env::VarError::NotPresent)); - assert_eq!(lang_list, vec!["en"]); - let lang_list = get_languages(Ok("C".into()), Err(std::env::VarError::NotPresent)); - assert_eq!(lang_list, vec!["en"]); - } + #[test] + fn country_code_expansion() { + let lang_list = get_languages(Ok("pt_BR".into()), Err(std::env::VarError::NotPresent)); + assert_eq!(lang_list, vec!["pt_BR", "pt", "en"]); + } - #[test] - fn test_language_no_duplicates() { - let lang_list = get_languages(Ok("de".into()), Ok("fr:de:cn:de".into())); - assert_eq!(lang_list, vec!["fr", "de", "cn", "en"]); + #[test] + fn ignore_posix_and_c() { + let lang_list = get_languages(Ok("POSIX".into()), Err(std::env::VarError::NotPresent)); + assert_eq!(lang_list, vec!["en"]); + let lang_list = get_languages(Ok("C".into()), Err(std::env::VarError::NotPresent)); + assert_eq!(lang_list, vec!["en"]); + } + + #[test] + fn no_duplicates() { + let lang_list = get_languages(Ok("de".into()), Ok("fr:de:cn:de".into())); + assert_eq!(lang_list, vec!["fr", "de", "cn", "en"]); + } } } From 127124eded17711de024db5bc781ddd6f7bf4276 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 29 Jan 2021 01:25:06 +0100 Subject: [PATCH 097/368] Optimize get_languages function - Replace `Result` parameters with `Option` - Replace `HashSet` for deduplication with linear search based approach - Avoid intermediate allocations This reduces the instruction count in release mode by almost 50%. --- src/cache.rs | 2 +- src/dedup.rs | 22 ++++++++++++++++ src/main.rs | 71 +++++++++++++++++++++++++--------------------------- 3 files changed, 57 insertions(+), 38 deletions(-) create mode 100644 src/dedup.rs diff --git a/src/cache.rs b/src/cache.rs index 9023aaf..0faddf4 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -159,7 +159,7 @@ impl Cache { pub fn find_page(&self, name: &str, languages: &[String]) -> Option { let page_filename = format!("{}.md", name); - // Get platform dir + // Get cache dir let cache_dir = match Self::get_cache_dir() { Ok(cache_dir) => cache_dir.join("tldr-master"), Err(e) => { diff --git a/src/dedup.rs b/src/dedup.rs new file mode 100644 index 0000000..b196efa --- /dev/null +++ b/src/dedup.rs @@ -0,0 +1,22 @@ +/// An extension trait to clear duplicates from a collection. +pub(crate) trait Dedup { + fn clear_duplicates(&mut self); +} + +/// Clear duplicates from a collection, keep the first one seen. +/// +/// For small vectors, this will be faster than a `HashSet`. +/// Based on +impl Dedup for Vec { + fn clear_duplicates(&mut self) { + let mut already_seen = Vec::with_capacity(self.len()); + self.retain(|item| { + if already_seen.contains(item) { + false + } else { + already_seen.push(item.clone()); + true + } + }) + } +} diff --git a/src/main.rs b/src/main.rs index ac874f2..ef3e2aa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,11 +17,11 @@ #[cfg(feature = "logging")] extern crate env_logger; -use std::collections::HashSet; use std::env; use std::fs::File; use std::io::BufRead; use std::io::BufReader; +use std::iter; use std::path::{Path, PathBuf}; use std::process; @@ -35,6 +35,7 @@ use serde_derive::Deserialize; mod cache; mod config; +mod dedup; mod error; mod formatter; mod tokenizer; @@ -42,6 +43,7 @@ mod types; use crate::cache::Cache; use crate::config::{get_config_path, make_default_config, Config, MAX_CACHE_AGE}; +use crate::dedup::Dedup; use crate::error::TealdeerError::{CacheError, ConfigError, UpdateError}; use crate::formatter::print_lines; use crate::tokenizer::Tokenizer; @@ -257,44 +259,42 @@ fn get_os() -> OsType { OsType::Other } -fn get_languages( - env_lang: Result, - env_language: Result, -) -> Vec { +fn get_languages(env_lang: Option, env_language: Option) -> Vec { // Language list according to // https://github.com/tldr-pages/tldr/blob/master/CLIENT-SPECIFICATION.md#language - if let Ok(lang) = env_lang { - let language = env_language.unwrap_or_default(); - let mut locales: Vec<&str> = language.split(':').collect(); - locales.push(&lang); - locales.push("en"); + if let Some(lang) = env_lang { + // Create an iterator that contains $LANGUAGES, split by `:`, then followed by $LANG. + let locales = env_language + .as_deref() + .unwrap_or("") + .split(':') + .chain(iter::once(&*lang)); let mut lang_list = Vec::new(); - let mut found_languages = HashSet::new(); - - for locale in &locales { + for locale in locales { + // Language plus country code (e.g. `en_US`) if locale.len() >= 5 && locale.chars().nth(2) == Some('_') { - // Language with country code - let lang = &locale[..5]; - if found_languages.insert(lang) { - lang_list.push(lang); - } + lang_list.push(&locale[..5]); } - if locale.len() >= 2 && *locale != "POSIX" { - // Language code - let lang = &locale[..2]; - if found_languages.insert(lang) { - lang_list.push(lang); - } + // Language code only (e.g. `en`) + if locale.len() >= 2 && locale != "POSIX" { + lang_list.push(&locale[..2]); } } + // Fallback language + lang_list.push("en"); + + // Deduplicate entries + lang_list.clear_duplicates(); + + // Convert Vec<&str> into Vec return lang_list.iter().map(|&s| String::from(s)).collect(); } // Without the LANG environment variable, only English pages should be looked up. - vec!["en".into()] + vec!["en".to_string()] } fn main() { @@ -428,7 +428,7 @@ fn main() { // Language overwritten by console argument vec![lang.clone()] } else { - get_languages(std::env::var("LANG"), std::env::var("LANGUAGE")) + get_languages(std::env::var("LANG").ok(), std::env::var("LANGUAGE").ok()) }; // Search for command in cache @@ -483,44 +483,41 @@ mod test { #[test] fn missing_lang_env() { - let lang_list = get_languages(Err(std::env::VarError::NotPresent), Ok("de:fr".into())); + let lang_list = get_languages(None, Some("de:fr".into())); assert_eq!(lang_list, vec!["en"]); - let lang_list = get_languages( - Err(std::env::VarError::NotPresent), - Err(std::env::VarError::NotPresent), - ); + let lang_list = get_languages(None, None); assert_eq!(lang_list, vec!["en"]); } #[test] fn missing_language_env() { - let lang_list = get_languages(Ok("de".into()), Err(std::env::VarError::NotPresent)); + let lang_list = get_languages(Some("de".into()), None); assert_eq!(lang_list, vec!["de", "en"]); } #[test] fn preference_order() { - let lang_list = get_languages(Ok("de".into()), Ok("fr:cn".into())); + let lang_list = get_languages(Some("de".into()), Some("fr:cn".into())); assert_eq!(lang_list, vec!["fr", "cn", "de", "en"]); } #[test] fn country_code_expansion() { - let lang_list = get_languages(Ok("pt_BR".into()), Err(std::env::VarError::NotPresent)); + let lang_list = get_languages(Some("pt_BR".into()), None); assert_eq!(lang_list, vec!["pt_BR", "pt", "en"]); } #[test] fn ignore_posix_and_c() { - let lang_list = get_languages(Ok("POSIX".into()), Err(std::env::VarError::NotPresent)); + let lang_list = get_languages(Some("POSIX".into()), None); assert_eq!(lang_list, vec!["en"]); - let lang_list = get_languages(Ok("C".into()), Err(std::env::VarError::NotPresent)); + let lang_list = get_languages(Some("C".into()), None); assert_eq!(lang_list, vec!["en"]); } #[test] fn no_duplicates() { - let lang_list = get_languages(Ok("de".into()), Ok("fr:de:cn:de".into())); + let lang_list = get_languages(Some("de".into()), Some("fr:de:cn:de".into())); assert_eq!(lang_list, vec!["fr", "de", "cn", "en"]); } } From 5d8448c442cff4cf8a7445dcfccc1bb8d25cc0db Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 29 Jan 2021 12:16:25 +0100 Subject: [PATCH 098/368] Require Rust 1.40 (was 1.39) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3cf2836..184a33d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - rust: [1.39.0, stable] + rust: [1.40.0, stable] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 From 2e1e0006b25fb51090ce22ffe64d797071c2bbeb Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 29 Jan 2021 14:23:09 +0100 Subject: [PATCH 099/368] Avoid cloning in Dedup::clear_duplicates Co-authored-by: Niklas Mohrin --- src/dedup.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/dedup.rs b/src/dedup.rs index b196efa..b06fe0c 100644 --- a/src/dedup.rs +++ b/src/dedup.rs @@ -1,3 +1,5 @@ +use std::mem; + /// An extension trait to clear duplicates from a collection. pub(crate) trait Dedup { fn clear_duplicates(&mut self); @@ -6,17 +8,13 @@ pub(crate) trait Dedup { /// Clear duplicates from a collection, keep the first one seen. /// /// For small vectors, this will be faster than a `HashSet`. -/// Based on impl Dedup for Vec { fn clear_duplicates(&mut self) { - let mut already_seen = Vec::with_capacity(self.len()); - self.retain(|item| { - if already_seen.contains(item) { - false - } else { - already_seen.push(item.clone()); - true + let orig = mem::replace(self, Vec::with_capacity(self.len())); + for item in orig { + if !self.contains(&item) { + self.push(item); } - }) + } } } From 1d529de26001275643836a1e723dfaf36f614189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Fri, 29 Jan 2021 21:22:52 +0100 Subject: [PATCH 100/368] Consider only standalone command names for styling (#157) --- src/formatter.rs | 15 ++++++++++++++- tests/config.toml | 3 +++ tests/inkscape-default-no-color.expected | 4 ++++ tests/inkscape-default.expected | 4 ++++ tests/inkscape-v1.md | 4 ++++ tests/inkscape-v2.md | 4 ++++ tests/inkscape-with-config.expected | 16 ++++++++++------ tests/lib.rs | 2 +- 8 files changed, 44 insertions(+), 8 deletions(-) diff --git a/src/formatter.rs b/src/formatter.rs index 40ec5bf..e2553c4 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -19,7 +19,20 @@ fn highlight_command<'a>( while let Some(command_start) = example_code[code_part_end_pos..].find(&command) { let code_part = &example_code[code_part_end_pos..code_part_end_pos + command_start]; parts.push(config.style.example_code.paint(code_part)); - parts.push(config.style.command_name.paint(command)); + if code_part_end_pos == 0 { + // Only highlight command names at the start of the line ... + parts.push(config.style.command_name.paint(command)); + } else { + let char_before_command = example_code + .chars() + .nth(code_part_end_pos + command_start - 1); + if char_before_command.filter(|c| c.is_whitespace()).is_some() { + // ... or when preceded by a whitespace character. + parts.push(config.style.command_name.paint(command)); + } else { + parts.push(config.style.example_code.paint(command)); + } + } code_part_end_pos += command_start + command.len(); } diff --git a/tests/config.toml b/tests/config.toml index d700672..04c09cc 100644 --- a/tests/config.toml +++ b/tests/config.toml @@ -3,6 +3,9 @@ foreground = "green" underline = false bold = false +[style.command_name] +bold = true + [style.description] underline = false bold = false diff --git a/tests/inkscape-default-no-color.expected b/tests/inkscape-default-no-color.expected index d0eec4c..f34c1ce 100644 --- a/tests/inkscape-default-no-color.expected +++ b/tests/inkscape-default-no-color.expected @@ -26,3 +26,7 @@ inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit + Some invalid command just to test the correct highlighting of the command name: + + inkscape --use-inkscape=v3.0 file + diff --git a/tests/inkscape-default.expected b/tests/inkscape-default.expected index c7061b3..7350de7 100644 --- a/tests/inkscape-default.expected +++ b/tests/inkscape-default.expected @@ -26,3 +26,7 @@ inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit + Some invalid command just to test the correct highlighting of the command name: + + inkscape --use-inkscape=v3.0 file + diff --git a/tests/inkscape-v1.md b/tests/inkscape-v1.md index 4071196..fa63b2b 100644 --- a/tests/inkscape-v1.md +++ b/tests/inkscape-v1.md @@ -26,3 +26,7 @@ - Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: `inkscape {{filename.svg}} --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit` + +- Some invalid command just to test the correct highlighting of the command name: + +`inkscape --use-inkscape=v3.0 file` diff --git a/tests/inkscape-v2.md b/tests/inkscape-v2.md index 3051867..0a1b530 100644 --- a/tests/inkscape-v2.md +++ b/tests/inkscape-v2.md @@ -27,3 +27,7 @@ Export an SVG document to PDF, converting all texts to paths: Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: inkscape {{filename.svg}} --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit + +Some invalid command just to test the correct highlighting of the command name: + + inkscape --use-inkscape=v3.0 file diff --git a/tests/inkscape-with-config.expected b/tests/inkscape-with-config.expected index 313e140..9ea279f 100644 --- a/tests/inkscape-with-config.expected +++ b/tests/inkscape-with-config.expected @@ -4,25 +4,29 @@ Open an SVG file in the Inkscape GUI: - inkscape filename.svg + inkscape filename.svg Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): - inkscape filename.svg -e filename.png + inkscape filename.svg -e filename.png Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): - inkscape filename.svg -e filename.png -w 600 -h 400 + inkscape filename.svg -e filename.png -w 600 -h 400 Export a single object, given its ID, into a bitmap: - inkscape filename.svg -i id -e object.png + inkscape filename.svg -i id -e object.png Export an SVG document to PDF, converting all texts to paths: - inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path + inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: - inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit + inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit + + Some invalid command just to test the correct highlighting of the command name: + + inkscape --use-inkscape=v3.0 file diff --git a/tests/lib.rs b/tests/lib.rs index 125e749..f45e314 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -308,7 +308,7 @@ fn test_rendering_color_never() { ); } -/// An end-to-end integration test for rendering with constom syntax config. +/// An end-to-end integration test for rendering with custom syntax config. #[test] fn test_correct_rendering_with_config() { let testenv = TestEnv::new(); From 4e1876ac88ad1a17e95d2dd49fec3ba048f59564 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 29 Jan 2021 22:14:37 +0100 Subject: [PATCH 101/368] Fix typo in code comment --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 68ef37e..302846f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -275,7 +275,7 @@ impl Config { /// variable. Otherwise, the user config directory is returned. /// /// Note that this function does not verify whether the directory at that -/// loation exists, or is a directory. +/// location exists, or is a directory. pub fn get_config_dir() -> Result { // Allow overriding the config directory by setting the // $TEALDEER_CONFIG_DIR env variable. From 978debe6ae862a083c7c7ff2d70a6ea5a08547ac Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 30 Jan 2021 21:31:10 +0100 Subject: [PATCH 102/368] Implement new --show-dirs command The command prints out the different directories (config, cache, etc) used by tealdeer. --- bash_tealdeer | 2 +- docs/src/config.md | 2 +- fish_tealdeer | 2 +- src/cache.rs | 2 +- src/main.rs | 42 +++++++++++++++++++++++++++++++++++++++--- src/usage.docopt | 3 ++- tests/lib.rs | 18 +++++++++++++++--- zsh_tealdeer | 2 +- 8 files changed, 61 insertions(+), 12 deletions(-) diff --git a/bash_tealdeer b/bash_tealdeer index 874356e..aadcc05 100644 --- a/bash_tealdeer +++ b/bash_tealdeer @@ -6,7 +6,7 @@ _tealdeer() _init_completion || return case $prev in - -h|--help|-v|--version|-l|--list|-u|--update|-c|--clear-cache|-p|--pager|-m|--markdown|--config-path|--seed-config|-q|--quiet) + -h|--help|-v|--version|-l|--list|-u|--update|-c|--clear-cache|-p|--pager|-m|--markdown|--show-paths|--seed-config|-q|--quiet) return ;; -f|--render) diff --git a/docs/src/config.md b/docs/src/config.md index 38e367b..79afcdf 100644 --- a/docs/src/config.md +++ b/docs/src/config.md @@ -8,7 +8,7 @@ the config file can be done manually or with the help of `tldr`: The configuration file path follows OS conventions. It can be queried with the following command: - $ tldr --config-path + $ tldr --show-paths On Linux, this will usually be `~/.config/tealdeer/config.toml`. diff --git a/fish_tealdeer b/fish_tealdeer index d571739..1aa95c5 100644 --- a/fish_tealdeer +++ b/fish_tealdeer @@ -13,7 +13,7 @@ complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f complete -c tldr -s p -l pager -d 'Use a pager to page output.' -f complete -c tldr -s m -l markdown -d 'Display the raw markdown instead of rendering it.' -f complete -c tldr -s q -l quiet -d 'Suppress informational messages.' -f -complete -c tldr -l config-path -d 'Show config file path.' -f +complete -c tldr -l show-paths -d 'Show file and directory paths used by tealdeer.' -f complete -c tldr -l seed-config -d 'Create a basic config.' -f complete -c tldr -l color -d 'Controls when to use color.' -xa 'always auto never' diff --git a/src/cache.rs b/src/cache.rs index 0faddf4..802c06e 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -33,7 +33,7 @@ impl Cache { } /// Return the path to the cache directory. - fn get_cache_dir() -> Result { + pub fn get_cache_dir() -> Result { // Allow overriding the cache directory by setting the // $TEALDEER_CACHE_DIR env variable. if let Ok(value) = env::var("TEALDEER_CACHE_DIR") { diff --git a/src/main.rs b/src/main.rs index ef3e2aa..94d6506 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,7 +42,7 @@ mod tokenizer; mod types; use crate::cache::Cache; -use crate::config::{get_config_path, make_default_config, Config, MAX_CACHE_AGE}; +use crate::config::{get_config_dir, get_config_path, make_default_config, Config, MAX_CACHE_AGE}; use crate::dedup::Dedup; use crate::error::TealdeerError::{CacheError, ConfigError, UpdateError}; use crate::formatter::print_lines; @@ -73,6 +73,7 @@ struct Args { flag_clear_cache: bool, flag_pager: bool, flag_quiet: bool, + flag_show_paths: bool, flag_config_path: bool, flag_seed_config: bool, flag_markdown: bool, @@ -179,7 +180,7 @@ fn update_cache(cache: &Cache, quietly: bool) { } } -/// Show the config path +/// Show the config path (DEPRECATED) fn show_config_path() { match get_config_path() { Ok(config_file_path) => { @@ -196,6 +197,36 @@ fn show_config_path() { } } +/// Show file paths +fn show_paths() { + let config_dir = get_config_dir() + .map(|mut path| { + path.push(""); // Trailing path separator + path.to_str().unwrap_or("[Invalid]").to_string() + }) + .unwrap_or_else(|e| format!("[Error: {}]", e)); + let config_path = get_config_path() + .map(|path| path.to_str().unwrap_or("[Invalid]").to_string()) + .unwrap_or_else(|e| format!("[Error: {}]", e)); + let cache_dir = Cache::get_cache_dir() + .map(|mut path| { + path.push(""); // Trailing path separator + path.to_str().unwrap_or("[Invalid]").to_string() + }) + .unwrap_or_else(|e| format!("[Error: {}]", e)); + let pages_dir = Cache::get_cache_dir() + .map(|path| path.join("tldr-master")) + .map(|mut path| { + path.push(""); // Trailing path separator + path.to_str().unwrap_or("[Invalid]").to_string() + }) + .unwrap_or_else(|e| format!("[Error: {}]", e)); + println!("Config dir: {}", config_dir); + println!("Config path: {}", config_path); + println!("Cache dir: {}", cache_dir); + println!("Pages dir: {}", pages_dir); +} + /// Create seed config file and exit fn create_config_and_exit() { match make_default_config() { @@ -315,8 +346,12 @@ fn main() { // Show config file and path, pass through if args.flag_config_path { + eprintln!("Warning: The --config-path flag is deprecated, use --show-paths instead"); show_config_path(); } + if args.flag_show_paths { + show_paths(); + } // Create a basic config and exit if args.flag_seed_config { @@ -450,7 +485,8 @@ fn main() { } // Some flags can be run without a command. - if !(args.flag_update || args.flag_clear_cache || args.flag_config_path) { + if !(args.flag_update || args.flag_clear_cache || args.flag_config_path || args.flag_show_paths) + { eprintln!("{}", USAGE); process::exit(1); } diff --git a/src/usage.docopt b/src/usage.docopt index 4a70c86..9ba0968 100644 --- a/src/usage.docopt +++ b/src/usage.docopt @@ -16,7 +16,8 @@ Options: -p --pager Use a pager to page output -m --markdown Display the raw markdown instead of rendering it -q --quiet Suppress informational messages - --config-path Show config file path + --show-paths Show file and directory paths used by tealdeer + --config-path Show config file path (deprecated) --seed-config Create a basic config --color Control when to use color [always, auto, never] [default: auto] diff --git a/tests/lib.rs b/tests/lib.rs index f45e314..d880584 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -202,22 +202,34 @@ fn test_setup_seed_config() { } #[test] -fn test_show_config_path() { +fn test_show_paths() { let testenv = TestEnv::new(); testenv .command() - .args(&["--config-path"]) + .args(&["--show-paths"]) .assert() .success() .stdout(contains(format!( - "Config path is: {}", + "Config dir: {}", + testenv.config_dir.path().to_str().unwrap(), + ))) + .stdout(contains(format!( + "Config path: {}", testenv .config_dir .path() .join("config.toml") .to_str() .unwrap(), + ))) + .stdout(contains(format!( + "Cache dir: {}", + testenv.cache_dir.path().to_str().unwrap(), + ))) + .stdout(contains(format!( + "Pages dir: {}", + testenv.cache_dir.path().join("tldr-master").to_str().unwrap(), ))); } diff --git a/zsh_tealdeer b/zsh_tealdeer index 2c8e284..2f55a38 100644 --- a/zsh_tealdeer +++ b/zsh_tealdeer @@ -23,7 +23,7 @@ _tealdeer() { "($I -p --pager)"{-p,--pager}"[Use a pager to page output]" "($I -m --markdown)"{-m,--markdown}"[Display the raw markdown instead of rendering it]" "($I -q --quiet)"{-q,--quiet}"[Suppress informational messages]" - "($I)--config-path[Show config file path]" + "($I)--show-paths[Show file and directory paths used by tealdeer]" "($I)--seed-config[Create a basic config]" "($I)--color[Controls when to use color]:when:(( always From ca1527938658cd2abbd4b75a58509fc7f9a8541f Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 30 Jan 2021 21:55:28 +0100 Subject: [PATCH 103/368] Show reason for choice of a certain cache/config dir --- src/cache.rs | 19 ++++++++++--------- src/config.rs | 17 +++++++++-------- src/main.rs | 39 ++++++++++++++++++++++++--------------- src/types.rs | 27 ++++++++++++++++++++++++++- tests/lib.rs | 7 ++++++- 5 files changed, 75 insertions(+), 34 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 802c06e..961fd0c 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -13,7 +13,7 @@ use tar::Archive; use walkdir::{DirEntry, WalkDir}; use crate::error::TealdeerError::{self, CacheError, UpdateError}; -use crate::types::OsType; +use crate::types::{OsType, PathSource}; #[derive(Debug)] pub struct Cache { @@ -33,14 +33,14 @@ impl Cache { } /// Return the path to the cache directory. - pub fn get_cache_dir() -> Result { + pub fn get_cache_dir() -> Result<(PathBuf, PathSource), TealdeerError> { // Allow overriding the cache directory by setting the // $TEALDEER_CACHE_DIR env variable. if let Ok(value) = env::var("TEALDEER_CACHE_DIR") { let path = PathBuf::from(value); if path.exists() && path.is_dir() { - return Ok(path); + return Ok((path, PathSource::EnvVar)); } else { return Err(CacheError( "Path specified by $TEALDEER_CACHE_DIR \ @@ -52,7 +52,7 @@ impl Cache { // Otherwise, fall back to user cache directory. match get_app_root(AppDataType::UserCache, &crate::APP_INFO) { - Ok(dirs) => Ok(dirs), + Ok(dirs) => Ok((dirs, PathSource::OsConvention)), Err(_) => Err(CacheError( "Could not determine user cache directory.".into(), )), @@ -94,7 +94,7 @@ impl Cache { let mut archive = Self::decompress(&bytes[..]); // Determine paths - let cache_dir = Self::get_cache_dir()?; + let (cache_dir, _) = Self::get_cache_dir()?; // Make sure that cache directory exists debug!("Ensure cache directory {:?} exists", &cache_dir); @@ -119,7 +119,7 @@ impl Cache { /// Return the duration since the cache directory was last modified. pub fn last_update() -> Option { - if let Ok(cache_dir) = Self::get_cache_dir() { + if let Ok((cache_dir, _)) = Self::get_cache_dir() { if let Ok(metadata) = fs::metadata(cache_dir.join("tldr-master")) { if let Ok(mtime) = metadata.modified() { let now = SystemTime::now(); @@ -161,7 +161,7 @@ impl Cache { // Get cache dir let cache_dir = match Self::get_cache_dir() { - Ok(cache_dir) => cache_dir.join("tldr-master"), + Ok((cache_dir, _)) => cache_dir.join("tldr-master"), Err(e) => { log::error!("Could not get cache directory: {}", e); return None; @@ -194,7 +194,7 @@ impl Cache { /// Return the available pages. pub fn list_pages(&self) -> Result, TealdeerError> { // Determine platforms directory and platform - let cache_dir = Self::get_cache_dir()?; + let (cache_dir, _) = Self::get_cache_dir()?; let platforms_dir = cache_dir.join("tldr-master").join("pages"); let platform_dir = self.get_platform_dir(); @@ -242,8 +242,9 @@ impl Cache { } /// Delete the cache directory. + #[allow(clippy::map_err_ignore)] pub fn clear() -> Result<(), TealdeerError> { - let path = Self::get_cache_dir()?; + let (path, _) = Self::get_cache_dir()?; if path.exists() && path.is_dir() { fs::remove_dir_all(&path).map_err(|_| { CacheError(format!( diff --git a/src/config.rs b/src/config.rs index 302846f..447725b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -10,6 +10,7 @@ use log::debug; use serde_derive::{Deserialize, Serialize}; use crate::error::TealdeerError::{self, ConfigError}; +use crate::types::PathSource; pub const CONFIG_FILE_NAME: &str = "config.toml"; pub const MAX_CACHE_AGE: Duration = Duration::from_secs(2_592_000); // 30 days @@ -234,7 +235,7 @@ impl Config { debug!("Loading config"); // Determine path - let config_file_path = get_config_path() + let (config_file_path, _) = get_config_path() .map_err(|e| ConfigError(format!("Could not determine config path: {}", e)))?; // Load raw config @@ -276,16 +277,16 @@ impl Config { /// /// Note that this function does not verify whether the directory at that /// location exists, or is a directory. -pub fn get_config_dir() -> Result { +pub fn get_config_dir() -> Result<(PathBuf, PathSource), TealdeerError> { // Allow overriding the config directory by setting the // $TEALDEER_CONFIG_DIR env variable. if let Ok(value) = env::var("TEALDEER_CONFIG_DIR") { - return Ok(PathBuf::from(value)); + return Ok((PathBuf::from(value), PathSource::EnvVar)); }; // Otherwise, fall back to the user config directory. match get_app_root(AppDataType::UserConfig, &crate::APP_INFO) { - Ok(dirs) => Ok(dirs), + Ok(dirs) => Ok((dirs, PathSource::OsConvention)), Err(_) => Err(ConfigError( "Could not determine the user config directory.".into(), )), @@ -296,15 +297,15 @@ pub fn get_config_dir() -> Result { /// /// Note that this function does not verify whether the file at that location /// exists, or is a file. -pub fn get_config_path() -> Result { - let config_dir = get_config_dir()?; +pub fn get_config_path() -> Result<(PathBuf, PathSource), TealdeerError> { + let (config_dir, source) = get_config_dir()?; let config_file_path = config_dir.join(CONFIG_FILE_NAME); - Ok(config_file_path) + Ok((config_file_path, source)) } /// Create default config file. pub fn make_default_config() -> Result { - let config_dir = get_config_dir()?; + let (config_dir, _) = get_config_dir()?; // Ensure that config directory exists if !config_dir.exists() { diff --git a/src/main.rs b/src/main.rs index 94d6506..b32acd7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -183,7 +183,7 @@ fn update_cache(cache: &Cache, quietly: bool) { /// Show the config path (DEPRECATED) fn show_config_path() { match get_config_path() { - Ok(config_file_path) => { + Ok((config_file_path, _)) => { println!("Config path is: {}", config_file_path.to_str().unwrap()); } Err(ConfigError(msg)) => { @@ -199,23 +199,32 @@ fn show_config_path() { /// Show file paths fn show_paths() { - let config_dir = get_config_dir() - .map(|mut path| { + let config_dir = get_config_dir().map_or_else( + |e| format!("[Error: {}]", e), + |(mut path, source)| { path.push(""); // Trailing path separator - path.to_str().unwrap_or("[Invalid]").to_string() - }) - .unwrap_or_else(|e| format!("[Error: {}]", e)); - let config_path = get_config_path() - .map(|path| path.to_str().unwrap_or("[Invalid]").to_string()) - .unwrap_or_else(|e| format!("[Error: {}]", e)); - let cache_dir = Cache::get_cache_dir() - .map(|mut path| { + match path.to_str() { + Some(path) => format!("{} ({})", path, source), + None => "[Invalid]".to_string(), + } + }, + ); + let config_path = get_config_path().map_or_else( + |e| format!("[Error: {}]", e), + |(path, _)| path.to_str().unwrap_or("[Invalid]").to_string(), + ); + let cache_dir = Cache::get_cache_dir().map_or_else( + |e| format!("[Error: {}]", e), + |(mut path, source)| { path.push(""); // Trailing path separator - path.to_str().unwrap_or("[Invalid]").to_string() - }) - .unwrap_or_else(|e| format!("[Error: {}]", e)); + match path.to_str() { + Some(path) => format!("{} ({})", path, source), + None => "[Invalid]".to_string(), + } + }, + ); let pages_dir = Cache::get_cache_dir() - .map(|path| path.join("tldr-master")) + .map(|(path, _)| path.join("tldr-master")) .map(|mut path| { path.push(""); // Trailing path separator path.to_str().unwrap_or("[Invalid]").to_string() diff --git a/src/types.rs b/src/types.rs index c0dfb27..c68dba8 100644 --- a/src/types.rs +++ b/src/types.rs @@ -1,4 +1,4 @@ -//! Types used in the client. +//! Shared types used in tealdeer. use std::fmt; @@ -101,6 +101,31 @@ impl LineType { } } +/// The reason why a certain path (e.g. config path or cache dir) was chosen. +#[derive(Debug, PartialEq)] +pub enum PathSource { + /// OS convention (e.g. XDG on Linux) + OsConvention, + /// Env variable (TEALDEER_*) + EnvVar, + /// Config file variable + ConfigVar, +} + +impl fmt::Display for PathSource { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!( + f, + "{}", + match self { + Self::OsConvention => "OS convention", + Self::EnvVar => "env variable", + Self::ConfigVar => "config file variable", + } + ) + } +} + #[cfg(test)] mod test { use super::LineType; diff --git a/tests/lib.rs b/tests/lib.rs index d880584..7f7ad4c 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -229,7 +229,12 @@ fn test_show_paths() { ))) .stdout(contains(format!( "Pages dir: {}", - testenv.cache_dir.path().join("tldr-master").to_str().unwrap(), + testenv + .cache_dir + .path() + .join("tldr-master") + .to_str() + .unwrap(), ))); } From cb57ac1d5d1df1b2fe77bcd884ff3d2255085eaa Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 5 Feb 2021 00:01:33 +0100 Subject: [PATCH 104/368] Require Rust 1.41 (was 1.40) This is required for Result::map_or_else. Additionally, run clippy with 1.41 as well. Otherwise it reports suggestions that are not compatible with 1.41. --- .github/workflows/ci.yml | 4 ++-- src/cache.rs | 1 - src/main.rs | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 184a33d..f1438a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - rust: [1.40.0, stable] + rust: [1.41.1, stable] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.46.0 + toolchain: 1.41.1 components: clippy override: true - uses: actions-rs/clippy-check@v1 diff --git a/src/cache.rs b/src/cache.rs index 961fd0c..409e228 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -242,7 +242,6 @@ impl Cache { } /// Delete the cache directory. - #[allow(clippy::map_err_ignore)] pub fn clear() -> Result<(), TealdeerError> { let (path, _) = Self::get_cache_dir()?; if path.exists() && path.is_dir() { diff --git a/src/main.rs b/src/main.rs index b32acd7..4b43090 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,7 +61,6 @@ const ARCHIVE_URL: &str = "https://github.com/tldr-pages/tldr/archive/master.tar const PAGER_COMMAND: &str = "less -R"; #[derive(Debug, Deserialize)] -#[allow(clippy::struct_excessive_bools)] struct Args { arg_command: Option>, flag_help: bool, From 2a6d09554b8be7fb70683c72cc7f85f925479bc9 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin <47574893+niklasmohrin@users.noreply.github.com> Date: Tue, 16 Feb 2021 18:13:38 +0100 Subject: [PATCH 105/368] Update tar-markdown.expected (#164) --- tests/tar-markdown.expected | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tar-markdown.expected b/tests/tar-markdown.expected index 913077f..8a973b3 100644 --- a/tests/tar-markdown.expected +++ b/tests/tar-markdown.expected @@ -1,7 +1,7 @@ # tar > Archiving utility. -> Often combined with a compression method, such as gzip or bzip. +> Often combined with a compression method, such as gzip or bzip2. > More information: . - [c]reate an archive from [f]iles: From 071680800a875357aa2f798eac0b080d7188345c Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Sun, 21 Mar 2021 07:55:23 -0700 Subject: [PATCH 106/368] zsh-completion: fix issue with [.md, add basic -L completion, remove extra _files args (#168) - Use array `commands=(...)` and `_describe` to deal with '[.md' & empty cache scenario. Fixes #166 - Hide `tldr --list` stderr (`2>/dev/null`) which breaks completion with empty cache - Remove `sed` since #112 changed commas to newlines - Add new `sed`-equivalent replacement (`:` -> `\:`) using native [ZSH `${name//pattern/repl}`](http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion) since colon is special character in ZSH completions - Add basic support for `-L, --language` flag from #125. In future, can consider adding extra completions maybe based on caches `pages.{lang}` folders. - Remove extraneous completion of file names for positional arguments (i.e. `'*:file:_files'`) --- zsh_tealdeer | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zsh_tealdeer b/zsh_tealdeer index 2f55a38..96e40f0 100644 --- a/zsh_tealdeer +++ b/zsh_tealdeer @@ -1,7 +1,9 @@ #compdef tldr _applications() { - _values 'applications' "${(uonzf)$(tldr --list | sed -e 's/, /\n/g')}" + local -a commands + commands=(${(uonzf)"$(tldr --list 2>/dev/null)"//:/\\:}) + _describe -t commands 'command' commands } _tealdeer() { @@ -18,6 +20,7 @@ _tealdeer() { sunos windows ))' + "($I -L --language)"{-L,--language}"[Override the language settings]:lang" "($I -u --update)"{-u,--update}"[Update the local cache]" "($I -c --clear-cache)"{-c,--clear-cache}"[Clear the local cache]" "($I -p --pager)"{-p,--pager}"[Use a pager to page output]" @@ -31,8 +34,7 @@ _tealdeer() { never ))" '(- *)'{-h,--help}'[Display help]' - '(- *)'{-v,--version}'[Show version information]' - '*:file:_files' + '(- *)'{-v,--version}'[Show version information]' '1: :_applications' ) From 49f151a6054d915b5d25887166cb58077581986d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sat, 10 Apr 2021 21:33:48 +0200 Subject: [PATCH 107/368] Remove 'extern crate' declarations (#175) Cargo.toml specifies Rust Edition 2018 which does not require 'extern crate' anymore. --- src/main.rs | 3 --- tests/lib.rs | 6 ------ 2 files changed, 9 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4b43090..1906410 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,9 +14,6 @@ #![allow(clippy::module_name_repetitions)] #![allow(clippy::too_many_lines)] -#[cfg(feature = "logging")] -extern crate env_logger; - use std::env; use std::fs::File; use std::io::BufRead; diff --git a/tests/lib.rs b/tests/lib.rs index 7f7ad4c..fc5790a 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -1,11 +1,5 @@ //! Integration tests. -extern crate assert_cmd; -extern crate escargot; -extern crate filetime; -extern crate predicates; -extern crate tempfile; - use std::fs::{create_dir_all, File}; use std::io::Write; use std::process::Command; From 7232bdd898eb42073d6b213e90b46eb1d7ad77d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Wed, 14 Apr 2021 20:55:27 +0200 Subject: [PATCH 108/368] Allow SunOS override (#176) Fixes #82. --- src/cache.rs | 3 +-- tests/lib.rs | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 409e228..a42efd9 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -131,12 +131,11 @@ impl Cache { } /// Return the platform directory. - #[allow(clippy::match_same_arms)] fn get_platform_dir(&self) -> Option<&'static str> { match self.os { OsType::Linux => Some("linux"), OsType::OsX => Some("osx"), - OsType::SunOs => None, // TODO: Does Rust support SunOS? + OsType::SunOs => Some("sunos"), OsType::Windows => Some("windows"), OsType::Other => None, } diff --git a/tests/lib.rs b/tests/lib.rs index fc5790a..1af432b 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -29,14 +29,19 @@ impl TestEnv { } } - /// Add entry for that environment. + /// Add entry for that environment to the "common" pages. fn add_entry(&self, name: &str, contents: &str) { + self.add_os_entry("common", name, contents); + } + + /// Add entry for that environment to an OS-specific subfolder. + fn add_os_entry(&self, os: &str, name: &str, contents: &str) { let dir = self .cache_dir .path() .join("tldr-master") .join("pages") - .join("common"); + .join(os); create_dir_all(&dir).unwrap(); let mut file = File::create(&dir.join(format!("{}.md", name))).unwrap(); @@ -232,6 +237,19 @@ fn test_show_paths() { ))); } +#[test] +fn test_os_specific_page() { + let testenv = TestEnv::new(); + + testenv.add_os_entry("sunos", "truss", "contents"); + + testenv + .command() + .args(&["--os", "sunos", "truss"]) + .assert() + .success(); +} + #[test] fn test_markdown_rendering() { let testenv = TestEnv::new(); From 07c715656f69d9bfd2519492685bd6f043e9b8c7 Mon Sep 17 00:00:00 2001 From: Dalton Date: Sun, 18 Apr 2021 12:22:41 -0500 Subject: [PATCH 109/368] Support custom pages and patches (#142) Allow adding, overriding and extending custom pages. Fixes #98. --- src/cache.rs | 65 +++++++++++++++++++++++++++++++++++++++++++++------ src/config.rs | 29 ++++++++++++++++++++++- src/main.rs | 49 ++++++++++++++++++++++---------------- 3 files changed, 115 insertions(+), 28 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index a42efd9..fa0d02c 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -2,6 +2,7 @@ use std::env; use std::ffi::OsStr; use std::fs; use std::io::Read; +use std::iter; use std::path::{Path, PathBuf}; use app_dirs::{get_app_root, AppDataType}; @@ -21,6 +22,30 @@ pub struct Cache { os: OsType, } +#[derive(Debug)] +pub struct PageLookupResult { + page_path: PathBuf, + patch_path: Option, +} + +impl PageLookupResult { + pub fn with_page(page_path: PathBuf) -> Self { + Self { + page_path, + patch_path: None, + } + } + + pub fn with_optional_patch(mut self, patch_path: Option) -> Self { + self.patch_path = patch_path; + self + } + + pub fn paths(&self) -> impl Iterator { + iter::once(self.page_path.as_path()).chain(self.patch_path.as_deref().into_iter()) + } +} + impl Cache { pub fn new(url: S, os: OsType) -> Self where @@ -143,20 +168,34 @@ impl Cache { /// Check for pages for a given platform in one of the given languages. fn find_page_for_platform( - name: &str, + page_name: &str, cache_dir: &Path, platform: &str, language_dirs: &[String], ) -> Option { language_dirs .iter() - .map(|lang_dir| cache_dir.join(lang_dir).join(platform).join(name)) + .map(|lang_dir| cache_dir.join(lang_dir).join(platform).join(page_name)) .find(|path| path.exists() && path.is_file()) } + /// Look up custom patch (.patch). If it exists, store it in a variable. + fn find_patch(patch_name: &str, custom_pages_dir: Option<&Path>) -> Option { + custom_pages_dir + .map(|custom_dir| custom_dir.join(patch_name)) + .filter(|path| path.exists() && path.is_file()) + } + /// Search for a page and return the path to it. - pub fn find_page(&self, name: &str, languages: &[String]) -> Option { + pub fn find_page( + &self, + name: &str, + languages: &[String], + custom_pages_dir: Option<&Path>, + ) -> Option { let page_filename = format!("{}.md", name); + let patch_filename = format!("{}.patch", name); + let custom_filename = format!("{}.page", name); // Get cache dir let cache_dir = match Self::get_cache_dir() { @@ -178,16 +217,28 @@ impl Cache { }) .collect(); - // Try to find a platform specific path first. + // Look up custom page (.page). If it exists, return it directly + if let Some(config_dir) = custom_pages_dir { + let custom_page = config_dir.join(custom_filename); + if custom_page.exists() && custom_page.is_file() { + return Some(PageLookupResult::with_page(custom_page)); + } + } + + let maybe_patch = Self::find_patch(&patch_filename, custom_pages_dir.as_deref()); + + // Try to find a platform specific path next, append custom patch to it. if let Some(pf) = self.get_platform_dir() { - let pf_path = Self::find_page_for_platform(&page_filename, &cache_dir, pf, &lang_dirs); - if pf_path.is_some() { - return pf_path; + if let Some(page) = + Self::find_page_for_platform(&page_filename, &cache_dir, pf, &lang_dirs) + { + return Some(PageLookupResult::with_page(page).with_optional_patch(maybe_patch)); } } // Did not find platform specific results, fall back to "common" Self::find_page_for_platform(&page_filename, &cache_dir, "common", &lang_dirs) + .map(|page| PageLookupResult::with_page(page).with_optional_patch(maybe_patch)) } /// Return the available pages. diff --git a/src/config.rs b/src/config.rs index 447725b..b971017 100644 --- a/src/config.rs +++ b/src/config.rs @@ -148,6 +148,22 @@ impl Default for RawUpdatesConfig { } } +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] +struct RawDirectoriesConfig { + #[serde(default)] + pub custom_pages_dir: Option, +} + +impl Default for RawDirectoriesConfig { + fn default() -> Self { + Self { + custom_pages_dir: get_app_root(AppDataType::UserData, &crate::APP_INFO) + .map(|path| path.join("pages")) + .ok(), + } + } +} + #[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] struct RawConfig { #[serde(default)] @@ -156,6 +172,8 @@ struct RawConfig { display: RawDisplayConfig, #[serde(default)] updates: RawUpdatesConfig, + #[serde(default)] + directories: RawDirectoriesConfig, } impl RawConfig { @@ -194,11 +212,17 @@ pub struct UpdatesConfig { pub auto_update_interval: Duration, } -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq)] +pub struct DirectoriesConfig { + pub custom_pages_dir: Option, +} + +#[derive(Clone, Debug, PartialEq)] pub struct Config { pub style: StyleConfig, pub display: DisplayConfig, pub updates: UpdatesConfig, + pub directories: DirectoriesConfig, } impl From for Config { @@ -221,6 +245,9 @@ impl From for Config { raw_config.updates.auto_update_interval_hours * 3600, ), }, + directories: DirectoriesConfig { + custom_pages_dir: raw_config.directories.custom_pages_dir, + }, } } } diff --git a/src/main.rs b/src/main.rs index 1906410..f83abcb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,7 +19,7 @@ use std::fs::File; use std::io::BufRead; use std::io::BufReader; use std::iter; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; use std::process; use ansi_term::{Color, Style}; @@ -38,7 +38,7 @@ mod formatter; mod tokenizer; mod types; -use crate::cache::Cache; +use crate::cache::{Cache, PageLookupResult}; use crate::config::{get_config_dir, get_config_path, make_default_config, Config, MAX_CACHE_AGE}; use crate::dedup::Dedup; use crate::error::TealdeerError::{CacheError, ConfigError, UpdateError}; @@ -78,21 +78,27 @@ struct Args { } /// Print page by path -fn print_page(path: &Path, enable_markdown: bool, config: &Config) -> Result<(), String> { +fn print_page( + page: &PageLookupResult, + enable_markdown: bool, + config: &Config, +) -> Result<(), String> { // Open file - let file = File::open(path).map_err(|msg| format!("Could not open file: {}", msg))?; - let reader = BufReader::new(file); + for path in page.paths() { + let file = File::open(path).map_err(|msg| format!("Could not open file: {}", msg))?; + let reader = BufReader::new(file); - if enable_markdown { - // Print the raw markdown of the file. - for line in reader.lines() { - println!("{}", line.unwrap()); - } - } else { - // Create tokenizer and print output - let mut tokenizer = Tokenizer::new(reader); - print_lines(&mut tokenizer, &config); - }; + if enable_markdown { + // Print the raw markdown of the file. + for line in reader.lines() { + println!("{}", line.unwrap()); + } + } else { + // Create tokenizer and print output + let mut tokenizer = Tokenizer::new(reader); + print_lines(&mut tokenizer, &config); + }; + } Ok(()) } @@ -424,7 +430,7 @@ fn main() { // Render local file and exit if let Some(ref file) = args.flag_render { - let path = PathBuf::from(file); + let path = PageLookupResult::with_page(PathBuf::from(file)); if let Err(msg) = print_page(&path, args.flag_markdown, &config) { eprintln!("{}", msg); process::exit(1); @@ -472,13 +478,16 @@ fn main() { }; // Search for command in cache - if let Some(path) = cache.find_page(&command, &languages) { - if let Err(msg) = print_page(&path, args.flag_markdown, &config) { + if let Some(page) = cache.find_page( + &command, + &languages, + config.directories.custom_pages_dir.as_deref(), + ) { + if let Err(msg) = print_page(&page, args.flag_markdown, &config) { eprintln!("{}", msg); process::exit(1); - } else { - process::exit(0); } + process::exit(0); } else { if !args.flag_quiet { println!("Page {} not found in cache", &command); From 2a304b17f284f535a9e813c163fcc5eb84a2fc8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sun, 18 Apr 2021 19:27:25 +0200 Subject: [PATCH 110/368] Fix clippy warnings (#173) --- src/cache.rs | 11 +++--- src/config.rs | 4 +-- src/main.rs | 97 ++++++++++++++++++++++++++------------------------- 3 files changed, 56 insertions(+), 56 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index fa0d02c..6fd2d82 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -66,13 +66,12 @@ impl Cache { if path.exists() && path.is_dir() { return Ok((path, PathSource::EnvVar)); - } else { - return Err(CacheError( - "Path specified by $TEALDEER_CACHE_DIR \ - does not exist or is not a directory." - .into(), - )); } + return Err(CacheError( + "Path specified by $TEALDEER_CACHE_DIR \ + does not exist or is not a directory." + .into(), + )); }; // Otherwise, fall back to user cache directory. diff --git a/src/config.rs b/src/config.rs index b971017..6781bda 100644 --- a/src/config.rs +++ b/src/config.rs @@ -36,7 +36,7 @@ pub enum RawColor { Cyan, White, Ansi(u8), - RGB { r: u8, g: u8, b: u8 }, + Rgb { r: u8, g: u8, b: u8 }, } impl From for Color { @@ -51,7 +51,7 @@ impl From for Color { RawColor::Cyan => Self::Cyan, RawColor::White => Self::White, RawColor::Ansi(num) => Self::Fixed(num), - RawColor::RGB { r, g, b } => Self::RGB(r, g, b), + RawColor::Rgb { r, g, b } => Self::RGB(r, g, b), } } } diff --git a/src/main.rs b/src/main.rs index f83abcb..2a92f7a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -225,13 +225,16 @@ fn show_paths() { } }, ); - let pages_dir = Cache::get_cache_dir() - .map(|(path, _)| path.join("tldr-master")) - .map(|mut path| { + let pages_dir = Cache::get_cache_dir().map_or_else( + |e| format!("[Error: {}]", e), + |(mut path, _)| { + path.push("tldr-master"); path.push(""); // Trailing path separator - path.to_str().unwrap_or("[Invalid]").to_string() - }) - .unwrap_or_else(|e| format!("[Error: {}]", e)); + path.into_os_string() + .into_string() + .unwrap_or_else(|_| String::from("[Invalid]")) + }, + ); println!("Config dir: {}", config_dir); println!("Config path: {}", config_path); println!("Cache dir: {}", cache_dir); @@ -301,42 +304,43 @@ fn get_os() -> OsType { OsType::Other } -fn get_languages(env_lang: Option, env_language: Option) -> Vec { +fn get_languages(env_lang: Option<&str>, env_language: Option<&str>) -> Vec { // Language list according to // https://github.com/tldr-pages/tldr/blob/master/CLIENT-SPECIFICATION.md#language - if let Some(lang) = env_lang { - // Create an iterator that contains $LANGUAGES, split by `:`, then followed by $LANG. - let locales = env_language - .as_deref() - .unwrap_or("") - .split(':') - .chain(iter::once(&*lang)); + if env_lang.is_none() { + return vec!["en".to_string()]; + } + let env_lang = env_lang.unwrap(); - let mut lang_list = Vec::new(); - for locale in locales { - // Language plus country code (e.g. `en_US`) - if locale.len() >= 5 && locale.chars().nth(2) == Some('_') { - lang_list.push(&locale[..5]); - } - // Language code only (e.g. `en`) - if locale.len() >= 2 && locale != "POSIX" { - lang_list.push(&locale[..2]); - } + // Create an iterator that contains $LANGUAGE (':' separated list) followed by $LANG (single language) + let locales = env_language + .unwrap_or("") + .split(':') + .chain(iter::once(env_lang)); + + let mut lang_list = Vec::new(); + for locale in locales { + // Language plus country code (e.g. `en_US`) + if locale.len() >= 5 && locale.chars().nth(2) == Some('_') { + lang_list.push(&locale[..5]); + } + // Language code only (e.g. `en`) + if locale.len() >= 2 && locale != "POSIX" { + lang_list.push(&locale[..2]); } - - // Fallback language - lang_list.push("en"); - - // Deduplicate entries - lang_list.clear_duplicates(); - - // Convert Vec<&str> into Vec - return lang_list.iter().map(|&s| String::from(s)).collect(); } - // Without the LANG environment variable, only English pages should be looked up. - vec!["en".to_string()] + lang_list.push("en"); + lang_list.clear_duplicates(); + lang_list.into_iter().map(str::to_string).collect() +} + +fn get_languages_from_env() -> Vec { + get_languages( + std::env::var("LANG").ok().as_deref(), + std::env::var("LANGUAGE").ok().as_deref(), + ) } fn main() { @@ -470,12 +474,9 @@ fn main() { check_cache(&args, enable_styles); } - let languages = if let Some(ref lang) = args.flag_language { - // Language overwritten by console argument - vec![lang.clone()] - } else { - get_languages(std::env::var("LANG").ok(), std::env::var("LANGUAGE").ok()) - }; + let languages = args + .flag_language + .map_or_else(get_languages_from_env, |flag_lang| vec![flag_lang]); // Search for command in cache if let Some(page) = cache.find_page( @@ -533,7 +534,7 @@ mod test { #[test] fn missing_lang_env() { - let lang_list = get_languages(None, Some("de:fr".into())); + let lang_list = get_languages(None, Some("de:fr")); assert_eq!(lang_list, vec!["en"]); let lang_list = get_languages(None, None); assert_eq!(lang_list, vec!["en"]); @@ -541,33 +542,33 @@ mod test { #[test] fn missing_language_env() { - let lang_list = get_languages(Some("de".into()), None); + let lang_list = get_languages(Some("de"), None); assert_eq!(lang_list, vec!["de", "en"]); } #[test] fn preference_order() { - let lang_list = get_languages(Some("de".into()), Some("fr:cn".into())); + let lang_list = get_languages(Some("de"), Some("fr:cn")); assert_eq!(lang_list, vec!["fr", "cn", "de", "en"]); } #[test] fn country_code_expansion() { - let lang_list = get_languages(Some("pt_BR".into()), None); + let lang_list = get_languages(Some("pt_BR"), None); assert_eq!(lang_list, vec!["pt_BR", "pt", "en"]); } #[test] fn ignore_posix_and_c() { - let lang_list = get_languages(Some("POSIX".into()), None); + let lang_list = get_languages(Some("POSIX"), None); assert_eq!(lang_list, vec!["en"]); - let lang_list = get_languages(Some("C".into()), None); + let lang_list = get_languages(Some("C"), None); assert_eq!(lang_list, vec!["en"]); } #[test] fn no_duplicates() { - let lang_list = get_languages(Some("de".into()), Some("fr:de:cn:de".into())); + let lang_list = get_languages(Some("de"), Some("fr:de:cn:de")); assert_eq!(lang_list, vec!["fr", "de", "cn", "en"]); } } From 42816d3d09aa59f15dbc2efe6719652c452bbedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AE=E3=83=A3=E3=83=A9?= Date: Mon, 19 Apr 2021 22:09:07 +0900 Subject: [PATCH 111/368] Fix order of derive helper attributes (#179) --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 6781bda..5ac7c42 100644 --- a/src/config.rs +++ b/src/config.rs @@ -24,8 +24,8 @@ fn default_bold() -> bool { false } -#[serde(rename_all = "lowercase")] #[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] +#[serde(rename_all = "lowercase")] pub enum RawColor { Black, Red, From 0fce79f8edc3841c17fea2c630cea4d7c0a4f4c8 Mon Sep 17 00:00:00 2001 From: Dalton Date: Fri, 23 Apr 2021 13:06:44 -0500 Subject: [PATCH 112/368] Add unit tests for custom pages / patches (#183) --- src/cache.rs | 30 +++++- tests/inkscape-patched-no-color.expected | 36 +++++++ tests/inkscape-v2.patch | 5 + tests/lib.rs | 114 +++++++++++++++++++++++ 4 files changed, 182 insertions(+), 3 deletions(-) create mode 100644 tests/inkscape-patched-no-color.expected create mode 100644 tests/inkscape-v2.patch diff --git a/src/cache.rs b/src/cache.rs index 6fd2d82..f69a76d 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -224,20 +224,20 @@ impl Cache { } } - let maybe_patch = Self::find_patch(&patch_filename, custom_pages_dir.as_deref()); + let patch_path = Self::find_patch(&patch_filename, custom_pages_dir.as_deref()); // Try to find a platform specific path next, append custom patch to it. if let Some(pf) = self.get_platform_dir() { if let Some(page) = Self::find_page_for_platform(&page_filename, &cache_dir, pf, &lang_dirs) { - return Some(PageLookupResult::with_page(page).with_optional_patch(maybe_patch)); + return Some(PageLookupResult::with_page(page).with_optional_patch(patch_path)); } } // Did not find platform specific results, fall back to "common" Self::find_page_for_platform(&page_filename, &cache_dir, "common", &lang_dirs) - .map(|page| PageLookupResult::with_page(page).with_optional_patch(maybe_patch)) + .map(|page| PageLookupResult::with_page(page).with_optional_patch(patch_path)) } /// Return the available pages. @@ -314,3 +314,27 @@ impl Cache { Ok(()) } } + +/// Unit Tests for cache module +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_page_lookup_result_iter_with_patch() { + let lookup = PageLookupResult::with_page(PathBuf::from("test.page")) + .with_optional_patch(Some(PathBuf::from("test.patch"))); + let mut iter = lookup.paths(); + assert_eq!(iter.next(), Some(Path::new("test.page"))); + assert_eq!(iter.next(), Some(Path::new("test.patch"))); + assert_eq!(iter.next(), None); + } + + #[test] + fn test_page_lookup_result_iter_no_patch() { + let lookup = PageLookupResult::with_page(PathBuf::from("test.page")); + let mut iter = lookup.paths(); + assert_eq!(iter.next(), Some(Path::new("test.page"))); + assert_eq!(iter.next(), None); + } +} diff --git a/tests/inkscape-patched-no-color.expected b/tests/inkscape-patched-no-color.expected new file mode 100644 index 0000000..de1db15 --- /dev/null +++ b/tests/inkscape-patched-no-color.expected @@ -0,0 +1,36 @@ + + An SVG (Scalable Vector Graphics) editing program. + Use -z to not open the GUI and only process files in the console. + + Open an SVG file in the Inkscape GUI: + + inkscape filename.svg + + Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): + + inkscape filename.svg -e filename.png + + Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): + + inkscape filename.svg -e filename.png -w 600 -h 400 + + Export a single object, given its ID, into a bitmap: + + inkscape filename.svg -i id -e object.png + + Export an SVG document to PDF, converting all texts to paths: + + inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path + + Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: + + inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit + + Some invalid command just to test the correct highlighting of the command name: + + inkscape --use-inkscape=v3.0 file + + Custom inkscape entry + + My Inkscape example + diff --git a/tests/inkscape-v2.patch b/tests/inkscape-v2.patch new file mode 100644 index 0000000..ffca34c --- /dev/null +++ b/tests/inkscape-v2.patch @@ -0,0 +1,5 @@ +This header shouldn't be required +================================= +Custom inkscape entry + + My Inkscape example diff --git a/tests/lib.rs b/tests/lib.rs index 1af432b..b80b84f 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -12,6 +12,7 @@ use tempfile::{Builder, TempDir}; struct TestEnv { pub cache_dir: TempDir, + pub custom_pages_dir: TempDir, pub config_dir: TempDir, pub input_dir: TempDir, pub default_features: bool, @@ -23,12 +24,25 @@ impl TestEnv { TestEnv { cache_dir: Builder::new().prefix(".tldr.test.cache").tempdir().unwrap(), config_dir: Builder::new().prefix(".tldr.test.conf").tempdir().unwrap(), + custom_pages_dir: Builder::new() + .prefix(".tldr.test.custom-pages") + .tempdir() + .unwrap(), input_dir: Builder::new().prefix(".tldr.test.input").tempdir().unwrap(), default_features: true, features: vec![], } } + /// Write `content` to "config.toml" in the `config_dir` directory + fn write_config(&self, content: impl AsRef) { + let config_file_name = self.config_dir.path().join("config.toml"); + println!("Config path: {:?}", &config_file_name); + + let mut config_file = File::create(&config_file_name).unwrap(); + config_file.write(content.as_ref().as_bytes()).unwrap(); + } + /// Add entry for that environment to the "common" pages. fn add_entry(&self, name: &str, contents: &str) { self.add_os_entry("common", name, contents); @@ -48,6 +62,22 @@ impl TestEnv { file.write_all(&contents.as_bytes()).unwrap(); } + /// Add custom patch entry to the custom_pages_dir + fn add_page_entry(&self, name: &str, contents: &str) { + let dir = self.custom_pages_dir.path(); + create_dir_all(&dir).unwrap(); + let mut file = File::create(&dir.join(format!("{}.page", name))).unwrap(); + file.write_all(&contents.as_bytes()).unwrap(); + } + + /// Add custom patch entry to the custom_pages_dir + fn add_patch_entry(&self, name: &str, contents: &str) { + let dir = self.custom_pages_dir.path(); + create_dir_all(&dir).unwrap(); + let mut file = File::create(&dir.join(format!("{}.patch", name))).unwrap(); + file.write_all(&contents.as_bytes()).unwrap(); + } + /// Disable default features. #[allow(dead_code)] // Might be useful in the future fn no_default_features(mut self) -> Self { @@ -495,6 +525,90 @@ fn test_autoupdate_cache() { check_cache_updated(false); } +/// End-end test to ensure .page files overwrite pages in cache_dir +#[test] +fn test_custom_page_overwrites() { + let testenv = TestEnv::new(); + + // set custom pages directory + testenv.write_config(format!( + "[directories]\ncustom_pages_dir = '{}'", + testenv.custom_pages_dir.path().to_str().unwrap() + )); + + // Add file that should be ignored to the cache dir + testenv.add_entry("inkscape-v2", ""); + // Add .page file to custome_pages_dir + testenv.add_page_entry("inkscape-v2", include_str!("inkscape-v2.md")); + + // Load expected output + let expected = include_str!("inkscape-default-no-color.expected"); + + testenv + .command() + .args(&["inkscape-v2", "--color", "never"]) + .assert() + .success() + .stdout(similar(expected)); +} + +/// End-End test to ensure that .patch files are appened to pages in the cache_dir +#[test] +fn test_custom_patch_appends_to_common() { + let testenv = TestEnv::new(); + + // set custom pages directory + testenv.write_config(format!( + "[directories]\ncustom_pages_dir = '{}'", + testenv.custom_pages_dir.path().to_str().unwrap() + )); + + // Add page to the cache dir + testenv.add_entry("inkscape-v2", include_str!("inkscape-v2.md")); + // Add .page file to custome_pages_dir + testenv.add_patch_entry("inkscape-v2", include_str!("inkscape-v2.patch")); + + // Load expected output + let expected = include_str!("inkscape-patched-no-color.expected"); + + testenv + .command() + .args(&["inkscape-v2", "--color", "never"]) + .assert() + .success() + .stdout(similar(expected)); +} + +/// End-End test to ensure that .patch files are not appended to .page files in the custom_pages_dir +/// Maybe this interaction should change but I put this test here for the coverage +#[test] +fn test_custom_patch_does_not_append_to_custom() { + let testenv = TestEnv::new(); + + // set custom pages directory + testenv.write_config(format!( + "[directories]\ncustom_pages_dir = '{}'", + testenv.custom_pages_dir.path().to_str().unwrap() + )); + + testenv.add_entry("test", ""); + + // Add page to the cache dir + testenv.add_page_entry("inkscape-v2", include_str!("inkscape-v2.md")); + // Add .page file to custome_pages_dir + testenv.add_patch_entry("inkscape-v2", include_str!("inkscape-v2.patch")); + + // Load expected output + let expected = include_str!("inkscape-default-no-color.expected"); + + testenv + .command() + .args(&["inkscape-v2", "--color", "never"]) + .assert() + .success() + .stdout(similar(expected)); +} + #[test] #[cfg(target_os = "windows")] fn test_pager_warning() { From a92e974ac26312354a2f85272eb4c32476c319f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sun, 9 May 2021 18:05:50 +0200 Subject: [PATCH 113/368] Update expected output for 'tar' tldr page (#186) --- tests/tar-markdown.expected | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/tar-markdown.expected b/tests/tar-markdown.expected index 8a973b3..ec9c7a7 100644 --- a/tests/tar-markdown.expected +++ b/tests/tar-markdown.expected @@ -4,11 +4,11 @@ > Often combined with a compression method, such as gzip or bzip2. > More information: . -- [c]reate an archive from [f]iles: +- [c]reate an archive and write it to a [f]ile: `tar cf {{target.tar}} {{file1}} {{file2}} {{file3}}` -- [c]reate a g[z]ipped archive from [f]iles: +- [c]reate a g[z]ipped archive and write it to a [f]ile: `tar czf {{target.tar.gz}} {{file1}} {{file2}} {{file3}}` @@ -16,15 +16,15 @@ `tar czf {{target.tar.gz}} --directory={{path/to/directory}} .` -- E[x]tract a (compressed) archive [f]ile into the current directory: +- E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely: -`tar xf {{source.tar[.gz|.bz2|.xz]}}` +`tar xvf {{source.tar[.gz|.bz2|.xz]}}` - E[x]tract a (compressed) archive [f]ile into the target directory: `tar xf {{source.tar[.gz|.bz2|.xz]}} --directory={{directory}}` -- [c]reate a compressed archive from [f]iles, using [a]rchive suffix to determine the compression program: +- [c]reate a compressed archive and write it to a [f]ile, using [a]rchive suffix to determine the compression program: `tar caf {{target.tar.xz}} {{file1}} {{file2}} {{file3}}` @@ -32,6 +32,6 @@ `tar tvf {{source.tar}}` -- E[x]tract [f]iles matching a pattern: +- E[x]tract files matching a pattern from an archive [f]ile: `tar xf {{source.tar}} --wildcards "{{*.html}}"` From 388deac0794dcbaa0ceddc69d95e2208a6316466 Mon Sep 17 00:00:00 2001 From: Dalton Date: Mon, 10 May 2021 02:17:13 -0500 Subject: [PATCH 114/368] Send all progress logging messages to stderr (#171) - Change logging messages to go to stderr - Updated tests to expect these messages in stderr instead of stdout - Changed test_markdown_rendering to no longer rely on the tldr pages repo --- src/main.rs | 12 ++++++------ tests/lib.rs | 21 ++++++++------------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2a92f7a..67b6421 100644 --- a/src/main.rs +++ b/src/main.rs @@ -163,7 +163,7 @@ fn clear_cache(quietly: bool) { process::exit(1); }); if !quietly { - println!("Successfully deleted cache."); + eprintln!("Successfully deleted cache."); } } @@ -178,7 +178,7 @@ fn update_cache(cache: &Cache, quietly: bool) { process::exit(1); }); if !quietly { - println!("Successfully updated cache."); + eprintln!("Successfully updated cache."); } } @@ -245,7 +245,7 @@ fn show_paths() { fn create_config_and_exit() { match make_default_config() { Ok(config_file_path) => { - println!( + eprintln!( "Successfully created seed config file here: {}", config_file_path.to_str().unwrap() ); @@ -491,9 +491,9 @@ fn main() { process::exit(0); } else { if !args.flag_quiet { - println!("Page {} not found in cache", &command); - println!("Try updating with `tldr --update`, or submit a pull request to:"); - println!("https://github.com/tldr-pages/tldr"); + eprintln!("Page {} not found in cache", &command); + eprintln!("Try updating with `tldr --update`, or submit a pull request to:"); + eprintln!("https://github.com/tldr-pages/tldr"); } process::exit(1); } diff --git a/tests/lib.rs b/tests/lib.rs index b80b84f..831478f 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -144,7 +144,7 @@ fn test_update_cache() { .args(&["--update"]) .assert() .success() - .stdout(contains("Successfully updated cache.")); + .stderr(contains("Successfully updated cache.")); testenv.command().args(&["sl"]).assert().success(); } @@ -227,7 +227,7 @@ fn test_setup_seed_config() { .args(&["--seed-config"]) .assert() .success() - .stdout(contains("Successfully created seed config file")); + .stderr(contains("Successfully created seed config file here")); } #[test] @@ -284,12 +284,7 @@ fn test_os_specific_page() { fn test_markdown_rendering() { let testenv = TestEnv::new(); - testenv - .command() - .args(&["--update"]) - .assert() - .success() - .stdout(contains("Successfully updated cache.")); + testenv.add_entry("tar", include_str!("tar-markdown.expected")); let expected = include_str!("tar-markdown.expected"); testenv @@ -410,7 +405,7 @@ fn test_spaces_find_command() { .args(&["--update"]) .assert() .success() - .stdout(contains("Successfully updated cache.")); + .stderr(contains("Successfully updated cache.")); testenv .command() @@ -428,7 +423,7 @@ fn test_pager_flag_enable() { .args(&["--update"]) .assert() .success() - .stdout(contains("Successfully updated cache.")); + .stderr(contains("Successfully updated cache.")); testenv .command() @@ -497,9 +492,9 @@ fn test_autoupdate_cache() { let assert = testenv.command().args(&["--list"]).assert().success(); let pred = contains("Successfully updated cache"); if expected { - assert.stdout(pred) + assert.stderr(pred) } else { - assert.stdout(pred.not()) + assert.stderr(pred.not()) }; }; @@ -618,7 +613,7 @@ fn test_pager_warning() { .args(&["--update"]) .assert() .success() - .stdout(contains("Successfully updated cache.")); + .stderr(contains("Successfully updated cache.")); // Regular call should not show a "pager flag not available on windows" warning testenv From 4d4c7b6a5df80c955566501f16f0ca7205d82961 Mon Sep 17 00:00:00 2001 From: Dalton Date: Tue, 11 May 2021 06:28:26 -0500 Subject: [PATCH 115/368] Fix clippy warnings (#188) * Fix clippy warnings * Update toolchain for CI workflows fmt and clippy --- .github/workflows/ci.yml | 4 ++-- src/main.rs | 1 + src/types.rs | 2 ++ tests/lib.rs | 6 +++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1438a1..2550c0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.41.1 + toolchain: 1.52.0 components: clippy override: true - uses: actions-rs/clippy-check@v1 @@ -60,7 +60,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.46.0 + toolchain: 1.52.0 override: true - run: rustup component add rustfmt - uses: actions-rs/cargo@v1 diff --git a/src/main.rs b/src/main.rs index 67b6421..90f265c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,6 +57,7 @@ const ARCHIVE_URL: &str = "https://github.com/tldr-pages/tldr/archive/master.tar #[cfg(not(target_os = "windows"))] const PAGER_COMMAND: &str = "less -R"; +#[allow(clippy::struct_excessive_bools)] #[derive(Debug, Deserialize)] struct Args { arg_command: Option>, diff --git a/src/types.rs b/src/types.rs index c68dba8..180185a 100644 --- a/src/types.rs +++ b/src/types.rs @@ -108,6 +108,8 @@ pub enum PathSource { OsConvention, /// Env variable (TEALDEER_*) EnvVar, + + #[allow(dead_code)] // Waiting for Pull Request #141 /// Config file variable ConfigVar, } diff --git a/tests/lib.rs b/tests/lib.rs index 831478f..e86cc6b 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -40,7 +40,7 @@ impl TestEnv { println!("Config path: {:?}", &config_file_name); let mut config_file = File::create(&config_file_name).unwrap(); - config_file.write(content.as_ref().as_bytes()).unwrap(); + config_file.write_all(content.as_ref().as_bytes()).unwrap(); } /// Add entry for that environment to the "common" pages. @@ -374,7 +374,7 @@ fn test_correct_rendering_with_config() { let mut config_file = File::create(&config_file_path).unwrap(); config_file - .write(include_str!("config.toml").as_bytes()) + .write_all(include_str!("config.toml").as_bytes()) .unwrap(); // Create input file @@ -482,7 +482,7 @@ fn test_autoupdate_cache() { // Activate automatic updates, set the auto-update interval to 24 hours let mut config_file = File::create(&config_file_path).unwrap(); config_file - .write("[updates]\nauto_update = true\nauto_update_interval_hours = 24".as_bytes()) + .write_all("[updates]\nauto_update = true\nauto_update_interval_hours = 24".as_bytes()) .unwrap(); config_file.flush().unwrap(); From 3223fec5eeac65cca302ec04cdb2a63b75bfbb29 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 13 May 2021 00:06:45 +0200 Subject: [PATCH 116/368] Update MSRV policy As discussed in #190. --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a492120..f14a44e 100644 --- a/README.md +++ b/README.md @@ -90,12 +90,8 @@ To run lints: ## MSRV (Minimally Supported Rust Version) -Tealdeer will not bump the MSRV requirement in patch versions, but it may -increase it in minor versions. The reason is that many important libraries -(e.g. the Tokio ecosystem, which is a dependency of reqwest, which is used for -downloading the cache) do not follow a static MSRV, but instead follow a -"stable + last n releases" approach. Trying to guarantee the same MSRV across -all minor releases would be a futile attempt. +When publishing a Tealdeer release, the Rust version required to build it +should be stable for at least a month. ## License From 25f736564db15b9022347c2a6eff3d7911cc6192 Mon Sep 17 00:00:00 2001 From: Cameron Tod Date: Thu, 13 May 2021 10:25:41 +1200 Subject: [PATCH 117/368] Docs: Fix packet/package typo (#185) --- docs/src/installing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/installing.md b/docs/src/installing.md index 8f98b62..29e3154 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -2,7 +2,7 @@ There are a few different ways to install Tealdeer: -- Through [packet managers](#packet-managers) +- Through [package managers](#package-managers) - Through [static binaries](#static-binaries-linux) - Through [cargo install](#through-cargo-install) - By [building from source](#build-from-source) @@ -10,7 +10,7 @@ There are a few different ways to install Tealdeer: Additionally, when not using system packages, you can [manually install autocompletions](#autocompletion). -## Packet Managers +## Package Managers Tealdeer has been added to a few package managers: @@ -19,7 +19,7 @@ Tealdeer has been added to a few package managers: [`tealdeer-git`](https://aur.archlinux.org/packages/tealdeer-git/) - Fedora: [`tealdeer`](https://src.fedoraproject.org/rpms/rust-tealdeer) - FreeBSD: [`sysutils/tealdeer`](https://www.freshports.org/sysutils/tealdeer/) -- macOS Homebrew: [`tealdeer`](https://formulae.brew.sh/formula/tealdeer) +- Homebrew: [`tealdeer`](https://formulae.brew.sh/formula/tealdeer) - NetBSD: [`sysutils/tealdeer`](https://pkgsrc.se/sysutils/tealdeer) - Nix: [`tealdeer`](https://nixos.org/nixos/packages.html#tealdeer) - openSUSE: [`tealdeer`](https://software.opensuse.org/package/tealdeer?search_term=tealdeer) From b6342633cd0a0a03a85cd727dc1ff5d3cbc9dcb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 13 May 2021 14:12:11 +0200 Subject: [PATCH 118/368] Use `which` instead of `tar` as reference tldr page in tests (#192) The page for `tar` changes pretty frequently. `which` was last updated in 2018 and is a rather simple command overall. So it is less likely that the reference in the repository has to be updated as often as the one for `tar`. --- tests/lib.rs | 12 ++++++------ tests/tar-markdown.expected | 37 ----------------------------------- tests/which-markdown.expected | 11 +++++++++++ 3 files changed, 17 insertions(+), 43 deletions(-) delete mode 100644 tests/tar-markdown.expected create mode 100644 tests/which-markdown.expected diff --git a/tests/lib.rs b/tests/lib.rs index e86cc6b..c9689d7 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -284,12 +284,12 @@ fn test_os_specific_page() { fn test_markdown_rendering() { let testenv = TestEnv::new(); - testenv.add_entry("tar", include_str!("tar-markdown.expected")); + testenv.add_entry("which", include_str!("which-markdown.expected")); - let expected = include_str!("tar-markdown.expected"); + let expected = include_str!("which-markdown.expected"); testenv .command() - .args(&["-m", "tar"]) + .args(&["-m", "which"]) .assert() .success() .stdout(similar(expected)); @@ -427,7 +427,7 @@ fn test_pager_flag_enable() { testenv .command() - .args(&["--pager", "tar"]) + .args(&["--pager", "which"]) .assert() .success(); } @@ -618,7 +618,7 @@ fn test_pager_warning() { // Regular call should not show a "pager flag not available on windows" warning testenv .command() - .args(&["tar"]) + .args(&["which"]) .assert() .success() .stderr(contains("pager flag not available on Windows").not()); @@ -626,7 +626,7 @@ fn test_pager_warning() { // But it should be shown if the pager flag is true testenv .command() - .args(&["tar", "-p"]) + .args(&["which", "-p"]) .assert() .success() .stderr(contains("pager flag not available on Windows")); diff --git a/tests/tar-markdown.expected b/tests/tar-markdown.expected deleted file mode 100644 index ec9c7a7..0000000 --- a/tests/tar-markdown.expected +++ /dev/null @@ -1,37 +0,0 @@ -# tar - -> Archiving utility. -> Often combined with a compression method, such as gzip or bzip2. -> More information: . - -- [c]reate an archive and write it to a [f]ile: - -`tar cf {{target.tar}} {{file1}} {{file2}} {{file3}}` - -- [c]reate a g[z]ipped archive and write it to a [f]ile: - -`tar czf {{target.tar.gz}} {{file1}} {{file2}} {{file3}}` - -- [c]reate a g[z]ipped archive from a directory using relative paths: - -`tar czf {{target.tar.gz}} --directory={{path/to/directory}} .` - -- E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely: - -`tar xvf {{source.tar[.gz|.bz2|.xz]}}` - -- E[x]tract a (compressed) archive [f]ile into the target directory: - -`tar xf {{source.tar[.gz|.bz2|.xz]}} --directory={{directory}}` - -- [c]reate a compressed archive and write it to a [f]ile, using [a]rchive suffix to determine the compression program: - -`tar caf {{target.tar.xz}} {{file1}} {{file2}} {{file3}}` - -- Lis[t] the contents of a tar [f]ile [v]erbosely: - -`tar tvf {{source.tar}}` - -- E[x]tract files matching a pattern from an archive [f]ile: - -`tar xf {{source.tar}} --wildcards "{{*.html}}"` diff --git a/tests/which-markdown.expected b/tests/which-markdown.expected new file mode 100644 index 0000000..36d3941 --- /dev/null +++ b/tests/which-markdown.expected @@ -0,0 +1,11 @@ +# which + +> Locate a program in the user's path. + +- Search the PATH environment variable and display the location of any matching executables: + +`which {{executable}}` + +- If there are multiple executables which match, display all: + +`which -a {{executable}}` From e32ce77c0c28723ba8326562ae37a10363f35b41 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 13 May 2021 00:11:15 +0200 Subject: [PATCH 119/368] CI: Bump Rust version --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2550c0c..3357d9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - rust: [1.41.1, stable] + rust: [1.52, stable] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 @@ -45,9 +45,9 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.52.0 - components: clippy - override: true + toolchain: 1.52 + components: clippy + override: true - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -60,8 +60,8 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.52.0 - override: true + toolchain: 1.52 + override: true - run: rustup component add rustfmt - uses: actions-rs/cargo@v1 with: From 06f771f64db2fe64d422b6a4748017bfd76a5c69 Mon Sep 17 00:00:00 2001 From: Sondre Nilsen Date: Sun, 9 May 2021 17:10:53 +0200 Subject: [PATCH 120/368] Use unbuffered IO for faster printing to stdout --- src/formatter.rs | 19 ++++++++++++------- src/main.rs | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/formatter.rs b/src/formatter.rs index e2553c4..34610ee 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -1,6 +1,6 @@ //! Functions related to formatting and printing lines from a `Tokenizer`. -use std::io::BufRead; +use std::io::{BufRead, Write}; use ansi_term::{ANSIString, ANSIStrings}; use log::debug; @@ -63,16 +63,17 @@ fn format_code(command: &str, text: &str, config: &Config) -> String { } /// Print a token stream to an ANSI terminal. -pub fn print_lines(tokenizer: &mut Tokenizer, config: &Config) +pub fn print_lines(writer: &mut T, tokenizer: &mut Tokenizer, config: &Config) where R: BufRead, + T: Write, { let mut command = String::new(); while let Some(token) = tokenizer.next_token() { match token { LineType::Empty => { if !config.display.compact { - println!() + writeln!(writer).unwrap(); } } LineType::Title(title) => { @@ -83,13 +84,17 @@ where command = title; debug!("Detected command name: {}", &command); } - LineType::Description(text) => println!(" {}", config.style.description.paint(text)), - LineType::ExampleText(text) => println!(" {}", config.style.example_text.paint(text)), + LineType::Description(text) => { + writeln!(writer, " {}", config.style.description.paint(text)).unwrap(); + } + LineType::ExampleText(text) => { + writeln!(writer, " {}", config.style.example_text.paint(text)).unwrap(); + } LineType::ExampleCode(text) => { - println!(" {}", &format_code(&command, &text, &config)) + writeln!(writer, " {}", &format_code(&command, &text, &config)).unwrap(); } LineType::Other(text) => debug!("Unknown line type: {:?}", text), } } - println!(); + writeln!(writer).unwrap(); } diff --git a/src/main.rs b/src/main.rs index 90f265c..c3f7946 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,13 +14,13 @@ #![allow(clippy::module_name_repetitions)] #![allow(clippy::too_many_lines)] -use std::env; use std::fs::File; use std::io::BufRead; use std::io::BufReader; use std::iter; use std::path::PathBuf; use std::process; +use std::{env, io::Write}; use ansi_term::{Color, Style}; use app_dirs::AppInfo; @@ -84,7 +84,9 @@ fn print_page( enable_markdown: bool, config: &Config, ) -> Result<(), String> { - // Open file + let stdout = std::io::stdout(); + let mut handle = stdout.lock(); + for path in page.paths() { let file = File::open(path).map_err(|msg| format!("Could not open file: {}", msg))?; let reader = BufReader::new(file); @@ -92,15 +94,21 @@ fn print_page( if enable_markdown { // Print the raw markdown of the file. for line in reader.lines() { - println!("{}", line.unwrap()); + writeln!(handle, "{}", line.unwrap()) + .map_err(|_| "Could not write to stdout".to_string())?; } } else { // Create tokenizer and print output let mut tokenizer = Tokenizer::new(reader); - print_lines(&mut tokenizer, &config); + print_lines(&mut handle, &mut tokenizer, &config) + .map_err(|_| "Could not write to stdout".to_string())?; }; } + handle + .flush() + .map_err(|_| "Could not flush stdout".to_string())?; + Ok(()) } From 22693c09bace8873de9f7f5afdc42eaa195cd700 Mon Sep 17 00:00:00 2001 From: Sondre Nilsen Date: Sun, 9 May 2021 17:11:17 +0200 Subject: [PATCH 121/368] Use rustls for TLS to avoid dynamic linking --- Cargo.lock | 243 ++++++++++++++++++++++++----------------------------- Cargo.toml | 2 +- 2 files changed, 110 insertions(+), 135 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f6cee68..8e8acd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -162,22 +162,6 @@ dependencies = [ "unreachable", ] -[[package]] -name = "core-foundation" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" - [[package]] name = "crc32fast" version = "1.2.0" @@ -338,21 +322,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -390,6 +359,18 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" +[[package]] +name = "futures-macro" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668c6733a182cd7deb4f1de7ba3bf2120823835b3bcfbeacf7d2c4a773c1bb8b" +dependencies = [ + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "futures-sink" version = "0.3.5" @@ -413,10 +394,13 @@ checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" dependencies = [ "futures-core", "futures-io", + "futures-macro", "futures-task", "memchr", "pin-project", "pin-utils", + "proc-macro-hack", + "proc-macro-nested", "slab", ] @@ -541,16 +525,19 @@ dependencies = [ ] [[package]] -name = "hyper-tls" -version = "0.4.3" +name = "hyper-rustls" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" +checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" dependencies = [ "bytes", + "futures-util", "hyper", - "native-tls", + "log", + "rustls", "tokio", - "tokio-tls", + "tokio-rustls", + "webpki", ] [[package]] @@ -723,24 +710,6 @@ dependencies = [ "ws2_32-sys", ] -[[package]] -name = "native-tls" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "ndk" version = "0.1.0" @@ -842,39 +811,6 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" -[[package]] -name = "openssl" -version = "0.10.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "lazy_static", - "libc", - "openssl-sys", -] - -[[package]] -name = "openssl-probe" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" - -[[package]] -name = "openssl-sys" -version = "0.9.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" -dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "pager" version = "0.15.0" @@ -923,12 +859,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkg-config" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" - [[package]] name = "ppv-lite86" version = "0.2.9" @@ -973,6 +903,18 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + +[[package]] +name = "proc-macro-nested" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" + [[package]] name = "proc-macro2" version = "1.0.19" @@ -1085,33 +1027,62 @@ dependencies = [ "http", "http-body", "hyper", - "hyper-tls", + "hyper-rustls", "ipnet", "js-sys", "lazy_static", "log", "mime", "mime_guess", - "native-tls", "percent-encoding", "pin-project-lite", + "rustls", "serde", "serde_urlencoded", "tokio", - "tokio-tls", + "tokio-rustls", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots", "winreg", ] +[[package]] +name = "ring" +version = "0.16.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b72b84d47e8ec5a4f2872e8262b8f8256c5be1c938a7d6d3a867a3ba8f722f74" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi 0.3.9", +] + [[package]] name = "rustc-demangle" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" +[[package]] +name = "rustls" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" +dependencies = [ + "base64", + "log", + "ring", + "sct", + "webpki", +] + [[package]] name = "ryu" version = "1.0.5" @@ -1128,36 +1099,13 @@ dependencies = [ ] [[package]] -name = "schannel" -version = "0.1.19" +name = "sct" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" dependencies = [ - "lazy_static", - "winapi 0.3.9", -] - -[[package]] -name = "security-framework" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" -dependencies = [ - "core-foundation-sys", - "libc", + "ring", + "untrusted", ] [[package]] @@ -1221,6 +1169,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "strsim" version = "0.9.3" @@ -1344,13 +1298,15 @@ dependencies = [ ] [[package]] -name = "tokio-tls" -version = "0.3.1" +name = "tokio-rustls" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" +checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" dependencies = [ - "native-tls", + "futures-core", + "rustls", "tokio", + "webpki", ] [[package]] @@ -1456,6 +1412,12 @@ dependencies = [ "void", ] +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "url" version = "2.1.1" @@ -1467,12 +1429,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "vcpkg" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" - [[package]] name = "version_check" version = "0.9.2" @@ -1605,6 +1561,25 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab146130f5f790d45f82aeeb09e55a256573373ec64409fc19a6fb82fb1032ae" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8eff4b7516a57307f9349c64bf34caa34b940b66fed4b2fb3136cb7386e5739" +dependencies = [ + "webpki", +] + [[package]] name = "winapi" version = "0.2.8" diff --git a/Cargo.toml b/Cargo.toml index 930c2d9..bbbd352 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ docopt = "1" env_logger = { version = "0.7", optional = true } flate2 = "1" log = "0.4" -reqwest = { version = "0.10.3", features = ["blocking", "native-tls"], default-features = false } +reqwest = { version = "0.10.3", features = ["blocking", "rustls-tls"], default-features = false } serde = "1.0.21" serde_derive = "1.0.21" tar = "0.4.14" From feb20d8c5c79494a827f6b3c51592dcd7df6edce Mon Sep 17 00:00:00 2001 From: Sondre Nilsen Date: Thu, 20 May 2021 12:25:10 +0200 Subject: [PATCH 122/368] Add WriteError type, convert print_lines to return a result --- src/error.rs | 13 +++++++++++++ src/formatter.rs | 22 +++++++++++++++------- src/main.rs | 22 +++++----------------- 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/src/error.rs b/src/error.rs index fdac30f..ffd6199 100644 --- a/src/error.rs +++ b/src/error.rs @@ -7,6 +7,18 @@ pub enum TealdeerError { CacheError(String), ConfigError(String), UpdateError(String), + WriteError(String), +} + +impl TealdeerError { + pub fn message(&self) -> &str { + match self { + Self::CacheError(msg) + | Self::ConfigError(msg) + | Self::UpdateError(msg) + | Self::WriteError(msg) => msg, + } + } } impl From for TealdeerError { @@ -21,6 +33,7 @@ impl fmt::Display for TealdeerError { Self::CacheError(e) => write!(f, "CacheError: {}", e), Self::ConfigError(e) => write!(f, "ConfigError: {}", e), Self::UpdateError(e) => write!(f, "UpdateError: {}", e), + Self::WriteError(e) => write!(f, "WriteError: {}", e), } } } diff --git a/src/formatter.rs b/src/formatter.rs index 34610ee..887df6b 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -6,6 +6,7 @@ use ansi_term::{ANSIString, ANSIStrings}; use log::debug; use crate::config::Config; +use crate::error::TealdeerError::{self, WriteError}; use crate::tokenizer::Tokenizer; use crate::types::LineType; @@ -63,17 +64,21 @@ fn format_code(command: &str, text: &str, config: &Config) -> String { } /// Print a token stream to an ANSI terminal. -pub fn print_lines(writer: &mut T, tokenizer: &mut Tokenizer, config: &Config) +pub fn print_lines( + writer: &mut T, + tokenizer: &mut Tokenizer, + config: &Config, +) -> Result<(), TealdeerError> where - R: BufRead, T: Write, + R: BufRead, { let mut command = String::new(); while let Some(token) = tokenizer.next_token() { match token { LineType::Empty => { if !config.display.compact { - writeln!(writer).unwrap(); + writeln!(writer).map_err(|e| WriteError(e.to_string()))?; } } LineType::Title(title) => { @@ -85,16 +90,19 @@ where debug!("Detected command name: {}", &command); } LineType::Description(text) => { - writeln!(writer, " {}", config.style.description.paint(text)).unwrap(); + writeln!(writer, " {}", config.style.description.paint(text)) + .map_err(|e| WriteError(e.to_string()))?; } LineType::ExampleText(text) => { - writeln!(writer, " {}", config.style.example_text.paint(text)).unwrap(); + writeln!(writer, " {}", config.style.example_text.paint(text)) + .map_err(|e| WriteError(e.to_string()))?; } LineType::ExampleCode(text) => { - writeln!(writer, " {}", &format_code(&command, &text, &config)).unwrap(); + writeln!(writer, " {}", &format_code(&command, &text, &config)) + .map_err(|e| WriteError(e.to_string()))?; } LineType::Other(text) => debug!("Unknown line type: {:?}", text), } } - writeln!(writer).unwrap(); + writeln!(writer).map_err(|e| WriteError(e.to_string())) } diff --git a/src/main.rs b/src/main.rs index c3f7946..58efc7e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,7 +41,7 @@ mod types; use crate::cache::{Cache, PageLookupResult}; use crate::config::{get_config_dir, get_config_path, make_default_config, Config, MAX_CACHE_AGE}; use crate::dedup::Dedup; -use crate::error::TealdeerError::{CacheError, ConfigError, UpdateError}; +use crate::error::TealdeerError::ConfigError; use crate::formatter::print_lines; use crate::tokenizer::Tokenizer; use crate::types::{ColorOptions, OsType}; @@ -101,7 +101,7 @@ fn print_page( // Create tokenizer and print output let mut tokenizer = Tokenizer::new(reader); print_lines(&mut handle, &mut tokenizer, &config) - .map_err(|_| "Could not write to stdout".to_string())?; + .map_err(|e| format!("Could not write to stdout: {}", e.message()))?; }; } @@ -164,11 +164,7 @@ fn check_cache(args: &Args, enable_styles: bool) { /// Clear the cache fn clear_cache(quietly: bool) { Cache::clear().unwrap_or_else(|e| { - match e { - CacheError(msg) | ConfigError(msg) | UpdateError(msg) => { - eprintln!("Could not delete cache: {}", msg) - } - }; + eprintln!("Could not delete cache: {}", e.message()); process::exit(1); }); if !quietly { @@ -179,11 +175,7 @@ fn clear_cache(quietly: bool) { /// Update the cache fn update_cache(cache: &Cache, quietly: bool) { cache.update().unwrap_or_else(|e| { - match e { - CacheError(msg) | ConfigError(msg) | UpdateError(msg) => { - eprintln!("Could not update cache: {}", msg) - } - }; + eprintln!("Could not update cache: {}", e.message()); process::exit(1); }); if !quietly { @@ -461,11 +453,7 @@ fn main() { // Get list of pages let pages = cache.list_pages().unwrap_or_else(|e| { - match e { - CacheError(msg) | ConfigError(msg) | UpdateError(msg) => { - eprintln!("Could not get list of pages: {}", msg) - } - } + eprintln!("Could not get list of pages: {}", e.message()); process::exit(1); }); From a5aa822d12662b09e2533b9b9bb9d21eaaf91333 Mon Sep 17 00:00:00 2001 From: bl-ue <54780737+bl-ue@users.noreply.github.com> Date: Tue, 22 Jun 2021 07:31:51 -0400 Subject: [PATCH 123/368] =?UTF-8?q?README:=20Update=20@SShrike=20=E2=86=92?= =?UTF-8?q?=20@severen=20(#193)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f14a44e..6059669 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. -Thanks to @SShrike for coming up with the name "tealdeer"! +Thanks to @severen for coming up with the name "tealdeer"! [tldr-node-client]: https://github.com/tldr-pages/tldr-node-client From 187214e39e4102ff6288521c84dd31fefc5e2ebf Mon Sep 17 00:00:00 2001 From: Rithvik Vibhu Date: Mon, 19 Jul 2021 17:27:16 +0530 Subject: [PATCH 124/368] Remove AUR links for `tealdeer` and `tealdeer-bin` (#196) The package is now in the community repos. --- docs/src/installing.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/src/installing.md b/docs/src/installing.md index 29e3154..2d037df 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -14,9 +14,7 @@ autocompletions](#autocompletion). Tealdeer has been added to a few package managers: -- Arch Linux AUR: [`tealdeer`](https://aur.archlinux.org/packages/tealdeer/), - [`tealdeer-bin`](https://aur.archlinux.org/packages/tealdeer-bin/) or - [`tealdeer-git`](https://aur.archlinux.org/packages/tealdeer-git/) +- Arch Linux: [`tealdeer`](https://archlinux.org/packages/community/x86_64/tealdeer/) - Fedora: [`tealdeer`](https://src.fedoraproject.org/rpms/rust-tealdeer) - FreeBSD: [`sysutils/tealdeer`](https://www.freshports.org/sysutils/tealdeer/) - Homebrew: [`tealdeer`](https://formulae.brew.sh/formula/tealdeer) From e7c5daa9b742b7dc9a7b640b7ddb2b0816e17c4c Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Thu, 4 Feb 2021 16:38:38 +0100 Subject: [PATCH 125/368] Add Dockerfile for benchmarks --- benchmarks/Dockerfile | 139 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 benchmarks/Dockerfile diff --git a/benchmarks/Dockerfile b/benchmarks/Dockerfile new file mode 100644 index 0000000..b70c58c --- /dev/null +++ b/benchmarks/Dockerfile @@ -0,0 +1,139 @@ +# Benchmark Dockerfile for tealdeer +# +# To run the benchmarks, execute +# +# docker build -t tldr-benchmark . +# docker run --privileged --rm -it tldr-benchmark +# +# as root in the directory of this Dockerfile. This will build the compared +# clients and benchmark them with `hyperfine` at the end. +# +# The `--privileged` flag is needed to drop the disk caches before every run. If +# you want to test with hot caches or don't want to use this flag, you will have +# to remove the `--prepare` line from the `hyperfine` command at the end of this +# file and rebuild the image. + +################################################################################ + +FROM rust AS tealdeer-builder + +WORKDIR /build +RUN git clone https://github.com/dbrgn/tealdeer.git \ + && cd tealdeer \ + && cargo build --release \ + && mkdir /build-outputs \ + && cp target/release/tldr /build-outputs/tealdeer + +################################################################################ + +FROM ubuntu:latest AS tldr-c-builder + +WORKDIR /build +RUN apt-get update && apt-get install -y build-essential git && rm -rf /var/lib/apt/lists/* +RUN git clone https://github.com/tldr-pages/tldr-c-client.git \ + && cd tldr-c-client \ + && DEBIAN_FRONTEND=noninteractive ./deps.sh \ + && make \ + && mkdir /build-outputs /deps \ + && cp tldr /build-outputs/tldr-c \ + && cp deps.sh /deps/tldr-c-deps.sh + +################################################################################ + +FROM haskell AS haskell-builder + +WORKDIR /build + +RUN git clone https://github.com/psibi/tldr-hs.git \ + && cd tldr-hs \ + && stack build --install-ghc + +RUN git clone https://github.com/gutjuri/fast-tldr \ + && cd fast-tldr \ + && stack build --install-ghc + +RUN mkdir /build-outputs \ + && find tldr-hs/.stack-work/dist -type f -iname tldr -exec mv '{}' /build-outputs/tldr-hs \; \ + && find fast-tldr/.stack-work/dist -type f -iname tldr -exec mv '{}' /build-outputs/fast-tldr \; + +################################################################################ + +FROM node:slim AS node-builder + +WORKDIR /build-outputs +RUN npm install tldr \ + && cp $(which node) . \ + && echo './node -- ./node_modules/.bin/tldr "$@"' > tldr-node \ + && chmod +x tldr-node + +################################################################################ + +FROM euantorano/zig:0.8.0 AS zig-builder + +WORKDIR /build +RUN apk add git \ + && git clone https://gitlab.com/ve-nt/outfieldr.git \ + && cd outfieldr \ + && git submodule init \ + && git submodule update \ + && zig build -Drelease-safe \ + && mkdir /build-outputs \ + && cp bin/tldr /build-outputs/outfieldr + +################################################################################ + +FROM ubuntu:latest AS benchmark + +ENV LANG="en_US.UTF-8" + +WORKDIR /deps +RUN apt-get update && apt-get install -y wget unzip python3 python3-venv && rm -rf /var/lib/apt/lists/* +COPY --from=tldr-c-builder /deps/* ./ +RUN for file in *; do DEBIAN_FRONTEND=noninteractive sh $file; done + +WORKDIR /clients +COPY --from=tealdeer-builder /build-outputs/* ./ +COPY --from=tldr-c-builder /build-outputs/* ./ +COPY --from=haskell-builder /build-outputs/* ./ +RUN wget -qO tldr-bash https://4e4.win/tldr && chmod +x tldr-bash +COPY --from=node-builder /build-outputs/node /build-outputs/tldr-node ./ +COPY --from=node-builder /build-outputs/node_modules/ ./node_modules/ +COPY --from=zig-builder /build-outputs/* ./ + +# python is really hard to isolate in a package, using pyinstaller didn't really work either, so for now we just use it like this +RUN python3 -m venv tldr-python \ + && cd tldr-python \ + && bash -c 'source bin/activate; pip install wheel; pip install tldr; deactivate' \ + && cd .. \ + && echo '#!/bin/bash' > tldr-python.bash \ + && echo 'source tldr-python/bin/activate; tldr $@' >> tldr-python.bash \ + && chmod +x tldr-python.bash + +# Update all the individual caches +RUN bash -c 'mkdir -p /caches/{tealdeer,tldr-c,tldr-hs,fast-tldr,tldr-bash,tldr-node,tldr-python,outfieldr/.local/share}' \ + && TEALDEER_CACHE_DIR=/caches/tealdeer ./tealdeer -u \ + && TLDR_CACHE_DIR=/caches/tldr-c ./tldr-c -u \ + && XDG_DATA_HOME=/caches/tldr-hs ./tldr-hs -u \ + && XDG_DATA_HOME=/caches/fast-tldr ./fast-tldr -u \ + && XDG_DATA_HOME=/caches/tldr-bash ./tldr-bash -u \ + && HOME=/caches/tldr-node ./tldr-node -u \ + && HOME=/caches/tldr-python ./tldr-python.bash -u \ + && HOME=/caches/outfieldr ./outfieldr -u + +WORKDIR /tools +RUN wget -q https://github.com/sharkdp/hyperfine/releases/download/v1.11.0/hyperfine_1.11.0_amd64.deb && dpkg -i hyperfine_1.11.0_amd64.deb + +ENV PAGE="tar" +WORKDIR /clients +CMD hyperfine \ + --warmup 10 \ + --runs 50 \ + --prepare 'sync; echo 3 | tee /proc/sys/vm/drop_caches' \ + "TEALDEER_CACHE_DIR=/caches/tealdeer ./tealdeer $PAGE" \ + "TLDR_CACHE_DIR=/caches/tldr-c ./tldr-c $PAGE" \ + "XDG_DATA_HOME=/caches/tldr-hs ./tldr-hs $PAGE" \ + "XDG_DATA_HOME=/caches/fast-tldr ./fast-tldr $PAGE" \ + "XDG_DATA_HOME=/caches/tldr-bash TLDR_LESS=0 ./tldr-bash $PAGE" \ + "HOME=/caches/tldr-python ./tldr-python.bash $PAGE" \ + "HOME=/caches/outfieldr ./outfieldr $PAGE" \ + "HOME=/caches/tldr-node ./tldr-node $PAGE" From d1d36a961aedbf706d05c1a1ee82a137b27963b8 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Thu, 3 Jun 2021 19:14:16 +0200 Subject: [PATCH 126/368] Update README.md to include updated benchmark results --- README.md | 66 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 6059669..bd21ac3 100644 --- a/README.md +++ b/README.md @@ -31,38 +31,37 @@ High level project goals: - [x] Download and cache pages - [x] Don't require a network connection for anything besides updating the cache -- [x] Command line interface similar or equivalent to the [NodeJS client][tldr-node-client] +- [x] Command line interface similar or equivalent to the [NodeJS client][node-gh] +- [x] Comply with the [tldr client specification][client-spec] +- [x] Advanced highlighting and configuration - [x] Be fast -A tool like `tldr` should be as frictionless as possible to use. It should be -easy to invoke (just `tldr tar`, not using another subcommand like `tldr find -tar`) and it should show the output as fast as possible. +A tool like `tldr` should be as frictionless as possible to use and show the +output as fast as possible. -tealdeer reaches these goals. During a (highly non-scientific) test (see -[#38](https://github.com/dbrgn/tealdeer/issues/38) for details), I tested the -invocation speed of `tldr ` for a few of the existing clients: +We think that `tealdeer` reaches these goals. We put together a (more or less) +reproducible benchmark that compiles a handful of clients from source and +measures the execution times on a cold disk cache. The benchmarking is run in a +Docker container using sharkdp's [`hyperfine`][hyperfine-gh] +([Dockerfile][benchmark-dockerfile]). -| Client | Times (ms) | Avg of 5 (ms) | -| --- | --- | --- | -| [Tealdeer](https://github.com/dbrgn/tealdeer/) | `15/11/5/5/11` | `9.4` (100%) | -| [C client](https://github.com/tldr-pages/tldr-cpp-client) | `11/5/12/11/15` | `10.8` (115%) | -| [Bash client](https://github.com/pepa65/tldr-bash-client) | `15/19/22/25/24` | `21.0` (223%) | -| [Go client by k3mist](https://github.com/k3mist/tldr/) | `98/96/100/95/101` | `98.8` (1'051%) | -| [Python client](https://github.com/lord63/tldr.py) | `152/148/151/158/140` | `149.8` (1'594%) | -| [NodeJS client](https://github.com/tldr-pages/tldr-node-client) | `169/171/170/170/170` | `170.0` (1'809%) | - -tealdeer was the winner here, although the C client and the Bash client are in -the same speed class. Interpreted languages are clearly much slower to invoke, -a delay of 170 milliseconds is definitely noticeable and increases friction for -the user. - -These are the clients I tried but failed to compile or run: -[Haskell client](https://github.com/psibi/tldr-hs), -[Ruby client](https://github.com/YellowApple/tldrb), -[Perl client](https://github.com/skaji/perl-tldr), -[Go client by anoopengineer](https://github.com/anoopengineer/tldr/), -[PHP client](https://github.com/BrainMaestro/tldr-php). +| Client (50 runs, 29.07.2021) | Programming Language | Mean in ms | Deviation in ms | Comments | +| :---: | :---: | :---: | :---: | :---: | +| `tealdeer` | Rust | 16.2 | 1.2 | | +| [`tldr-c`][c-gh] | C | 35.7 | 3.2 | | +| [`tldr-hs`][hs-gh] | Haskell | 23.6 | 1.0 | no example highlighting | +| [`fast-tldr`][fast-tldr-gh] | Haskell | 15.2 | 0.7 | no example highlighting | +| [`tldr-bash`][bash-gh] | Bash | 28.3 | 1.1 | | +| [`tldr-python-client`][python-gh] | Python | 97.9 | 3.5 | | +| [`outfieldr`][outfieldr-gh] | Zig | 4.7 | 0.5 | no user configuration | +| [`tldr-node-client`][node-gh] | Javascript / Node | 533.1 | 12.5 | | +As you can see, `tealdeer` is not the fastest of the tested clients anymore. We +strive for useful features and code quality over raw performance, even if that +means that we don't come out on top in this friendly competition. That said, we +are still optimizing the code, for example when the `outfieldr` developers +[suggested to switch][outfieldr-comment-tls] to a native TLS implementation +instead of the native libraries. ## Development @@ -113,7 +112,18 @@ be dual licensed as above, without any additional terms or conditions. Thanks to @severen for coming up with the name "tealdeer"! -[tldr-node-client]: https://github.com/tldr-pages/tldr-node-client +[node-gh]: https://github.com/tldr-pages/tldr-node-client +[c-gh]: https://github.com/tldr-pages/tldr-c-client +[hs-gh]: https://github.com/psibi/tldr-hs +[fast-tldr-gh]: https://github.com/gutjuri/fast-tldr +[bash-gh]: https://4e4.win/tldr +[outfieldr-gh]: https://gitlab.com/ve-nt/outfieldr +[python-gh]: https://github.com/tldr-pages/tldr-python-client + +[benchmark-dockerfile]: https://github.com/dbrgn/tealdeer/blob/master/benchmarks/Dockerfile +[client-spec]: https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md +[hyperfine-gh]: https://github.com/sharkdp/hyperfine +[outfieldr-comment-tls]: https://github.com/dbrgn/tealdeer/issues/129#issuecomment-833596765 [github-actions]: https://github.com/dbrgn/tealdeer/actions?query=branch%3Amaster From d5d3d20451014bcbb4772ca7bdf0deb6a85b2431 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin <47574893+niklasmohrin@users.noreply.github.com> Date: Tue, 17 Aug 2021 19:40:35 +0200 Subject: [PATCH 127/368] Run clippy on stable with msrv setting instead of on msrv (#200) --- .github/workflows/ci.yml | 2 +- clippy.toml | 1 + src/error.rs | 2 +- src/formatter.rs | 6 +++--- src/main.rs | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 clippy.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3357d9f..6148acd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.52 + toolchain: stable components: clippy override: true - uses: actions-rs/clippy-check@v1 diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 0000000..cef91fd --- /dev/null +++ b/clippy.toml @@ -0,0 +1 @@ +msrv = "1.52" diff --git a/src/error.rs b/src/error.rs index ffd6199..e85971d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -2,7 +2,7 @@ use reqwest::Error as ReqwestError; use std::fmt; #[derive(Debug)] -#[allow(clippy::pub_enum_variant_names)] +#[allow(clippy::enum_variant_names)] pub enum TealdeerError { CacheError(String), ConfigError(String), diff --git a/src/formatter.rs b/src/formatter.rs index 887df6b..f131e93 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -53,10 +53,10 @@ fn format_code(command: &str, text: &str, config: &Config) -> String { let example_code = &between_variables[..variable_start]; let example_variable = &between_variables[variable_start + 2..]; - highlight_command(&command, &example_code, &config, &mut parts); + highlight_command(command, example_code, config, &mut parts); parts.push(config.style.example_variable.paint(example_variable)); } else { - highlight_command(&command, &between_variables, &config, &mut parts); + highlight_command(command, between_variables, config, &mut parts); } } @@ -98,7 +98,7 @@ where .map_err(|e| WriteError(e.to_string()))?; } LineType::ExampleCode(text) => { - writeln!(writer, " {}", &format_code(&command, &text, &config)) + writeln!(writer, " {}", &format_code(&command, &text, config)) .map_err(|e| WriteError(e.to_string()))?; } LineType::Other(text) => debug!("Unknown line type: {:?}", text), diff --git a/src/main.rs b/src/main.rs index 58efc7e..5bcea82 100644 --- a/src/main.rs +++ b/src/main.rs @@ -100,7 +100,7 @@ fn print_page( } else { // Create tokenizer and print output let mut tokenizer = Tokenizer::new(reader); - print_lines(&mut handle, &mut tokenizer, &config) + print_lines(&mut handle, &mut tokenizer, config) .map_err(|e| format!("Could not write to stdout: {}", e.message()))?; }; } From 9ac67ec562bc72a232a67a42511a8ec31f91d2e6 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Sun, 29 Aug 2021 16:00:57 +0200 Subject: [PATCH 128/368] Bump CI toolchain to 1.53 --- .github/workflows/ci.yml | 4 ++-- clippy.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6148acd..ca3deae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - rust: [1.52, stable] + rust: [1.53, stable] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 @@ -60,7 +60,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.52 + toolchain: 1.53 override: true - run: rustup component add rustfmt - uses: actions-rs/cargo@v1 diff --git a/clippy.toml b/clippy.toml index cef91fd..349b690 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1 +1 @@ -msrv = "1.52" +msrv = "1.53" From a4ac910e865171473eb2769f3645c9a14666dda7 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Sat, 28 Aug 2021 11:18:01 +0200 Subject: [PATCH 129/368] Add various small refactorings --- src/cache.rs | 4 +-- src/formatter.rs | 2 +- src/main.rs | 28 +++++++-------- tests/lib.rs | 89 ++++++++++++++++++++++++------------------------ 4 files changed, 59 insertions(+), 64 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index f69a76d..081dea2 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -42,7 +42,7 @@ impl PageLookupResult { } pub fn paths(&self) -> impl Iterator { - iter::once(self.page_path.as_path()).chain(self.patch_path.as_deref().into_iter()) + iter::once(self.page_path.as_path()).chain(self.patch_path.as_deref()) } } @@ -224,7 +224,7 @@ impl Cache { } } - let patch_path = Self::find_patch(&patch_filename, custom_pages_dir.as_deref()); + let patch_path = Self::find_patch(&patch_filename, custom_pages_dir); // Try to find a platform specific path next, append custom patch to it. if let Some(pf) = self.get_platform_dir() { diff --git a/src/formatter.rs b/src/formatter.rs index f131e93..9859c1a 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -98,7 +98,7 @@ where .map_err(|e| WriteError(e.to_string()))?; } LineType::ExampleCode(text) => { - writeln!(writer, " {}", &format_code(&command, &text, config)) + writeln!(writer, " {}", format_code(&command, &text, config)) .map_err(|e| WriteError(e.to_string()))?; } LineType::Other(text) => debug!("Unknown line type: {:?}", text), diff --git a/src/main.rs b/src/main.rs index 5bcea82..693b793 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,7 +17,6 @@ use std::fs::File; use std::io::BufRead; use std::io::BufReader; -use std::iter; use std::path::PathBuf; use std::process; use std::{env, io::Write}; @@ -315,10 +314,7 @@ fn get_languages(env_lang: Option<&str>, env_language: Option<&str>) -> Vec Result { - Docopt::new(USAGE).and_then(|d| d.argv(argv.iter()).deserialize()) + Docopt::new(USAGE).and_then(|d| d.argv(argv).deserialize()) } #[test] fn test_docopt_os_case_insensitive() { - let argv = vec!["cp", "--os", "LiNuX"]; + let argv = ["cp", "--os", "LiNuX"]; let os = test_helper(&argv).unwrap().flag_os.unwrap(); assert_eq!(OsType::Linux, os); } #[test] fn test_docopt_expect_error() { - let argv = vec!["cp", "--os", "lindows"]; + let argv = ["cp", "--os", "lindows"]; assert!(!test_helper(&argv).is_ok()); } @@ -532,41 +528,41 @@ mod test { #[test] fn missing_lang_env() { let lang_list = get_languages(None, Some("de:fr")); - assert_eq!(lang_list, vec!["en"]); + assert_eq!(lang_list, ["en"]); let lang_list = get_languages(None, None); - assert_eq!(lang_list, vec!["en"]); + assert_eq!(lang_list, ["en"]); } #[test] fn missing_language_env() { let lang_list = get_languages(Some("de"), None); - assert_eq!(lang_list, vec!["de", "en"]); + assert_eq!(lang_list, ["de", "en"]); } #[test] fn preference_order() { let lang_list = get_languages(Some("de"), Some("fr:cn")); - assert_eq!(lang_list, vec!["fr", "cn", "de", "en"]); + assert_eq!(lang_list, ["fr", "cn", "de", "en"]); } #[test] fn country_code_expansion() { let lang_list = get_languages(Some("pt_BR"), None); - assert_eq!(lang_list, vec!["pt_BR", "pt", "en"]); + assert_eq!(lang_list, ["pt_BR", "pt", "en"]); } #[test] fn ignore_posix_and_c() { let lang_list = get_languages(Some("POSIX"), None); - assert_eq!(lang_list, vec!["en"]); + assert_eq!(lang_list, ["en"]); let lang_list = get_languages(Some("C"), None); - assert_eq!(lang_list, vec!["en"]); + assert_eq!(lang_list, ["en"]); } #[test] fn no_duplicates() { let lang_list = get_languages(Some("de"), Some("fr:de:cn:de")); - assert_eq!(lang_list, vec!["fr", "de", "cn", "en"]); + assert_eq!(lang_list, ["fr", "de", "cn", "en"]); } } } diff --git a/tests/lib.rs b/tests/lib.rs index c9689d7..769901a 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -37,7 +37,7 @@ impl TestEnv { /// Write `content` to "config.toml" in the `config_dir` directory fn write_config(&self, content: impl AsRef) { let config_file_name = self.config_dir.path().join("config.toml"); - println!("Config path: {:?}", &config_file_name); + println!("Config path: {:?}", config_file_name); let mut config_file = File::create(&config_file_name).unwrap(); config_file.write_all(content.as_ref().as_bytes()).unwrap(); @@ -59,23 +59,23 @@ impl TestEnv { create_dir_all(&dir).unwrap(); let mut file = File::create(&dir.join(format!("{}.md", name))).unwrap(); - file.write_all(&contents.as_bytes()).unwrap(); + file.write_all(contents.as_bytes()).unwrap(); } /// Add custom patch entry to the custom_pages_dir fn add_page_entry(&self, name: &str, contents: &str) { let dir = self.custom_pages_dir.path(); - create_dir_all(&dir).unwrap(); + create_dir_all(dir).unwrap(); let mut file = File::create(&dir.join(format!("{}.page", name))).unwrap(); - file.write_all(&contents.as_bytes()).unwrap(); + file.write_all(contents.as_bytes()).unwrap(); } /// Add custom patch entry to the custom_pages_dir fn add_patch_entry(&self, name: &str, contents: &str) { let dir = self.custom_pages_dir.path(); - create_dir_all(&dir).unwrap(); + create_dir_all(dir).unwrap(); let mut file = File::create(&dir.join(format!("{}.patch", name))).unwrap(); - file.write_all(&contents.as_bytes()).unwrap(); + file.write_all(contents.as_bytes()).unwrap(); } /// Disable default features. @@ -122,7 +122,7 @@ impl TestEnv { fn test_missing_cache() { TestEnv::new() .command() - .args(&["sl"]) + .args(["sl"]) .assert() .failure() .stderr(contains("Cache not found. Please run `tldr --update`.")); @@ -134,19 +134,19 @@ fn test_update_cache() { testenv .command() - .args(&["sl"]) + .args(["sl"]) .assert() .failure() .stderr(contains("Cache not found. Please run `tldr --update`.")); testenv .command() - .args(&["--update"]) + .args(["--update"]) .assert() .success() .stderr(contains("Successfully updated cache.")); - testenv.command().args(&["sl"]).assert().success(); + testenv.command().args(["sl"]).assert().success(); } #[test] @@ -154,14 +154,14 @@ fn test_quiet_cache() { let testenv = TestEnv::new(); testenv .command() - .args(&["--update", "--quiet"]) + .args(["--update", "--quiet"]) .assert() .success() .stdout(is_empty()); testenv .command() - .args(&["--clear-cache", "--quiet"]) + .args(["--clear-cache", "--quiet"]) .assert() .success() .stdout(is_empty()); @@ -173,14 +173,14 @@ fn test_quiet_failures() { testenv .command() - .args(&["--update", "-q"]) + .args(["--update", "-q"]) .assert() .success() .stdout(is_empty()); testenv .command() - .args(&["fakeprogram", "-q"]) + .args(["fakeprogram", "-q"]) .assert() .failure() .stdout(is_empty()); @@ -192,7 +192,7 @@ fn test_quiet_old_cache() { testenv .command() - .args(&["--update", "-q"]) + .args(["--update", "-q"]) .assert() .success() .stdout(is_empty()); @@ -205,14 +205,14 @@ fn test_quiet_old_cache() { testenv .command() - .args(&["tldr"]) + .args(["tldr"]) .assert() .success() .stderr(contains("The cache hasn't been updated for more than ")); testenv .command() - .args(&["tldr", "--quiet"]) + .args(["tldr", "--quiet"]) .assert() .success() .stderr(contains("The cache hasn't been updated for more than ").not()); @@ -224,7 +224,7 @@ fn test_setup_seed_config() { testenv .command() - .args(&["--seed-config"]) + .args(["--seed-config"]) .assert() .success() .stderr(contains("Successfully created seed config file here")); @@ -236,7 +236,7 @@ fn test_show_paths() { testenv .command() - .args(&["--show-paths"]) + .args(["--show-paths"]) .assert() .success() .stdout(contains(format!( @@ -275,7 +275,7 @@ fn test_os_specific_page() { testenv .command() - .args(&["--os", "sunos", "truss"]) + .args(["--os", "sunos", "truss"]) .assert() .success(); } @@ -289,7 +289,7 @@ fn test_markdown_rendering() { let expected = include_str!("which-markdown.expected"); testenv .command() - .args(&["-m", "which"]) + .args(["-m", "which"]) .assert() .success() .stdout(similar(expected)); @@ -305,13 +305,13 @@ fn _test_correct_rendering( // Create input file let file_path = testenv.input_dir.path().join(filename); - println!("Testfile path: {:?}", &file_path); + println!("Testfile path: {:?}", file_path); let mut file = File::create(&file_path).unwrap(); file.write_all(input_file.as_bytes()).unwrap(); testenv .command() - .args(&["--color", color_option, "-f", &file_path.to_str().unwrap()]) + .args(["--color", color_option, "-f", file_path.to_str().unwrap()]) .assert() .success() .stdout(similar(expected)); @@ -370,27 +370,26 @@ fn test_correct_rendering_with_config() { // Setup config file // TODO should be config::CONFIG_FILE_NAME let config_file_path = testenv.config_dir.path().join("config.toml"); - println!("Config path: {:?}", &config_file_path); + println!("Config path: {:?}", config_file_path); let mut config_file = File::create(&config_file_path).unwrap(); config_file - .write_all(include_str!("config.toml").as_bytes()) + .write_all(include_bytes!("config.toml")) .unwrap(); // Create input file let file_path = testenv.input_dir.path().join("inkscape-v2.md"); - println!("Testfile path: {:?}", &file_path); + println!("Testfile path: {:?}", file_path); let mut file = File::create(&file_path).unwrap(); - file.write_all(include_str!("inkscape-v2.md").as_bytes()) - .unwrap(); + file.write_all(include_bytes!("inkscape-v2.md")).unwrap(); // Load expected output let expected = include_str!("inkscape-with-config.expected"); testenv .command() - .args(&["--color", "always", "-f", &file_path.to_str().unwrap()]) + .args(["--color", "always", "-f", file_path.to_str().unwrap()]) .assert() .success() .stdout(similar(expected)); @@ -402,14 +401,14 @@ fn test_spaces_find_command() { testenv .command() - .args(&["--update"]) + .args(["--update"]) .assert() .success() .stderr(contains("Successfully updated cache.")); testenv .command() - .args(&["git", "checkout"]) + .args(["git", "checkout"]) .assert() .success(); } @@ -420,14 +419,14 @@ fn test_pager_flag_enable() { testenv .command() - .args(&["--update"]) + .args(["--update"]) .assert() .success() .stderr(contains("Successfully updated cache.")); testenv .command() - .args(&["--pager", "which"]) + .args(["--pager", "which"]) .assert() .success(); } @@ -438,7 +437,7 @@ fn test_list_flag_rendering() { testenv .command() - .args(&["--list"]) + .args(["--list"]) .assert() .failure() .stderr(contains("Cache not found. Please run `tldr --update`.")); @@ -447,7 +446,7 @@ fn test_list_flag_rendering() { testenv .command() - .args(&["--list"]) + .args(["--list"]) .assert() .success() .stdout("foo\n"); @@ -458,7 +457,7 @@ fn test_list_flag_rendering() { testenv .command() - .args(&["--list"]) + .args(["--list"]) .assert() .success() .stdout("bar\nbaz\nfoo\nqux\n"); @@ -471,7 +470,7 @@ fn test_autoupdate_cache() { // The first time, if automatic updates are disabled, the cache should not be found testenv .command() - .args(&["--list"]) + .args(["--list"]) .assert() .failure() .stderr(contains("Cache not found. Please run `tldr --update`.")); @@ -482,14 +481,14 @@ fn test_autoupdate_cache() { // Activate automatic updates, set the auto-update interval to 24 hours let mut config_file = File::create(&config_file_path).unwrap(); config_file - .write_all("[updates]\nauto_update = true\nauto_update_interval_hours = 24".as_bytes()) + .write_all(b"[updates]\nauto_update = true\nauto_update_interval_hours = 24") .unwrap(); config_file.flush().unwrap(); // Helper function that runs `tldr --list` and asserts that the cache is automatically updated // or not, depending on the value of `expected`. let check_cache_updated = |expected| { - let assert = testenv.command().args(&["--list"]).assert().success(); + let assert = testenv.command().args(["--list"]).assert().success(); let pred = contains("Successfully updated cache"); if expected { assert.stderr(pred) @@ -541,7 +540,7 @@ fn test_custom_page_overwrites() { testenv .command() - .args(&["inkscape-v2", "--color", "never"]) + .args(["inkscape-v2", "--color", "never"]) .assert() .success() .stdout(similar(expected)); @@ -568,7 +567,7 @@ fn test_custom_patch_appends_to_common() { testenv .command() - .args(&["inkscape-v2", "--color", "never"]) + .args(["inkscape-v2", "--color", "never"]) .assert() .success() .stdout(similar(expected)); @@ -598,7 +597,7 @@ fn test_custom_patch_does_not_append_to_custom() { testenv .command() - .args(&["inkscape-v2", "--color", "never"]) + .args(["inkscape-v2", "--color", "never"]) .assert() .success() .stdout(similar(expected)); @@ -610,7 +609,7 @@ fn test_pager_warning() { let testenv = TestEnv::new(); testenv .command() - .args(&["--update"]) + .args(["--update"]) .assert() .success() .stderr(contains("Successfully updated cache.")); @@ -618,7 +617,7 @@ fn test_pager_warning() { // Regular call should not show a "pager flag not available on windows" warning testenv .command() - .args(&["which"]) + .args(["which"]) .assert() .success() .stderr(contains("pager flag not available on Windows").not()); @@ -626,7 +625,7 @@ fn test_pager_warning() { // But it should be shown if the pager flag is true testenv .command() - .args(&["which", "-p"]) + .args(["which", "-p"]) .assert() .success() .stderr(contains("pager flag not available on Windows")); From 8051c3169a11970e020cd7dcce851ababb9c8f12 Mon Sep 17 00:00:00 2001 From: Wesley Klop Date: Mon, 6 Sep 2021 17:01:55 +0200 Subject: [PATCH 130/368] Implement support for italics (#197) Closes #146. --- src/config.rs | 11 +++++++++++ tests/config.toml | 1 + tests/inkscape-with-config.expected | 12 ++++++------ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/config.rs b/src/config.rs index 5ac7c42..a2f49ee 100644 --- a/src/config.rs +++ b/src/config.rs @@ -24,6 +24,10 @@ fn default_bold() -> bool { false } +fn default_italic() -> bool { + false +} + #[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] #[serde(rename_all = "lowercase")] pub enum RawColor { @@ -64,6 +68,8 @@ struct RawStyle { pub underline: bool, #[serde(default = "default_bold")] pub bold: bool, + #[serde(default = "default_italic")] + pub italic: bool, } impl Default for RawStyle { @@ -73,6 +79,7 @@ impl Default for RawStyle { background: None, underline: false, bold: false, + italic: false, } } } // impl RawStyle @@ -97,6 +104,10 @@ impl From for Style { style = style.bold(); } + if raw_style.italic { + style = style.italic(); + } + style } } diff --git a/tests/config.toml b/tests/config.toml index 04c09cc..3b90d90 100644 --- a/tests/config.toml +++ b/tests/config.toml @@ -18,6 +18,7 @@ underline = false [style.example_variable] underline = true bold = false +italic = true [display] use_pager = false diff --git a/tests/inkscape-with-config.expected b/tests/inkscape-with-config.expected index 9ea279f..e79b219 100644 --- a/tests/inkscape-with-config.expected +++ b/tests/inkscape-with-config.expected @@ -4,27 +4,27 @@ Open an SVG file in the Inkscape GUI: - inkscape filename.svg + inkscape filename.svg Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): - inkscape filename.svg -e filename.png + inkscape filename.svg -e filename.png Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): - inkscape filename.svg -e filename.png -w 600 -h 400 + inkscape filename.svg -e filename.png -w 600 -h 400 Export a single object, given its ID, into a bitmap: - inkscape filename.svg -i id -e object.png + inkscape filename.svg -i id -e object.png Export an SVG document to PDF, converting all texts to paths: - inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path + inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: - inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit + inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit Some invalid command just to test the correct highlighting of the command name: From 49f2f8a3dde5ba470524682c3b24af962ed5d47a Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 6 Sep 2021 17:02:53 +0200 Subject: [PATCH 131/368] Mention italic styling in docs --- docs/src/config_style.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/config_style.md b/docs/src/config_style.md index 255a44b..38709ee 100644 --- a/docs/src/config_style.md +++ b/docs/src/config_style.md @@ -18,6 +18,7 @@ Using the config file, the style (e.g. colors or underlines) can be customized. - `background` (color string, ANSI code, or RGB, see below) - `underline` (`true` or `false`) - `bold` (`true` or `false`) +- `italic` (`true` or `false`) Colors can be specified in one of three ways: From cdbca5c53b2d2f0c3fd1189a2def4cff3c58ea4d Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 21 May 2021 12:36:32 +0200 Subject: [PATCH 132/368] Add `FindFrom` extension trait to `str` to start searching at a byte offset. This also moves the contents of `dedup.rs` into a shared module `extensions`. --- src/{dedup.rs => extensions.rs} | 13 +++++++++++++ src/main.rs | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) rename src/{dedup.rs => extensions.rs} (61%) diff --git a/src/dedup.rs b/src/extensions.rs similarity index 61% rename from src/dedup.rs rename to src/extensions.rs index b06fe0c..3aebfa2 100644 --- a/src/dedup.rs +++ b/src/extensions.rs @@ -18,3 +18,16 @@ impl Dedup for Vec { } } } + +/// Like `str::find`, but starts searching at `start`. +pub(crate) trait FindFrom { + fn find_from(&self, needle: &Self, start: usize) -> Option; +} + +impl FindFrom for str { + fn find_from(&self, needle: &Self, start: usize) -> Option { + self.get(start..) + .and_then(|s| s.find(needle)) + .map(|i| i + start) + } +} diff --git a/src/main.rs b/src/main.rs index 693b793..0d68b06 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,16 +31,16 @@ use serde_derive::Deserialize; mod cache; mod config; -mod dedup; mod error; +pub mod extensions; mod formatter; mod tokenizer; mod types; use crate::cache::{Cache, PageLookupResult}; use crate::config::{get_config_dir, get_config_path, make_default_config, Config, MAX_CACHE_AGE}; -use crate::dedup::Dedup; use crate::error::TealdeerError::ConfigError; +use crate::extensions::Dedup; use crate::formatter::print_lines; use crate::tokenizer::Tokenizer; use crate::types::{ColorOptions, OsType}; From 62e82461cb182f163d2f5e4d87186b34ed1c5713 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 21 May 2021 12:38:44 +0200 Subject: [PATCH 133/368] Refactor most of `formatter.rs` This includes - adding the `HighlightingSnippet` enum as a common ground for highlighting and printing code to communicate - decomposing `print_lines` accordingly - clearing up `highlight_code_segment` (previously `highlight_command`) - adding unit tests (now that they can reason about `HighlightingSnippet`s instead of having to output on the integration test level --- src/formatter.rs | 274 ++++++++++++++++++++++++++++++++++++----------- src/main.rs | 12 ++- 2 files changed, 221 insertions(+), 65 deletions(-) diff --git a/src/formatter.rs b/src/formatter.rs index 9859c1a..dd7335d 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -1,84 +1,122 @@ //! Functions related to formatting and printing lines from a `Tokenizer`. -use std::io::{BufRead, Write}; +use std::io::{self, BufRead, Write}; -use ansi_term::{ANSIString, ANSIStrings}; use log::debug; -use crate::config::Config; +use crate::config::StyleConfig; use crate::error::TealdeerError::{self, WriteError}; +use crate::extensions::FindFrom; use crate::tokenizer::Tokenizer; use crate::types::LineType; -fn highlight_command<'a>( - command: &'a str, - example_code: &'a str, - config: &Config, - parts: &mut Vec>, -) { - let mut code_part_end_pos = 0; - while let Some(command_start) = example_code[code_part_end_pos..].find(&command) { - let code_part = &example_code[code_part_end_pos..code_part_end_pos + command_start]; - parts.push(config.style.example_code.paint(code_part)); - if code_part_end_pos == 0 { - // Only highlight command names at the start of the line ... - parts.push(config.style.command_name.paint(command)); - } else { - let char_before_command = example_code - .chars() - .nth(code_part_end_pos + command_start - 1); - if char_before_command.filter(|c| c.is_whitespace()).is_some() { - // ... or when preceded by a whitespace character. - parts.push(config.style.command_name.paint(command)); - } else { - parts.push(config.style.example_code.paint(command)); - } - } - - code_part_end_pos += command_start + command.len(); - } - parts.push( - config - .style - .example_code - .paint(&example_code[code_part_end_pos..]), - ); +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +enum HighlightingSnippet<'a> { + CommandName(&'a str), + Variable(&'a str), + NormalCode(&'a str), + Description(&'a str), + Text(&'a str), + Linebreak, } -/// Format and highlight code examples including variables in {{ curly braces }}. -fn format_code(command: &str, text: &str, config: &Config) -> String { - let mut parts = Vec::new(); - for between_variables in text.split("}}") { - if let Some(variable_start) = between_variables.find("{{") { - let example_code = &between_variables[..variable_start]; - let example_variable = &between_variables[variable_start + 2..]; +impl<'a> HighlightingSnippet<'a> { + pub fn is_empty(&self) -> bool { + use HighlightingSnippet::*; - highlight_command(command, example_code, config, &mut parts); - parts.push(config.style.example_variable.paint(example_variable)); - } else { - highlight_command(command, between_variables, config, &mut parts); + match self { + CommandName(s) | Variable(s) | NormalCode(s) | Description(s) | Text(s) => s.is_empty(), + Linebreak => false, } } +} - ANSIStrings(&parts).to_string() +/// Checks whether the characters right before and after the substring (given by half-open index interval) are whitespace (if they exist). +fn is_freestanding_substring(surrouding: &str, substring: (usize, usize)) -> bool { + let (start, end) = substring; + // "okay" meaning or + let char_before_is_okay = surrouding[..start] + .chars() + .last() + .filter(|prev_char| !prev_char.is_whitespace()) + .is_none(); + let char_after_is_okay = surrouding[end..] + .chars() + .next() + .filter(|next_char| !next_char.is_whitespace()) + .is_none(); + char_before_is_okay && char_after_is_okay +} + +/// Yields `NormalCode` and `CommandName` in alternating order according to the occurences of +/// `command_name` in `segment`. Variables are not detected here, see `highlight_code` +/// instead. +fn highlight_code_segment<'a, E>( + command_name: &'a str, + mut segment: &'a str, + yield_snippet: &mut impl FnMut(HighlightingSnippet<'a>) -> Result<(), E>, +) -> Result<(), E> { + if !command_name.is_empty() { + let mut search_start = 0; + while let Some(match_start) = segment.find_from(command_name, search_start) { + let match_end = match_start + command_name.len(); + if is_freestanding_substring(segment, (match_start, match_end)) { + yield_snippet(HighlightingSnippet::NormalCode(&segment[..match_start]))?; + yield_snippet(HighlightingSnippet::CommandName(command_name))?; + segment = &segment[match_end..]; + search_start = 0; + } else { + search_start = segment[match_start..] + .char_indices() + .nth(1) + .map_or(segment.len(), |(i, _)| match_start + i); + } + } + } + yield_snippet(HighlightingSnippet::NormalCode(segment))?; + Ok(()) +} + +/// Highlight code examples including user variables in {{ curly braces }}. +fn highlight_code<'a, E>( + command: &'a str, + text: &'a str, + yield_snippet: &mut impl FnMut(HighlightingSnippet<'a>) -> Result<(), E>, +) -> Result<(), E> { + let variable_splits = text + .split("}}") + .map(|s| s.split_once("{{").unwrap_or((s, ""))); + for (code_segment, variable) in variable_splits { + highlight_code_segment(&command, code_segment, yield_snippet)?; + yield_snippet(HighlightingSnippet::Variable(variable))?; + } + Ok(()) } /// Print a token stream to an ANSI terminal. pub fn print_lines( writer: &mut T, tokenizer: &mut Tokenizer, - config: &Config, + style: &StyleConfig, + keep_empty_lines: bool, ) -> Result<(), TealdeerError> where T: Write, R: BufRead, { let mut command = String::new(); + let mut yield_snippet = |snip: HighlightingSnippet<'_>| { + if snip.is_empty() { + Ok(()) + } else { + print_snippet(writer, snip, style).map_err(|e| WriteError(e.to_string())) + } + }; while let Some(token) = tokenizer.next_token() { match token { LineType::Empty => { - if !config.display.compact { - writeln!(writer).map_err(|e| WriteError(e.to_string()))?; + if keep_empty_lines { + yield_snippet(HighlightingSnippet::Linebreak)?; } } LineType::Title(title) => { @@ -89,20 +127,132 @@ where command = title; debug!("Detected command name: {}", &command); } - LineType::Description(text) => { - writeln!(writer, " {}", config.style.description.paint(text)) - .map_err(|e| WriteError(e.to_string()))?; - } - LineType::ExampleText(text) => { - writeln!(writer, " {}", config.style.example_text.paint(text)) - .map_err(|e| WriteError(e.to_string()))?; - } + LineType::Description(text) => yield_snippet(HighlightingSnippet::Description(&text))?, + LineType::ExampleText(text) => yield_snippet(HighlightingSnippet::Text(&text))?, LineType::ExampleCode(text) => { - writeln!(writer, " {}", format_code(&command, &text, config)) - .map_err(|e| WriteError(e.to_string()))?; + yield_snippet(HighlightingSnippet::NormalCode(" "))?; + highlight_code(&command, &text, &mut yield_snippet)?; + yield_snippet(HighlightingSnippet::Linebreak)?; } + LineType::Other(text) => debug!("Unknown line type: {:?}", text), } } - writeln!(writer).map_err(|e| WriteError(e.to_string())) + yield_snippet(HighlightingSnippet::Linebreak)?; + Ok(()) +} + +fn print_snippet( + writer: &mut impl Write, + snip: HighlightingSnippet<'_>, + style: &StyleConfig, +) -> Result<(), io::Error> { + use HighlightingSnippet::*; + + match snip { + CommandName(s) => write!(writer, "{}", style.command_name.paint(s)), + Variable(s) => write!(writer, "{}", style.example_variable.paint(s)), + NormalCode(s) => write!(writer, "{}", style.example_code.paint(s)), + Description(s) => writeln!(writer, " {}", style.description.paint(s)), + Text(s) => writeln!(writer, " {}", style.example_text.paint(s)), + Linebreak => writeln!(writer), + } +} + +#[cfg(test)] +mod tests { + use super::*; + use HighlightingSnippet::*; + + #[test] + fn test_is_freestanding_substring() { + assert!(is_freestanding_substring("I love tldr", (0, 1))); + assert!(is_freestanding_substring("I love tldr", (2, 6))); + assert!(is_freestanding_substring("I love tldr", (7, 11))); + + assert!(is_freestanding_substring("tldr", (0, 4))); + assert!(is_freestanding_substring("tldr ", (0, 4))); + assert!(is_freestanding_substring(" tldr", (1, 5))); + assert!(is_freestanding_substring(" tldr ", (1, 5))); + + assert!(!is_freestanding_substring("tldr", (1, 3))); + assert!(!is_freestanding_substring("tldr ", (1, 4))); + assert!(!is_freestanding_substring(" tldr", (1, 4))); + + assert!(is_freestanding_substring( + " épicé ", + (1, " épicé".len()) // note the missing trailing space + )); + assert!(!is_freestanding_substring( + " épicé ", + (1, " épic".len()) // note the missing trailing space and character + )); + } + + fn run<'a>(cmd: &'a str, segment: &'a str) -> Vec> { + let mut yielded = Vec::new(); + let mut yield_snippet = |snip: HighlightingSnippet<'a>| { + if !snip.is_empty() { + yielded.push(snip); + } + Ok::<(), ()>(()) + }; + + highlight_code_segment(cmd, segment, &mut yield_snippet) + .expect("highlight code segment failed"); + yielded + } + + #[test] + fn test_highlight_code_segment() { + assert!(run("make", "").is_empty()); + assert_eq!( + &run("make", "make all CC=clang -q"), + &[CommandName("make"), NormalCode(" all CC=clang -q")] + ); + assert_eq!( + &run("make", " make money --always-make"), + &[ + NormalCode(" "), + CommandName("make"), + NormalCode(" money --always-make") + ] + ); + assert_eq!( + &run("git commit", "git commit -m 'git commit'"), + &[CommandName("git commit"), NormalCode(" -m 'git commit'"),] + ); + } + + #[test] + fn test_i18n() { + assert_eq!( + &run("mäke", "mäke höhlenrätselbücher"), + &[CommandName("mäke"), NormalCode(" höhlenrätselbücher")] + ); + assert_eq!( + &run( + "Müll", + "1000 Gründe warum Müll heute größer ist als Müll früher, ärgerlich" + ), + &[ + NormalCode("1000 Gründe warum "), + CommandName("Müll"), + NormalCode(" heute größer ist als "), + CommandName("Müll"), + NormalCode(" früher, ärgerlich") + ] + ); + assert_eq!( + &run( + "übergang", + "die Zustandsübergangsfunktion übergang Änderungen", + ), + &[ + NormalCode("die Zustandsübergangsfunktion "), + CommandName("übergang"), + NormalCode(" Änderungen") + ], + ); + } } diff --git a/src/main.rs b/src/main.rs index 0d68b06..ffdfb92 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,8 +10,9 @@ #![deny(clippy::all)] #![warn(clippy::pedantic)] -#![allow(clippy::similar_names)] +#![allow(clippy::enum_glob_use)] #![allow(clippy::module_name_repetitions)] +#![allow(clippy::similar_names)] #![allow(clippy::too_many_lines)] use std::fs::File; @@ -99,8 +100,13 @@ fn print_page( } else { // Create tokenizer and print output let mut tokenizer = Tokenizer::new(reader); - print_lines(&mut handle, &mut tokenizer, config) - .map_err(|e| format!("Could not write to stdout: {}", e.message()))?; + print_lines( + &mut handle, + &mut tokenizer, + &config.style, + !config.display.compact, + ) + .map_err(|e| format!("Could not write to stdout: {}", e.message()))?; }; } From e8b1c9e801cc07348e2d7e550fd5a6b473479bbd Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 2 Jun 2021 21:04:05 +0200 Subject: [PATCH 134/368] Rename `Tokenizer` to `LineIterator` This also replaces the `next_token` method with the `next` method from the `Iterator` trait. --- src/formatter.rs | 14 +++--- src/{tokenizer.rs => line_iterator.rs} | 68 +++++++++++++------------- src/main.rs | 8 ++- 3 files changed, 44 insertions(+), 46 deletions(-) rename src/{tokenizer.rs => line_iterator.rs} (53%) diff --git a/src/formatter.rs b/src/formatter.rs index dd7335d..9a26c1d 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -1,13 +1,12 @@ //! Functions related to formatting and printing lines from a `Tokenizer`. -use std::io::{self, BufRead, Write}; +use std::io::{self, Write}; use log::debug; use crate::config::StyleConfig; use crate::error::TealdeerError::{self, WriteError}; use crate::extensions::FindFrom; -use crate::tokenizer::Tokenizer; use crate::types::LineType; #[derive(Debug, Clone, Copy, PartialEq, Eq)] @@ -94,15 +93,14 @@ fn highlight_code<'a, E>( } /// Print a token stream to an ANSI terminal. -pub fn print_lines( +pub fn print_lines( writer: &mut T, - tokenizer: &mut Tokenizer, + lines: impl Iterator, style: &StyleConfig, keep_empty_lines: bool, ) -> Result<(), TealdeerError> where T: Write, - R: BufRead, { let mut command = String::new(); let mut yield_snippet = |snip: HighlightingSnippet<'_>| { @@ -112,8 +110,8 @@ where print_snippet(writer, snip, style).map_err(|e| WriteError(e.to_string())) } }; - while let Some(token) = tokenizer.next_token() { - match token { + for line in lines { + match line { LineType::Empty => { if keep_empty_lines { yield_snippet(HighlightingSnippet::Linebreak)?; @@ -123,7 +121,7 @@ where debug!("Ignoring title"); // This is safe as long as the parsed title is only the command, - // and tokenizer yields values in order of appearance. + // and the iterator yields values in order of appearance. command = title; debug!("Detected command name: {}", &command); } diff --git a/src/tokenizer.rs b/src/line_iterator.rs similarity index 53% rename from src/tokenizer.rs rename to src/line_iterator.rs index f9b3837..c1fbb0f 100644 --- a/src/tokenizer.rs +++ b/src/line_iterator.rs @@ -1,4 +1,4 @@ -//! Code to tokenize a `BufRead` instance into an iterator of `LineType`s. +//! Code to split a `BufRead` instance into an iterator of `LineType`s. use std::io::BufRead; @@ -15,13 +15,13 @@ pub enum TldrFormat { V2, } -/// A tokenizer is initialized with a `BufReader` instance that contains the -/// entire Tldr page. It then returns tokens as `Option`. +/// A `LineIterator` is initialized with a `BufReader` instance that contains the +/// entire Tldr page. It then implements `Iterator`. #[derive(Debug)] -pub struct Tokenizer { +pub struct LineIterator { /// An instance of `R: BufRead`. reader: R, - /// Whether the first line has already been tokenized or not. + /// Whether the first line has already been processed or not. first_line: bool, /// Buffer for the current line. Used internally. current_line: String, @@ -29,7 +29,7 @@ pub struct Tokenizer { format: TldrFormat, } -impl Tokenizer +impl LineIterator where R: BufRead, { @@ -41,38 +41,40 @@ where format: TldrFormat::Undecided, } } +} - pub fn next_token(&mut self) -> Option { +impl Iterator for LineIterator { + type Item = LineType; + + fn next(&mut self) -> Option { self.current_line.clear(); let bytes_read = self.reader.read_line(&mut self.current_line); match bytes_read { Ok(0) => None, Err(e) => { - warn!("Could not read line from token reader: {:?}", e); + warn!("Could not read line from reader: {:?}", e); None } Ok(_) => { // Handle new titles - if self.first_line && !self.current_line.starts_with('#') { - // It's the new format! Drop next line. - // (Hmm, is there a way to do this without an allocation?) - let mut devnull = String::new(); - if let Err(e) = self.reader.read_line(&mut devnull) { - warn!("Could not read line from token reader: {:?}", e); - return None; - } - self.first_line = false; - self.format = TldrFormat::V2; - return Some(LineType::Title(self.current_line.trim_end().to_string())); - } - if self.first_line { - // Clear `first_line` flag - self.first_line = false; - - // It's the old format. - self.format = TldrFormat::V1; + if self.current_line.starts_with('#') { + // It's the old format. + self.format = TldrFormat::V1; + } else { + // It's the new format! Drop next line. + // (Hmm, is there a way to do this without an allocation?) + let mut devnull = String::new(); + if let Err(e) = self.reader.read_line(&mut devnull) { + warn!("Could not read line from reader: {:?}", e); + return None; + } + self.first_line = false; + self.format = TldrFormat::V2; + return Some(LineType::Title(self.current_line.trim_end().to_string())); + } } + self.first_line = false; // Convert line to a `LineType` instance match self.format { @@ -87,26 +89,26 @@ where #[cfg(test)] mod test { - use super::Tokenizer; + use super::LineIterator; use crate::types::LineType; #[test] fn test_first_line_old_format() { let input = "# The Title\n\n"; - let mut tokenizer = Tokenizer::new(input.as_bytes()); - let title = tokenizer.next_token().unwrap(); + let mut lines = LineIterator::new(input.as_bytes()); + let title = lines.next().unwrap(); assert_eq!(title, LineType::Title("The Title".to_string())); - let empty = tokenizer.next_token().unwrap(); + let empty = lines.next().unwrap(); assert_eq!(empty, LineType::Empty); } #[test] fn test_first_line_new_format() { let input = "The Title\n=========\n\n"; - let mut tokenizer = Tokenizer::new(input.as_bytes()); - let title = tokenizer.next_token().unwrap(); + let mut lines = LineIterator::new(input.as_bytes()); + let title = lines.next().unwrap(); assert_eq!(title, LineType::Title("The Title".to_string())); - let empty = tokenizer.next_token().unwrap(); + let empty = lines.next().unwrap(); assert_eq!(empty, LineType::Empty); } } diff --git a/src/main.rs b/src/main.rs index ffdfb92..be65e26 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,7 +35,7 @@ mod config; mod error; pub mod extensions; mod formatter; -mod tokenizer; +mod line_iterator; mod types; use crate::cache::{Cache, PageLookupResult}; @@ -43,7 +43,7 @@ use crate::config::{get_config_dir, get_config_path, make_default_config, Config use crate::error::TealdeerError::ConfigError; use crate::extensions::Dedup; use crate::formatter::print_lines; -use crate::tokenizer::Tokenizer; +use crate::line_iterator::LineIterator; use crate::types::{ColorOptions, OsType}; const NAME: &str = "tealdeer"; @@ -98,11 +98,9 @@ fn print_page( .map_err(|_| "Could not write to stdout".to_string())?; } } else { - // Create tokenizer and print output - let mut tokenizer = Tokenizer::new(reader); print_lines( &mut handle, - &mut tokenizer, + LineIterator::new(reader), &config.style, !config.display.compact, ) From 808ad7ff303ef21c43de08eb350ce1cf4b6f12d7 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 2 Jun 2021 22:01:02 +0200 Subject: [PATCH 135/368] Extract output logic for pages into own module This moves `print_page` from `main.rs` and `print_snippet` from `formatter.rs` into a new file `output.rs`. To decompose `print_snippet` from `print_lines`, the latter now takes the `yield_snippet` callable as an argument (similar to how the helper methods got a hold of it). In order for this to work, callers have to provide a function that is generic over all possible snippet lifetimes. --- src/formatter.rs | 48 +++++++------------------------- src/main.rs | 46 ++----------------------------- src/output.rs | 71 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 81 deletions(-) create mode 100644 src/output.rs diff --git a/src/formatter.rs b/src/formatter.rs index 9a26c1d..54d805d 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -1,16 +1,12 @@ //! Functions related to formatting and printing lines from a `Tokenizer`. -use std::io::{self, Write}; - -use log::debug; - -use crate::config::StyleConfig; -use crate::error::TealdeerError::{self, WriteError}; use crate::extensions::FindFrom; use crate::types::LineType; +use log::debug; + #[derive(Debug, Clone, Copy, PartialEq, Eq)] -enum HighlightingSnippet<'a> { +pub enum HighlightingSnippet<'a> { CommandName(&'a str), Variable(&'a str), NormalCode(&'a str), @@ -93,23 +89,16 @@ fn highlight_code<'a, E>( } /// Print a token stream to an ANSI terminal. -pub fn print_lines( - writer: &mut T, - lines: impl Iterator, - style: &StyleConfig, +pub fn highlight_lines( + lines: L, + yield_snippet: &mut F, keep_empty_lines: bool, -) -> Result<(), TealdeerError> +) -> Result<(), E> where - T: Write, + L: Iterator, + F: for<'snip> FnMut(HighlightingSnippet<'snip>) -> Result<(), E>, { let mut command = String::new(); - let mut yield_snippet = |snip: HighlightingSnippet<'_>| { - if snip.is_empty() { - Ok(()) - } else { - print_snippet(writer, snip, style).map_err(|e| WriteError(e.to_string())) - } - }; for line in lines { match line { LineType::Empty => { @@ -129,7 +118,7 @@ where LineType::ExampleText(text) => yield_snippet(HighlightingSnippet::Text(&text))?, LineType::ExampleCode(text) => { yield_snippet(HighlightingSnippet::NormalCode(" "))?; - highlight_code(&command, &text, &mut yield_snippet)?; + highlight_code(&command, &text, yield_snippet)?; yield_snippet(HighlightingSnippet::Linebreak)?; } @@ -140,23 +129,6 @@ where Ok(()) } -fn print_snippet( - writer: &mut impl Write, - snip: HighlightingSnippet<'_>, - style: &StyleConfig, -) -> Result<(), io::Error> { - use HighlightingSnippet::*; - - match snip { - CommandName(s) => write!(writer, "{}", style.command_name.paint(s)), - Variable(s) => write!(writer, "{}", style.example_variable.paint(s)), - NormalCode(s) => write!(writer, "{}", style.example_code.paint(s)), - Description(s) => writeln!(writer, " {}", style.description.paint(s)), - Text(s) => writeln!(writer, " {}", style.example_text.paint(s)), - Linebreak => writeln!(writer), - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/src/main.rs b/src/main.rs index be65e26..69011b9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,12 +15,9 @@ #![allow(clippy::similar_names)] #![allow(clippy::too_many_lines)] -use std::fs::File; -use std::io::BufRead; -use std::io::BufReader; +use std::env; use std::path::PathBuf; use std::process; -use std::{env, io::Write}; use ansi_term::{Color, Style}; use app_dirs::AppInfo; @@ -36,14 +33,14 @@ mod error; pub mod extensions; mod formatter; mod line_iterator; +mod output; mod types; use crate::cache::{Cache, PageLookupResult}; use crate::config::{get_config_dir, get_config_path, make_default_config, Config, MAX_CACHE_AGE}; use crate::error::TealdeerError::ConfigError; use crate::extensions::Dedup; -use crate::formatter::print_lines; -use crate::line_iterator::LineIterator; +use crate::output::print_page; use crate::types::{ColorOptions, OsType}; const NAME: &str = "tealdeer"; @@ -78,43 +75,6 @@ struct Args { flag_language: Option, } -/// Print page by path -fn print_page( - page: &PageLookupResult, - enable_markdown: bool, - config: &Config, -) -> Result<(), String> { - let stdout = std::io::stdout(); - let mut handle = stdout.lock(); - - for path in page.paths() { - let file = File::open(path).map_err(|msg| format!("Could not open file: {}", msg))?; - let reader = BufReader::new(file); - - if enable_markdown { - // Print the raw markdown of the file. - for line in reader.lines() { - writeln!(handle, "{}", line.unwrap()) - .map_err(|_| "Could not write to stdout".to_string())?; - } - } else { - print_lines( - &mut handle, - LineIterator::new(reader), - &config.style, - !config.display.compact, - ) - .map_err(|e| format!("Could not write to stdout: {}", e.message()))?; - }; - } - - handle - .flush() - .map_err(|_| "Could not flush stdout".to_string())?; - - Ok(()) -} - /// Set up display pager #[cfg(not(target_os = "windows"))] fn configure_pager() { diff --git a/src/output.rs b/src/output.rs new file mode 100644 index 0000000..cc3c7a0 --- /dev/null +++ b/src/output.rs @@ -0,0 +1,71 @@ +//! Functions for printing pages to the terminal + +use std::fs::File; +use std::io::{self, BufRead, BufReader, Write}; + +use crate::cache::PageLookupResult; +use crate::config::{Config, StyleConfig}; +use crate::error::TealdeerError::WriteError; +use crate::formatter::{highlight_lines, HighlightingSnippet}; +use crate::line_iterator::LineIterator; + +/// Print page by path +pub fn print_page( + page: &PageLookupResult, + enable_markdown: bool, + config: &Config, +) -> Result<(), String> { + let stdout = io::stdout(); + let mut handle = stdout.lock(); + + for path in page.paths() { + let file = File::open(path).map_err(|msg| format!("Could not open file: {}", msg))?; + let reader = BufReader::new(file); + + if enable_markdown { + // Print the raw markdown of the file. + for line in reader.lines() { + writeln!(handle, "{}", line.unwrap()) + .map_err(|_| "Could not write to stdout".to_string())?; + } + } else { + let mut yield_snippet = |snip: HighlightingSnippet<'_>| { + if snip.is_empty() { + Ok(()) + } else { + print_snippet(&mut handle, snip, &config.style) + .map_err(|e| WriteError(e.to_string())) + } + }; + highlight_lines( + LineIterator::new(reader), + &mut yield_snippet, + !config.display.compact, + ) + .map_err(|e| format!("Could not write to stdout: {}", e.message()))?; + }; + } + + handle + .flush() + .map_err(|_| "Could not flush stdout".to_string())?; + + Ok(()) +} + +fn print_snippet( + writer: &mut impl Write, + snip: HighlightingSnippet<'_>, + style: &StyleConfig, +) -> Result<(), io::Error> { + use HighlightingSnippet::*; + + match snip { + CommandName(s) => write!(writer, "{}", style.command_name.paint(s)), + Variable(s) => write!(writer, "{}", style.example_variable.paint(s)), + NormalCode(s) => write!(writer, "{}", style.example_code.paint(s)), + Description(s) => writeln!(writer, " {}", style.description.paint(s)), + Text(s) => writeln!(writer, " {}", style.example_text.paint(s)), + Linebreak => writeln!(writer), + } +} From 743998a75fd398906826c01cf3050f7f158efdfc Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 2 Jun 2021 22:23:35 +0200 Subject: [PATCH 136/368] Reorder functions in `formatter.rs` As someone reading this file for the first time, I would want to see the only public and most general function first and find the specifics further down instead of having to look for the "module entry" first. --- src/formatter.rs | 127 ++++++++++++++++++++++++----------------------- 1 file changed, 64 insertions(+), 63 deletions(-) diff --git a/src/formatter.rs b/src/formatter.rs index 54d805d..af33ae9 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -6,6 +6,7 @@ use crate::types::LineType; use log::debug; #[derive(Debug, Clone, Copy, PartialEq, Eq)] +/// Represents a snippet from a page from a specific highlighting class. pub enum HighlightingSnippet<'a> { CommandName(&'a str), Variable(&'a str), @@ -26,69 +27,7 @@ impl<'a> HighlightingSnippet<'a> { } } -/// Checks whether the characters right before and after the substring (given by half-open index interval) are whitespace (if they exist). -fn is_freestanding_substring(surrouding: &str, substring: (usize, usize)) -> bool { - let (start, end) = substring; - // "okay" meaning or - let char_before_is_okay = surrouding[..start] - .chars() - .last() - .filter(|prev_char| !prev_char.is_whitespace()) - .is_none(); - let char_after_is_okay = surrouding[end..] - .chars() - .next() - .filter(|next_char| !next_char.is_whitespace()) - .is_none(); - char_before_is_okay && char_after_is_okay -} - -/// Yields `NormalCode` and `CommandName` in alternating order according to the occurences of -/// `command_name` in `segment`. Variables are not detected here, see `highlight_code` -/// instead. -fn highlight_code_segment<'a, E>( - command_name: &'a str, - mut segment: &'a str, - yield_snippet: &mut impl FnMut(HighlightingSnippet<'a>) -> Result<(), E>, -) -> Result<(), E> { - if !command_name.is_empty() { - let mut search_start = 0; - while let Some(match_start) = segment.find_from(command_name, search_start) { - let match_end = match_start + command_name.len(); - if is_freestanding_substring(segment, (match_start, match_end)) { - yield_snippet(HighlightingSnippet::NormalCode(&segment[..match_start]))?; - yield_snippet(HighlightingSnippet::CommandName(command_name))?; - segment = &segment[match_end..]; - search_start = 0; - } else { - search_start = segment[match_start..] - .char_indices() - .nth(1) - .map_or(segment.len(), |(i, _)| match_start + i); - } - } - } - yield_snippet(HighlightingSnippet::NormalCode(segment))?; - Ok(()) -} - -/// Highlight code examples including user variables in {{ curly braces }}. -fn highlight_code<'a, E>( - command: &'a str, - text: &'a str, - yield_snippet: &mut impl FnMut(HighlightingSnippet<'a>) -> Result<(), E>, -) -> Result<(), E> { - let variable_splits = text - .split("}}") - .map(|s| s.split_once("{{").unwrap_or((s, ""))); - for (code_segment, variable) in variable_splits { - highlight_code_segment(&command, code_segment, yield_snippet)?; - yield_snippet(HighlightingSnippet::Variable(variable))?; - } - Ok(()) -} - -/// Print a token stream to an ANSI terminal. +/// Parse the content of each line yielded by `lines` and yield `HighLightingSnippet`s accordingly. pub fn highlight_lines( lines: L, yield_snippet: &mut F, @@ -129,6 +68,68 @@ where Ok(()) } +/// Highlight code examples including user variables in {{ curly braces }}. +fn highlight_code<'a, E>( + command: &'a str, + text: &'a str, + yield_snippet: &mut impl FnMut(HighlightingSnippet<'a>) -> Result<(), E>, +) -> Result<(), E> { + let variable_splits = text + .split("}}") + .map(|s| s.split_once("{{").unwrap_or((s, ""))); + for (code_segment, variable) in variable_splits { + highlight_code_segment(command, code_segment, yield_snippet)?; + yield_snippet(HighlightingSnippet::Variable(variable))?; + } + Ok(()) +} + +/// Yields `NormalCode` and `CommandName` in alternating order according to the occurences of +/// `command_name` in `segment`. Variables are not detected here, see `highlight_code` +/// instead. +fn highlight_code_segment<'a, E>( + command_name: &'a str, + mut segment: &'a str, + yield_snippet: &mut impl FnMut(HighlightingSnippet<'a>) -> Result<(), E>, +) -> Result<(), E> { + if !command_name.is_empty() { + let mut search_start = 0; + while let Some(match_start) = segment.find_from(command_name, search_start) { + let match_end = match_start + command_name.len(); + if is_freestanding_substring(segment, (match_start, match_end)) { + yield_snippet(HighlightingSnippet::NormalCode(&segment[..match_start]))?; + yield_snippet(HighlightingSnippet::CommandName(command_name))?; + segment = &segment[match_end..]; + search_start = 0; + } else { + search_start = segment[match_start..] + .char_indices() + .nth(1) + .map_or(segment.len(), |(i, _)| match_start + i); + } + } + } + yield_snippet(HighlightingSnippet::NormalCode(segment))?; + Ok(()) +} + +/// Checks whether the characters right before and after the substring (given by half-open index interval) are whitespace (if they exist). +fn is_freestanding_substring(surrouding: &str, substring: (usize, usize)) -> bool { + let (start, end) = substring; + // "okay" meaning or + let char_before_is_okay = surrouding[..start] + .chars() + .last() + .filter(|prev_char| !prev_char.is_whitespace()) + .is_none(); + let char_after_is_okay = surrouding[end..] + .chars() + .next() + .filter(|next_char| !next_char.is_whitespace()) + .is_none(); + char_before_is_okay && char_after_is_okay +} + #[cfg(test)] mod tests { use super::*; From 22baa455b5f9e2e2e331771ba74b194648b03f34 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 2 Jun 2021 22:31:05 +0200 Subject: [PATCH 137/368] Update inkscape-default.expected --- tests/inkscape-default.expected | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/inkscape-default.expected b/tests/inkscape-default.expected index 7350de7..da909f2 100644 --- a/tests/inkscape-default.expected +++ b/tests/inkscape-default.expected @@ -4,29 +4,29 @@ Open an SVG file in the Inkscape GUI: - inkscape filename.svg + inkscape filename.svg Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): - inkscape filename.svg -e filename.png + inkscape filename.svg -e filename.png Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): - inkscape filename.svg -e filename.png -w 600 -h 400 + inkscape filename.svg -e filename.png -w 600 -h 400 Export a single object, given its ID, into a bitmap: - inkscape filename.svg -i id -e object.png + inkscape filename.svg -i id -e object.png Export an SVG document to PDF, converting all texts to paths: - inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path + inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: - inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit + inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit Some invalid command just to test the correct highlighting of the command name: - inkscape --use-inkscape=v3.0 file + inkscape --use-inkscape=v3.0 file From b216a63c64568dfb28a5a1fc7f1b4ef4fbe5d191 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 2 Jun 2021 22:49:37 +0200 Subject: [PATCH 138/368] Add integration test for non-ascii page rendering Although this did not fail on old master, it is still an important case to test. Actually, this test doesn't even break when introducing some errors that fail i18n unit tests, unless the command name itself is non-ascii. --- tests/chmod.ru.expected | 32 ++++++++++++++++++++++++++++++++ tests/chmod.ru.md | 32 ++++++++++++++++++++++++++++++++ tests/lib.rs | 10 ++++++++++ 3 files changed, 74 insertions(+) create mode 100644 tests/chmod.ru.expected create mode 100644 tests/chmod.ru.md diff --git a/tests/chmod.ru.expected b/tests/chmod.ru.expected new file mode 100644 index 0000000..c7f92c2 --- /dev/null +++ b/tests/chmod.ru.expected @@ -0,0 +1,32 @@ + + Изменить права доступа файлу или папке. + Больше информации: . + + Дать [u]пользователю, который владеет файлом, права на его [x]исполнение: + + chmod u+x файл + + Дать права [u]пользователю права [r]чтения и [w]записи в файл/папку: + + chmod u+rw файл_или_папка + + Убрать права на [x]исполнение у [g]группы: + + chmod g-x файл + + Дать [a]всем пользователям права на [r]чтение и [x]исполенеие: + + chmod a+rx файл + + Дать [o]другим (не из группы владельцев файлом) такие же права как и у [g]группы: + + chmod o=g файл + + Убрать все права у [o]других: + + chmod o= файл + + Изменить права рекурсивно, дав [g]группе и [o]другим возможность [w]записи в папку: + + chmod -R g+w,o+w папка + diff --git a/tests/chmod.ru.md b/tests/chmod.ru.md new file mode 100644 index 0000000..4b92329 --- /dev/null +++ b/tests/chmod.ru.md @@ -0,0 +1,32 @@ +# chmod + +> Изменить права доступа файлу или папке. +> Больше информации: . + +- Дать [u]пользователю, который владеет файлом, права на его [x]исполнение: + +`chmod u+x {{файл}}` + +- Дать права [u]пользователю права [r]чтения и [w]записи в файл/папку: + +`chmod u+rw {{файл_или_папка}}` + +- Убрать права на [x]исполнение у [g]группы: + +`chmod g-x {{файл}}` + +- Дать [a]всем пользователям права на [r]чтение и [x]исполенеие: + +`chmod a+rx {{файл}}` + +- Дать [o]другим (не из группы владельцев файлом) такие же права как и у [g]группы: + +`chmod o=g {{файл}}` + +- Убрать все права у [o]других: + +`chmod o= {{файл}}` + +- Изменить права рекурсивно, дав [g]группе и [o]другим возможность [w]записи в папку: + +`chmod -R g+w,o+w {{папка}}` diff --git a/tests/lib.rs b/tests/lib.rs index 769901a..9a77373 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -362,6 +362,16 @@ fn test_rendering_color_never() { ); } +#[test] +fn test_rendering_i18n() { + _test_correct_rendering( + include_str!("chmod.ru.md"), + "chmod.ru.md", + include_str!("chmod.ru.expected"), + "always", + ); +} + /// An end-to-end integration test for rendering with custom syntax config. #[test] fn test_correct_rendering_with_config() { From 3ac087ae415eab3d4f36e8afed3f0f3fa5a9137a Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 8 Sep 2021 15:02:25 +0200 Subject: [PATCH 139/368] Final touches for formatting refactor - Rename: `yield_snippet` => `process_snippet` - Rename: `HighlightingSnippet` => `PageSnippet` --- src/formatter.rs | 48 ++++++++++++++++++++++++------------------------ src/output.rs | 10 +++++----- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/formatter.rs b/src/formatter.rs index af33ae9..d1cfde4 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -6,8 +6,8 @@ use crate::types::LineType; use log::debug; #[derive(Debug, Clone, Copy, PartialEq, Eq)] -/// Represents a snippet from a page from a specific highlighting class. -pub enum HighlightingSnippet<'a> { +/// Represents a snippet from a page of a specific highlighting class. +pub enum PageSnippet<'a> { CommandName(&'a str), Variable(&'a str), NormalCode(&'a str), @@ -16,9 +16,9 @@ pub enum HighlightingSnippet<'a> { Linebreak, } -impl<'a> HighlightingSnippet<'a> { +impl<'a> PageSnippet<'a> { pub fn is_empty(&self) -> bool { - use HighlightingSnippet::*; + use PageSnippet::*; match self { CommandName(s) | Variable(s) | NormalCode(s) | Description(s) | Text(s) => s.is_empty(), @@ -30,19 +30,19 @@ impl<'a> HighlightingSnippet<'a> { /// Parse the content of each line yielded by `lines` and yield `HighLightingSnippet`s accordingly. pub fn highlight_lines( lines: L, - yield_snippet: &mut F, + process_snippet: &mut F, keep_empty_lines: bool, ) -> Result<(), E> where L: Iterator, - F: for<'snip> FnMut(HighlightingSnippet<'snip>) -> Result<(), E>, + F: for<'snip> FnMut(PageSnippet<'snip>) -> Result<(), E>, { let mut command = String::new(); for line in lines { match line { LineType::Empty => { if keep_empty_lines { - yield_snippet(HighlightingSnippet::Linebreak)?; + process_snippet(PageSnippet::Linebreak)?; } } LineType::Title(title) => { @@ -53,18 +53,18 @@ where command = title; debug!("Detected command name: {}", &command); } - LineType::Description(text) => yield_snippet(HighlightingSnippet::Description(&text))?, - LineType::ExampleText(text) => yield_snippet(HighlightingSnippet::Text(&text))?, + LineType::Description(text) => process_snippet(PageSnippet::Description(&text))?, + LineType::ExampleText(text) => process_snippet(PageSnippet::Text(&text))?, LineType::ExampleCode(text) => { - yield_snippet(HighlightingSnippet::NormalCode(" "))?; - highlight_code(&command, &text, yield_snippet)?; - yield_snippet(HighlightingSnippet::Linebreak)?; + process_snippet(PageSnippet::NormalCode(" "))?; + highlight_code(&command, &text, process_snippet)?; + process_snippet(PageSnippet::Linebreak)?; } LineType::Other(text) => debug!("Unknown line type: {:?}", text), } } - yield_snippet(HighlightingSnippet::Linebreak)?; + process_snippet(PageSnippet::Linebreak)?; Ok(()) } @@ -72,14 +72,14 @@ where fn highlight_code<'a, E>( command: &'a str, text: &'a str, - yield_snippet: &mut impl FnMut(HighlightingSnippet<'a>) -> Result<(), E>, + process_snippet: &mut impl FnMut(PageSnippet<'a>) -> Result<(), E>, ) -> Result<(), E> { let variable_splits = text .split("}}") .map(|s| s.split_once("{{").unwrap_or((s, ""))); for (code_segment, variable) in variable_splits { - highlight_code_segment(command, code_segment, yield_snippet)?; - yield_snippet(HighlightingSnippet::Variable(variable))?; + highlight_code_segment(command, code_segment, process_snippet)?; + process_snippet(PageSnippet::Variable(variable))?; } Ok(()) } @@ -90,15 +90,15 @@ fn highlight_code<'a, E>( fn highlight_code_segment<'a, E>( command_name: &'a str, mut segment: &'a str, - yield_snippet: &mut impl FnMut(HighlightingSnippet<'a>) -> Result<(), E>, + process_snippet: &mut impl FnMut(PageSnippet<'a>) -> Result<(), E>, ) -> Result<(), E> { if !command_name.is_empty() { let mut search_start = 0; while let Some(match_start) = segment.find_from(command_name, search_start) { let match_end = match_start + command_name.len(); if is_freestanding_substring(segment, (match_start, match_end)) { - yield_snippet(HighlightingSnippet::NormalCode(&segment[..match_start]))?; - yield_snippet(HighlightingSnippet::CommandName(command_name))?; + process_snippet(PageSnippet::NormalCode(&segment[..match_start]))?; + process_snippet(PageSnippet::CommandName(command_name))?; segment = &segment[match_end..]; search_start = 0; } else { @@ -109,7 +109,7 @@ fn highlight_code_segment<'a, E>( } } } - yield_snippet(HighlightingSnippet::NormalCode(segment))?; + process_snippet(PageSnippet::NormalCode(segment))?; Ok(()) } @@ -133,7 +133,7 @@ fn is_freestanding_substring(surrouding: &str, substring: (usize, usize)) -> boo #[cfg(test)] mod tests { use super::*; - use HighlightingSnippet::*; + use PageSnippet::*; #[test] fn test_is_freestanding_substring() { @@ -160,16 +160,16 @@ mod tests { )); } - fn run<'a>(cmd: &'a str, segment: &'a str) -> Vec> { + fn run<'a>(cmd: &'a str, segment: &'a str) -> Vec> { let mut yielded = Vec::new(); - let mut yield_snippet = |snip: HighlightingSnippet<'a>| { + let mut process_snippet = |snip: PageSnippet<'a>| { if !snip.is_empty() { yielded.push(snip); } Ok::<(), ()>(()) }; - highlight_code_segment(cmd, segment, &mut yield_snippet) + highlight_code_segment(cmd, segment, &mut process_snippet) .expect("highlight code segment failed"); yielded } diff --git a/src/output.rs b/src/output.rs index cc3c7a0..25b9bc3 100644 --- a/src/output.rs +++ b/src/output.rs @@ -6,7 +6,7 @@ use std::io::{self, BufRead, BufReader, Write}; use crate::cache::PageLookupResult; use crate::config::{Config, StyleConfig}; use crate::error::TealdeerError::WriteError; -use crate::formatter::{highlight_lines, HighlightingSnippet}; +use crate::formatter::{highlight_lines, PageSnippet}; use crate::line_iterator::LineIterator; /// Print page by path @@ -29,7 +29,7 @@ pub fn print_page( .map_err(|_| "Could not write to stdout".to_string())?; } } else { - let mut yield_snippet = |snip: HighlightingSnippet<'_>| { + let mut process_snippet = |snip: PageSnippet<'_>| { if snip.is_empty() { Ok(()) } else { @@ -39,7 +39,7 @@ pub fn print_page( }; highlight_lines( LineIterator::new(reader), - &mut yield_snippet, + &mut process_snippet, !config.display.compact, ) .map_err(|e| format!("Could not write to stdout: {}", e.message()))?; @@ -55,10 +55,10 @@ pub fn print_page( fn print_snippet( writer: &mut impl Write, - snip: HighlightingSnippet<'_>, + snip: PageSnippet<'_>, style: &StyleConfig, ) -> Result<(), io::Error> { - use HighlightingSnippet::*; + use PageSnippet::*; match snip { CommandName(s) => write!(writer, "{}", style.command_name.paint(s)), From 1471b1d97be144d23834b526a2c831a06253a81f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sun, 12 Sep 2021 20:28:22 +0200 Subject: [PATCH 140/368] Create cache directory path if it does not exist (#174) Fixes #167 --- src/cache.rs | 37 ++++++++++++++++++++++++++----------- tests/lib.rs | 52 ++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 74 insertions(+), 15 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 081dea2..fb55349 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -16,6 +16,8 @@ use walkdir::{DirEntry, WalkDir}; use crate::error::TealdeerError::{self, CacheError, UpdateError}; use crate::types::{OsType, PathSource}; +static CACHE_DIR_ENV_VAR: &str = "TEALDEER_CACHE_DIR"; + #[derive(Debug)] pub struct Cache { url: String, @@ -59,19 +61,32 @@ impl Cache { /// Return the path to the cache directory. pub fn get_cache_dir() -> Result<(PathBuf, PathSource), TealdeerError> { - // Allow overriding the cache directory by setting the - // $TEALDEER_CACHE_DIR env variable. - if let Ok(value) = env::var("TEALDEER_CACHE_DIR") { + // Allow overriding the cache directory by setting the env variable. + if let Ok(value) = env::var(CACHE_DIR_ENV_VAR) { let path = PathBuf::from(value); - - if path.exists() && path.is_dir() { - return Ok((path, PathSource::EnvVar)); + let (path_exists, path_is_dir) = path + .metadata() + .map_or((false, false), |md| (true, md.is_dir())); + if path_exists && !path_is_dir { + return Err(CacheError(format!( + "Path specified by ${} is not a directory.", + CACHE_DIR_ENV_VAR + ))); } - return Err(CacheError( - "Path specified by $TEALDEER_CACHE_DIR \ - does not exist or is not a directory." - .into(), - )); + if !path_exists { + // Try to create the complete directory path. + fs::create_dir_all(&path).map_err(|_| { + CacheError(format!( + "Directory path specified by ${} cannot be created.", + CACHE_DIR_ENV_VAR + )) + })?; + eprintln!( + "Successfully created cache directory path `{}`.", + path.to_str().unwrap() + ); + } + return Ok((path, PathSource::EnvVar)); }; // Otherwise, fall back to user cache directory. diff --git a/tests/lib.rs b/tests/lib.rs index 769901a..686fcaf 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -10,6 +10,9 @@ use predicates::boolean::PredicateBooleanExt; use predicates::prelude::predicate::str::{contains, is_empty, similar}; use tempfile::{Builder, TempDir}; +// TODO: Should be 'cache::CACHE_DIR_ENV_VAR'. This requires to have a library crate for the logic. +static CACHE_DIR_ENV_VAR: &str = "TEALDEER_CACHE_DIR"; + struct TestEnv { pub cache_dir: TempDir, pub custom_pages_dir: TempDir, @@ -106,10 +109,7 @@ impl TestEnv { } let run = build.run().unwrap(); let mut cmd = run.command(); - cmd.env( - "TEALDEER_CACHE_DIR", - self.cache_dir.path().to_str().unwrap(), - ); + cmd.env(CACHE_DIR_ENV_VAR, self.cache_dir.path().to_str().unwrap()); cmd.env( "TEALDEER_CONFIG_DIR", self.config_dir.path().to_str().unwrap(), @@ -218,6 +218,50 @@ fn test_quiet_old_cache() { .stderr(contains("The cache hasn't been updated for more than ").not()); } +#[test] +fn test_create_cache_directory_path() { + let testenv = TestEnv::new(); + let cache_dir = testenv.cache_dir.path(); + let internal_cache_dir = cache_dir.join("internal"); + + let mut command = testenv.command(); + command.env(CACHE_DIR_ENV_VAR, internal_cache_dir.to_str().unwrap()); + + assert!(!internal_cache_dir.exists()); + + command + .arg("-u") + .assert() + .success() + .stderr(contains(format!( + "Successfully created cache directory path `{}`.", + internal_cache_dir.to_str().unwrap() + ))) + .stderr(contains("Successfully updated cache.")); + + assert!(internal_cache_dir.is_dir()); +} + +#[test] +fn test_cache_location_not_a_directory() { + let testenv = TestEnv::new(); + let cache_dir = testenv.cache_dir.path(); + let internal_file = cache_dir.join("internal"); + File::create(&internal_file).unwrap(); + + let mut command = testenv.command(); + command.env(CACHE_DIR_ENV_VAR, internal_file.to_str().unwrap()); + + command + .arg("-u") + .assert() + .failure() + .stderr(contains(format!( + "Path specified by ${} is not a directory.", + CACHE_DIR_ENV_VAR + ))); +} + #[test] fn test_setup_seed_config() { let testenv = TestEnv::new(); From ffc30d124306bd9fb55d31bda98f1b7200b9ad5d Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 12 Sep 2021 20:35:00 +0200 Subject: [PATCH 141/368] Run cargo update --- Cargo.lock | 821 +++++++++++++++++++++++++++++------------------------ 1 file changed, 447 insertions(+), 374 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8e8acd3..1a392ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,35 +1,22 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -[[package]] -name = "addr2line" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" -dependencies = [ - "gimli", -] +version = 3 [[package]] name = "adler" -version = "0.2.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "0.7.13" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ "memchr", ] -[[package]] -name = "android_log-sys" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8052e2d8aabbb8d556d6abbcce2a22b9590996c5f849b9c7ce4544a2e3b984e" - [[package]] name = "ansi_term" version = "0.12.1" @@ -41,9 +28,9 @@ dependencies = [ [[package]] name = "app_dirs2" -version = "2.3.0" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a213127e3ec94ab7b7397a23ca4649c0494b8ed576b3fcf834a6569bde87512e" +checksum = "55db1808b75fbf537160a28c59f868018c480a9a7f05ab6d6a760cba7d4cd303" dependencies = [ "jni", "ndk-glue", @@ -51,20 +38,15 @@ dependencies = [ "xdg", ] -[[package]] -name = "ascii" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" - [[package]] name = "assert_cmd" -version = "1.0.1" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c88b9ca26f9c16ec830350d309397e74ee9abdfd8eb1f71cb6ecc71a3fc818da" +checksum = "c98233c6673d8601ab23e77eb38f999c51100d46c5703b17288c57fddf3a1ffe" dependencies = [ + "bstr", "doc-comment", - "predicates", + "predicates 2.0.2", "predicates-core", "predicates-tree", "wait-timeout", @@ -87,20 +69,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" -[[package]] -name = "backtrace" -version = "0.3.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - [[package]] name = "base64" version = "0.12.3" @@ -108,22 +76,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" [[package]] -name = "bitflags" -version = "1.2.1" +name = "base64" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bstr" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90682c8d613ad3373e66de8c6411e0ae2ab2571e879d2efbf73558cc66f21279" +dependencies = [ + "lazy_static", + "memchr", + "regex-automata", +] [[package]] name = "bumpalo" -version = "3.4.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" - -[[package]] -name = "byteorder" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" [[package]] name = "bytes" @@ -132,10 +111,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] -name = "cc" -version = "1.0.59" +name = "bytes" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381" +checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" + +[[package]] +name = "cc" +version = "1.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" [[package]] name = "cesu8" @@ -150,32 +135,70 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] -name = "combine" -version = "3.8.1" +name = "cfg-if" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "combine" +version = "4.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a909e4d93292cd8e9c42e189f61681eff9d67b6541f96b8a1a737f23737bd001" dependencies = [ - "ascii", - "byteorder", - "either", + "bytes 1.1.0", "memchr", - "unreachable", ] [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", +] + +[[package]] +name = "darling" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.9.3", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +dependencies = [ + "darling_core", + "quote", + "syn", ] [[package]] name = "derivative" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", @@ -188,6 +211,12 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + [[package]] name = "doc-comment" version = "0.3.3" @@ -196,35 +225,29 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "docopt" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969" +checksum = "7f3f119846c823f9eafcf953a8f6ffb6ed69bf6240883261a7f13b634579a51f" dependencies = [ "lazy_static", "regex", "serde", - "strsim", + "strsim 0.10.0", ] -[[package]] -name = "dtoa" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" - [[package]] name = "either" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "encoding_rs" -version = "0.8.24" +version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a51b8cf747471cb9499b6d59e59b0444f4c90eba8968c4e44874e92b5b64ace2" +checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -242,9 +265,9 @@ dependencies = [ [[package]] name = "errno" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eab5ee3df98a279d9b316b1af6ac95422127b1290317e6d18c1743c99418b01" +checksum = "fa68f2fb9cae9d37c9b2b3584aba698a2e97f72d7aef7b9f7aa71d8b54ce46fe" dependencies = [ "errno-dragonfly", "libc", @@ -261,35 +284,25 @@ dependencies = [ "libc", ] -[[package]] -name = "error-chain" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" -dependencies = [ - "backtrace", - "version_check", -] - [[package]] name = "escargot" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74cf96bec282dcdb07099f7e31d9fed323bca9435a09aba7b6d99b7617bca96d" +checksum = "44bb3f795fe1b9d34f089c7fab034c2b757998d65361d95ef008045b57665262" dependencies = [ - "lazy_static", "log", + "once_cell", "serde", "serde_json", ] [[package]] name = "filetime" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed85775dcc68644b5c950ac06a2b23768d3bc9390464151aaf27136998dcf9e" +checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall", "winapi 0.3.9", @@ -297,11 +310,11 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.17" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "766d0e77a2c1502169d4a93ff3b8c15a71fd946cd0126309752104e5f3c46d94" +checksum = "80edafed416a46fb378521624fab1cfa2eb514784fd8921adbe8a8d8321da811" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crc32fast", "libc", "miniz_oxide", @@ -322,6 +335,16 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "form_urlencoded" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +dependencies = [ + "matches", + "percent-encoding", +] + [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -340,31 +363,32 @@ checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "futures-channel" -version = "0.3.5" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" +checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.5" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" +checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" [[package]] name = "futures-io" -version = "0.3.5" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" +checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" [[package]] name = "futures-macro" -version = "0.3.14" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668c6733a182cd7deb4f1de7ba3bf2120823835b3bcfbeacf7d2c4a773c1bb8b" +checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" dependencies = [ + "autocfg", "proc-macro-hack", "proc-macro2", "quote", @@ -373,31 +397,29 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.5" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" +checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" [[package]] name = "futures-task" -version = "0.3.5" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" -dependencies = [ - "once_cell", -] +checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" [[package]] name = "futures-util" -version = "0.3.5" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" +checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" dependencies = [ + "autocfg", "futures-core", "futures-io", "futures-macro", "futures-task", "memchr", - "pin-project", + "pin-project-lite 0.2.7", "pin-utils", "proc-macro-hack", "proc-macro-nested", @@ -412,28 +434,22 @@ checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" [[package]] name = "getrandom" -version = "0.1.14" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "wasi", ] -[[package]] -name = "gimli" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" - [[package]] name = "h2" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" +checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" dependencies = [ - "bytes", + "bytes 0.5.6", "fnv", "futures-core", "futures-sink", @@ -444,33 +460,31 @@ dependencies = [ "tokio", "tokio-util", "tracing", + "tracing-futures", ] [[package]] name = "hashbrown" -version = "0.8.2" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" -dependencies = [ - "autocfg", -] +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" [[package]] name = "hermit-abi" -version = "0.1.15" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] [[package]] name = "http" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" +checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" dependencies = [ - "bytes", + "bytes 1.1.0", "fnv", "itoa", ] @@ -481,15 +495,21 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" dependencies = [ - "bytes", + "bytes 0.5.6", "http", ] [[package]] name = "httparse" -version = "1.3.4" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" + +[[package]] +name = "httpdate" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" [[package]] name = "humantime" @@ -502,11 +522,11 @@ dependencies = [ [[package]] name = "hyper" -version = "0.13.7" +version = "0.13.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb" +checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb" dependencies = [ - "bytes", + "bytes 0.5.6", "futures-channel", "futures-core", "futures-util", @@ -514,10 +534,10 @@ dependencies = [ "http", "http-body", "httparse", + "httpdate", "itoa", "pin-project", "socket2", - "time", "tokio", "tower-service", "tracing", @@ -530,7 +550,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" dependencies = [ - "bytes", + "bytes 0.5.6", "futures-util", "hyper", "log", @@ -541,10 +561,16 @@ dependencies = [ ] [[package]] -name = "idna" -version = "0.2.0" +name = "ident_case" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" dependencies = [ "matches", "unicode-bidi", @@ -553,9 +579,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.5.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c" +checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" dependencies = [ "autocfg", "hashbrown", @@ -572,27 +598,36 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" +checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" + +[[package]] +name = "itertools" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" +dependencies = [ + "either", +] [[package]] name = "itoa" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "jni" -version = "0.14.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1981310da491a4f0f815238097d0d43d8072732b5ae5f8bd0d8eadf5bf245402" +checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" dependencies = [ "cesu8", "combine", - "error-chain", "jni-sys", "log", + "thiserror", "walkdir", ] @@ -604,9 +639,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.44" +version = "0.3.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a7e2c92a4804dd459b86c339278d0fe87cf93757fae222c3fa3ae75458bc73" +checksum = "1866b355d9c878e5e607473cbe3f63282c0b7aad2db1dbebf55076c686918254" dependencies = [ "wasm-bindgen", ] @@ -629,30 +664,30 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.76" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" +checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" [[package]] name = "log" -version = "0.4.11" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] name = "matches" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "memchr" -version = "2.3.3" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] name = "mime" @@ -672,20 +707,21 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.1" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ "adler", + "autocfg", ] [[package]] name = "mio" -version = "0.6.22" +version = "0.6.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "fuchsia-zircon", "fuchsia-zircon-sys", "iovec", @@ -700,9 +736,9 @@ dependencies = [ [[package]] name = "miow" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" dependencies = [ "kernel32-sys", "net2", @@ -712,42 +748,56 @@ dependencies = [ [[package]] name = "ndk" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a356cafe20aee088789830bfea3a61336e84ded9e545e00d3869ce95dcb80c" +checksum = "8794322172319b972f528bf90c6b467be0079f1fa82780ffb431088e741a73ab" dependencies = [ "jni-sys", "ndk-sys", "num_enum", + "thiserror", ] [[package]] name = "ndk-glue" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1730ee2e3de41c3321160a6da815f008c4006d71b095880ea50e17cf52332b8" +checksum = "c5caf0c24d51ac1c905c27d4eda4fa0635bbe0de596b8f79235e0b17a4d29385" dependencies = [ - "android_log-sys", "lazy_static", "libc", "log", "ndk", + "ndk-macro", "ndk-sys", ] [[package]] -name = "ndk-sys" -version = "0.1.0" +name = "ndk-macro" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2820aca934aba5ed91c79acc72b6a44048ceacc5d36c035ed4e051f12d887d" +checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" +dependencies = [ + "darling", + "proc-macro-crate 0.1.5", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ndk-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c44922cb3dbb1c70b5e5f443d63b64363a898564d739ba5198e3a9138442868d" [[package]] name = "net2" -version = "0.2.34" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" +checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "libc", "winapi 0.3.9", ] @@ -760,9 +810,9 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num-traits" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ "autocfg", ] @@ -779,9 +829,9 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.4.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" +checksum = "3f9bd055fb730c4f8f4f57d45d35cd6b3f0980535b056dc7ff119cee6a66ed6f" dependencies = [ "derivative", "num_enum_derive", @@ -789,27 +839,21 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.4.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" +checksum = "486ea01961c4a818096de679a8b740b26d9033146ac5291b1c98557658f8cdd9" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", ] -[[package]] -name = "object" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" - [[package]] name = "once_cell" -version = "1.4.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" [[package]] name = "pager" @@ -829,18 +873,18 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pin-project" -version = "0.4.23" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" +checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "0.4.23" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" +checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" dependencies = [ "proc-macro2", "quote", @@ -849,9 +893,15 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.1.7" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" +checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" + +[[package]] +name = "pin-project-lite" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" [[package]] name = "pin-utils" @@ -861,15 +911,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "ppv-lite86" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "predicates" -version = "1.0.5" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bfead12e90dccead362d62bb2c90a5f6fc4584963645bc7f71a735e0b0735a" +checksum = "f49cfaf7fdaa3bfacc6fa3e7054e65148878354a5cfddcf661df4c851f8021df" dependencies = [ "difference", "float-cmp", @@ -879,16 +929,27 @@ dependencies = [ ] [[package]] -name = "predicates-core" -version = "1.0.0" +name = "predicates" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178" +checksum = "c143348f141cc87aab5b950021bac6145d0e5ae754b0591de23244cee42c9308" +dependencies = [ + "difflib", + "itertools", + "predicates-core", +] + +[[package]] +name = "predicates-core" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e35a3326b75e49aa85f5dc6ec15b41108cf5aee58eabb1f274dd18b73c2451" [[package]] name = "predicates-tree" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124" +checksum = "d7dd0fd014130206c9352efbdc92be592751b2b9274dff685348341082c6ea3d" dependencies = [ "predicates-core", "treeline", @@ -903,6 +964,16 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro-crate" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" +dependencies = [ + "thiserror", + "toml", +] + [[package]] name = "proc-macro-hack" version = "0.5.19" @@ -917,9 +988,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.19" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" +checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" dependencies = [ "unicode-xid", ] @@ -932,20 +1003,19 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" dependencies = [ "proc-macro2", ] [[package]] name = "rand" -version = "0.7.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" dependencies = [ - "getrandom", "libc", "rand_chacha", "rand_core", @@ -954,9 +1024,9 @@ dependencies = [ [[package]] name = "rand_chacha" -version = "0.2.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", "rand_core", @@ -964,45 +1034,53 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.5.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ "getrandom", ] [[package]] name = "rand_hc" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" dependencies = [ "rand_core", ] [[package]] name = "redox_syscall" -version = "0.1.57" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +dependencies = [ + "bitflags", +] [[package]] name = "regex" -version = "1.3.9" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" dependencies = [ "aho-corasick", "memchr", "regex-syntax", - "thread_local", ] [[package]] -name = "regex-syntax" -version = "0.6.18" +name = "regex-automata" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" + +[[package]] +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] name = "remove_dir_all" @@ -1015,12 +1093,12 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.10.8" +version = "0.10.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9eaa17ac5d7b838b7503d118fa16ad88f440498bf9ffe5424e621f93190d61e" +checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" dependencies = [ - "base64", - "bytes", + "base64 0.13.0", + "bytes 0.5.6", "encoding_rs", "futures-core", "futures-util", @@ -1035,7 +1113,7 @@ dependencies = [ "mime", "mime_guess", "percent-encoding", - "pin-project-lite", + "pin-project-lite 0.2.7", "rustls", "serde", "serde_urlencoded", @@ -1051,9 +1129,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.16" +version = "0.16.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b72b84d47e8ec5a4f2872e8262b8f8256c5be1c938a7d6d3a867a3ba8f722f74" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ "cc", "libc", @@ -1064,19 +1142,13 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "rustc-demangle" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" - [[package]] name = "rustls" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" dependencies = [ - "base64", + "base64 0.12.3", "log", "ring", "sct", @@ -1100,9 +1172,9 @@ dependencies = [ [[package]] name = "sct" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ "ring", "untrusted", @@ -1110,18 +1182,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.115" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5" +checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.115" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48" +checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" dependencies = [ "proc-macro2", "quote", @@ -1130,9 +1202,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.57" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" +checksum = "a7f9e390c27c3c0ce8bc5d725f6e4d30a29d26659494aa4b17535f7522c5c950" dependencies = [ "itoa", "ryu", @@ -1141,31 +1213,30 @@ dependencies = [ [[package]] name = "serde_urlencoded" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" +checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" dependencies = [ - "dtoa", + "form_urlencoded", "itoa", + "ryu", "serde", - "url", ] [[package]] name = "slab" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" [[package]] name = "socket2" -version = "0.3.12" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" +checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", - "redox_syscall", "winapi 0.3.9", ] @@ -1182,10 +1253,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" [[package]] -name = "syn" -version = "1.0.39" +name = "strsim" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "syn" +version = "1.0.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84" dependencies = [ "proc-macro2", "quote", @@ -1194,13 +1271,12 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.30" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489997b7557e9a43e192c527face4feacc78bfbe6eed67fd55c4c9e381cba290" +checksum = "d6f5515d3add52e0bbdcad7b83c388bb36ba7b754dda3b5f5bc2d38640cdba5c" dependencies = [ "filetime", "libc", - "redox_syscall", "xattr", ] @@ -1219,7 +1295,7 @@ dependencies = [ "flate2", "log", "pager", - "predicates", + "predicates 1.0.8", "remove_dir_all", "reqwest", "serde", @@ -1232,11 +1308,11 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "rand", "redox_syscall", @@ -1246,46 +1322,55 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" dependencies = [ "winapi-util", ] [[package]] -name = "thread_local" -version = "1.0.1" +name = "thiserror" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +checksum = "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88" dependencies = [ - "lazy_static", + "thiserror-impl", ] [[package]] -name = "time" -version = "0.1.44" +name = "thiserror-impl" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "tinyvec" -version = "0.3.4" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" +checksum = "5241dd6f21443a3606b432718b166d3cedc962fd4b8bea54a8bc7f514ebda986" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "0.2.22" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" +checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" dependencies = [ - "bytes", + "bytes 0.5.6", "fnv", "futures-core", "iovec", @@ -1293,7 +1378,7 @@ dependencies = [ "memchr", "mio", "num_cpus", - "pin-project-lite", + "pin-project-lite 0.1.12", "slab", ] @@ -1315,49 +1400,60 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" dependencies = [ - "bytes", + "bytes 0.5.6", "futures-core", "futures-sink", "log", - "pin-project-lite", + "pin-project-lite 0.1.12", "tokio", ] [[package]] name = "toml" -version = "0.5.6" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ "serde", ] [[package]] name = "tower-service" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" +checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.19" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d79ca061b032d6ce30c660fded31189ca0b9922bf483cd70759f13a2d86786c" +checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "log", + "pin-project-lite 0.2.7", "tracing-core", ] [[package]] name = "tracing-core" -version = "0.1.15" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f0e00789804e99b20f12bc7003ca416309d28a6f495d6af58d1e2c2842461b5" +checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8" dependencies = [ "lazy_static", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + [[package]] name = "treeline" version = "0.1.0" @@ -1381,36 +1477,24 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] +checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" [[package]] name = "unicode-normalization" -version = "0.1.13" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" +checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" dependencies = [ "tinyvec", ] [[package]] name = "unicode-xid" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" - -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -dependencies = [ - "void", -] +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" [[package]] name = "untrusted" @@ -1420,10 +1504,11 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.1.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" dependencies = [ + "form_urlencoded", "idna", "matches", "percent-encoding", @@ -1431,15 +1516,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" [[package]] name = "wait-timeout" @@ -1452,9 +1531,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", "winapi 0.3.9", @@ -1473,23 +1552,17 @@ dependencies = [ [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.67" +version = "0.2.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0563a9a4b071746dd5aedbc3a28c6fe9be4586fb3fbadb67c400d4f53c6b16c" +checksum = "5e68338db6becec24d3c7977b5bf8a48be992c934b5d07177e3931f5dc9b076c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "serde", "serde_json", "wasm-bindgen-macro", @@ -1497,9 +1570,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.67" +version = "0.2.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc71e4c5efa60fb9e74160e89b93353bc24059999c0ae0fb03affc39770310b0" +checksum = "f34c405b4f0658583dba0c1c7c9b694f3cac32655db463b56c254a1c75269523" dependencies = [ "bumpalo", "lazy_static", @@ -1512,11 +1585,11 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.17" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95f8d235a77f880bcef268d379810ea6c0af2eacfa90b1ad5af731776e0c4699" +checksum = "a87d738d4abc4cf22f6eb142f5b9a81301331ee3c767f2fef2fda4e325492060" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -1524,9 +1597,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.67" +version = "0.2.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c57cefa5fa80e2ba15641578b44d36e7a64279bc5ed43c6dbaf329457a2ed2" +checksum = "b9d5a6580be83b19dc570a8f9c324251687ab2184e57086f71625feb57ec77c8" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1534,9 +1607,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.67" +version = "0.2.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" +checksum = "e3775a030dc6f5a0afd8a84981a21cc92a781eb429acef9ecce476d0c9113e92" dependencies = [ "proc-macro2", "quote", @@ -1547,15 +1620,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.67" +version = "0.2.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93b162580e34310e5931c4b792560108b10fd14d64915d7fff8ff00180e70092" +checksum = "c279e376c7a8e8752a8f1eaa35b7b0bee6bb9fb0cdacfa97cc3f1f289c87e2b4" [[package]] name = "web-sys" -version = "0.3.44" +version = "0.3.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda38f4e5ca63eda02c059d243aa25b5f35ab98451e518c51612cd0f1bd19a47" +checksum = "0a84d70d1ec7d2da2d26a5bd78f4bca1b8c3254805363ce743b7a05bc30d195a" dependencies = [ "js-sys", "wasm-bindgen", @@ -1563,9 +1636,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.21.3" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab146130f5f790d45f82aeeb09e55a256573373ec64409fc19a6fb82fb1032ae" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ "ring", "untrusted", @@ -1573,9 +1646,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8eff4b7516a57307f9349c64bf34caa34b940b66fed4b2fb3136cb7386e5739" +checksum = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" dependencies = [ "webpki", ] From 437616291492823401711a14886759f1d997d783 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 12 Sep 2021 20:40:08 +0200 Subject: [PATCH 142/368] =?UTF-8?q?Upgrade=20env=5Flogger:=200.7=20?= =?UTF-8?q?=E2=86=92=200.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 17 ++++------------- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1a392ed..95ffe6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -252,9 +252,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" dependencies = [ "atty", "humantime", @@ -513,12 +513,9 @@ checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" [[package]] name = "humantime" -version = "1.3.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" @@ -995,12 +992,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - [[package]] name = "quote" version = "1.0.9" diff --git a/Cargo.toml b/Cargo.toml index bbbd352..dc0aa82 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ ansi_term = "0.12.0" app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" docopt = "1" -env_logger = { version = "0.7", optional = true } +env_logger = { version = "0.9", optional = true } flate2 = "1" log = "0.4" reqwest = { version = "0.10.3", features = ["blocking", "rustls-tls"], default-features = false } From b359fd8e5b82b5267717a7ce96469c0eaca31baa Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 12 Sep 2021 20:42:10 +0200 Subject: [PATCH 143/368] =?UTF-8?q?Upgrade=20pager:=200.15=20=E2=86=92=200?= =?UTF-8?q?.16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 95ffe6f..2c9b5d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -854,9 +854,9 @@ checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" [[package]] name = "pager" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69ced2bfa977c4541743a7427b89c94120684791a9629941fe6028dccab6528" +checksum = "05c7d08cf0d0b55c4f0ffedb5e06569ea212e85d622975071370393970491968" dependencies = [ "errno", "libc", diff --git a/Cargo.toml b/Cargo.toml index dc0aa82..e99028a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ toml = "0.5.1" walkdir = "2.0.1" [target.'cfg(not(windows))'.dependencies] -pager = "0.15" +pager = "0.16" [dev-dependencies] assert_cmd = "1.0.1" From 7aa111e7272cbbbfb989d05cf2efcc3c2a3e1660 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 12 Sep 2021 20:56:02 +0200 Subject: [PATCH 144/368] =?UTF-8?q?Upgrade=20reqwest:=200.10=20=E2=86=92?= =?UTF-8?q?=200.11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This increases the release binary size by 144 KiB, but it reduces the number of transitive dependencies from 152 to 140. --- Cargo.lock | 386 +++++++++++++++++++++-------------------------------- Cargo.toml | 2 +- 2 files changed, 151 insertions(+), 237 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2c9b5d5..54fdd12 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,7 +23,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -34,7 +34,7 @@ checksum = "55db1808b75fbf537160a28c59f868018c480a9a7f05ab6d6a760cba7d4cd303" dependencies = [ "jni", "ndk-glue", - "winapi 0.3.9", + "winapi", "xdg", ] @@ -60,7 +60,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -69,12 +69,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - [[package]] name = "base64" version = "0.13.0" @@ -104,12 +98,6 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.1.0" @@ -128,12 +116,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -146,17 +128,33 @@ version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a909e4d93292cd8e9c42e189f61681eff9d67b6541f96b8a1a737f23737bd001" dependencies = [ - "bytes 1.1.0", + "bytes", "memchr", ] +[[package]] +name = "core-foundation" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" + [[package]] name = "crc32fast" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -247,7 +245,7 @@ version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -271,7 +269,7 @@ checksum = "fa68f2fb9cae9d37c9b2b3584aba698a2e97f72d7aef7b9f7aa71d8b54ce46fe" dependencies = [ "errno-dragonfly", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -302,10 +300,10 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -314,7 +312,7 @@ version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80edafed416a46fb378521624fab1cfa2eb514784fd8921adbe8a8d8321da811" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crc32fast", "libc", "miniz_oxide", @@ -345,22 +343,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - [[package]] name = "futures-channel" version = "0.3.17" @@ -419,7 +401,7 @@ dependencies = [ "futures-macro", "futures-task", "memchr", - "pin-project-lite 0.2.7", + "pin-project-lite", "pin-utils", "proc-macro-hack", "proc-macro-nested", @@ -438,18 +420,18 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi", ] [[package]] name = "h2" -version = "0.2.7" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" +checksum = "d7f3675cfef6a30c8031cf9e6493ebdc3bb3272a3fea3923c4210d1830e6a472" dependencies = [ - "bytes 0.5.6", + "bytes", "fnv", "futures-core", "futures-sink", @@ -460,7 +442,6 @@ dependencies = [ "tokio", "tokio-util", "tracing", - "tracing-futures", ] [[package]] @@ -484,19 +465,20 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", "itoa", ] [[package]] name = "http-body" -version = "0.3.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" dependencies = [ - "bytes 0.5.6", + "bytes", "http", + "pin-project-lite", ] [[package]] @@ -507,9 +489,9 @@ checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" [[package]] name = "httpdate" -version = "0.3.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" [[package]] name = "humantime" @@ -519,11 +501,11 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.13.10" +version = "0.14.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb" +checksum = "13f67199e765030fa08fe0bd581af683f0d5bc04ea09c2b1102012c5fb90e7fd" dependencies = [ - "bytes 0.5.6", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -533,7 +515,7 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project", + "pin-project-lite", "socket2", "tokio", "tower-service", @@ -543,11 +525,10 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.21.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" dependencies = [ - "bytes 0.5.6", "futures-util", "hyper", "log", @@ -584,15 +565,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - [[package]] name = "ipnet" version = "2.3.1" @@ -643,16 +615,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -671,7 +633,7 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -692,16 +654,6 @@ version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" -[[package]] -name = "mime_guess" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -dependencies = [ - "mime", - "unicase", -] - [[package]] name = "miniz_oxide" version = "0.4.4" @@ -714,33 +666,24 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.23" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", "libc", "log", "miow", - "net2", - "slab", - "winapi 0.2.8", + "ntapi", + "winapi", ] [[package]] name = "miow" -version = "0.2.2" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", + "winapi", ] [[package]] @@ -788,23 +731,21 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c44922cb3dbb1c70b5e5f443d63b64363a898564d739ba5198e3a9138442868d" -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - [[package]] name = "normalize-line-endings" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi", +] + [[package]] name = "num-traits" version = "0.2.14" @@ -852,6 +793,12 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +[[package]] +name = "openssl-probe" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" + [[package]] name = "pager" version = "0.16.0" @@ -868,32 +815,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -[[package]] -name = "pin-project" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - [[package]] name = "pin-project-lite" version = "0.2.7" @@ -1079,17 +1000,17 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] name = "reqwest" -version = "0.10.10" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" +checksum = "246e9f61b9bb77df069a947682be06e31ac43ea37862e244a69f177694ea6d22" dependencies = [ - "base64 0.13.0", - "bytes 0.5.6", + "base64", + "bytes", "encoding_rs", "futures-core", "futures-util", @@ -1102,10 +1023,10 @@ dependencies = [ "lazy_static", "log", "mime", - "mime_guess", "percent-encoding", - "pin-project-lite 0.2.7", + "pin-project-lite", "rustls", + "rustls-native-certs", "serde", "serde_urlencoded", "tokio", @@ -1130,22 +1051,34 @@ dependencies = [ "spin", "untrusted", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] name = "rustls" -version = "0.18.1" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ - "base64 0.12.3", + "base64", "log", "ring", "sct", "webpki", ] +[[package]] +name = "rustls-native-certs" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +dependencies = [ + "openssl-probe", + "rustls", + "schannel", + "security-framework", +] + [[package]] name = "ryu" version = "1.0.5" @@ -1161,6 +1094,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +dependencies = [ + "lazy_static", + "winapi", +] + [[package]] name = "sct" version = "0.6.1" @@ -1171,6 +1114,29 @@ dependencies = [ "untrusted", ] +[[package]] +name = "security-framework" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "serde" version = "1.0.130" @@ -1222,13 +1188,12 @@ checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" [[package]] name = "socket2" -version = "0.3.19" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" +checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad" dependencies = [ - "cfg-if 1.0.0", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1303,12 +1268,12 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "rand", "redox_syscall", "remove_dir_all", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1357,29 +1322,26 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "0.2.25" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" +checksum = "b4efe6fc2395938c8155973d7be49fe8d03a843726e285e100a8a383cc0154ce" dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", + "autocfg", + "bytes", + "libc", "memchr", "mio", "num_cpus", - "pin-project-lite 0.1.12", - "slab", + "pin-project-lite", + "winapi", ] [[package]] name = "tokio-rustls" -version = "0.14.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ - "futures-core", "rustls", "tokio", "webpki", @@ -1387,15 +1349,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.3.1" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +checksum = "08d3725d3efa29485e87311c5b699de63cde14b00ed4d256b8318aa30ca452cd" dependencies = [ - "bytes 0.5.6", + "bytes", "futures-core", "futures-sink", "log", - "pin-project-lite 0.1.12", + "pin-project-lite", "tokio", ] @@ -1420,9 +1382,8 @@ version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" dependencies = [ - "cfg-if 1.0.0", - "log", - "pin-project-lite 0.2.7", + "cfg-if", + "pin-project-lite", "tracing-core", ] @@ -1435,16 +1396,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[package]] name = "treeline" version = "0.1.0" @@ -1457,15 +1408,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" version = "0.3.6" @@ -1505,12 +1447,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "version_check" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" - [[package]] name = "wait-timeout" version = "0.2.0" @@ -1527,7 +1463,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", - "winapi 0.3.9", + "winapi", "winapi-util", ] @@ -1553,7 +1489,7 @@ version = "0.2.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e68338db6becec24d3c7977b5bf8a48be992c934b5d07177e3931f5dc9b076c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "serde", "serde_json", "wasm-bindgen-macro", @@ -1580,7 +1516,7 @@ version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a87d738d4abc4cf22f6eb142f5b9a81301331ee3c767f2fef2fda4e325492060" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -1637,19 +1573,13 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.20.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" dependencies = [ "webpki", ] -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -1660,12 +1590,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -1678,7 +1602,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1693,17 +1617,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", + "winapi", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e99028a..b512cc1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ docopt = "1" env_logger = { version = "0.9", optional = true } flate2 = "1" log = "0.4" -reqwest = { version = "0.10.3", features = ["blocking", "rustls-tls"], default-features = false } +reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls", "rustls-tls-native-roots"], default-features = false } serde = "1.0.21" serde_derive = "1.0.21" tar = "0.4.14" From 85ab38d892f356511651e15b0163f69f5586555d Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 12 Sep 2021 20:59:59 +0200 Subject: [PATCH 145/368] Remove dev dependency on remove_dir_all It's a transitive dependency of the `tempdir` crate. It was pinned to a specific version to achieve compatibility with Rust 1.39, but we now run on 1.53. --- Cargo.lock | 5 ++--- Cargo.toml | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 54fdd12..8b89e50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -996,9 +996,9 @@ checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] name = "remove_dir_all" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ "winapi", ] @@ -1252,7 +1252,6 @@ dependencies = [ "log", "pager", "predicates 1.0.8", - "remove_dir_all", "reqwest", "serde", "serde_derive", diff --git a/Cargo.toml b/Cargo.toml index b512cc1..fc5e2bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,6 @@ escargot = "0.5" predicates = "1.0" tempfile = "3.1.0" filetime = "0.2.10" -remove_dir_all = "=0.5.2" # Only used to ensure compatibility with 1.39 (#133) [features] logging = ["env_logger"] From 07dc5c6bf409cf9ff159e89a12e1323c4109b382 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 12 Sep 2021 21:04:45 +0200 Subject: [PATCH 146/368] =?UTF-8?q?Upgrade=20predicates=20and=20assert=5Fc?= =?UTF-8?q?md:=201=20=E2=86=92=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 34 +++++++++------------------------- Cargo.toml | 4 ++-- tests/lib.rs | 14 +++++++------- 3 files changed, 18 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8b89e50..138dcff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,13 +40,13 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "1.0.8" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c98233c6673d8601ab23e77eb38f999c51100d46c5703b17288c57fddf3a1ffe" +checksum = "b800c4403e8105d959595e1f88119e78bc12bc874c4336973658b648a746ba93" dependencies = [ "bstr", "doc-comment", - "predicates 2.0.2", + "predicates", "predicates-core", "predicates-tree", "wait-timeout", @@ -203,12 +203,6 @@ dependencies = [ "syn", ] -[[package]] -name = "difference" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" - [[package]] name = "difflib" version = "0.4.0" @@ -320,9 +314,9 @@ dependencies = [ [[package]] name = "float-cmp" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1267f4ac4f343772758f7b1bdcbe767c218bbab93bb432acbf5162bbf85a6c4" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" dependencies = [ "num-traits", ] @@ -833,19 +827,6 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" -[[package]] -name = "predicates" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49cfaf7fdaa3bfacc6fa3e7054e65148878354a5cfddcf661df4c851f8021df" -dependencies = [ - "difference", - "float-cmp", - "normalize-line-endings", - "predicates-core", - "regex", -] - [[package]] name = "predicates" version = "2.0.2" @@ -853,8 +834,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c143348f141cc87aab5b950021bac6145d0e5ae754b0591de23244cee42c9308" dependencies = [ "difflib", + "float-cmp", "itertools", + "normalize-line-endings", "predicates-core", + "regex", ] [[package]] @@ -1251,7 +1235,7 @@ dependencies = [ "flate2", "log", "pager", - "predicates 1.0.8", + "predicates", "reqwest", "serde", "serde_derive", diff --git a/Cargo.toml b/Cargo.toml index fc5e2bb..0a603a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,9 +34,9 @@ walkdir = "2.0.1" pager = "0.16" [dev-dependencies] -assert_cmd = "1.0.1" +assert_cmd = "2.0.1" escargot = "0.5" -predicates = "1.0" +predicates = "2.0.2" tempfile = "3.1.0" filetime = "0.2.10" diff --git a/tests/lib.rs b/tests/lib.rs index c0db85e..a6414e6 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -7,7 +7,7 @@ use std::time::{Duration, SystemTime}; use assert_cmd::prelude::*; use predicates::boolean::PredicateBooleanExt; -use predicates::prelude::predicate::str::{contains, is_empty, similar}; +use predicates::prelude::predicate::str::{contains, diff, is_empty}; use tempfile::{Builder, TempDir}; // TODO: Should be 'cache::CACHE_DIR_ENV_VAR'. This requires to have a library crate for the logic. @@ -336,7 +336,7 @@ fn test_markdown_rendering() { .args(["-m", "which"]) .assert() .success() - .stdout(similar(expected)); + .stdout(diff(expected)); } fn _test_correct_rendering( @@ -358,7 +358,7 @@ fn _test_correct_rendering( .args(["--color", color_option, "-f", file_path.to_str().unwrap()]) .assert() .success() - .stdout(similar(expected)); + .stdout(diff(expected)); } /// An end-to-end integration test for direct file rendering (v1 syntax). @@ -446,7 +446,7 @@ fn test_correct_rendering_with_config() { .args(["--color", "always", "-f", file_path.to_str().unwrap()]) .assert() .success() - .stdout(similar(expected)); + .stdout(diff(expected)); } #[test] @@ -597,7 +597,7 @@ fn test_custom_page_overwrites() { .args(["inkscape-v2", "--color", "never"]) .assert() .success() - .stdout(similar(expected)); + .stdout(diff(expected)); } /// End-End test to ensure that .patch files are appened to pages in the cache_dir @@ -624,7 +624,7 @@ fn test_custom_patch_appends_to_common() { .args(["inkscape-v2", "--color", "never"]) .assert() .success() - .stdout(similar(expected)); + .stdout(diff(expected)); } /// End-End test to ensure that .patch files are not appended to .page files in the custom_pages_dir @@ -654,7 +654,7 @@ fn test_custom_patch_does_not_append_to_custom() { .args(["inkscape-v2", "--color", "never"]) .assert() .success() - .stdout(similar(expected)); + .stdout(diff(expected)); } #[test] From e84fce6f901b34c62e852273187225e612682a93 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 13 Sep 2021 09:06:21 +0200 Subject: [PATCH 147/368] Use tree-style imports (#204) --- src/cache.rs | 20 ++++++++++++-------- src/config.rs | 17 ++++++++++------- src/error.rs | 3 ++- src/formatter.rs | 3 +-- src/line_iterator.rs | 3 ++- src/main.rs | 18 +++++++++--------- src/output.rs | 18 +++++++++++------- tests/lib.rs | 16 ++++++++++------ 8 files changed, 57 insertions(+), 41 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index fb55349..0e2ea2c 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -1,9 +1,11 @@ -use std::env; -use std::ffi::OsStr; -use std::fs; -use std::io::Read; -use std::iter; -use std::path::{Path, PathBuf}; +use std::{ + env, + ffi::OsStr, + fs, + io::Read, + iter, + path::{Path, PathBuf}, +}; use app_dirs::{get_app_root, AppDataType}; use flate2::read::GzDecoder; @@ -13,8 +15,10 @@ use std::time::{Duration, SystemTime}; use tar::Archive; use walkdir::{DirEntry, WalkDir}; -use crate::error::TealdeerError::{self, CacheError, UpdateError}; -use crate::types::{OsType, PathSource}; +use crate::{ + error::TealdeerError::{self, CacheError, UpdateError}, + types::{OsType, PathSource}, +}; static CACHE_DIR_ENV_VAR: &str = "TEALDEER_CACHE_DIR"; diff --git a/src/config.rs b/src/config.rs index a2f49ee..a4730fc 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,16 +1,19 @@ -use std::env; -use std::fs; -use std::io::{Error as IoError, Read, Write}; -use std::path::PathBuf; -use std::time::Duration; +use std::{ + env, fs, + io::{Error as IoError, Read, Write}, + path::PathBuf, + time::Duration, +}; use ansi_term::{Color, Style}; use app_dirs::{get_app_root, AppDataType}; use log::debug; use serde_derive::{Deserialize, Serialize}; -use crate::error::TealdeerError::{self, ConfigError}; -use crate::types::PathSource; +use crate::{ + error::TealdeerError::{self, ConfigError}, + types::PathSource, +}; pub const CONFIG_FILE_NAME: &str = "config.toml"; pub const MAX_CACHE_AGE: Duration = Duration::from_secs(2_592_000); // 30 days diff --git a/src/error.rs b/src/error.rs index e85971d..548c39f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,6 +1,7 @@ -use reqwest::Error as ReqwestError; use std::fmt; +use reqwest::Error as ReqwestError; + #[derive(Debug)] #[allow(clippy::enum_variant_names)] pub enum TealdeerError { diff --git a/src/formatter.rs b/src/formatter.rs index d1cfde4..ede13c3 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -1,7 +1,6 @@ //! Functions related to formatting and printing lines from a `Tokenizer`. -use crate::extensions::FindFrom; -use crate::types::LineType; +use crate::{extensions::FindFrom, types::LineType}; use log::debug; diff --git a/src/line_iterator.rs b/src/line_iterator.rs index c1fbb0f..4d0eab6 100644 --- a/src/line_iterator.rs +++ b/src/line_iterator.rs @@ -2,9 +2,10 @@ use std::io::BufRead; -use crate::types::LineType; use log::warn; +use crate::types::LineType; + #[derive(Debug, PartialEq, Eq)] pub enum TldrFormat { /// Not yet clear diff --git a/src/main.rs b/src/main.rs index 69011b9..59986a1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,9 +15,7 @@ #![allow(clippy::similar_names)] #![allow(clippy::too_many_lines)] -use std::env; -use std::path::PathBuf; -use std::process; +use std::{env, path::PathBuf, process}; use ansi_term::{Color, Style}; use app_dirs::AppInfo; @@ -36,12 +34,14 @@ mod line_iterator; mod output; mod types; -use crate::cache::{Cache, PageLookupResult}; -use crate::config::{get_config_dir, get_config_path, make_default_config, Config, MAX_CACHE_AGE}; -use crate::error::TealdeerError::ConfigError; -use crate::extensions::Dedup; -use crate::output::print_page; -use crate::types::{ColorOptions, OsType}; +use crate::{ + cache::{Cache, PageLookupResult}, + config::{get_config_dir, get_config_path, make_default_config, Config, MAX_CACHE_AGE}, + error::TealdeerError::ConfigError, + extensions::Dedup, + output::print_page, + types::{ColorOptions, OsType}, +}; const NAME: &str = "tealdeer"; const APP_INFO: AppInfo = AppInfo { diff --git a/src/output.rs b/src/output.rs index 25b9bc3..70cd138 100644 --- a/src/output.rs +++ b/src/output.rs @@ -1,13 +1,17 @@ //! Functions for printing pages to the terminal -use std::fs::File; -use std::io::{self, BufRead, BufReader, Write}; +use std::{ + fs::File, + io::{self, BufRead, BufReader, Write}, +}; -use crate::cache::PageLookupResult; -use crate::config::{Config, StyleConfig}; -use crate::error::TealdeerError::WriteError; -use crate::formatter::{highlight_lines, PageSnippet}; -use crate::line_iterator::LineIterator; +use crate::{ + cache::PageLookupResult, + config::{Config, StyleConfig}, + error::TealdeerError::WriteError, + formatter::{highlight_lines, PageSnippet}, + line_iterator::LineIterator, +}; /// Print page by path pub fn print_page( diff --git a/tests/lib.rs b/tests/lib.rs index a6414e6..2926c75 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -1,13 +1,17 @@ //! Integration tests. -use std::fs::{create_dir_all, File}; -use std::io::Write; -use std::process::Command; -use std::time::{Duration, SystemTime}; +use std::{ + fs::{create_dir_all, File}, + io::Write, + process::Command, + time::{Duration, SystemTime}, +}; use assert_cmd::prelude::*; -use predicates::boolean::PredicateBooleanExt; -use predicates::prelude::predicate::str::{contains, diff, is_empty}; +use predicates::{ + boolean::PredicateBooleanExt, + prelude::predicate::str::{contains, diff, is_empty}, +}; use tempfile::{Builder, TempDir}; // TODO: Should be 'cache::CACHE_DIR_ENV_VAR'. This requires to have a library crate for the logic. From 3f4910030770e298d0187b601226e28bf1c07450 Mon Sep 17 00:00:00 2001 From: Tsvetomir Bonev Date: Sun, 3 Oct 2021 17:10:30 +0300 Subject: [PATCH 148/368] Docs: Add funtoo package to list (#208) --- docs/src/installing.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/installing.md b/docs/src/installing.md index 2d037df..ed16a33 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -17,6 +17,7 @@ Tealdeer has been added to a few package managers: - Arch Linux: [`tealdeer`](https://archlinux.org/packages/community/x86_64/tealdeer/) - Fedora: [`tealdeer`](https://src.fedoraproject.org/rpms/rust-tealdeer) - FreeBSD: [`sysutils/tealdeer`](https://www.freshports.org/sysutils/tealdeer/) +- Funtoo: [`app-misc/tealdeer`](https://github.com/funtoo/core-kit/tree/1.4-release/app-misc/tealdeer) - Homebrew: [`tealdeer`](https://formulae.brew.sh/formula/tealdeer) - NetBSD: [`sysutils/tealdeer`](https://pkgsrc.se/sysutils/tealdeer) - Nix: [`tealdeer`](https://nixos.org/nixos/packages.html#tealdeer) From 9eca2fe5dba6aa6b6606313b0083d996eb546bf2 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 16 Oct 2021 13:06:28 +0200 Subject: [PATCH 149/368] Update copyright year --- LICENSE-MIT | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE-MIT b/LICENSE-MIT index 4203759..1c952f1 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright (C) 2015-2020 Danilo Bargen and contributors +Copyright (C) 2015-2021 Danilo Bargen and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/src/main.rs b/src/main.rs index 59986a1..b2e19f5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ //! An implementation of [tldr](https://github.com/tldr-pages/tldr) in Rust. // -// Copyright (c) 2015-2020 tealdeer developers +// Copyright (c) 2015-2021 tealdeer developers // // Licensed under the Apache License, Version 2.0 or the MIT license From 3c92cff865a9bed8e6d6d74ad8b39b8bee1b4321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sat, 16 Oct 2021 17:20:07 +0200 Subject: [PATCH 150/368] Add test for hightlighting with empty command (#178) --- src/formatter.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/formatter.rs b/src/formatter.rs index ede13c3..9789975 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -225,4 +225,14 @@ mod tests { ], ); } + + #[test] + fn test_empty_command() { + let segment = "some code"; + let snippets = [NormalCode(segment)]; + + assert_eq!(run("", segment), snippets); + assert_eq!(run(" ", segment), snippets); + assert_eq!(run(" \t ", segment), snippets); + } } From 32cc6d589386b70dc2726c379bd1a1f88968d12c Mon Sep 17 00:00:00 2001 From: rnd Date: Sat, 16 Oct 2021 17:38:07 +0200 Subject: [PATCH 151/368] Use default style if user-defined style is missing (#210) Changes the serde configuration of the `RawConfig` struct to utilize a custom `Default` implementation to initialize new objects. This implementation contains the default style set as it was previously provided through the implementation of `RawConfig::new()`. This allows to utilize the default configuration until the user overwrites the related `RawStyleConfig` field, e.g. the description highlighting. Fixes #149. --- src/config.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/config.rs b/src/config.rs index a4730fc..758147a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -178,21 +178,29 @@ impl Default for RawDirectoriesConfig { } } -#[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] +#[serde(default)] struct RawConfig { - #[serde(default)] style: RawStyleConfig, - #[serde(default)] display: RawDisplayConfig, - #[serde(default)] updates: RawUpdatesConfig, - #[serde(default)] directories: RawDirectoriesConfig, } impl RawConfig { fn new() -> Self { - let mut raw_config = Self::default(); + Self::default() + } +} + +impl Default for RawConfig { + fn default() -> Self { + let mut raw_config = RawConfig { + style: RawStyleConfig::default(), + display: RawDisplayConfig::default(), + updates: RawUpdatesConfig::default(), + directories: RawDirectoriesConfig::default(), + }; // Set default config raw_config.style.example_text.foreground = Some(RawColor::Green); From 7bd08e35d13a3582c57bdc5822ca13b9814dca9e Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 16 Oct 2021 01:29:21 +0200 Subject: [PATCH 152/368] Refactor cache freshness checks - Create explicit CacheFreshness enum - Do not exit inside `check_cache` function, this prevents further actions if the cache isn't found Co-authored-by: invakid404 --- src/cache.rs | 18 ++++++++++ src/main.rs | 92 +++++++++++++++++++++++++++------------------------- tests/lib.rs | 4 +-- 3 files changed, 67 insertions(+), 47 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 0e2ea2c..bdae9dc 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -52,6 +52,15 @@ impl PageLookupResult { } } +pub enum CacheFreshness { + /// The cache is still fresh (less than MAX_CACHE_AGE old) + Fresh, + /// The cache is stale and should be updated + Stale(Duration), + /// The cache is missing + Missing, +} + impl Cache { pub fn new(url: S, os: OsType) -> Self where @@ -173,6 +182,15 @@ impl Cache { None } + /// Return the freshness of the cache (fresh, stale or missing). + pub fn freshness() -> CacheFreshness { + match Cache::last_update() { + Some(ago) if ago > crate::config::MAX_CACHE_AGE => CacheFreshness::Stale(ago), + Some(_) => CacheFreshness::Fresh, + None => CacheFreshness::Missing, + } + } + /// Return the platform directory. fn get_platform_dir(&self) -> Option<&'static str> { match self.os { diff --git a/src/main.rs b/src/main.rs index b2e19f5..5c03a7d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,8 +35,8 @@ mod output; mod types; use crate::{ - cache::{Cache, PageLookupResult}, - config::{get_config_dir, get_config_path, make_default_config, Config, MAX_CACHE_AGE}, + cache::{Cache, CacheFreshness, PageLookupResult}, + config::{get_config_dir, get_config_path, make_default_config, Config}, error::TealdeerError::ConfigError, extensions::Dedup, output::print_page, @@ -86,42 +86,46 @@ fn configure_pager() { eprintln!("Warning: -p / --pager flag not available on Windows!"); } +/// The cache should get updated if this was requested by the user, or if auto +/// updates are enabled and the cache age is longer than the auto update interval. fn should_update_cache(args: &Args, config: &Config) -> bool { args.flag_update || (config.updates.auto_update && Cache::last_update().map_or(true, |ago| ago >= config.updates.auto_update_interval)) } -/// Check the cache for freshness -fn check_cache(args: &Args, enable_styles: bool) { - match Cache::last_update() { - Some(ago) if ago > MAX_CACHE_AGE => { - if args.flag_quiet { - return; - } +#[derive(PartialEq)] +enum CheckCacheResult { + CacheFound, + CacheMissing, +} - // Only use color if enabled +/// Check the cache for freshness. If it's stale or missing, show a warning. +fn check_cache(args: &Args, enable_styles: bool) -> CheckCacheResult { + match Cache::freshness() { + CacheFreshness::Fresh => CheckCacheResult::CacheFound, + CacheFreshness::Stale(_) if args.flag_quiet => CheckCacheResult::CacheFound, + CacheFreshness::Stale(age) => { let warning_style = if enable_styles { Style::new().fg(Color::Yellow) } else { Style::default() }; - eprintln!( "{}", warning_style.paint(format!( - "The cache hasn't been updated for more than {} days.\n\ - You should probably run `tldr --update` soon.", - MAX_CACHE_AGE.as_secs() / 24 / 3600 + "The cache hasn't been updated for {} days.\n\ + You should probably run `tldr --update` soon.", + age.as_secs() / 24 / 3600 )) ); + CheckCacheResult::CacheFound } - Some(_) => {} - None => { + CacheFreshness::Missing => { eprintln!("Cache not found. Please run `tldr --update`."); - process::exit(1); + CheckCacheResult::CacheMissing } - }; + } } /// Clear the cache @@ -377,23 +381,7 @@ fn main() { None => get_os(), }; - // Initialize cache - let cache = Cache::new(ARCHIVE_URL, os); - - // Clear cache, pass through - if args.flag_clear_cache { - clear_cache(args.flag_quiet); - } - - // Update cache, pass through - let cache_updated = if should_update_cache(&args, &config) { - update_cache(&cache, args.flag_quiet); - true - } else { - false - }; - - // Render local file and exit + // If a local file was passed in, render it and exit if let Some(ref file) = args.flag_render { let path = PageLookupResult::with_page(PathBuf::from(file)); if let Err(msg) = print_page(&path, args.flag_markdown, &config) { @@ -404,13 +392,32 @@ fn main() { }; } + // Initialize cache + let cache = Cache::new(ARCHIVE_URL, os); + + // Clear cache, pass through + if args.flag_clear_cache { + clear_cache(args.flag_quiet); + } + + // Cache update, pass through + let cache_updated = if should_update_cache(&args, &config) { + update_cache(&cache, args.flag_quiet); + true + } else { + false + }; + + // Check cache presence and freshness + if !cache_updated + && (args.flag_list || args.arg_command.is_some()) + && check_cache(&args, enable_styles) == CheckCacheResult::CacheMissing + { + process::exit(1); + } + // List cached commands and exit if args.flag_list { - if !cache_updated { - // Check cache for freshness - check_cache(&args, enable_styles); - } - // Get list of pages let pages = cache.list_pages().unwrap_or_else(|e| { eprintln!("Could not get list of pages: {}", e.message()); @@ -426,11 +433,6 @@ fn main() { if let Some(ref command) = args.arg_command { let command = command.join("-"); - if !cache_updated { - // Check cache for freshness - check_cache(&args, enable_styles); - } - let languages = args .flag_language .map_or_else(get_languages_from_env, |flag_lang| vec![flag_lang]); diff --git a/tests/lib.rs b/tests/lib.rs index 2926c75..1a3a441 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -212,14 +212,14 @@ fn test_quiet_old_cache() { .args(["tldr"]) .assert() .success() - .stderr(contains("The cache hasn't been updated for more than ")); + .stderr(contains("The cache hasn't been updated for ")); testenv .command() .args(["tldr", "--quiet"]) .assert() .success() - .stderr(contains("The cache hasn't been updated for more than ").not()); + .stderr(contains("The cache hasn't been updated for ").not()); } #[test] From 006ec6f3c002d5f55f2cba4e50f63885e929042f Mon Sep 17 00:00:00 2001 From: invakid404 Date: Sat, 16 Oct 2021 19:40:02 +0300 Subject: [PATCH 153/368] Switch to recommended tldr-pages archive URL Instead of downloading the GitHub repository archive, download the pages from the official URL instead. Squashed commits: - chore: use recommended tldr-pages archive url - chore: extract pages dir to constant - chore(deps): install zip crate - feat: use zip crate to unpack archive - chore(deps): drop flate2 --- Cargo.lock | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++- Cargo.toml | 2 +- src/cache.rs | 23 +++++++++++--------- src/main.rs | 6 +++--- tests/lib.rs | 10 +++++---- 5 files changed, 81 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 138dcff..3d9a346 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -98,12 +98,39 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + [[package]] name = "bytes" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +[[package]] +name = "bzip2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "cc" version = "1.0.70" @@ -821,6 +848,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkg-config" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c9b1041b4387893b91ee6746cddfc28516aff326a3519fb2adf820932c5e6cb" + [[package]] name = "ppv-lite86" version = "0.2.10" @@ -1232,7 +1265,6 @@ dependencies = [ "env_logger", "escargot", "filetime", - "flate2", "log", "pager", "predicates", @@ -1243,6 +1275,7 @@ dependencies = [ "tempfile", "toml", "walkdir", + "zip", ] [[package]] @@ -1288,6 +1321,16 @@ dependencies = [ "syn", ] +[[package]] +name = "time" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "tinyvec" version = "1.4.0" @@ -1617,3 +1660,17 @@ name = "xdg" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" + +[[package]] +name = "zip" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93ab48844d61251bb3835145c521d88aa4031d7139e8485990f60ca911fa0815" +dependencies = [ + "byteorder", + "bzip2", + "crc32fast", + "flate2", + "thiserror", + "time", +] diff --git a/Cargo.toml b/Cargo.toml index 0a603a4..31e16b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,6 @@ app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" docopt = "1" env_logger = { version = "0.9", optional = true } -flate2 = "1" log = "0.4" reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls", "rustls-tls-native-roots"], default-features = false } serde = "1.0.21" @@ -29,6 +28,7 @@ serde_derive = "1.0.21" tar = "0.4.14" toml = "0.5.1" walkdir = "2.0.1" +zip = "0.5" [target.'cfg(not(windows))'.dependencies] pager = "0.16" diff --git a/src/cache.rs b/src/cache.rs index bdae9dc..7b682e2 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -2,18 +2,17 @@ use std::{ env, ffi::OsStr, fs, - io::Read, + io::{Cursor, Read, Seek}, iter, path::{Path, PathBuf}, }; use app_dirs::{get_app_root, AppDataType}; -use flate2::read::GzDecoder; use log::debug; use reqwest::{blocking::Client, Proxy}; use std::time::{Duration, SystemTime}; -use tar::Archive; use walkdir::{DirEntry, WalkDir}; +use zip::ZipArchive; use crate::{ error::TealdeerError::{self, CacheError, UpdateError}, @@ -22,6 +21,9 @@ use crate::{ static CACHE_DIR_ENV_VAR: &str = "TEALDEER_CACHE_DIR"; +pub static TLDR_PAGES_DIR: &str = "tldr-pages"; +static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; + #[derive(Debug)] pub struct Cache { url: String, @@ -133,8 +135,8 @@ impl Cache { } /// Decompress and open the archive - fn decompress(reader: R) -> Archive> { - Archive::new(GzDecoder::new(reader)) + fn decompress(reader: R) -> ZipArchive { + ZipArchive::new(reader).unwrap() } /// Update the pages cache. @@ -143,10 +145,11 @@ impl Cache { let bytes: Vec = self.download()?; // Decompress the response body into an `Archive` - let mut archive = Self::decompress(&bytes[..]); + let mut archive = Self::decompress(Cursor::new(bytes)); // Determine paths let (cache_dir, _) = Self::get_cache_dir()?; + let pages_dir = cache_dir.join(TLDR_PAGES_DIR); // Make sure that cache directory exists debug!("Ensure cache directory {:?} exists", &cache_dir); @@ -163,7 +166,7 @@ impl Cache { // Extract archive archive - .unpack(&cache_dir) + .extract(&pages_dir) .map_err(|e| UpdateError(format!("Could not unpack compressed data: {}", e)))?; Ok(()) @@ -172,7 +175,7 @@ impl Cache { /// Return the duration since the cache directory was last modified. pub fn last_update() -> Option { if let Ok((cache_dir, _)) = Self::get_cache_dir() { - if let Ok(metadata) = fs::metadata(cache_dir.join("tldr-master")) { + if let Ok(metadata) = fs::metadata(cache_dir.join(TLDR_PAGES_DIR)) { if let Ok(mtime) = metadata.modified() { let now = SystemTime::now(); return now.duration_since(mtime).ok(); @@ -235,7 +238,7 @@ impl Cache { // Get cache dir let cache_dir = match Self::get_cache_dir() { - Ok((cache_dir, _)) => cache_dir.join("tldr-master"), + Ok((cache_dir, _)) => cache_dir.join(TLDR_PAGES_DIR), Err(e) => { log::error!("Could not get cache directory: {}", e); return None; @@ -281,7 +284,7 @@ impl Cache { pub fn list_pages(&self) -> Result, TealdeerError> { // Determine platforms directory and platform let (cache_dir, _) = Self::get_cache_dir()?; - let platforms_dir = cache_dir.join("tldr-master").join("pages"); + let platforms_dir = cache_dir.join(TLDR_PAGES_DIR).join("pages"); let platform_dir = self.get_platform_dir(); // Closure that allows the WalkDir instance to traverse platform diff --git a/src/main.rs b/src/main.rs index 5c03a7d..e87bc5c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,7 +35,7 @@ mod output; mod types; use crate::{ - cache::{Cache, CacheFreshness, PageLookupResult}, + cache::{Cache, CacheFreshness, PageLookupResult, TLDR_PAGES_DIR}, config::{get_config_dir, get_config_path, make_default_config, Config}, error::TealdeerError::ConfigError, extensions::Dedup, @@ -50,7 +50,7 @@ const APP_INFO: AppInfo = AppInfo { }; const VERSION: &str = env!("CARGO_PKG_VERSION"); const USAGE: &str = include_str!("usage.docopt"); -const ARCHIVE_URL: &str = "https://github.com/tldr-pages/tldr/archive/master.tar.gz"; +const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; #[cfg(not(target_os = "windows"))] const PAGER_COMMAND: &str = "less -R"; @@ -196,7 +196,7 @@ fn show_paths() { let pages_dir = Cache::get_cache_dir().map_or_else( |e| format!("[Error: {}]", e), |(mut path, _)| { - path.push("tldr-master"); + path.push(TLDR_PAGES_DIR); path.push(""); // Trailing path separator path.into_os_string() .into_string() diff --git a/tests/lib.rs b/tests/lib.rs index 1a3a441..b6cdff2 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -17,6 +17,8 @@ use tempfile::{Builder, TempDir}; // TODO: Should be 'cache::CACHE_DIR_ENV_VAR'. This requires to have a library crate for the logic. static CACHE_DIR_ENV_VAR: &str = "TEALDEER_CACHE_DIR"; +pub static TLDR_PAGES_DIR: &str = "tldr-pages"; + struct TestEnv { pub cache_dir: TempDir, pub custom_pages_dir: TempDir, @@ -60,7 +62,7 @@ impl TestEnv { let dir = self .cache_dir .path() - .join("tldr-master") + .join(TLDR_PAGES_DIR) .join("pages") .join(os); create_dir_all(&dir).unwrap(); @@ -202,7 +204,7 @@ fn test_quiet_old_cache() { .stdout(is_empty()); filetime::set_file_mtime( - testenv.cache_dir.path().join("tldr-master"), + testenv.cache_dir.path().join(TLDR_PAGES_DIR), filetime::FileTime::from_unix_time(1, 0), ) .unwrap(); @@ -309,7 +311,7 @@ fn test_show_paths() { testenv .cache_dir .path() - .join("tldr-master") + .join(TLDR_PAGES_DIR) .to_str() .unwrap(), ))); @@ -534,7 +536,7 @@ fn test_autoupdate_cache() { .stderr(contains("Cache not found. Please run `tldr --update`.")); let config_file_path = testenv.config_dir.path().join("config.toml"); - let cache_file_path = testenv.cache_dir.path().join("tldr-master"); + let cache_file_path = testenv.cache_dir.path().join(TLDR_PAGES_DIR); // Activate automatic updates, set the auto-update interval to 24 hours let mut config_file = File::create(&config_file_path).unwrap(); From 62725fca5f5d71d0e96600536bf9e3f6975193ba Mon Sep 17 00:00:00 2001 From: invakid404 Date: Sat, 16 Oct 2021 19:51:47 +0300 Subject: [PATCH 154/368] When clearing cache, only delete pages, not entire cache dir Squashed commits: - chore: wipe only pages instead of entire cache dir - fix: only delete dir if it exists - chore: try to make variable names less confusing - chore: display error as well --- src/cache.rs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 7b682e2..0161de4 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -334,12 +334,21 @@ impl Cache { pub fn clear() -> Result<(), TealdeerError> { let (path, _) = Self::get_cache_dir()?; if path.exists() && path.is_dir() { - fs::remove_dir_all(&path).map_err(|_| { - CacheError(format!( - "Could not remove cache directory ({}).", - path.display() - )) - })?; + // Delete old tldr-pages cache location as well if present + // TODO: To be removed in the future + for pages_dir_name in [TLDR_PAGES_DIR, TLDR_OLD_PAGES_DIR] { + let pages_dir = path.join(pages_dir_name); + + if pages_dir.exists() { + fs::remove_dir_all(&pages_dir).map_err(|e| { + CacheError(format!( + "Could not remove cache directory ({}): {}", + pages_dir.display(), + e + )) + })?; + } + } } else if path.exists() { return Err(CacheError(format!( "Cache path ({}) is not a directory.", From 0ebd727a325511909f07273299ed001d1c71a28c Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 16 Oct 2021 20:36:48 +0200 Subject: [PATCH 155/368] Remove tar dependency It's unused since #213. --- Cargo.lock | 21 --------------------- Cargo.toml | 1 - 2 files changed, 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3d9a346..6590ef9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1242,17 +1242,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "tar" -version = "0.4.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f5515d3add52e0bbdcad7b83c388bb36ba7b754dda3b5f5bc2d38640cdba5c" -dependencies = [ - "filetime", - "libc", - "xattr", -] - [[package]] name = "tealdeer" version = "1.4.1" @@ -1271,7 +1260,6 @@ dependencies = [ "reqwest", "serde", "serde_derive", - "tar", "tempfile", "toml", "walkdir", @@ -1646,15 +1634,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "xattr" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" -dependencies = [ - "libc", -] - [[package]] name = "xdg" version = "2.2.0" diff --git a/Cargo.toml b/Cargo.toml index 31e16b3..99f496f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,6 @@ log = "0.4" reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls", "rustls-tls-native-roots"], default-features = false } serde = "1.0.21" serde_derive = "1.0.21" -tar = "0.4.14" toml = "0.5.1" walkdir = "2.0.1" zip = "0.5" From 84227937ae0e9459f31cc2aca9111237219d3823 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 16 Oct 2021 20:40:39 +0200 Subject: [PATCH 156/368] Remove some optional zip features By getting rid of the bzip2 and time features, we reduce the number of dependencies. The official tldr pages archive uses deflate compression, so that should be sufficient. --- Cargo.lock | 43 ++----------------------------------------- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6590ef9..72a085f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,27 +110,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" -[[package]] -name = "bzip2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "cc" version = "1.0.70" @@ -329,9 +308,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80edafed416a46fb378521624fab1cfa2eb514784fd8921adbe8a8d8321da811" +checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" dependencies = [ "cfg-if", "crc32fast", @@ -848,12 +827,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkg-config" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c9b1041b4387893b91ee6746cddfc28516aff326a3519fb2adf820932c5e6cb" - [[package]] name = "ppv-lite86" version = "0.2.10" @@ -1309,16 +1282,6 @@ dependencies = [ "syn", ] -[[package]] -name = "time" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "tinyvec" version = "1.4.0" @@ -1647,9 +1610,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93ab48844d61251bb3835145c521d88aa4031d7139e8485990f60ca911fa0815" dependencies = [ "byteorder", - "bzip2", "crc32fast", "flate2", "thiserror", - "time", ] diff --git a/Cargo.toml b/Cargo.toml index 99f496f..6eb8fee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ serde = "1.0.21" serde_derive = "1.0.21" toml = "0.5.1" walkdir = "2.0.1" -zip = "0.5" +zip = { version = "0.5", default-features = false, features = ["deflate"] } [target.'cfg(not(windows))'.dependencies] pager = "0.16" From 5ad7dcfa34398eab54b4921a1e9c4bcb15a6d762 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 7 Mar 2020 17:50:12 +0100 Subject: [PATCH 157/368] Argument parsing: Switch from docopt to clap --- .github/workflows/ci.yml | 4 +- Cargo.lock | 104 ++++++++++++++++++++--- Cargo.toml | 2 +- clippy.toml | 2 +- docs/src/usage.md | 3 +- docs/src/usage.txt | 28 +++++++ fish_tealdeer | 2 +- src/cache.rs | 1 - src/main.rs | 174 +++++++++++++++++++++------------------ src/types.rs | 37 ++++++++- src/usage.docopt | 36 -------- 11 files changed, 255 insertions(+), 138 deletions(-) create mode 100644 docs/src/usage.txt delete mode 100644 src/usage.docopt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca3deae..36d1f55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - rust: [1.53, stable] + rust: [1.54, stable] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 @@ -60,7 +60,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.53 + toolchain: 1.54 override: true - run: rustup component add rustfmt - uses: actions-rs/cargo@v1 diff --git a/Cargo.lock b/Cargo.lock index 72a085f..14828af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -128,6 +128,36 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "clap" +version = "3.0.0-beta.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feff3878564edb93745d58cf63e17b63f24142506e7a20c87a5521ed7bfb1d63" +dependencies = [ + "atty", + "bitflags", + "clap_derive", + "indexmap", + "lazy_static", + "os_str_bytes", + "strsim 0.10.0", + "termcolor", + "textwrap", +] + +[[package]] +name = "clap_derive" +version = "3.0.0-beta.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b15c6b4f786ffb6192ffe65a36855bc1fc2444bcd0945ae16748dcd6ed7d0d3" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "combine" version = "4.6.1" @@ -221,18 +251,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" -[[package]] -name = "docopt" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f3f119846c823f9eafcf953a8f6ffb6ed69bf6240883261a7f13b634579a51f" -dependencies = [ - "lazy_static", - "regex", - "serde", - "strsim 0.10.0", -] - [[package]] name = "either" version = "1.6.1" @@ -450,6 +468,15 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "hermit-abi" version = "0.1.19" @@ -799,6 +826,15 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" +[[package]] +name = "os_str_bytes" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addaa943333a514159c80c97ff4a93306530d965d27e139188283cd13e06a799" +dependencies = [ + "memchr", +] + [[package]] name = "pager" version = "0.16.0" @@ -882,6 +918,30 @@ dependencies = [ "toml", ] +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + [[package]] name = "proc-macro-hack" version = "0.5.19" @@ -1223,7 +1283,7 @@ dependencies = [ "app_dirs2", "assert_cmd", "atty", - "docopt", + "clap", "env_logger", "escargot", "filetime", @@ -1262,6 +1322,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "textwrap" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" + [[package]] name = "thiserror" version = "1.0.29" @@ -1400,6 +1466,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" + [[package]] name = "unicode-xid" version = "0.2.2" @@ -1424,6 +1496,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "version_check" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" + [[package]] name = "wait-timeout" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index 6eb8fee..5d053f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ path = "src/main.rs" ansi_term = "0.12.0" app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" -docopt = "1" +clap = { version = "3.0.0-beta.5", features = ["std", "derive", "color", "suggestions" ], default-features = false } env_logger = { version = "0.9", optional = true } log = "0.4" reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls", "rustls-tls-native-roots"], default-features = false } diff --git a/clippy.toml b/clippy.toml index 349b690..ece14b8 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1 +1 @@ -msrv = "1.53" +msrv = "1.54" diff --git a/docs/src/usage.md b/docs/src/usage.md index c8fa308..6fba933 100644 --- a/docs/src/usage.md +++ b/docs/src/usage.md @@ -4,6 +4,7 @@ Tealdeer is straightforward to use, through the binary named `tldr`. You can view the available options using `tldr --help`: + ``` -{{#include ../../src/usage.docopt}} +{{#include usage.txt}} ``` diff --git a/docs/src/usage.txt b/docs/src/usage.txt new file mode 100644 index 0000000..695eda1 --- /dev/null +++ b/docs/src/usage.txt @@ -0,0 +1,28 @@ +tealdeer 1.4.1 + +Danilo Bargen + +A fast TLDR client + +USAGE: + tldr [OPTIONS] [COMMAND]... + +ARGS: + ... The command to show (e.g. `tar` or `git log`) + +OPTIONS: + -l, --list List all commands in the cache + -f, --render Render a specific markdown file + -o, --os Override the operating system [linux, osx, sunos, windows] + -L, --language Override the language + -u, --update Update the local cache + -c, --clear-cache Clear the local cache + -p, --pager Use a pager to page output + -m, --markdown Display the raw markdown instead of rendering it + -q, --quiet Suppress informational messages + --show-paths Show file and directory paths used by tealdeer + --config-path Show config file path + --seed-config Create a basic config + --color Control whether to use color [always, auto, never] + -v, --version Print the version + -h, --help Print help information diff --git a/fish_tealdeer b/fish_tealdeer index 1aa95c5..7f2c63f 100644 --- a/fish_tealdeer +++ b/fish_tealdeer @@ -7,7 +7,7 @@ complete -c tldr -s h -l help -d 'Print the help message.' -f complete -c tldr -s v -l version -d 'Show version information.' -f complete -c tldr -s l -l list -d 'List all commands in the cache.' -f complete -c tldr -s f -l render -d 'Render a specific markdown file.' -r -complete -c tldr -s o -l os -d 'Override the operating system.' -xa 'linux osx sunos windows other' +complete -c tldr -s o -l os -d 'Override the operating system.' -xa 'linux osx sunos windows' complete -c tldr -s u -l update -d 'Update the local cache.' -f complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f complete -c tldr -s p -l pager -d 'Use a pager to page output.' -f diff --git a/src/cache.rs b/src/cache.rs index 0161de4..5bfccb5 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -201,7 +201,6 @@ impl Cache { OsType::OsX => Some("osx"), OsType::SunOs => Some("sunos"), OsType::Windows => Some("windows"), - OsType::Other => None, } } diff --git a/src/main.rs b/src/main.rs index e87bc5c..03277dc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,10 +20,9 @@ use std::{env, path::PathBuf, process}; use ansi_term::{Color, Style}; use app_dirs::AppInfo; use atty::Stream; -use docopt::Docopt; +use clap::{AppSettings, Parser}; #[cfg(not(target_os = "windows"))] use pager::Pager; -use serde_derive::Deserialize; mod cache; mod config; @@ -48,31 +47,82 @@ const APP_INFO: AppInfo = AppInfo { name: NAME, author: NAME, }; -const VERSION: &str = env!("CARGO_PKG_VERSION"); -const USAGE: &str = include_str!("usage.docopt"); const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; #[cfg(not(target_os = "windows"))] const PAGER_COMMAND: &str = "less -R"; -#[allow(clippy::struct_excessive_bools)] -#[derive(Debug, Deserialize)] +#[derive(Parser, Debug)] +#[clap(about = "A fast TLDR client", author, version)] +#[clap(setting = AppSettings::ArgRequiredElseHelp)] +#[clap(setting = AppSettings::HelpRequired)] +#[clap(setting = AppSettings::DeriveDisplayOrder)] struct Args { - arg_command: Option>, - flag_help: bool, - flag_version: bool, - flag_list: bool, - flag_render: Option, - flag_os: Option, - flag_update: bool, - flag_clear_cache: bool, - flag_pager: bool, - flag_quiet: bool, - flag_show_paths: bool, - flag_config_path: bool, - flag_seed_config: bool, - flag_markdown: bool, - flag_color: ColorOptions, - flag_language: Option, + /// The command to show (e.g. `tar` or `git log`) + #[clap(min_values = 1)] + command: Vec, + + /// List all commands in the cache + #[clap(short = 'l', long = "list")] + list: bool, + + /// Render a specific markdown file + #[clap( + short = 'f', + long = "render", + value_name = "FILE", + conflicts_with = "command" + )] + render: Option, + + /// Override the operating system [linux, osx, sunos, windows] + #[clap(short = 'o', long = "os", requires = "command")] + os: Option, + + /// Override the language + #[clap(short = 'L', long = "language")] + language: Option, + + /// Update the local cache + #[clap(short = 'u', long = "update")] + update: bool, + + /// Clear the local cache + #[clap(short = 'c', long = "clear-cache")] + clear_cache: bool, + + /// Use a pager to page output + #[clap(short = 'p', long = "pager", requires = "command")] + pager: bool, + + /// Display the raw markdown instead of rendering it + #[clap(short = 'm', long = "markdown", requires = "command")] + markdown: bool, + + /// Suppress informational messages + #[clap(short = 'q', long = "quiet")] + quiet: bool, + + /// Show file and directory paths used by tealdeer + #[clap(long = "show-paths")] + show_paths: bool, + + /// Show config file path + #[clap(long = "config-path")] + config_path: bool, + + /// Create a basic config + #[clap(long = "seed-config")] + seed_config: bool, + + /// Control whether to use color [always, auto, never] + #[clap(long = "color", value_name = "WHEN")] + color: Option, + + /// Print the version + // Note: We override the version flag because clap uses `-V` by default, + // while TLDR specification requires `-v` to be used. + #[clap(short = 'v', long = "version")] + version: bool, } /// Set up display pager @@ -89,7 +139,7 @@ fn configure_pager() { /// The cache should get updated if this was requested by the user, or if auto /// updates are enabled and the cache age is longer than the auto update interval. fn should_update_cache(args: &Args, config: &Config) -> bool { - args.flag_update + args.update || (config.updates.auto_update && Cache::last_update().map_or(true, |ago| ago >= config.updates.auto_update_interval)) } @@ -104,7 +154,7 @@ enum CheckCacheResult { fn check_cache(args: &Args, enable_styles: bool) -> CheckCacheResult { match Cache::freshness() { CacheFreshness::Fresh => CheckCacheResult::CacheFound, - CacheFreshness::Stale(_) if args.flag_quiet => CheckCacheResult::CacheFound, + CacheFreshness::Stale(_) if args.quiet => CheckCacheResult::CacheFound, CacheFreshness::Stale(age) => { let warning_style = if enable_styles { Style::new().fg(Color::Yellow) @@ -313,28 +363,19 @@ fn main() { init_log(); // Parse arguments - let args: Args = Docopt::new(USAGE) - .and_then(|d| d.deserialize()) - .unwrap_or_else(|e| e.exit()); - - // Show version and exit - if args.flag_version { - let os = get_os(); - println!("{} v{} ({})", NAME, VERSION, os); - process::exit(0); - } + let args: Args = Args::parse(); // Show config file and path, pass through - if args.flag_config_path { + if args.config_path { eprintln!("Warning: The --config-path flag is deprecated, use --show-paths instead"); show_config_path(); } - if args.flag_show_paths { + if args.show_paths { show_paths(); } // Create a basic config and exit - if args.flag_seed_config { + if args.seed_config { create_config_and_exit(); } @@ -344,7 +385,7 @@ fn main() { #[cfg(not(target_os = "windows"))] let ansi_support = true; - let enable_styles = match args.flag_color { + let enable_styles = match args.color.unwrap_or(ColorOptions::Auto) { // Attempt to use styling if instructed ColorOptions::Always => true, // Enable styling if: @@ -371,20 +412,20 @@ fn main() { } }; - if args.flag_pager || config.display.use_pager { + if args.pager || config.display.use_pager { configure_pager(); } // Specify target OS - let os: OsType = match args.flag_os { + let os: OsType = match args.os { Some(os) => os, None => get_os(), }; // If a local file was passed in, render it and exit - if let Some(ref file) = args.flag_render { + if let Some(ref file) = args.render { let path = PageLookupResult::with_page(PathBuf::from(file)); - if let Err(msg) = print_page(&path, args.flag_markdown, &config) { + if let Err(msg) = print_page(&path, args.markdown, &config) { eprintln!("{}", msg); process::exit(1); } else { @@ -396,13 +437,13 @@ fn main() { let cache = Cache::new(ARCHIVE_URL, os); // Clear cache, pass through - if args.flag_clear_cache { - clear_cache(args.flag_quiet); + if args.clear_cache { + clear_cache(args.quiet); } // Cache update, pass through let cache_updated = if should_update_cache(&args, &config) { - update_cache(&cache, args.flag_quiet); + update_cache(&cache, args.quiet); true } else { false @@ -410,14 +451,14 @@ fn main() { // Check cache presence and freshness if !cache_updated - && (args.flag_list || args.arg_command.is_some()) + && (args.list || !args.command.is_empty()) && check_cache(&args, enable_styles) == CheckCacheResult::CacheMissing { process::exit(1); } // List cached commands and exit - if args.flag_list { + if args.list { // Get list of pages let pages = cache.list_pages().unwrap_or_else(|e| { eprintln!("Could not get list of pages: {}", e.message()); @@ -430,12 +471,12 @@ fn main() { } // Show command from cache - if let Some(ref command) = args.arg_command { - let command = command.join("-"); + if !args.command.is_empty() { + let command = args.command.join("-"); let languages = args - .flag_language - .map_or_else(get_languages_from_env, |flag_lang| vec![flag_lang]); + .language + .map_or_else(get_languages_from_env, |lang| vec![lang]); // Search for command in cache if let Some(page) = cache.find_page( @@ -443,13 +484,13 @@ fn main() { &languages, config.directories.custom_pages_dir.as_deref(), ) { - if let Err(msg) = print_page(&page, args.flag_markdown, &config) { + if let Err(msg) = print_page(&page, args.markdown, &config) { eprintln!("{}", msg); process::exit(1); } process::exit(0); } else { - if !args.flag_quiet { + if !args.quiet { eprintln!("Page {} not found in cache", &command); eprintln!("Try updating with `tldr --update`, or submit a pull request to:"); eprintln!("https://github.com/tldr-pages/tldr"); @@ -457,36 +498,11 @@ fn main() { process::exit(1); } } - - // Some flags can be run without a command. - if !(args.flag_update || args.flag_clear_cache || args.flag_config_path || args.flag_show_paths) - { - eprintln!("{}", USAGE); - process::exit(1); - } } #[cfg(test)] mod test { - use crate::{get_languages, Args, OsType, USAGE}; - use docopt::{Docopt, Error}; - - fn test_helper(argv: &[&str]) -> Result { - Docopt::new(USAGE).and_then(|d| d.argv(argv).deserialize()) - } - - #[test] - fn test_docopt_os_case_insensitive() { - let argv = ["cp", "--os", "LiNuX"]; - let os = test_helper(&argv).unwrap().flag_os.unwrap(); - assert_eq!(OsType::Linux, os); - } - - #[test] - fn test_docopt_expect_error() { - let argv = ["cp", "--os", "lindows"]; - assert!(!test_helper(&argv).is_ok()); - } + use crate::get_languages; mod language { use super::*; diff --git a/src/types.rs b/src/types.rs index 180185a..2d938a5 100644 --- a/src/types.rs +++ b/src/types.rs @@ -1,6 +1,6 @@ //! Shared types used in tealdeer. -use std::fmt; +use std::{fmt, str}; use serde_derive::{Deserialize, Serialize}; @@ -12,7 +12,6 @@ pub enum OsType { OsX, SunOs, Windows, - Other, } impl fmt::Display for OsType { @@ -22,7 +21,23 @@ impl fmt::Display for OsType { Self::OsX => write!(f, "macOS / BSD"), Self::SunOs => write!(f, "SunOS"), Self::Windows => write!(f, "Windows"), - Self::Other => write!(f, "Unknown OS"), + } + } +} + +impl str::FromStr for OsType { + type Err = String; + + fn from_str(s: &str) -> Result { + match s { + "linux" => Ok(Self::Linux), + "osx" => Ok(Self::OsX), + "sunos" => Ok(Self::SunOs), + "windows" => Ok(Self::Windows), + other => Err(format!( + "Unknown OS: {}. Possible values: linux, osx, sunos, windows", + other + )), } } } @@ -35,6 +50,22 @@ pub enum ColorOptions { Never, } +impl str::FromStr for ColorOptions { + type Err = String; + + fn from_str(s: &str) -> Result { + match s { + "always" => Ok(Self::Always), + "auto" => Ok(Self::Auto), + "never" => Ok(Self::Never), + other => Err(format!( + "Unknown color option: {}. Possible values: always, auto, never", + other + )), + } + } +} + #[derive(Debug, Eq, PartialEq)] pub enum LineType { Empty, diff --git a/src/usage.docopt b/src/usage.docopt deleted file mode 100644 index 9ba0968..0000000 --- a/src/usage.docopt +++ /dev/null @@ -1,36 +0,0 @@ -Usage: - - tldr [options] ... - tldr [options] - -Options: - - -h --help Show this screen - -v --version Show version information - -l --list List all commands in the cache - -f --render Render a specific markdown file - -o --os Override the operating system [linux, osx, sunos, windows] - -L --language Override the language settings - -u --update Update the local cache - -c --clear-cache Clear the local cache - -p --pager Use a pager to page output - -m --markdown Display the raw markdown instead of rendering it - -q --quiet Suppress informational messages - --show-paths Show file and directory paths used by tealdeer - --config-path Show config file path (deprecated) - --seed-config Create a basic config - --color Control when to use color [always, auto, never] [default: auto] - -Examples: - - $ tldr tar - $ tldr --list - -To control the cache: - - $ tldr --update - $ tldr --clear-cache - -To render a local file (for testing): - - $ tldr --render /path/to/file.md From 6d77483ad5cf66c054fa07379b2fe27a74e011f7 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 17 Oct 2021 19:56:40 +0200 Subject: [PATCH 158/368] Implement Default for ColorOptions --- src/config.rs | 2 +- src/main.rs | 2 +- src/types.rs | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 758147a..2f5f62f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -85,7 +85,7 @@ impl Default for RawStyle { italic: false, } } -} // impl RawStyle +} impl From for Style { fn from(raw_style: RawStyle) -> Self { diff --git a/src/main.rs b/src/main.rs index 03277dc..92787de 100644 --- a/src/main.rs +++ b/src/main.rs @@ -385,7 +385,7 @@ fn main() { #[cfg(not(target_os = "windows"))] let ansi_support = true; - let enable_styles = match args.color.unwrap_or(ColorOptions::Auto) { + let enable_styles = match args.color.unwrap_or_default() { // Attempt to use styling if instructed ColorOptions::Always => true, // Enable styling if: diff --git a/src/types.rs b/src/types.rs index 2d938a5..239b3fc 100644 --- a/src/types.rs +++ b/src/types.rs @@ -66,6 +66,12 @@ impl str::FromStr for ColorOptions { } } +impl Default for ColorOptions { + fn default() -> Self { + Self::Auto + } +} + #[derive(Debug, Eq, PartialEq)] pub enum LineType { Empty, From ee0d32d3de89d7289c03f272d7f6fbe067b1a2fe Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 9 May 2021 19:50:39 +0200 Subject: [PATCH 159/368] CI: Ensure that usage string is always up to date --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36d1f55..160d9ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,3 +67,27 @@ jobs: with: command: fmt args: --all -- --check + + docs: + name: build docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: '0.4.4' + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + - name: Ensure that docs can be built + run: cd docs && mdbook build + - name: Generate usage string + run: cargo run -- --help > docs/src/usage-actual.txt + - name: Ensure that usage string is up to date + run: diff docs/src/usage{,-actual}.txt From 8833b6b40179eef6161035d10d7e218694facca1 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 17 Oct 2021 20:53:12 +0200 Subject: [PATCH 160/368] Rename -m / --markdown to -r / --raw That flag name is clearer: We output raw page data without processing. --- bash_tealdeer | 2 +- docs/src/usage.txt | 2 +- fish_tealdeer | 2 +- src/main.rs | 22 ++++++++++++++++++---- tests/lib.rs | 2 +- zsh_tealdeer | 2 +- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/bash_tealdeer b/bash_tealdeer index aadcc05..6ed44cd 100644 --- a/bash_tealdeer +++ b/bash_tealdeer @@ -6,7 +6,7 @@ _tealdeer() _init_completion || return case $prev in - -h|--help|-v|--version|-l|--list|-u|--update|-c|--clear-cache|-p|--pager|-m|--markdown|--show-paths|--seed-config|-q|--quiet) + -h|--help|-v|--version|-l|--list|-u|--update|-c|--clear-cache|-p|--pager|-r|--raw|--show-paths|--seed-config|-q|--quiet) return ;; -f|--render) diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 695eda1..3f5f24a 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -18,7 +18,7 @@ OPTIONS: -u, --update Update the local cache -c, --clear-cache Clear the local cache -p, --pager Use a pager to page output - -m, --markdown Display the raw markdown instead of rendering it + -r, --raw Display the raw markdown instead of rendering it -q, --quiet Suppress informational messages --show-paths Show file and directory paths used by tealdeer --config-path Show config file path diff --git a/fish_tealdeer b/fish_tealdeer index 7f2c63f..cad6cc2 100644 --- a/fish_tealdeer +++ b/fish_tealdeer @@ -11,7 +11,7 @@ complete -c tldr -s o -l os -d 'Override the operating system.' -xa 'li complete -c tldr -s u -l update -d 'Update the local cache.' -f complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f complete -c tldr -s p -l pager -d 'Use a pager to page output.' -f -complete -c tldr -s m -l markdown -d 'Display the raw markdown instead of rendering it.' -f +complete -c tldr -s r -l raw -d 'Display the raw markdown instead of rendering it.' -f complete -c tldr -s q -l quiet -d 'Suppress informational messages.' -f complete -c tldr -l show-paths -d 'Show file and directory paths used by tealdeer.' -f complete -c tldr -l seed-config -d 'Create a basic config.' -f diff --git a/src/main.rs b/src/main.rs index 92787de..15ccac5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -95,7 +95,11 @@ struct Args { pager: bool, /// Display the raw markdown instead of rendering it - #[clap(short = 'm', long = "markdown", requires = "command")] + #[clap(short = 'r', long = "--raw", requires = "command")] + raw: bool, + + /// Deprecated alias of `raw` + #[clap(long = "markdown", short = 'm', requires = "command", hidden = true)] markdown: bool, /// Suppress informational messages @@ -363,7 +367,17 @@ fn main() { init_log(); // Parse arguments - let args: Args = Args::parse(); + let args = { + let mut args = Args::parse(); + + // Handle renamed arguments + if args.markdown { + args.raw = true; + eprintln!("Warning: The -m / --markdown flag is deprecated, use -r / --raw instead"); + } + + args + }; // Show config file and path, pass through if args.config_path { @@ -425,7 +439,7 @@ fn main() { // If a local file was passed in, render it and exit if let Some(ref file) = args.render { let path = PageLookupResult::with_page(PathBuf::from(file)); - if let Err(msg) = print_page(&path, args.markdown, &config) { + if let Err(msg) = print_page(&path, args.raw, &config) { eprintln!("{}", msg); process::exit(1); } else { @@ -484,7 +498,7 @@ fn main() { &languages, config.directories.custom_pages_dir.as_deref(), ) { - if let Err(msg) = print_page(&page, args.markdown, &config) { + if let Err(msg) = print_page(&page, args.raw, &config) { eprintln!("{}", msg); process::exit(1); } diff --git a/tests/lib.rs b/tests/lib.rs index b6cdff2..6ff88d2 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -339,7 +339,7 @@ fn test_markdown_rendering() { let expected = include_str!("which-markdown.expected"); testenv .command() - .args(["-m", "which"]) + .args(["--raw", "which"]) .assert() .success() .stdout(diff(expected)); diff --git a/zsh_tealdeer b/zsh_tealdeer index 96e40f0..0674063 100644 --- a/zsh_tealdeer +++ b/zsh_tealdeer @@ -24,7 +24,7 @@ _tealdeer() { "($I -u --update)"{-u,--update}"[Update the local cache]" "($I -c --clear-cache)"{-c,--clear-cache}"[Clear the local cache]" "($I -p --pager)"{-p,--pager}"[Use a pager to page output]" - "($I -m --markdown)"{-m,--markdown}"[Display the raw markdown instead of rendering it]" + "($I -r --raw)"{-r,--raw}"[Display the raw markdown instead of rendering it]" "($I -q --quiet)"{-q,--quiet}"[Suppress informational messages]" "($I)--show-paths[Show file and directory paths used by tealdeer]" "($I)--seed-config[Create a basic config]" From fc726011d1b92b83e2cc3257108a47f14a72390c Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 17 Oct 2021 21:16:50 +0200 Subject: [PATCH 161/368] Move free-standing get_os function to OsType::current --- src/main.rs | 36 +----------------------------------- src/types.rs | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 35 deletions(-) diff --git a/src/main.rs b/src/main.rs index 15ccac5..03a6d68 100644 --- a/src/main.rs +++ b/src/main.rs @@ -292,40 +292,6 @@ fn init_log() { #[cfg(not(feature = "logging"))] fn init_log() {} -#[cfg(target_os = "linux")] -fn get_os() -> OsType { - OsType::Linux -} - -#[cfg(any( - target_os = "macos", - target_os = "freebsd", - target_os = "netbsd", - target_os = "openbsd", - target_os = "dragonfly" -))] -fn get_os() -> OsType { - OsType::OsX -} - -#[cfg(target_os = "windows")] -fn get_os() -> OsType { - OsType::Windows -} - -#[cfg(not(any( - target_os = "linux", - target_os = "macos", - target_os = "freebsd", - target_os = "netbsd", - target_os = "openbsd", - target_os = "dragonfly", - target_os = "windows" -)))] -fn get_os() -> OsType { - OsType::Other -} - fn get_languages(env_lang: Option<&str>, env_language: Option<&str>) -> Vec { // Language list according to // https://github.com/tldr-pages/tldr/blob/master/CLIENT-SPECIFICATION.md#language @@ -433,7 +399,7 @@ fn main() { // Specify target OS let os: OsType = match args.os { Some(os) => os, - None => get_os(), + None => OsType::current(), }; // If a local file was passed in, render it and exit diff --git a/src/types.rs b/src/types.rs index 239b3fc..3e6a161 100644 --- a/src/types.rs +++ b/src/types.rs @@ -42,6 +42,42 @@ impl str::FromStr for OsType { } } +impl OsType { + #[cfg(target_os = "linux")] + pub fn current() -> Self { + Self::Linux + } + + #[cfg(any( + target_os = "macos", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd", + target_os = "dragonfly" + ))] + pub fn current() -> Self { + Self::OsX + } + + #[cfg(target_os = "windows")] + pub fn current() -> Self { + Self::Windows + } + + #[cfg(not(any( + target_os = "linux", + target_os = "macos", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd", + target_os = "dragonfly", + target_os = "windows" + )))] + pub fn current() -> Self { + Self::Other + } +} + #[derive(Debug, Eq, PartialEq, Copy, Clone, Deserialize)] #[serde(rename_all = "lowercase")] pub enum ColorOptions { From 6823e271a0efab4daaa30f527b56eac53b6efc9e Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 17 Oct 2021 22:10:06 +0200 Subject: [PATCH 162/368] Disable clap colors for now May be re-introduced if clap adds a `DisableColoredHelp` setting. Relevant discussion: - https://github.com/clap-rs/clap/pull/2845#issuecomment-945185102 - https://github.com/dbrgn/tealdeer/pull/108#issuecomment-945182471 --- Cargo.lock | 2 -- Cargo.toml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14828af..85a67a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -134,14 +134,12 @@ version = "3.0.0-beta.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "feff3878564edb93745d58cf63e17b63f24142506e7a20c87a5521ed7bfb1d63" dependencies = [ - "atty", "bitflags", "clap_derive", "indexmap", "lazy_static", "os_str_bytes", "strsim 0.10.0", - "termcolor", "textwrap", ] diff --git a/Cargo.toml b/Cargo.toml index 5d053f0..7a025f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ path = "src/main.rs" ansi_term = "0.12.0" app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" -clap = { version = "3.0.0-beta.5", features = ["std", "derive", "color", "suggestions" ], default-features = false } +clap = { version = "3.0.0-beta.5", features = ["std", "derive", "suggestions" ], default-features = false } env_logger = { version = "0.9", optional = true } log = "0.4" reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls", "rustls-tls-native-roots"], default-features = false } From 371f1d2ace99f4cf7077c27cf65908ca5b8a2acd Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 17 Oct 2021 22:20:39 +0200 Subject: [PATCH 163/368] Help: Add a link to the online docs --- docs/src/usage.txt | 2 ++ src/main.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 3f5f24a..85d089c 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -26,3 +26,5 @@ OPTIONS: --color Control whether to use color [always, auto, never] -v, --version Print the version -h, --help Print help information + +To view the user documentation, please visit https://dbrgn.github.io/tealdeer/. diff --git a/src/main.rs b/src/main.rs index 03a6d68..7b74e64 100644 --- a/src/main.rs +++ b/src/main.rs @@ -56,6 +56,9 @@ const PAGER_COMMAND: &str = "less -R"; #[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(setting = AppSettings::HelpRequired)] #[clap(setting = AppSettings::DeriveDisplayOrder)] +#[clap( + after_help = "To view the user documentation, please visit https://dbrgn.github.io/tealdeer/." +)] struct Args { /// The command to show (e.g. `tar` or `git log`) #[clap(min_values = 1)] From 618ecaf71fbadc8de5d408f01d7cb251abf65d1f Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 17 Oct 2021 22:23:35 +0200 Subject: [PATCH 164/368] Add @niklasmohrin to crate authors --- Cargo.toml | 5 ++++- docs/src/usage.txt | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7a025f8..ba56396 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,8 @@ [package] -authors = ["Danilo Bargen "] +authors = [ + "Danilo Bargen ", + "Niklas Mohrin ", +] description = "Fetch and show tldr help pages for many CLI commands. Full featured offline client with caching support." homepage = "https://github.com/dbrgn/tealdeer/" license = "MIT/Apache-2.0" diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 85d089c..7e13562 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -1,6 +1,6 @@ tealdeer 1.4.1 -Danilo Bargen +Danilo Bargen , Niklas Mohrin A fast TLDR client From cea3bcdc3f05a9fc711c4127cae19f9cbe0c0f63 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 18 Oct 2021 00:21:43 +0200 Subject: [PATCH 165/368] Update benchmarks (#216) New numbers with clap instead of docopt (current master branch). This change improved performance considerably. --- README.md | 30 +++++++++++++++--------------- benchmarks/Dockerfile | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index bd21ac3..86c82a6 100644 --- a/README.md +++ b/README.md @@ -45,23 +45,23 @@ measures the execution times on a cold disk cache. The benchmarking is run in a Docker container using sharkdp's [`hyperfine`][hyperfine-gh] ([Dockerfile][benchmark-dockerfile]). -| Client (50 runs, 29.07.2021) | Programming Language | Mean in ms | Deviation in ms | Comments | +| Client (50 runs, 17.10.2021) | Programming Language | Mean in ms | Deviation in ms | Comments | | :---: | :---: | :---: | :---: | :---: | -| `tealdeer` | Rust | 16.2 | 1.2 | | -| [`tldr-c`][c-gh] | C | 35.7 | 3.2 | | -| [`tldr-hs`][hs-gh] | Haskell | 23.6 | 1.0 | no example highlighting | -| [`fast-tldr`][fast-tldr-gh] | Haskell | 15.2 | 0.7 | no example highlighting | -| [`tldr-bash`][bash-gh] | Bash | 28.3 | 1.1 | | -| [`tldr-python-client`][python-gh] | Python | 97.9 | 3.5 | | -| [`outfieldr`][outfieldr-gh] | Zig | 4.7 | 0.5 | no user configuration | -| [`tldr-node-client`][node-gh] | Javascript / Node | 533.1 | 12.5 | | +| [`outfieldr`][outfieldr-gh] | Zig | 9.1 | 0.5 | no user configuration | +| `tealdeer` | Rust | 13.2 | 0.5 | | +| [`fast-tldr`][fast-tldr-gh] | Haskell | 17.0 | 0.6 | no example highlighting | +| [`tldr-hs`][hs-gh] | Haskell | 25.1 | 0.5 | no example highlighting | +| [`tldr-bash`][bash-gh] | Bash | 30.0 | 0.8 | | +| [`tldr-c`][c-gh] | C | 38.4 | 1.0 | | +| [`tldr-python-client`][python-gh] | Python | 87.0 | 2.4 | | +| [`tldr-node-client`][node-gh] | JavaScript / NodeJS | 407.1 | 12.9 | | -As you can see, `tealdeer` is not the fastest of the tested clients anymore. We -strive for useful features and code quality over raw performance, even if that -means that we don't come out on top in this friendly competition. That said, we -are still optimizing the code, for example when the `outfieldr` developers -[suggested to switch][outfieldr-comment-tls] to a native TLS implementation -instead of the native libraries. +As you can see, `tealdeer` is one of the fastest of the tested clients. +However, we strive for useful features and code quality over raw performance, +even if that means that we don't come out on top in this friendly competition. +That said, we are still optimizing the code, for example when the `outfieldr` +developers [suggested to switch][outfieldr-comment-tls] to a native TLS +implementation instead of the native libraries. ## Development diff --git a/benchmarks/Dockerfile b/benchmarks/Dockerfile index b70c58c..d717eba 100644 --- a/benchmarks/Dockerfile +++ b/benchmarks/Dockerfile @@ -2,7 +2,7 @@ # # To run the benchmarks, execute # -# docker build -t tldr-benchmark . +# docker build --pull -t tldr-benchmark . # docker run --privileged --rm -it tldr-benchmark # # as root in the directory of this Dockerfile. This will build the compared From 3beed4ad489856a323848e8ac2f3ca96930df3ee Mon Sep 17 00:00:00 2001 From: Marcin Puc <5671049+tranzystorek-io@users.noreply.github.com> Date: Sun, 24 Oct 2021 23:17:43 +0200 Subject: [PATCH 166/368] Simplify clap derive definition (#221) - Use `possible_values` - Change `render` field type to `PathBuf` - Add comment about explicit field names --- docs/src/usage.txt | 5 +++-- src/main.rs | 25 ++++++++++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 7e13562..e677621 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -13,7 +13,8 @@ ARGS: OPTIONS: -l, --list List all commands in the cache -f, --render Render a specific markdown file - -o, --os Override the operating system [linux, osx, sunos, windows] + -o, --os Override the operating system [possible values: linux, osx, sunos, + windows] -L, --language Override the language -u, --update Update the local cache -c, --clear-cache Clear the local cache @@ -23,7 +24,7 @@ OPTIONS: --show-paths Show file and directory paths used by tealdeer --config-path Show config file path --seed-config Create a basic config - --color Control whether to use color [always, auto, never] + --color Control whether to use color [possible values: always, auto, never] -v, --version Print the version -h, --help Print help information diff --git a/src/main.rs b/src/main.rs index 7b74e64..0895fd7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,6 +51,8 @@ const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; #[cfg(not(target_os = "windows"))] const PAGER_COMMAND: &str = "less -R"; +// Note: flag names are specified explicitly in clap attributes +// to improve readability and allow contributors to grep names like "clear-cache" #[derive(Parser, Debug)] #[clap(about = "A fast TLDR client", author, version)] #[clap(setting = AppSettings::ArgRequiredElseHelp)] @@ -75,10 +77,15 @@ struct Args { value_name = "FILE", conflicts_with = "command" )] - render: Option, + render: Option, - /// Override the operating system [linux, osx, sunos, windows] - #[clap(short = 'o', long = "os", requires = "command")] + /// Override the operating system + #[clap( + short = 'o', + long = "os", + requires = "command", + possible_values = ["linux", "osx", "sunos", "windows"] + )] os: Option, /// Override the language @@ -121,8 +128,12 @@ struct Args { #[clap(long = "seed-config")] seed_config: bool, - /// Control whether to use color [always, auto, never] - #[clap(long = "color", value_name = "WHEN")] + /// Control whether to use color + #[clap( + long = "color", + value_name = "WHEN", + possible_values = ["always", "auto", "never"] + )] color: Option, /// Print the version @@ -406,8 +417,8 @@ fn main() { }; // If a local file was passed in, render it and exit - if let Some(ref file) = args.render { - let path = PageLookupResult::with_page(PathBuf::from(file)); + if let Some(file) = args.render { + let path = PageLookupResult::with_page(file); if let Err(msg) = print_page(&path, args.raw, &config) { eprintln!("{}", msg); process::exit(1); From 746d4dadda579f4e7a5e351223154a074c31c232 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 24 Oct 2021 23:30:10 +0200 Subject: [PATCH 167/368] Fix clippy warnings (#222) - Silence warning about excessive bools - Implement recommendation about unneeded Option in return type --- src/cache.rs | 28 +++++++++++----------------- src/main.rs | 1 + 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 5bfccb5..df7d362 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -195,12 +195,12 @@ impl Cache { } /// Return the platform directory. - fn get_platform_dir(&self) -> Option<&'static str> { + fn get_platform_dir(&self) -> &'static str { match self.os { - OsType::Linux => Some("linux"), - OsType::OsX => Some("osx"), - OsType::SunOs => Some("sunos"), - OsType::Windows => Some("windows"), + OsType::Linux => "linux", + OsType::OsX => "osx", + OsType::SunOs => "sunos", + OsType::Windows => "windows", } } @@ -266,12 +266,11 @@ impl Cache { let patch_path = Self::find_patch(&patch_filename, custom_pages_dir); // Try to find a platform specific path next, append custom patch to it. - if let Some(pf) = self.get_platform_dir() { - if let Some(page) = - Self::find_page_for_platform(&page_filename, &cache_dir, pf, &lang_dirs) - { - return Some(PageLookupResult::with_page(page).with_optional_patch(patch_path)); - } + let platform_dir = self.get_platform_dir(); + if let Some(page) = + Self::find_page_for_platform(&page_filename, &cache_dir, platform_dir, &lang_dirs) + { + return Some(PageLookupResult::with_page(page).with_optional_patch(patch_path)); } // Did not find platform specific results, fall back to "common" @@ -295,12 +294,7 @@ impl Cache { None => return false, }; if file_type.is_dir() { - if file_name == "common" { - return true; - } - if let Some(platform) = platform_dir { - return file_name == platform; - } + return file_name == "common" || file_name == platform_dir; } else if file_type.is_file() { return true; } diff --git a/src/main.rs b/src/main.rs index 0895fd7..6f182b7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,6 +13,7 @@ #![allow(clippy::enum_glob_use)] #![allow(clippy::module_name_repetitions)] #![allow(clippy::similar_names)] +#![allow(clippy::struct_excessive_bools)] #![allow(clippy::too_many_lines)] use std::{env, path::PathBuf, process}; From 9c90f8ba7a73fe791d502dbe05f37a73234dafd6 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 4 Dec 2021 21:34:06 +0100 Subject: [PATCH 168/368] Fix clippy lints added in 1.57 (#225) --- src/cache.rs | 2 +- src/config.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cache.rs b/src/cache.rs index df7d362..a4a2100 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -312,7 +312,7 @@ impl Cache { let extension = &path.extension().and_then(OsStr::to_str).unwrap_or(""); if e.file_type().is_file() && extension == &"md" { path.file_stem() - .and_then(|stem| stem.to_str().map(|s| s.into())) + .and_then(|stem| stem.to_str().map(Into::into)) } else { None } diff --git a/src/config.rs b/src/config.rs index 2f5f62f..efd7feb 100644 --- a/src/config.rs +++ b/src/config.rs @@ -75,6 +75,7 @@ struct RawStyle { pub italic: bool, } +#[allow(clippy::derivable_impls)] // Explicitly control defaults impl Default for RawStyle { fn default() -> Self { Self { From 02c2d6709a061e61e14d910ea3054627d4b39b07 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 4 Dec 2021 21:47:58 +0100 Subject: [PATCH 169/368] Run cargo update (#226) This fixes a vulnerability in tokio (RUSTSEC-2021-0124). --- Cargo.lock | 377 ++++++++++++++++++++++++++++------------------------- 1 file changed, 196 insertions(+), 181 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 85a67a5..3585ebf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,9 +28,9 @@ dependencies = [ [[package]] name = "app_dirs2" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55db1808b75fbf537160a28c59f868018c480a9a7f05ab6d6a760cba7d4cd303" +checksum = "2dd95d9b31f552568dcad90bb809b795f63795fba32f733eb7435a4d13f5d28f" dependencies = [ "jni", "ndk-glue", @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b800c4403e8105d959595e1f88119e78bc12bc874c4336973658b648a746ba93" +checksum = "e996dc7940838b7ef1096b882e29ec30a3149a3a443cdc8dba19ed382eca1fe2" dependencies = [ "bstr", "doc-comment", @@ -83,9 +83,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bstr" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90682c8d613ad3373e66de8c6411e0ae2ab2571e879d2efbf73558cc66f21279" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" dependencies = [ "lazy_static", "memchr", @@ -94,9 +94,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.7.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" +checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" [[package]] name = "byteorder" @@ -112,9 +112,9 @@ checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" [[package]] name = "cc" -version = "1.0.70" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" +checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" [[package]] name = "cesu8" @@ -158,9 +158,9 @@ dependencies = [ [[package]] name = "combine" -version = "4.6.1" +version = "4.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a909e4d93292cd8e9c42e189f61681eff9d67b6541f96b8a1a737f23737bd001" +checksum = "b2b2f5d0ee456f3928812dfc8c6d9a1d592b98678f6d56db9b0cd2b7bc6c8db5" dependencies = [ "bytes", "memchr", @@ -168,9 +168,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" dependencies = [ "core-foundation-sys", "libc", @@ -178,15 +178,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "crc32fast" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836" dependencies = [ "cfg-if", ] @@ -243,6 +243,26 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" +[[package]] +name = "dirs" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "doc-comment" version = "0.3.3" @@ -257,9 +277,9 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "encoding_rs" -version = "0.8.28" +version = "0.8.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" +checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746" dependencies = [ "cfg-if", ] @@ -279,9 +299,9 @@ dependencies = [ [[package]] name = "errno" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa68f2fb9cae9d37c9b2b3584aba698a2e97f72d7aef7b9f7aa71d8b54ce46fe" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" dependencies = [ "errno-dragonfly", "libc", @@ -290,19 +310,19 @@ dependencies = [ [[package]] name = "errno-dragonfly" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" dependencies = [ - "gcc", + "cc", "libc", ] [[package]] name = "escargot" -version = "0.5.2" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bb3f795fe1b9d34f089c7fab034c2b757998d65361d95ef008045b57665262" +checksum = "9ead7d8a70259beb627c1ffdd19b0372381f247f88e46a3bd52bb797182690b3" dependencies = [ "log", "once_cell", @@ -361,75 +381,52 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +checksum = "7fc8cd39e3dbf865f7340dce6a2d401d24fd37c6fe6c4f0ee0de8bfca2252d27" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" +checksum = "629316e42fe7c2a0b9a65b47d159ceaa5453ab14e8f0a3c5eedbb8cd55b4a445" [[package]] name = "futures-io" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" - -[[package]] -name = "futures-macro" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" -dependencies = [ - "autocfg", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] +checksum = "e481354db6b5c353246ccf6a728b0c5511d752c08da7260546fc0933869daa11" [[package]] name = "futures-sink" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" +checksum = "996c6442437b62d21a32cd9906f9c41e7dc1e19a9579843fad948696769305af" [[package]] name = "futures-task" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" +checksum = "dabf1872aaab32c886832f2276d2f5399887e2bd613698a02359e4ea83f8de12" [[package]] name = "futures-util" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +checksum = "41d22213122356472061ac0f1ab2cee28d2bac8491410fd68c2af53d1cedb83e" dependencies = [ - "autocfg", "futures-core", "futures-io", - "futures-macro", "futures-task", "memchr", "pin-project-lite", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] -[[package]] -name = "gcc" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" - [[package]] name = "getrandom" version = "0.2.3" @@ -443,9 +440,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.4" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f3675cfef6a30c8031cf9e6493ebdc3bb3272a3fea3923c4210d1830e6a472" +checksum = "7fd819562fcebdac5afc5c113c3ec36f902840b70fd4fc458799c8ce4607ae55" dependencies = [ "bytes", "fnv", @@ -486,9 +483,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" +checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" dependencies = [ "bytes", "fnv", @@ -497,9 +494,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" +checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" dependencies = [ "bytes", "http", @@ -514,9 +511,9 @@ checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" [[package]] name = "httpdate" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "humantime" @@ -526,9 +523,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.12" +version = "0.14.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f67199e765030fa08fe0bd581af683f0d5bc04ea09c2b1102012c5fb90e7fd" +checksum = "436ec0091e4f20e655156a30a0df3770fe2900aa301e548e08446ec794b6953c" dependencies = [ "bytes", "futures-channel", @@ -550,17 +547,15 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.22.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" dependencies = [ - "futures-util", + "http", "hyper", - "log", "rustls", "tokio", "tokio-rustls", - "webpki", ] [[package]] @@ -633,9 +628,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.54" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1866b355d9c878e5e607473cbe3f63282c0b7aad2db1dbebf55076c686918254" +checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" dependencies = [ "wasm-bindgen", ] @@ -648,9 +643,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.101" +version = "0.2.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +checksum = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01" [[package]] name = "log" @@ -691,9 +686,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.13" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" +checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" dependencies = [ "libc", "log", @@ -713,10 +708,11 @@ dependencies = [ [[package]] name = "ndk" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8794322172319b972f528bf90c6b467be0079f1fa82780ffb431088e741a73ab" +checksum = "d64d6af06fde0e527b1ba5c7b79a6cc89cfc46325b0b2887dffe8f70197e0c3c" dependencies = [ + "bitflags", "jni-sys", "ndk-sys", "num_enum", @@ -725,9 +721,9 @@ dependencies = [ [[package]] name = "ndk-glue" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5caf0c24d51ac1c905c27d4eda4fa0635bbe0de596b8f79235e0b17a4d29385" +checksum = "d3e9e94628f24e7a3cb5b96a2dc5683acd9230bf11991c2a1677b87695138420" dependencies = [ "lazy_static", "libc", @@ -752,9 +748,9 @@ dependencies = [ [[package]] name = "ndk-sys" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c44922cb3dbb1c70b5e5f443d63b64363a898564d739ba5198e3a9138442868d" +checksum = "e1bcdd74c20ad5d95aacd60ef9ba40fdf77f767051040541df557b7a9b2a2121" [[package]] name = "normalize-line-endings" @@ -806,7 +802,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "486ea01961c4a818096de679a8b740b26d9033146ac5291b1c98557658f8cdd9" dependencies = [ - "proc-macro-crate 1.0.0", + "proc-macro-crate 1.1.0", "proc-macro2", "quote", "syn", @@ -863,15 +859,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "ppv-lite86" -version = "0.2.10" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" [[package]] name = "predicates" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c143348f141cc87aab5b950021bac6145d0e5ae754b0591de23244cee42c9308" +checksum = "95e5a7689e456ab905c22c2b48225bb921aba7c8dfa58440d68ba13f6222a715" dependencies = [ "difflib", "float-cmp", @@ -889,12 +885,12 @@ checksum = "57e35a3326b75e49aa85f5dc6ec15b41108cf5aee58eabb1f274dd18b73c2451" [[package]] name = "predicates-tree" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7dd0fd014130206c9352efbdc92be592751b2b9274dff685348341082c6ea3d" +checksum = "338c7be2905b732ae3984a2f40032b5e94fd8f52505b186c7d4d68d193445df7" dependencies = [ "predicates-core", - "treeline", + "termtree", ] [[package]] @@ -908,9 +904,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" +checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" dependencies = [ "thiserror", "toml", @@ -940,32 +936,20 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - [[package]] name = "proc-macro2" -version = "1.0.29" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" +checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" dependencies = [ "unicode-xid", ] [[package]] name = "quote" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" dependencies = [ "proc-macro2", ] @@ -1019,6 +1003,16 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_users" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +dependencies = [ + "getrandom", + "redox_syscall", +] + [[package]] name = "regex" version = "1.5.4" @@ -1053,9 +1047,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.4" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246e9f61b9bb77df069a947682be06e31ac43ea37862e244a69f177694ea6d22" +checksum = "07bea77bc708afa10e59905c3d4af7c8fd43c9214251673095ff8b14345fcbc5" dependencies = [ "base64", "bytes", @@ -1075,7 +1069,9 @@ dependencies = [ "pin-project-lite", "rustls", "rustls-native-certs", + "rustls-pemfile", "serde", + "serde_json", "serde_urlencoded", "tokio", "tokio-rustls", @@ -1104,34 +1100,42 @@ dependencies = [ [[package]] name = "rustls" -version = "0.19.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +checksum = "d37e5e2290f3e040b594b1a9e04377c2c671f1a1cfd9bfdef82106ac1c113f84" dependencies = [ - "base64", "log", "ring", "sct", - "webpki", + "webpki 0.22.0", ] [[package]] name = "rustls-native-certs" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +checksum = "5ca9ebdfa27d3fc180e42879037b5338ab1c040c06affd00d8338598e7800943" dependencies = [ "openssl-probe", - "rustls", + "rustls-pemfile", "schannel", "security-framework", ] [[package]] -name = "ryu" -version = "1.0.5" +name = "rustls-pemfile" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +dependencies = [ + "base64", +] + +[[package]] +name = "ryu" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568" [[package]] name = "same-file" @@ -1154,9 +1158,9 @@ dependencies = [ [[package]] name = "sct" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ "ring", "untrusted", @@ -1207,9 +1211,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.67" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f9e390c27c3c0ce8bc5d725f6e4d30a29d26659494aa4b17535f7522c5c950" +checksum = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527" dependencies = [ "itoa", "ryu", @@ -1230,15 +1234,15 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" +checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" [[package]] name = "socket2" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad" +checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" dependencies = [ "libc", "winapi", @@ -1264,9 +1268,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.76" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84" +checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" dependencies = [ "proc-macro2", "quote", @@ -1320,6 +1324,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "termtree" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" + [[package]] name = "textwrap" version = "0.14.2" @@ -1328,18 +1338,18 @@ checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" [[package]] name = "thiserror" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88" +checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" +checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ "proc-macro2", "quote", @@ -1348,9 +1358,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.4.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5241dd6f21443a3606b432718b166d3cedc962fd4b8bea54a8bc7f514ebda986" +checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" dependencies = [ "tinyvec_macros", ] @@ -1363,9 +1373,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.11.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4efe6fc2395938c8155973d7be49fe8d03a843726e285e100a8a383cc0154ce" +checksum = "70e992e41e0d2fb9f755b37446f20900f64446ef54874f40a60c78f021ac6144" dependencies = [ "autocfg", "bytes", @@ -1379,20 +1389,20 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.22.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +checksum = "4baa378e417d780beff82bf54ceb0d195193ea6a00c14e22359e7f39456b5689" dependencies = [ "rustls", "tokio", - "webpki", + "webpki 0.22.0", ] [[package]] name = "tokio-util" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d3725d3efa29485e87311c5b699de63cde14b00ed4d256b8318aa30ca452cd" +checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" dependencies = [ "bytes", "futures-core", @@ -1419,9 +1429,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.26" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" +checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" dependencies = [ "cfg-if", "pin-project-lite", @@ -1430,19 +1440,13 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.19" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8" +checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" dependencies = [ "lazy_static", ] -[[package]] -name = "treeline" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" - [[package]] name = "try-lock" version = "0.2.3" @@ -1451,9 +1455,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "unicode-bidi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" +checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" [[package]] name = "unicode-normalization" @@ -1538,21 +1542,19 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.77" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e68338db6becec24d3c7977b5bf8a48be992c934b5d07177e3931f5dc9b076c" +checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" dependencies = [ "cfg-if", - "serde", - "serde_json", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.77" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34c405b4f0658583dba0c1c7c9b694f3cac32655db463b56c254a1c75269523" +checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" dependencies = [ "bumpalo", "lazy_static", @@ -1565,9 +1567,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a87d738d4abc4cf22f6eb142f5b9a81301331ee3c767f2fef2fda4e325492060" +checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" dependencies = [ "cfg-if", "js-sys", @@ -1577,9 +1579,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.77" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d5a6580be83b19dc570a8f9c324251687ab2184e57086f71625feb57ec77c8" +checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1587,9 +1589,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.77" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3775a030dc6f5a0afd8a84981a21cc92a781eb429acef9ecce476d0c9113e92" +checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" dependencies = [ "proc-macro2", "quote", @@ -1600,15 +1602,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.77" +version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c279e376c7a8e8752a8f1eaa35b7b0bee6bb9fb0cdacfa97cc3f1f289c87e2b4" +checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "web-sys" -version = "0.3.54" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a84d70d1ec7d2da2d26a5bd78f4bca1b8c3254805363ce743b7a05bc30d195a" +checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" dependencies = [ "js-sys", "wasm-bindgen", @@ -1624,13 +1626,23 @@ dependencies = [ "untrusted", ] +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "webpki-roots" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" dependencies = [ - "webpki", + "webpki 0.21.4", ] [[package]] @@ -1675,9 +1687,12 @@ dependencies = [ [[package]] name = "xdg" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" +checksum = "3a23fe958c70412687039c86f578938b4a0bb50ec788e96bce4d6ab00ddd5803" +dependencies = [ + "dirs", +] [[package]] name = "zip" From 0fbc95cb71f27a91a6ad35eeb204e66fd6ea9e51 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 5 Dec 2021 13:28:58 +0100 Subject: [PATCH 170/368] Rename -o / --os to -p / --platform (#217) This makes it compliant with the client spec. The `-p` flag was previously used for the pager, using the pager now requires using the long flag (`--pager`). Alternatively the pager can be configured through the config file. This commit also renames OsType to PlatformType. --- bash_tealdeer | 2 +- docs/src/usage.txt | 6 ++++-- fish_tealdeer | 2 +- src/cache.rs | 18 +++++++++--------- src/main.rs | 28 +++++++++++++++++++--------- src/types.rs | 8 ++++---- tests/lib.rs | 4 ++-- zsh_tealdeer | 2 +- 8 files changed, 41 insertions(+), 29 deletions(-) diff --git a/bash_tealdeer b/bash_tealdeer index 6ed44cd..e45c886 100644 --- a/bash_tealdeer +++ b/bash_tealdeer @@ -13,7 +13,7 @@ _tealdeer() _filedir return ;; - -o|--os) + -p|--platform) COMPREPLY=( $(compgen -W 'linux osx sunos windows' -- "${cur}") ) return ;; diff --git a/docs/src/usage.txt b/docs/src/usage.txt index e677621..a88af6f 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -13,12 +13,14 @@ ARGS: OPTIONS: -l, --list List all commands in the cache -f, --render Render a specific markdown file - -o, --os Override the operating system [possible values: linux, osx, sunos, + -p, --platform Override the operating system [possible values: linux, osx, sunos, + windows] + -o, --os Deprecated alias of `platform` [possible values: linux, osx, sunos, windows] -L, --language Override the language -u, --update Update the local cache -c, --clear-cache Clear the local cache - -p, --pager Use a pager to page output + --pager Use a pager to page output -r, --raw Display the raw markdown instead of rendering it -q, --quiet Suppress informational messages --show-paths Show file and directory paths used by tealdeer diff --git a/fish_tealdeer b/fish_tealdeer index cad6cc2..57d3e31 100644 --- a/fish_tealdeer +++ b/fish_tealdeer @@ -7,7 +7,7 @@ complete -c tldr -s h -l help -d 'Print the help message.' -f complete -c tldr -s v -l version -d 'Show version information.' -f complete -c tldr -s l -l list -d 'List all commands in the cache.' -f complete -c tldr -s f -l render -d 'Render a specific markdown file.' -r -complete -c tldr -s o -l os -d 'Override the operating system.' -xa 'linux osx sunos windows' +complete -c tldr -s p -l platform -d 'Override the operating system.' -xa 'linux osx sunos windows' complete -c tldr -s u -l update -d 'Update the local cache.' -f complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f complete -c tldr -s p -l pager -d 'Use a pager to page output.' -f diff --git a/src/cache.rs b/src/cache.rs index a4a2100..ac6347c 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -16,7 +16,7 @@ use zip::ZipArchive; use crate::{ error::TealdeerError::{self, CacheError, UpdateError}, - types::{OsType, PathSource}, + types::{PathSource, PlatformType}, }; static CACHE_DIR_ENV_VAR: &str = "TEALDEER_CACHE_DIR"; @@ -27,7 +27,7 @@ static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; #[derive(Debug)] pub struct Cache { url: String, - os: OsType, + platform: PlatformType, } #[derive(Debug)] @@ -64,13 +64,13 @@ pub enum CacheFreshness { } impl Cache { - pub fn new(url: S, os: OsType) -> Self + pub fn new(url: S, platform: PlatformType) -> Self where S: Into, { Self { url: url.into(), - os, + platform, } } @@ -196,11 +196,11 @@ impl Cache { /// Return the platform directory. fn get_platform_dir(&self) -> &'static str { - match self.os { - OsType::Linux => "linux", - OsType::OsX => "osx", - OsType::SunOs => "sunos", - OsType::Windows => "windows", + match self.platform { + PlatformType::Linux => "linux", + PlatformType::OsX => "osx", + PlatformType::SunOs => "sunos", + PlatformType::Windows => "windows", } } diff --git a/src/main.rs b/src/main.rs index 6f182b7..e899d39 100644 --- a/src/main.rs +++ b/src/main.rs @@ -40,7 +40,7 @@ use crate::{ error::TealdeerError::ConfigError, extensions::Dedup, output::print_page, - types::{ColorOptions, OsType}, + types::{ColorOptions, PlatformType}, }; const NAME: &str = "tealdeer"; @@ -81,13 +81,22 @@ struct Args { render: Option, /// Override the operating system + #[clap( + short = 'p', + long = "platform", + requires = "command", + possible_values = ["linux", "osx", "sunos", "windows"], + )] + platform: Option, + + /// Deprecated alias of `platform` #[clap( short = 'o', long = "os", requires = "command", - possible_values = ["linux", "osx", "sunos", "windows"] + possible_values = ["linux", "osx", "sunos", "windows"], )] - os: Option, + os: Option, /// Override the language #[clap(short = 'L', long = "language")] @@ -102,7 +111,7 @@ struct Args { clear_cache: bool, /// Use a pager to page output - #[clap(short = 'p', long = "pager", requires = "command")] + #[clap(long = "pager", requires = "command")] pager: bool, /// Display the raw markdown instead of rendering it @@ -356,6 +365,10 @@ fn main() { args.raw = true; eprintln!("Warning: The -m / --markdown flag is deprecated, use -r / --raw instead"); } + if args.os.is_some() { + eprintln!("Warning: The -o / --os flag is deprecated, use -p / --platform instead"); + } + args.platform = args.platform.or(args.os); args }; @@ -412,10 +425,7 @@ fn main() { } // Specify target OS - let os: OsType = match args.os { - Some(os) => os, - None => OsType::current(), - }; + let platform: PlatformType = args.platform.unwrap_or_else(PlatformType::current); // If a local file was passed in, render it and exit if let Some(file) = args.render { @@ -429,7 +439,7 @@ fn main() { } // Initialize cache - let cache = Cache::new(ARCHIVE_URL, os); + let cache = Cache::new(ARCHIVE_URL, platform); // Clear cache, pass through if args.clear_cache { diff --git a/src/types.rs b/src/types.rs index 3e6a161..7d018a8 100644 --- a/src/types.rs +++ b/src/types.rs @@ -7,14 +7,14 @@ use serde_derive::{Deserialize, Serialize}; #[derive(Debug, Eq, PartialEq, Copy, Clone, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] #[allow(dead_code)] -pub enum OsType { +pub enum PlatformType { Linux, OsX, SunOs, Windows, } -impl fmt::Display for OsType { +impl fmt::Display for PlatformType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { Self::Linux => write!(f, "Linux"), @@ -25,7 +25,7 @@ impl fmt::Display for OsType { } } -impl str::FromStr for OsType { +impl str::FromStr for PlatformType { type Err = String; fn from_str(s: &str) -> Result { @@ -42,7 +42,7 @@ impl str::FromStr for OsType { } } -impl OsType { +impl PlatformType { #[cfg(target_os = "linux")] pub fn current() -> Self { Self::Linux diff --git a/tests/lib.rs b/tests/lib.rs index 6ff88d2..de212d2 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -325,7 +325,7 @@ fn test_os_specific_page() { testenv .command() - .args(["--os", "sunos", "truss"]) + .args(["--platform", "sunos", "truss"]) .assert() .success(); } @@ -685,7 +685,7 @@ fn test_pager_warning() { // But it should be shown if the pager flag is true testenv .command() - .args(["which", "-p"]) + .args(["--pager", "which"]) .assert() .success() .stderr(contains("pager flag not available on Windows")); diff --git a/zsh_tealdeer b/zsh_tealdeer index 0674063..cd4e2a5 100644 --- a/zsh_tealdeer +++ b/zsh_tealdeer @@ -14,7 +14,7 @@ _tealdeer() { args+=( "($I -l --list)"{-l,--list}"[List all commands in the cache]" "($I -f --render)"{-f,--render}"[Render a specific markdown file]:file:_files" - "($I -o --os)"{-o,--os}'[Override the operating system]:os:(( + "($I -p --platform)"{-p,--platform}'[Override the operating system]:platform:(( linux osx sunos From 2684727eaadad6bb3980c517d33cd4cf78ae3bf0 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 5 Dec 2021 14:00:59 +0100 Subject: [PATCH 171/368] Add helper functions: print_warning / print_error (#223) These functions prepend a consistend prefix and they also use colors (when enabled). Messages are written to stderr. --- src/config.rs | 10 +++- src/main.rs | 158 ++++++++++++++++++++++++++++---------------------- src/utils.rs | 22 +++++++ 3 files changed, 119 insertions(+), 71 deletions(-) create mode 100644 src/utils.rs diff --git a/src/config.rs b/src/config.rs index efd7feb..d1b040b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -291,13 +291,17 @@ impl Config { // Load raw config let raw_config: RawConfig = if config_file_path.exists() && config_file_path.is_file() { let mut config_file = - fs::File::open(config_file_path).map_err(map_io_err_to_config_err)?; + fs::File::open(&config_file_path).map_err(map_io_err_to_config_err)?; let mut contents = String::new(); let _ = config_file .read_to_string(&mut contents) .map_err(map_io_err_to_config_err)?; - toml::from_str(&contents) - .map_err(|err| ConfigError(format!("Failed to parse config file: {}", err)))? + toml::from_str(&contents).map_err(|err| { + ConfigError(format!( + "Failed to parse config file at {:?}:\n{}", + config_file_path, err + )) + })? } else { RawConfig::new() }; diff --git a/src/main.rs b/src/main.rs index e899d39..e2b4c87 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,7 +18,6 @@ use std::{env, path::PathBuf, process}; -use ansi_term::{Color, Style}; use app_dirs::AppInfo; use atty::Stream; use clap::{AppSettings, Parser}; @@ -33,6 +32,7 @@ mod formatter; mod line_iterator; mod output; mod types; +mod utils; use crate::{ cache::{Cache, CacheFreshness, PageLookupResult, TLDR_PAGES_DIR}, @@ -41,6 +41,7 @@ use crate::{ extensions::Dedup, output::print_page, types::{ColorOptions, PlatformType}, + utils::{print_error, print_warning}, }; const NAME: &str = "tealdeer"; @@ -49,8 +50,6 @@ const APP_INFO: AppInfo = AppInfo { author: NAME, }; const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; -#[cfg(not(target_os = "windows"))] -const PAGER_COMMAND: &str = "less -R"; // Note: flag names are specified explicitly in clap attributes // to improve readability and allow contributors to grep names like "clear-cache" @@ -155,13 +154,13 @@ struct Args { /// Set up display pager #[cfg(not(target_os = "windows"))] -fn configure_pager() { - Pager::with_default_pager(PAGER_COMMAND).setup(); +fn configure_pager(_: bool) { + Pager::with_default_pager("less -R").setup(); } #[cfg(target_os = "windows")] -fn configure_pager() { - eprintln!("Warning: -p / --pager flag not available on Windows!"); +fn configure_pager(enable_styles: bool) { + print_warning(enable_styles, "-p / --pager flag not available on Windows!"); } /// The cache should get updated if this was requested by the user, or if auto @@ -184,32 +183,33 @@ fn check_cache(args: &Args, enable_styles: bool) -> CheckCacheResult { CacheFreshness::Fresh => CheckCacheResult::CacheFound, CacheFreshness::Stale(_) if args.quiet => CheckCacheResult::CacheFound, CacheFreshness::Stale(age) => { - let warning_style = if enable_styles { - Style::new().fg(Color::Yellow) - } else { - Style::default() - }; - eprintln!( - "{}", - warning_style.paint(format!( + print_warning( + enable_styles, + &format!( "The cache hasn't been updated for {} days.\n\ You should probably run `tldr --update` soon.", age.as_secs() / 24 / 3600 - )) + ), ); CheckCacheResult::CacheFound } CacheFreshness::Missing => { - eprintln!("Cache not found. Please run `tldr --update`."); + print_warning( + enable_styles, + "Cache not found. Please run `tldr --update`.", + ); CheckCacheResult::CacheMissing } } } /// Clear the cache -fn clear_cache(quietly: bool) { +fn clear_cache(quietly: bool, enable_styles: bool) { Cache::clear().unwrap_or_else(|e| { - eprintln!("Could not delete cache: {}", e.message()); + print_error( + enable_styles, + &format!("Could not delete cache: {}", e.message()), + ); process::exit(1); }); if !quietly { @@ -218,9 +218,12 @@ fn clear_cache(quietly: bool) { } /// Update the cache -fn update_cache(cache: &Cache, quietly: bool) { +fn update_cache(cache: &Cache, quietly: bool, enable_styles: bool) { cache.update().unwrap_or_else(|e| { - eprintln!("Could not update cache: {}", e.message()); + print_error( + enable_styles, + &format!("Could not update cache: {}", e.message()), + ); process::exit(1); }); if !quietly { @@ -229,17 +232,20 @@ fn update_cache(cache: &Cache, quietly: bool) { } /// Show the config path (DEPRECATED) -fn show_config_path() { +fn show_config_path(enable_styles: bool) { match get_config_path() { Ok((config_file_path, _)) => { println!("Config path is: {}", config_file_path.to_str().unwrap()); } Err(ConfigError(msg)) => { - eprintln!("Could not look up config_path: {}", msg); + print_error( + enable_styles, + &format!("Could not look up config_path: {}", msg), + ); process::exit(1); } Err(_) => { - eprintln!("Unknown error"); + print_error(enable_styles, "Unknown error"); process::exit(1); } } @@ -288,7 +294,7 @@ fn show_paths() { } /// Create seed config file and exit -fn create_config_and_exit() { +fn create_config_and_exit(enable_styles: bool) { match make_default_config() { Ok(config_file_path) => { eprintln!( @@ -298,11 +304,14 @@ fn create_config_and_exit() { process::exit(0); } Err(ConfigError(msg)) => { - eprintln!("Could not create seed config: {}", msg); + print_error( + enable_styles, + &format!("Could not create seed config: {}", msg), + ); process::exit(1); } Err(_) => { - eprintln!("Unknown error"); + print_error(enable_styles, "Unknown error"); process::exit(1); } } @@ -357,42 +366,13 @@ fn main() { init_log(); // Parse arguments - let args = { - let mut args = Args::parse(); - - // Handle renamed arguments - if args.markdown { - args.raw = true; - eprintln!("Warning: The -m / --markdown flag is deprecated, use -r / --raw instead"); - } - if args.os.is_some() { - eprintln!("Warning: The -o / --os flag is deprecated, use -p / --platform instead"); - } - args.platform = args.platform.or(args.os); - - args - }; - - // Show config file and path, pass through - if args.config_path { - eprintln!("Warning: The --config-path flag is deprecated, use --show-paths instead"); - show_config_path(); - } - if args.show_paths { - show_paths(); - } - - // Create a basic config and exit - if args.seed_config { - create_config_and_exit(); - } + let mut args = Args::parse(); // Determine the usage of styles #[cfg(target_os = "windows")] let ansi_support = ansi_term::enable_ansi_support().is_ok(); #[cfg(not(target_os = "windows"))] let ansi_support = true; - let enable_styles = match args.color.unwrap_or_default() { // Attempt to use styling if instructed ColorOptions::Always => true, @@ -407,21 +387,54 @@ fn main() { ColorOptions::Never => false, }; + // Handle renamed arguments + if args.markdown { + args.raw = true; + print_warning( + enable_styles, + "The -m / --markdown flag is deprecated, use -r / --raw instead", + ); + } + if args.os.is_some() { + print_warning( + enable_styles, + "The -o / --os flag is deprecated, use -p / --platform instead", + ); + } + args.platform = args.platform.or(args.os); + + // Show config file and path, pass through + if args.config_path { + print_warning( + enable_styles, + "The --config-path flag is deprecated, use --show-paths instead", + ); + show_config_path(enable_styles); + } + if args.show_paths { + show_paths(); + } + + // Create a basic config and exit + if args.seed_config { + create_config_and_exit(enable_styles); + } + // Look up config file, if none is found fall back to default config. let config = match Config::load(enable_styles) { Ok(config) => config, Err(ConfigError(msg)) => { - eprintln!("Could not load config: {}", msg); + print_error(enable_styles, &format!("Could not load config: {}", msg)); process::exit(1); } Err(e) => { - eprintln!("Could not load config: {}", e); + print_error(enable_styles, &format!("Could not load config: {}", e)); process::exit(1); } }; if args.pager || config.display.use_pager { - configure_pager(); + configure_pager(enable_styles); } // Specify target OS @@ -431,7 +444,7 @@ fn main() { if let Some(file) = args.render { let path = PageLookupResult::with_page(file); if let Err(msg) = print_page(&path, args.raw, &config) { - eprintln!("{}", msg); + print_error(enable_styles, &msg); process::exit(1); } else { process::exit(0); @@ -443,12 +456,12 @@ fn main() { // Clear cache, pass through if args.clear_cache { - clear_cache(args.quiet); + clear_cache(args.quiet, enable_styles); } // Cache update, pass through let cache_updated = if should_update_cache(&args, &config) { - update_cache(&cache, args.quiet); + update_cache(&cache, args.quiet, enable_styles); true } else { false @@ -466,7 +479,10 @@ fn main() { if args.list { // Get list of pages let pages = cache.list_pages().unwrap_or_else(|e| { - eprintln!("Could not get list of pages: {}", e.message()); + print_error( + enable_styles, + &format!("Could not get list of pages: {}", e.message()), + ); process::exit(1); }); @@ -490,15 +506,21 @@ fn main() { config.directories.custom_pages_dir.as_deref(), ) { if let Err(msg) = print_page(&page, args.raw, &config) { - eprintln!("{}", msg); + print_error(enable_styles, &msg); process::exit(1); } process::exit(0); } else { if !args.quiet { - eprintln!("Page {} not found in cache", &command); - eprintln!("Try updating with `tldr --update`, or submit a pull request to:"); - eprintln!("https://github.com/tldr-pages/tldr"); + print_warning( + enable_styles, + &format!( + "Page `{}` not found in cache.\n\ + Try updating with `tldr --update`, or submit a pull request to:\n\ + https://github.com/tldr-pages/tldr", + &command + ), + ); } process::exit(1); } diff --git a/src/utils.rs b/src/utils.rs new file mode 100644 index 0000000..e6f65f5 --- /dev/null +++ b/src/utils.rs @@ -0,0 +1,22 @@ +use ansi_term::{Color, Style}; + +/// Print a warning to stderr. If `enable_styles` is true, then a yellow +/// message will be printed. +pub fn print_warning(enable_styles: bool, message: &str) { + print_msg(enable_styles, message, "Warning: ", Color::Yellow); +} + +/// Print an error to stderr. If `enable_styles` is true, then a red message +/// will be printed. +pub fn print_error(enable_styles: bool, message: &str) { + print_msg(enable_styles, message, "Error: ", Color::Red); +} + +fn print_msg(enable_styles: bool, message: &str, prefix: &'static str, color: Color) { + if enable_styles { + let style = Style::new().fg(color); + eprintln!("{}{}", style.paint(prefix), style.paint(message)); + } else { + eprintln!("{}", message); + } +} From 02a395ad137b07d2414dfb9754ed3a5ca8f7d678 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 5 Dec 2021 14:15:49 +0100 Subject: [PATCH 172/368] Remove last traces of short `-p` pager flag (#228) I missed some occurrences in #217. --- src/main.rs | 2 +- zsh_tealdeer | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index e2b4c87..2ef2071 100644 --- a/src/main.rs +++ b/src/main.rs @@ -160,7 +160,7 @@ fn configure_pager(_: bool) { #[cfg(target_os = "windows")] fn configure_pager(enable_styles: bool) { - print_warning(enable_styles, "-p / --pager flag not available on Windows!"); + print_warning(enable_styles, "--pager flag not available on Windows!"); } /// The cache should get updated if this was requested by the user, or if auto diff --git a/zsh_tealdeer b/zsh_tealdeer index cd4e2a5..7bf5fcf 100644 --- a/zsh_tealdeer +++ b/zsh_tealdeer @@ -23,7 +23,7 @@ _tealdeer() { "($I -L --language)"{-L,--language}"[Override the language settings]:lang" "($I -u --update)"{-u,--update}"[Update the local cache]" "($I -c --clear-cache)"{-c,--clear-cache}"[Clear the local cache]" - "($I -p --pager)"{-p,--pager}"[Use a pager to page output]" + "($I)--pager[Use a pager to page output]" "($I -r --raw)"{-r,--raw}"[Display the raw markdown instead of rendering it]" "($I -q --quiet)"{-q,--quiet}"[Suppress informational messages]" "($I)--show-paths[Show file and directory paths used by tealdeer]" From 023a9d207904613615ceb23733d378d79efb0a79 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 5 Dec 2021 14:31:03 +0100 Subject: [PATCH 173/368] Lowercase page names before lookup (#227) --- src/main.rs | 5 ++++- tests/lib.rs | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 2ef2071..c90c128 100644 --- a/src/main.rs +++ b/src/main.rs @@ -493,7 +493,10 @@ fn main() { // Show command from cache if !args.command.is_empty() { - let command = args.command.join("-"); + // Note: According to the TLDR client spec, page names must be transparently + // lowercased before lookup: + // https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md#page-names + let command = args.command.join("-").to_lowercase(); let languages = args .language diff --git a/tests/lib.rs b/tests/lib.rs index de212d2..7d52beb 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -690,3 +690,22 @@ fn test_pager_warning() { .success() .stderr(contains("pager flag not available on Windows")); } + +/// Ensure that page lookup is case insensitive, so a page lookup for `eyed3` +/// and `eyeD3` should return the same page. +#[test] +fn test_lowercased_page_lookup() { + let testenv = TestEnv::new(); + + // Lookup `eyed3`, initially fails + testenv.command().args(["eyed3"]).assert().failure(); + + // Add entry + testenv.add_entry("eyed3", "contents"); + + // Lookup `eyed3` again + testenv.command().args(["eyed3"]).assert().success(); + + // Lookup `eyeD3`, should succeed as well + testenv.command().args(["eyeD3"]).assert().success(); +} From 72d753c52b9651438b338ce4da08a8aecf99bee1 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 5 Dec 2021 16:38:35 +0100 Subject: [PATCH 174/368] Add "macos" alias for "osx" (#215) The Apple computer operating system was renamed from "OS X" to "macOS" in 2016. We should accept "macos" instead of "osx" in all our CLI APIs, and the docs should also mention this alias instead of "osx". For backwards compatibility and for compatibility with the tldr client specification, we should still accept "osx" though. --- bash_tealdeer | 2 +- docs/src/usage.txt | 7 +++---- fish_tealdeer | 2 +- src/main.rs | 5 +++-- src/types.rs | 4 ++-- zsh_tealdeer | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bash_tealdeer b/bash_tealdeer index e45c886..2a1429d 100644 --- a/bash_tealdeer +++ b/bash_tealdeer @@ -14,7 +14,7 @@ _tealdeer() return ;; -p|--platform) - COMPREPLY=( $(compgen -W 'linux osx sunos windows' -- "${cur}") ) + COMPREPLY=( $(compgen -W 'linux macos sunos windows' -- "${cur}") ) return ;; --color) diff --git a/docs/src/usage.txt b/docs/src/usage.txt index a88af6f..4f88bc9 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -13,10 +13,9 @@ ARGS: OPTIONS: -l, --list List all commands in the cache -f, --render Render a specific markdown file - -p, --platform Override the operating system [possible values: linux, osx, sunos, - windows] - -o, --os Deprecated alias of `platform` [possible values: linux, osx, sunos, - windows] + -p, --platform Override the operating system [possible values: linux, macos, + windows, sunos, osx] + -o, --os Deprecated alias of `platform` -L, --language Override the language -u, --update Update the local cache -c, --clear-cache Clear the local cache diff --git a/fish_tealdeer b/fish_tealdeer index 57d3e31..ee68e2a 100644 --- a/fish_tealdeer +++ b/fish_tealdeer @@ -7,7 +7,7 @@ complete -c tldr -s h -l help -d 'Print the help message.' -f complete -c tldr -s v -l version -d 'Show version information.' -f complete -c tldr -s l -l list -d 'List all commands in the cache.' -f complete -c tldr -s f -l render -d 'Render a specific markdown file.' -r -complete -c tldr -s p -l platform -d 'Override the operating system.' -xa 'linux osx sunos windows' +complete -c tldr -s p -l platform -d 'Override the operating system.' -xa 'linux macos sunos windows' complete -c tldr -s u -l update -d 'Update the local cache.' -f complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f complete -c tldr -s p -l pager -d 'Use a pager to page output.' -f diff --git a/src/main.rs b/src/main.rs index c90c128..45419f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -84,7 +84,7 @@ struct Args { short = 'p', long = "platform", requires = "command", - possible_values = ["linux", "osx", "sunos", "windows"], + possible_values = ["linux", "macos", "windows", "sunos", "osx"], )] platform: Option, @@ -93,7 +93,8 @@ struct Args { short = 'o', long = "os", requires = "command", - possible_values = ["linux", "osx", "sunos", "windows"], + possible_values = ["linux", "macos", "windows", "sunos", "osx"], + hide_possible_values = true, )] os: Option, diff --git a/src/types.rs b/src/types.rs index 7d018a8..3981776 100644 --- a/src/types.rs +++ b/src/types.rs @@ -31,11 +31,11 @@ impl str::FromStr for PlatformType { fn from_str(s: &str) -> Result { match s { "linux" => Ok(Self::Linux), - "osx" => Ok(Self::OsX), + "osx" | "macos" => Ok(Self::OsX), "sunos" => Ok(Self::SunOs), "windows" => Ok(Self::Windows), other => Err(format!( - "Unknown OS: {}. Possible values: linux, osx, sunos, windows", + "Unknown OS: {}. Possible values: linux, macos, osx, sunos, windows", other )), } diff --git a/zsh_tealdeer b/zsh_tealdeer index 7bf5fcf..28cd34b 100644 --- a/zsh_tealdeer +++ b/zsh_tealdeer @@ -16,7 +16,7 @@ _tealdeer() { "($I -f --render)"{-f,--render}"[Render a specific markdown file]:file:_files" "($I -p --platform)"{-p,--platform}'[Override the operating system]:platform:(( linux - osx + macos sunos windows ))' From 1a3624d011684e1f381820f5abb3c4b69dd65c00 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 5 Dec 2021 20:45:35 +0100 Subject: [PATCH 175/368] Introduce command_or_file arg group (#230) This allows to say "this command line parameter requires either a command or a raw file". Fixes #219. --- src/main.rs | 16 ++++++++++------ tests/lib.rs | 31 +++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 45419f9..45aa050 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,7 @@ use std::{env, path::PathBuf, process}; use app_dirs::AppInfo; use atty::Stream; -use clap::{AppSettings, Parser}; +use clap::{AppSettings, ArgGroup, Parser}; #[cfg(not(target_os = "windows"))] use pager::Pager; @@ -61,6 +61,7 @@ const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; #[clap( after_help = "To view the user documentation, please visit https://dbrgn.github.io/tealdeer/." )] +#[clap(group = ArgGroup::new("command_or_file").args(&["command", "render"]))] struct Args { /// The command to show (e.g. `tar` or `git log`) #[clap(min_values = 1)] @@ -83,7 +84,6 @@ struct Args { #[clap( short = 'p', long = "platform", - requires = "command", possible_values = ["linux", "macos", "windows", "sunos", "osx"], )] platform: Option, @@ -92,7 +92,6 @@ struct Args { #[clap( short = 'o', long = "os", - requires = "command", possible_values = ["linux", "macos", "windows", "sunos", "osx"], hide_possible_values = true, )] @@ -111,15 +110,20 @@ struct Args { clear_cache: bool, /// Use a pager to page output - #[clap(long = "pager", requires = "command")] + #[clap(long = "pager", requires = "command_or_file")] pager: bool, /// Display the raw markdown instead of rendering it - #[clap(short = 'r', long = "--raw", requires = "command")] + #[clap(short = 'r', long = "--raw", requires = "command_or_file")] raw: bool, /// Deprecated alias of `raw` - #[clap(long = "markdown", short = 'm', requires = "command", hidden = true)] + #[clap( + long = "markdown", + short = 'm', + requires = "command_or_file", + hidden = true + )] markdown: bool, /// Suppress informational messages diff --git a/tests/lib.rs b/tests/lib.rs index 7d52beb..de6d346 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -709,3 +709,34 @@ fn test_lowercased_page_lookup() { // Lookup `eyeD3`, should succeed as well testenv.command().args(["eyeD3"]).assert().success(); } + +/// Regression test for #219: It should be possible to combine `--raw` and `-f`. +#[test] +fn test_raw_render_file() { + let testenv = TestEnv::new(); + + // Create input file + let file_path = testenv.input_dir.path().join("inkscape.md"); + let mut file = File::create(&file_path).unwrap(); + file.write_all(include_bytes!("inkscape-v1.md")).unwrap(); + + // Base args + let mut args = vec!["--color", "never", "-f", file_path.to_str().unwrap()]; + + // Default render + testenv + .command() + .args(&args) + .assert() + .success() + .stdout(diff(include_str!("inkscape-default-no-color.expected"))); + + // Raw render + args.push("--raw"); + testenv + .command() + .args(&args) + .assert() + .success() + .stdout(diff(include_str!("inkscape-v1.md"))); +} From 25d771778a67813fb56d9d27a670bda46a59fec6 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 11 Dec 2021 17:36:28 +0100 Subject: [PATCH 176/368] Update clap to 3.0.0-rc.4 --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- src/main.rs | 3 +-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3585ebf..1560972 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,9 +130,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.0.0-beta.5" +version = "3.0.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feff3878564edb93745d58cf63e17b63f24142506e7a20c87a5521ed7bfb1d63" +checksum = "967965e82fc46fee1a88147a7a977a66d615ed5f83eb95b18577b342c08f90ff" dependencies = [ "bitflags", "clap_derive", @@ -145,9 +145,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.0.0-beta.5" +version = "3.0.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b15c6b4f786ffb6192ffe65a36855bc1fc2444bcd0945ae16748dcd6ed7d0d3" +checksum = "85946d4034625800196413478a1c6d3a57c12785e1f3970e590e0137dfa07342" dependencies = [ "heck", "proc-macro-error", @@ -822,9 +822,9 @@ checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" [[package]] name = "os_str_bytes" -version = "4.2.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "addaa943333a514159c80c97ff4a93306530d965d27e139188283cd13e06a799" +checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index ba56396..805e743 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ path = "src/main.rs" ansi_term = "0.12.0" app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" -clap = { version = "3.0.0-beta.5", features = ["std", "derive", "suggestions" ], default-features = false } +clap = { version = "3.0.0-rc.4", features = ["std", "derive", "suggestions" ], default-features = false } env_logger = { version = "0.9", optional = true } log = "0.4" reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls", "rustls-tls-native-roots"], default-features = false } diff --git a/src/main.rs b/src/main.rs index 45aa050..87570b6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -56,7 +56,6 @@ const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; #[derive(Parser, Debug)] #[clap(about = "A fast TLDR client", author, version)] #[clap(setting = AppSettings::ArgRequiredElseHelp)] -#[clap(setting = AppSettings::HelpRequired)] #[clap(setting = AppSettings::DeriveDisplayOrder)] #[clap( after_help = "To view the user documentation, please visit https://dbrgn.github.io/tealdeer/." @@ -122,7 +121,7 @@ struct Args { long = "markdown", short = 'm', requires = "command_or_file", - hidden = true + hide = true )] markdown: bool, From 69f48082147d917f9ccccacc010c1a9bfb3c4ebc Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 11 Dec 2021 17:37:11 +0100 Subject: [PATCH 177/368] Clap: Hide deprecated -o/--os argument from help --- docs/src/usage.txt | 1 - src/main.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 4f88bc9..a1df753 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -15,7 +15,6 @@ OPTIONS: -f, --render Render a specific markdown file -p, --platform Override the operating system [possible values: linux, macos, windows, sunos, osx] - -o, --os Deprecated alias of `platform` -L, --language Override the language -u, --update Update the local cache -c, --clear-cache Clear the local cache diff --git a/src/main.rs b/src/main.rs index 87570b6..6a80017 100644 --- a/src/main.rs +++ b/src/main.rs @@ -92,7 +92,7 @@ struct Args { short = 'o', long = "os", possible_values = ["linux", "macos", "windows", "sunos", "osx"], - hide_possible_values = true, + hide = true )] os: Option, From b726840246f5999f1e95b65df0d27dfe60ddb3cd Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 11 Dec 2021 17:37:21 +0100 Subject: [PATCH 178/368] Run cargo update --- Cargo.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1560972..cd7b9d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -277,9 +277,9 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "encoding_rs" -version = "0.8.29" +version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746" +checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" dependencies = [ "cfg-if", ] @@ -440,9 +440,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd819562fcebdac5afc5c113c3ec36f902840b70fd4fc458799c8ce4607ae55" +checksum = "8f072413d126e57991455e0a922b31e4c8ba7c2ffbebf6b78b4f8521397d65cd" dependencies = [ "bytes", "fnv", @@ -523,9 +523,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.15" +version = "0.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436ec0091e4f20e655156a30a0df3770fe2900aa301e548e08446ec794b6953c" +checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" dependencies = [ "bytes", "futures-channel", @@ -593,9 +593,9 @@ checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" [[package]] name = "itertools" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" +checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" dependencies = [ "either", ] @@ -938,9 +938,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a" dependencies = [ "unicode-xid", ] @@ -1133,9 +1133,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568" +checksum = "254df5081ce98661a883445175e52efe99d1cb2a5552891d965d2f5d0cad1c16" [[package]] name = "same-file" @@ -1191,18 +1191,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.130" +version = "1.0.131" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +checksum = "b4ad69dfbd3e45369132cc64e6748c2d65cdfb001a2b1c232d128b4ad60561c1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.130" +version = "1.0.131" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +checksum = "b710a83c4e0dff6a3d511946b95274ad9ca9e5d3ae497b63fda866ac955358d2" dependencies = [ "proc-macro2", "quote", From 876f390ac6dcd19ff2839465b33244cae1c7c03a Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 11 Dec 2021 17:40:16 +0100 Subject: [PATCH 179/368] Clap: Enable colored error messages --- Cargo.lock | 2 ++ Cargo.toml | 2 +- src/main.rs | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index cd7b9d4..c937fc5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -134,12 +134,14 @@ version = "3.0.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "967965e82fc46fee1a88147a7a977a66d615ed5f83eb95b18577b342c08f90ff" dependencies = [ + "atty", "bitflags", "clap_derive", "indexmap", "lazy_static", "os_str_bytes", "strsim 0.10.0", + "termcolor", "textwrap", ] diff --git a/Cargo.toml b/Cargo.toml index 805e743..5caf131 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ path = "src/main.rs" ansi_term = "0.12.0" app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" -clap = { version = "3.0.0-rc.4", features = ["std", "derive", "suggestions" ], default-features = false } +clap = { version = "3.0.0-rc.4", features = ["std", "derive", "suggestions", "color"], default-features = false } env_logger = { version = "0.9", optional = true } log = "0.4" reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls", "rustls-tls-native-roots"], default-features = false } diff --git a/src/main.rs b/src/main.rs index 6a80017..4ee6d2d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,6 +57,7 @@ const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; #[clap(about = "A fast TLDR client", author, version)] #[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(setting = AppSettings::DeriveDisplayOrder)] +#[clap(setting = AppSettings::DisableColoredHelp)] #[clap( after_help = "To view the user documentation, please visit https://dbrgn.github.io/tealdeer/." )] From 00ec281b9b0ef301b414dfc9182289ba517d1a0f Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 20 Dec 2021 00:25:48 +0100 Subject: [PATCH 180/368] Include custom pages directory in --show-paths command --- src/main.rs | 39 +++++++++++++++++++++++++-------------- tests/lib.rs | 26 ++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4ee6d2d..d23e029 100644 --- a/src/main.rs +++ b/src/main.rs @@ -257,7 +257,7 @@ fn show_config_path(enable_styles: bool) { } /// Show file paths -fn show_paths() { +fn show_paths(config: &Config) { let config_dir = get_config_dir().map_or_else( |e| format!("[Error: {}]", e), |(mut path, source)| { @@ -289,13 +289,21 @@ fn show_paths() { path.push(""); // Trailing path separator path.into_os_string() .into_string() - .unwrap_or_else(|_| String::from("[Invalid]")) + .unwrap_or_else(|_| "[Invalid]".to_string()) }, ); - println!("Config dir: {}", config_dir); - println!("Config path: {}", config_path); - println!("Cache dir: {}", cache_dir); - println!("Pages dir: {}", pages_dir); + let custom_pages_dir = config.directories.custom_pages_dir.as_deref().map_or_else( + || "[None]".to_string(), + |path| { + path.to_str() + .map_or_else(|| "[Invalid]".to_string(), ToString::to_string) + }, + ); + println!("Config dir: {}", config_dir); + println!("Config path: {}", config_path); + println!("Cache dir: {}", cache_dir); + println!("Pages dir: {}", pages_dir); + println!("Custom pages dir: {}", custom_pages_dir); } /// Create seed config file and exit @@ -416,14 +424,6 @@ fn main() { ); show_config_path(enable_styles); } - if args.show_paths { - show_paths(); - } - - // Create a basic config and exit - if args.seed_config { - create_config_and_exit(enable_styles); - } // Look up config file, if none is found fall back to default config. let config = match Config::load(enable_styles) { @@ -438,10 +438,21 @@ fn main() { } }; + // Set up pager if args.pager || config.display.use_pager { configure_pager(enable_styles); } + // Show various paths + if args.show_paths { + show_paths(&config); + } + + // Create a basic config and exit + if args.seed_config { + create_config_and_exit(enable_styles); + } + // Specify target OS let platform: PlatformType = args.platform.unwrap_or_else(PlatformType::current); diff --git a/tests/lib.rs b/tests/lib.rs index de6d346..dd03135 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -284,17 +284,18 @@ fn test_setup_seed_config() { fn test_show_paths() { let testenv = TestEnv::new(); + // Show general commands testenv .command() .args(["--show-paths"]) .assert() .success() .stdout(contains(format!( - "Config dir: {}", + "Config dir: {}", testenv.config_dir.path().to_str().unwrap(), ))) .stdout(contains(format!( - "Config path: {}", + "Config path: {}", testenv .config_dir .path() @@ -303,11 +304,11 @@ fn test_show_paths() { .unwrap(), ))) .stdout(contains(format!( - "Cache dir: {}", + "Cache dir: {}", testenv.cache_dir.path().to_str().unwrap(), ))) .stdout(contains(format!( - "Pages dir: {}", + "Pages dir: {}", testenv .cache_dir .path() @@ -315,6 +316,23 @@ fn test_show_paths() { .to_str() .unwrap(), ))); + + // Set custom pages directory + testenv.write_config(format!( + "[directories]\ncustom_pages_dir = '{}'", + testenv.custom_pages_dir.path().to_str().unwrap() + )); + + // Now ensure that this path is contained in the output + testenv + .command() + .args(["--show-paths"]) + .assert() + .success() + .stdout(contains(format!( + "Custom pages dir: {}", + testenv.custom_pages_dir.path().to_str().unwrap(), + ))); } #[test] From 6508ec6ac662af2009ec45ffe467728a594ec2ad Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 20 Dec 2021 00:26:16 +0100 Subject: [PATCH 181/368] Ensure that default custom_pages_dir ends with trailing slash --- src/config.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index d1b040b..32e902e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -173,7 +173,10 @@ impl Default for RawDirectoriesConfig { fn default() -> Self { Self { custom_pages_dir: get_app_root(AppDataType::UserData, &crate::APP_INFO) - .map(|path| path.join("pages")) + .map(|path| { + // Note: The `join("")` call ensures that there's a trailing slash + path.join("pages").join("") + }) .ok(), } } From 66255219fa65f3466bd7db275afa7db0dd494009 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 20 Dec 2021 00:43:40 +0100 Subject: [PATCH 182/368] Docs: Improve structure of config docs --- docs/src/SUMMARY.md | 6 ++--- docs/src/config.md | 49 +++++++++++++++++++++++--------------- docs/src/config_display.md | 2 +- docs/src/config_style.md | 2 +- docs/src/config_updates.md | 2 +- 5 files changed, 36 insertions(+), 25 deletions(-) diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 6201678..e2455c4 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -5,6 +5,6 @@ - [Installing](./installing.md) - [Usage](./usage.md) - [Configuration](./config.md) - - [display](./config_display.md) - - [style](./config_style.md) - - [updates](./config_updates.md) + - [Section: \[display\]](./config_display.md) + - [Section: \[style\]](./config_style.md) + - [Section: \[updates\]](./config_updates.md) diff --git a/docs/src/config.md b/docs/src/config.md index 79afcdf..9052210 100644 --- a/docs/src/config.md +++ b/docs/src/config.md @@ -1,33 +1,30 @@ # Configuration -Tealdeer can be customized with a config file called `config.toml`. Creating -the config file can be done manually or with the help of `tldr`: +Tealdeer can be customized with a config file in [TOML +format](https://toml.io/) called `config.toml`. - $ tldr --seed-config +## Configfile Path -The configuration file path follows OS conventions. It can be queried with the -following command: +The configuration file path follows OS conventions (e.g. +`$XDG_CONFIG_HOME/tealdeer/config.toml` on Linux). The paths can be queried +with the following command: $ tldr --show-paths +Creating the config file can be done manually or with the help of `tldr`: + + $ tldr --seed-config + On Linux, this will usually be `~/.config/tealdeer/config.toml`. -## Override Config Directory - -The directory where the configuration file resides may be overwritten by the -environment variable `TEALDEER_CONFIG_DIR`. Remember to use an absolute path. -Variable expansion will not be performed on the path. - -## Override Cache Directory - -Similarly, the cache directory where the pages are downloaded to, also follows -OS conventions. On Linux, it will usually be at `~/.cache/tealdeer/`. The path -can be overwritten using the environment variable `TEALDEER_CACHE_DIR`. -Remember to use an absolute path. Variable expansion will not be performed on -the path. - ## Config Example +Here's an example configuration file. Note that this example does not contain +all possible config options. For details on the things that can be configured, +please refer to the subsections of this documentation page +([display](config_display.html), [style](config_style.html) or +[updates](config_updates.html)). + ```toml [display] compact = false @@ -49,3 +46,17 @@ underline = true [updates] auto_update = true ``` + +## Override Config Directory + +The directory where the configuration file resides may be overwritten by the +environment variable `TEALDEER_CONFIG_DIR`. Remember to use an absolute path. +Variable expansion will not be performed on the path. + +## Override Cache Directory + +Similarly, the cache directory where the pages are downloaded to, also follows +OS conventions. On Linux, it will usually be at `~/.cache/tealdeer/`. The path +can be overwritten using the environment variable `TEALDEER_CACHE_DIR`. +Remember to use an absolute path. Variable expansion will not be performed on +the path. diff --git a/docs/src/config_display.md b/docs/src/config_display.md index 6d16805..36d5f23 100644 --- a/docs/src/config_display.md +++ b/docs/src/config_display.md @@ -1,4 +1,4 @@ -# display +# Section: \[display\] In the `display` section you can configure the output format. diff --git a/docs/src/config_style.md b/docs/src/config_style.md index 38709ee..be2a4cc 100644 --- a/docs/src/config_style.md +++ b/docs/src/config_style.md @@ -1,4 +1,4 @@ -# style +# Section: \[style\] Using the config file, the style (e.g. colors or underlines) can be customized. diff --git a/docs/src/config_updates.md b/docs/src/config_updates.md index ac9a59b..5eb8f95 100644 --- a/docs/src/config_updates.md +++ b/docs/src/config_updates.md @@ -1,4 +1,4 @@ -# updates +# Section: \[updates\] ## Automatic updates From abeb5c37576d6f47b19fdd321411a24a40c12110 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 20 Dec 2021 00:48:39 +0100 Subject: [PATCH 183/368] Docs: Add directories config section --- docs/src/SUMMARY.md | 1 + docs/src/config.md | 4 ++-- docs/src/config_directories.md | 11 +++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 docs/src/config_directories.md diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index e2455c4..eb628c2 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -8,3 +8,4 @@ - [Section: \[display\]](./config_display.md) - [Section: \[style\]](./config_style.md) - [Section: \[updates\]](./config_updates.md) + - [Section: \[directories\]](./config_directories.md) diff --git a/docs/src/config.md b/docs/src/config.md index 9052210..020687e 100644 --- a/docs/src/config.md +++ b/docs/src/config.md @@ -22,8 +22,8 @@ On Linux, this will usually be `~/.config/tealdeer/config.toml`. Here's an example configuration file. Note that this example does not contain all possible config options. For details on the things that can be configured, please refer to the subsections of this documentation page -([display](config_display.html), [style](config_style.html) or -[updates](config_updates.html)). +([display](config_display.html), [style](config_style.html), +[updates](config_updates.html) or [directories](config_directories.html)). ```toml [display] diff --git a/docs/src/config_directories.md b/docs/src/config_directories.md new file mode 100644 index 0000000..8340ad9 --- /dev/null +++ b/docs/src/config_directories.md @@ -0,0 +1,11 @@ +# Section: \[directories\] + +This section allows overriding some directory paths. + +## `custom_pages_dir` + +Set the directory to be used to look up custom pages. Remember to use an +absolute path. Variable expansion will not be performed on the path. + + [directories] + custom_pages_dir = "/home/myuser/custom-tldr-pages/" From ca844b35e93bb32d43ce433f650b1dbf9378891a Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 20 Dec 2021 01:04:57 +0100 Subject: [PATCH 184/368] Docs: Document custom pages and patches --- docs/src/SUMMARY.md | 1 + docs/src/config_directories.md | 5 ++-- docs/src/usage_custom_pages.md | 42 ++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 docs/src/usage_custom_pages.md diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index eb628c2..8aaac31 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -4,6 +4,7 @@ - [Installing](./installing.md) - [Usage](./usage.md) + - [Custom Pages](./usage_custom_pages.md) - [Configuration](./config.md) - [Section: \[display\]](./config_display.md) - [Section: \[style\]](./config_style.md) diff --git a/docs/src/config_directories.md b/docs/src/config_directories.md index 8340ad9..d894e90 100644 --- a/docs/src/config_directories.md +++ b/docs/src/config_directories.md @@ -4,8 +4,9 @@ This section allows overriding some directory paths. ## `custom_pages_dir` -Set the directory to be used to look up custom pages. Remember to use an -absolute path. Variable expansion will not be performed on the path. +Set the directory to be used to look up [custom +pages](usage_custom_pages.html). Remember to use an absolute path. Variable +expansion will not be performed on the path. [directories] custom_pages_dir = "/home/myuser/custom-tldr-pages/" diff --git a/docs/src/usage_custom_pages.md b/docs/src/usage_custom_pages.md new file mode 100644 index 0000000..589479f --- /dev/null +++ b/docs/src/usage_custom_pages.md @@ -0,0 +1,42 @@ +# Custom Pages and Patches + +Tealdeer allows creating new custom pages, overriding existing pages as well as +extending existing pages. + +The directory, where these custom pages and patches can be placed, follows OS +conventions. On Linux, for example, the default location is +`~/.local/share/tealdeer/pages/`. To print the path used on your system, simply +run `tldr --show-paths`. + +The custom pages directory can be [overridden by the config +file](config_directories.html). + +## Custom Pages + +To document internal command line tools, or if you want to replace an existing +tldr page with one that's better suited for you, place a file with the name +`.page` in the custom pages directory. When calling `tldr `, +your custom page will be shown instead of the upstream version in the cache. + +Path: + + $CUSTOM_PAGES_DIR/.page + +Example: + + ~/.local/share/tealdeer/pages/ufw.page + +## Custom Patches + +Sometimes you don't want to fully replace an existing upstream page, but just +want to extend it with your own examples that you frequently need. In this +case, use a file called `.patch`, it will be appended to existing +pages. + +Path: + + $CUSTOM_PAGES_DIR/.patch + +Example: + + ~/.local/share/tealdeer/pages/ufw.patch From 0ef31d1f17727a4ec2550e78faf0024b9ff8df8d Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 29 Dec 2021 23:52:25 +0100 Subject: [PATCH 185/368] Concatenate page and patch bytes before processing This way a patch file does not need a well-formed header anymore. Fixes #181. --- src/cache.rs | 60 +++++++++++++++++++++++------------------ src/main.rs | 5 ++-- src/output.rs | 60 ++++++++++++++++++++--------------------- tests/inkscape-v2.patch | 3 +-- 4 files changed, 68 insertions(+), 60 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index ac6347c..1a3a31d 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -1,9 +1,8 @@ use std::{ env, ffi::OsStr, - fs, - io::{Cursor, Read, Seek}, - iter, + fs::{self, File}, + io::{BufReader, Cursor, Read, Seek}, path::{Path, PathBuf}, }; @@ -32,8 +31,8 @@ pub struct Cache { #[derive(Debug)] pub struct PageLookupResult { - page_path: PathBuf, - patch_path: Option, + pub page_path: PathBuf, + pub patch_path: Option, } impl PageLookupResult { @@ -49,8 +48,36 @@ impl PageLookupResult { self } - pub fn paths(&self) -> impl Iterator { - iter::once(self.page_path.as_path()).chain(self.patch_path.as_deref()) + /// Create a buffered reader that sequentially reads from the page and the + /// patch, as if they were concatenated. + /// + /// This will return an error if either the page file or the patch file + /// cannot be opened. + pub fn reader(&self) -> Result>, String> { + // Open page file + let page_file = File::open(&self.page_path) + .map_err(|msg| format!("Could not open page file at {:?}: {}", self.page_path, msg))?; + + // Open patch file + let patch_file_opt = match &self.patch_path { + Some(path) => Some( + File::open(path) + .map_err(|msg| format!("Could not open patch file at {:?}: {}", path, msg))?, + ), + None => None, + }; + + // Create chained reader from file(s) + // + // Note: It might be worthwhile to create our own struct that accepts + // the page and patch files and that will read them sequentially, + // because it avoids the boxing below. However, the performance impact + // would first need to be shown to be significant using a benchmark. + Ok(BufReader::new(if let Some(patch_file) = patch_file_opt { + Box::new(page_file.chain(patch_file)) as Box + } else { + Box::new(page_file) as Box + })) } } @@ -360,23 +387,4 @@ impl Cache { /// Unit Tests for cache module #[cfg(test)] mod tests { - use super::*; - - #[test] - fn test_page_lookup_result_iter_with_patch() { - let lookup = PageLookupResult::with_page(PathBuf::from("test.page")) - .with_optional_patch(Some(PathBuf::from("test.patch"))); - let mut iter = lookup.paths(); - assert_eq!(iter.next(), Some(Path::new("test.page"))); - assert_eq!(iter.next(), Some(Path::new("test.patch"))); - assert_eq!(iter.next(), None); - } - - #[test] - fn test_page_lookup_result_iter_no_patch() { - let lookup = PageLookupResult::with_page(PathBuf::from("test.page")); - let mut iter = lookup.paths(); - assert_eq!(iter.next(), Some(Path::new("test.page"))); - assert_eq!(iter.next(), None); - } } diff --git a/src/main.rs b/src/main.rs index d23e029..7b2e45c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -514,17 +514,18 @@ fn main() { // https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md#page-names let command = args.command.join("-").to_lowercase(); + // Collect languages let languages = args .language .map_or_else(get_languages_from_env, |lang| vec![lang]); // Search for command in cache - if let Some(page) = cache.find_page( + if let Some(lookup_result) = cache.find_page( &command, &languages, config.directories.custom_pages_dir.as_deref(), ) { - if let Err(msg) = print_page(&page, args.raw, &config) { + if let Err(msg) = print_page(&lookup_result, args.raw, &config) { print_error(enable_styles, &msg); process::exit(1); } diff --git a/src/output.rs b/src/output.rs index 70cd138..cad0690 100644 --- a/src/output.rs +++ b/src/output.rs @@ -1,9 +1,6 @@ //! Functions for printing pages to the terminal -use std::{ - fs::File, - io::{self, BufRead, BufReader, Write}, -}; +use std::io::{self, BufRead, Write}; use crate::{ cache::PageLookupResult, @@ -15,41 +12,44 @@ use crate::{ /// Print page by path pub fn print_page( - page: &PageLookupResult, + lookup_result: &PageLookupResult, enable_markdown: bool, config: &Config, ) -> Result<(), String> { + // Create reader from file(s) + let reader = lookup_result.reader()?; + + // Lock stdout only once, this improves performance considerably let stdout = io::stdout(); let mut handle = stdout.lock(); - for path in page.paths() { - let file = File::open(path).map_err(|msg| format!("Could not open file: {}", msg))?; - let reader = BufReader::new(file); - - if enable_markdown { - // Print the raw markdown of the file. - for line in reader.lines() { - writeln!(handle, "{}", line.unwrap()) - .map_err(|_| "Could not write to stdout".to_string())?; + if enable_markdown { + // Print the raw markdown of the file. + for line in reader.lines() { + writeln!(handle, "{}", line.unwrap()) + .map_err(|_| "Could not write to stdout".to_string())?; + } + } else { + // Closure that processes a page snippet and writes it to stdout + let mut process_snippet = |snip: PageSnippet<'_>| { + if snip.is_empty() { + Ok(()) + } else { + print_snippet(&mut handle, snip, &config.style) + .map_err(|e| WriteError(e.to_string())) } - } else { - let mut process_snippet = |snip: PageSnippet<'_>| { - if snip.is_empty() { - Ok(()) - } else { - print_snippet(&mut handle, snip, &config.style) - .map_err(|e| WriteError(e.to_string())) - } - }; - highlight_lines( - LineIterator::new(reader), - &mut process_snippet, - !config.display.compact, - ) - .map_err(|e| format!("Could not write to stdout: {}", e.message()))?; }; - } + // Print highlighted lines + highlight_lines( + LineIterator::new(reader), + &mut process_snippet, + !config.display.compact, + ) + .map_err(|e| format!("Could not write to stdout: {}", e.message()))?; + }; + + // We're done outputting data, flush stdout now! handle .flush() .map_err(|_| "Could not flush stdout".to_string())?; diff --git a/tests/inkscape-v2.patch b/tests/inkscape-v2.patch index ffca34c..762cf15 100644 --- a/tests/inkscape-v2.patch +++ b/tests/inkscape-v2.patch @@ -1,5 +1,4 @@ -This header shouldn't be required -================================= + Custom inkscape entry My Inkscape example From fb40974616d4b5662a722cdd32d1abc44db68dae Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 29 Dec 2021 23:53:46 +0100 Subject: [PATCH 186/368] Cache: Add tests for PageLookupResult::reader Co-authored-by: Dalton Maahs --- src/cache.rs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/src/cache.rs b/src/cache.rs index 1a3a31d..8a6d662 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -387,4 +387,55 @@ impl Cache { /// Unit Tests for cache module #[cfg(test)] mod tests { + use super::*; + + use std::{ + fs::File, + io::{Read, Write}, + }; + + #[test] + fn test_reader_with_patch() { + // Write test files + let dir = tempfile::tempdir().unwrap(); + let page_path = dir.path().join("test.page"); + let patch_path = dir.path().join("test.patch"); + { + let mut f1 = File::create(&page_path).unwrap(); + f1.write_all(b"Hello\n").unwrap(); + let mut f2 = File::create(&patch_path).unwrap(); + f2.write_all(b"World").unwrap(); + } + + // Create chained reader from lookup result + let lr = PageLookupResult::with_page(page_path).with_optional_patch(Some(patch_path)); + let mut reader = lr.reader().unwrap(); + + // Read into a Vec + let mut buf = Vec::new(); + reader.read_to_end(&mut buf).unwrap(); + + assert_eq!(&buf, b"Hello\nWorld"); + } + + #[test] + fn test_reader_without_patch() { + // Write test file + let dir = tempfile::tempdir().unwrap(); + let page_path = dir.path().join("test.page"); + { + let mut f = File::create(&page_path).unwrap(); + f.write_all(b"Hello").unwrap(); + } + + // Create chained reader from lookup result + let lr = PageLookupResult::with_page(page_path); + let mut reader = lr.reader().unwrap(); + + // Read into a Vec + let mut buf = Vec::new(); + reader.read_to_end(&mut buf).unwrap(); + + assert_eq!(&buf, b"Hello"); + } } From 2b1167f19b96b1c20ffe4a34b98ed7a5e3d9bba0 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 30 Dec 2021 00:12:51 +0100 Subject: [PATCH 187/368] Update custom patches docs --- docs/src/SUMMARY.md | 2 +- docs/src/usage_custom_pages.md | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 8aaac31..8d1a634 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -4,7 +4,7 @@ - [Installing](./installing.md) - [Usage](./usage.md) - - [Custom Pages](./usage_custom_pages.md) + - [Custom Pages and Patches](./usage_custom_pages.md) - [Configuration](./config.md) - [Section: \[display\]](./config_display.md) - [Section: \[style\]](./config_style.md) diff --git a/docs/src/usage_custom_pages.md b/docs/src/usage_custom_pages.md index 589479f..bdae7a9 100644 --- a/docs/src/usage_custom_pages.md +++ b/docs/src/usage_custom_pages.md @@ -4,7 +4,7 @@ Tealdeer allows creating new custom pages, overriding existing pages as well as extending existing pages. The directory, where these custom pages and patches can be placed, follows OS -conventions. On Linux, for example, the default location is +conventions. On Linux for instance, the default location is `~/.local/share/tealdeer/pages/`. To print the path used on your system, simply run `tldr --show-paths`. @@ -33,6 +33,9 @@ want to extend it with your own examples that you frequently need. In this case, use a file called `.patch`, it will be appended to existing pages. +> **Note:** Because the patch file will be concatenated directly to the page +> file, it needs to start with an empty line. + Path: $CUSTOM_PAGES_DIR/.patch From ed3d1ea9af2a069e92a1b0565d9796e1677523ea Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 30 Dec 2021 21:03:44 +0100 Subject: [PATCH 188/368] Always add empty line before concatenating patch file --- src/cache.rs | 8 ++++---- tests/inkscape-v2.patch | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 8a6d662..87db30c 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -74,7 +74,7 @@ impl PageLookupResult { // because it avoids the boxing below. However, the performance impact // would first need to be shown to be significant using a benchmark. Ok(BufReader::new(if let Some(patch_file) = patch_file_opt { - Box::new(page_file.chain(patch_file)) as Box + Box::new(page_file.chain(&b"\n"[..]).chain(patch_file)) as Box } else { Box::new(page_file) as Box })) @@ -415,7 +415,7 @@ mod tests { let mut buf = Vec::new(); reader.read_to_end(&mut buf).unwrap(); - assert_eq!(&buf, b"Hello\nWorld"); + assert_eq!(&buf, b"Hello\n\nWorld"); } #[test] @@ -425,7 +425,7 @@ mod tests { let page_path = dir.path().join("test.page"); { let mut f = File::create(&page_path).unwrap(); - f.write_all(b"Hello").unwrap(); + f.write_all(b"Hello\n").unwrap(); } // Create chained reader from lookup result @@ -436,6 +436,6 @@ mod tests { let mut buf = Vec::new(); reader.read_to_end(&mut buf).unwrap(); - assert_eq!(&buf, b"Hello"); + assert_eq!(&buf, b"Hello\n"); } } diff --git a/tests/inkscape-v2.patch b/tests/inkscape-v2.patch index 762cf15..5cc5d22 100644 --- a/tests/inkscape-v2.patch +++ b/tests/inkscape-v2.patch @@ -1,4 +1,3 @@ - Custom inkscape entry My Inkscape example From e722b4f92ee328009765d72fc084c04562983862 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 30 Dec 2021 22:39:27 +0100 Subject: [PATCH 189/368] Rename main branch (#239) --- .github/workflows/ci.yml | 2 +- .github/workflows/gh-pages.yml | 2 +- README.md | 4 ++-- src/main.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 160d9ae..390e565 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ on: push: branches: - - master + - main pull_request: schedule: - cron: '30 3 * * 2' diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 35f17b3..c32ec71 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -3,7 +3,7 @@ name: github pages on: push: branches: - - master + - main jobs: deploy: diff --git a/README.md b/README.md index 86c82a6..1746860 100644 --- a/README.md +++ b/README.md @@ -120,13 +120,13 @@ Thanks to @severen for coming up with the name "tealdeer"! [outfieldr-gh]: https://gitlab.com/ve-nt/outfieldr [python-gh]: https://github.com/tldr-pages/tldr-python-client -[benchmark-dockerfile]: https://github.com/dbrgn/tealdeer/blob/master/benchmarks/Dockerfile +[benchmark-dockerfile]: https://github.com/dbrgn/tealdeer/blob/main/benchmarks/Dockerfile [client-spec]: https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md [hyperfine-gh]: https://github.com/sharkdp/hyperfine [outfieldr-comment-tls]: https://github.com/dbrgn/tealdeer/issues/129#issuecomment-833596765 -[github-actions]: https://github.com/dbrgn/tealdeer/actions?query=branch%3Amaster +[github-actions]: https://github.com/dbrgn/tealdeer/actions?query=branch%3Amain [github-actions-badge]: https://github.com/dbrgn/tealdeer/workflows/CI/badge.svg [crates-io]: https://crates.io/crates/tealdeer [crates-io-badge]: https://img.shields.io/crates/v/tealdeer.svg diff --git a/src/main.rs b/src/main.rs index 7b2e45c..e6d79df 100644 --- a/src/main.rs +++ b/src/main.rs @@ -340,7 +340,7 @@ fn init_log() {} fn get_languages(env_lang: Option<&str>, env_language: Option<&str>) -> Vec { // Language list according to - // https://github.com/tldr-pages/tldr/blob/master/CLIENT-SPECIFICATION.md#language + // https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md#language if env_lang.is_none() { return vec!["en".to_string()]; From 2007aa0c325a679d537ea7430fd940aca8db94b4 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 11 Mar 2021 13:37:15 +0900 Subject: [PATCH 190/368] CI: Add initial release workflow --- .github/workflows/release.yml | 97 +++++++++++++++++++++++++++++++++++ upload-asset.sh | 37 +++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 upload-asset.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..974d873 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,97 @@ +on: + push: + tags: + - "v*" # push events to matching v*, i.e. v1.0, v20.15.10 + +jobs: + completions-upload: + runs-on: ubuntu-latest + strategy: + matrix: + target: ["bash", "fish", "zsh"] + steps: + - uses: actions/checkout@v2 + - name: Upload + if: startsWith(github.ref, 'refs/tags/') + run: | + sudo apt update && sudo apt install -y jq + source ./upload-asset.sh + + upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ matrix.target }}_tealdeer completions_${{ matrix.target }} + + license-upload: + runs-on: ubuntu-latest + strategy: + matrix: + target: ["MIT", "APACHE"] + steps: + - uses: actions/checkout@v2 + - name: Upload + if: startsWith(github.ref, 'refs/tags/') + run: | + sudo apt update && sudo apt install -y jq + source ./upload-asset.sh + + upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} LICENSE-${{ matrix.target }} LICENSE-${{ matrix.target }} + + build-linux: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - arch: "x86_64" + libc: "musl" + - arch: "i686" + libc: "musl" + - arch: "armv7" + libc: "musleabihf" + - arch: "arm" + libc: "musleabi" + - arch: "arm" + libc: "musleabihf" + + steps: + - uses: actions/checkout@v2 + - name: Docker Pull + run: docker pull messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} + - name: Build with Docker + run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} cargo build --release + - name: Stripping + run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} musl-strip -s /home/rust/src/target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr + - uses: actions/upload-artifact@v2 + with: + name: "tldr-linux-${{ matrix.arch }}-${{ matrix.libc }}" + path: "target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr" + + build-darwin: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --target x86_64-apple-darwin + - uses: actions/upload-artifact@v2 + with: + name: "tldr-apple-darwin-x86_64" + path: "target/x86_64-apple-darwin/release/tldr" + + release-upload: + needs: + - build-linux + - build-darwin + runs-on: ubuntu-latest + strategy: + matrix: + target: ["linux-x86_64-musl", "linux-i686-musl", "linux-armv7-musleabihf", "linux-arm-musleabi", "linux-arm-musleabihf", "apple-darwin-x86_64"] + steps: + - uses: actions/checkout@v2 + - uses: actions/download-artifact@v2 + - name: Upload + if: startsWith(github.ref, 'refs/tags/') + run: | + sudo apt update && sudo apt install -y jq + source ./upload-asset.sh + + upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} tldr-${{ matrix.target }}/tldr tldr-${{ matrix.target }} diff --git a/upload-asset.sh b/upload-asset.sh new file mode 100644 index 0000000..af85fbf --- /dev/null +++ b/upload-asset.sh @@ -0,0 +1,37 @@ +#! /bin/bash +# https://gist.github.com/schell/2fe896953b6728cc3c5d8d5f9f3a17a3 +# requires curl and jq on PATH: https://stedolan.github.io/jq/ + +# upload a release file. +# this must be called only after a successful create_release, as create_release saves +# the json response in release.json. +# token: github api user token +# repo: github username/reponame +# file: path to the asset file to upload +# name: name to use for the uploaded asset +upload_release_file() { + token=$1 + repo=$2 + file=$3 + name=$4 + + url=`curl --silent "https://api.github.com/repos/${repo}/releases/latest" | jq -r .upload_url | cut -d{ -f'1'` + command="\ + curl -s -o upload.json -w '%{http_code}' \ + --request POST \ + --header 'authorization: Bearer ${token}' \ + --header 'Content-Type: application/octet-stream' \ + --data-binary @\"${file}\" + ${url}?name=${name}" + http_code=`eval $command` + if [ $http_code == "201" ]; then + echo "asset $name uploaded:" + jq -r .browser_download_url upload.json + else + echo "upload failed with code '$http_code':" + cat upload.json + echo "command:" + echo $command + return 1 + fi +} From c155b6f98d0972d4495dc1495591819cda6d550d Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 30 Dec 2021 22:37:39 +0100 Subject: [PATCH 191/368] CI: Clean up release workflow and upload script - Clean up scripts - Create draft release before uploading assets - Find release for current tag, don't simply pick the latest - Add Windows builds - Add checksums for binaries --- .github/workflows/release.yml | 112 ++++++++++++++++++++++++---------- scripts/upload-asset.sh | 88 ++++++++++++++++++++++++++ upload-asset.sh | 37 ----------- 3 files changed, 169 insertions(+), 68 deletions(-) create mode 100644 scripts/upload-asset.sh delete mode 100644 upload-asset.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 974d873..c0a7f1c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,38 +4,51 @@ on: - "v*" # push events to matching v*, i.e. v1.0, v20.15.10 jobs: - completions-upload: - runs-on: ubuntu-latest + create-release: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Create release for tag + if: startsWith(github.ref, 'refs/tags/') + run: | + source ./scripts/upload-asset.sh + # Create: + create_release ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} "Tealdeer version ${GITHUB_REF#refs/*/v}.\n\nFor the full changelog, see https://github.com/dbrgn/tealdeer/blob/main/CHANGELOG.md.\n\nBinaries were generated automatically in CI, and are therefore unsigned. For a fully trusted release, please build from source." + + upload-completions: + needs: + - create-release + runs-on: ubuntu-20.04 strategy: matrix: target: ["bash", "fish", "zsh"] steps: - uses: actions/checkout@v2 - - name: Upload + - name: Upload completion if: startsWith(github.ref, 'refs/tags/') run: | - sudo apt update && sudo apt install -y jq - source ./upload-asset.sh + source ./scripts/upload-asset.sh + # Upload: + upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} ${{ matrix.target }}_tealdeer completions_${{ matrix.target }} - upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ matrix.target }}_tealdeer completions_${{ matrix.target }} - - license-upload: - runs-on: ubuntu-latest + upload-license: + needs: + - create-release + runs-on: ubuntu-20.04 strategy: matrix: target: ["MIT", "APACHE"] steps: - uses: actions/checkout@v2 - - name: Upload + - name: Upload license if: startsWith(github.ref, 'refs/tags/') run: | - sudo apt update && sudo apt install -y jq - source ./upload-asset.sh - - upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} LICENSE-${{ matrix.target }} LICENSE-${{ matrix.target }} + source ./scripts/upload-asset.sh + # Upload: + upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} LICENSE-${{ matrix.target }} LICENSE-${{ matrix.target }}.txt build-linux: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: include: @@ -49,22 +62,21 @@ jobs: libc: "musleabi" - arch: "arm" libc: "musleabihf" - steps: - uses: actions/checkout@v2 - - name: Docker Pull + - name: Pull Docker image run: docker pull messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} - - name: Build with Docker + - name: Build in Docker run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} cargo build --release - - name: Stripping + - name: Strip binary run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} musl-strip -s /home/rust/src/target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr - uses: actions/upload-artifact@v2 with: - name: "tldr-linux-${{ matrix.arch }}-${{ matrix.libc }}" + name: "tealdeer-linux-${{ matrix.arch }}-${{ matrix.libc }}" path: "target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr" - build-darwin: - runs-on: macos-latest + build-macos: + runs-on: macos-11 steps: - uses: actions/checkout@v2 - name: Build @@ -74,24 +86,62 @@ jobs: args: --release --target x86_64-apple-darwin - uses: actions/upload-artifact@v2 with: - name: "tldr-apple-darwin-x86_64" + name: "tealdeer-macos-x86_64" path: "target/x86_64-apple-darwin/release/tldr" - release-upload: + build-windows: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v2 + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --target x86_64-pc-windows-msvc + - uses: actions/upload-artifact@v2 + with: + name: "tealdeer-windows-x86_64-msvc" + path: "target/x86_64-pc-windows-msvc/release/tldr.exe" + + upload-release: needs: + - create-release - build-linux - - build-darwin - runs-on: ubuntu-latest + - build-macos + - build-windows + runs-on: ubuntu-20.04 strategy: matrix: - target: ["linux-x86_64-musl", "linux-i686-musl", "linux-armv7-musleabihf", "linux-arm-musleabi", "linux-arm-musleabihf", "apple-darwin-x86_64"] + target: + - linux-x86_64-musl + - linux-i686-musl + - linux-armv7-musleabihf + - linux-arm-musleabi + - linux-arm-musleabihf + - macos-x86_64 + - windows-x86_64-msvc steps: - uses: actions/checkout@v2 - uses: actions/download-artifact@v2 - - name: Upload + - name: Upload binary if: startsWith(github.ref, 'refs/tags/') run: | - sudo apt update && sudo apt install -y jq - source ./upload-asset.sh + source ./scripts/upload-asset.sh - upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} tldr-${{ matrix.target }}/tldr tldr-${{ matrix.target }} + # Move/rename file + mkdir out && cd out + if [[ "${{ matrix.target }}" == *windows* ]]; then + src="../tealdeer-${{ matrix.target }}/tldr.exe" + filename="tealdeer-${{ matrix.target }}.exe" + else + src="../tealdeer-${{ matrix.target }}/tldr" + filename="tealdeer-${{ matrix.target }}" + fi + cp $src $filename + + # Create checksum + sha256sum "$filename" > "$filename.sha256" + + # Upload: + upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} $filename $filename + upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} $filename.sha256 $filename.sha256 diff --git a/scripts/upload-asset.sh b/scripts/upload-asset.sh new file mode 100644 index 0000000..7f0a9c3 --- /dev/null +++ b/scripts/upload-asset.sh @@ -0,0 +1,88 @@ +#!/usr/bin/env bash +# +# Upload artifacts to GitHub Actions. +# +# Based on: https://gist.github.com/schell/2fe896953b6728cc3c5d8d5f9f3a17a3 +# +# Requires curl and jq on PATH + +# Args: +# token: GitHub API user token +# repo: GitHub username/reponame +# tag: Name of the tag for which to create a release +# description: Release description +create_release() { + # Args + token=$1 + repo=$2 + tag=$3 + description=$4 + echo "Creating release:" + echo " repo=$repo" + echo " tag=$tag" + echo "" + + # Create release + http_code=$( + curl -s -o create.json -w '%{http_code}' \ + --header "Accept: application/vnd.github.v3+json" \ + --header "Authorization: Bearer $token" \ + --header "Content-Type:application/json" \ + "https://api.github.com/repos/$repo/releases" \ + -d '{"tag_name":"'"$tag"'","name":"'"${tag/v/Release }"'","draft":true,"body":"'"${description/\"/\\\"}"'"}' + ) + if [ "$http_code" == "201" ]; then + echo "Release for tag $tag created." + else + echo "Asset upload failed with code '$http_code'." + return 1 + fi +} + +# Args: +# token: GitHub API user token +# repo: GitHub username/reponame +# tag: Name of the tag for which to upload the assets +# file: Path to the asset file to upload +# name: Name to use for the uploaded asset +upload_release_file() { + # Args + token=$1 + repo=$2 + tag=$3 + file=$4 + name=$5 + echo "Uploading:" + echo " repo=$repo" + echo " tag=$tag" + echo " file=$file" + echo " name=$name" + echo "" + + # Determine upload URL of latest draft release for the specified tag + upload_url=$( + curl -s \ + --header "Accept: application/vnd.github.v3+json" \ + --header "Authorization: Bearer $token" \ + "https://api.github.com/repos/$repo/releases" \ + | jq -r '[.[] | select(.tag_name == "'"$tag"'" and .draft)][0].upload_url' \ + | cut -d"{" -f'1' + ) + echo "Determined upload URL: $upload_url" + http_code=$( + curl -s -o upload.json -w '%{http_code}' \ + --request POST \ + --header "Accept: application/vnd.github.v3+json" \ + --header "Authorization: Bearer $token" \ + --header "Content-Type: application/octet-stream" \ + --data-binary "@$file" "$upload_url?name=$name" + ) + if [ "$http_code" == "201" ]; then + echo "Asset $name uploaded:" + jq -r .browser_download_url upload.json + else + echo "Asset upload failed with code '$http_code':" + cat upload.json + return 1 + fi +} diff --git a/upload-asset.sh b/upload-asset.sh deleted file mode 100644 index af85fbf..0000000 --- a/upload-asset.sh +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/bash -# https://gist.github.com/schell/2fe896953b6728cc3c5d8d5f9f3a17a3 -# requires curl and jq on PATH: https://stedolan.github.io/jq/ - -# upload a release file. -# this must be called only after a successful create_release, as create_release saves -# the json response in release.json. -# token: github api user token -# repo: github username/reponame -# file: path to the asset file to upload -# name: name to use for the uploaded asset -upload_release_file() { - token=$1 - repo=$2 - file=$3 - name=$4 - - url=`curl --silent "https://api.github.com/repos/${repo}/releases/latest" | jq -r .upload_url | cut -d{ -f'1'` - command="\ - curl -s -o upload.json -w '%{http_code}' \ - --request POST \ - --header 'authorization: Bearer ${token}' \ - --header 'Content-Type: application/octet-stream' \ - --data-binary @\"${file}\" - ${url}?name=${name}" - http_code=`eval $command` - if [ $http_code == "201" ]; then - echo "asset $name uploaded:" - jq -r .browser_download_url upload.json - else - echo "upload failed with code '$http_code':" - cat upload.json - echo "command:" - echo $command - return 1 - fi -} From d1c17f2eb68faafcd95d74240b059e7ef171bbfc Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 31 Dec 2021 18:20:16 +0100 Subject: [PATCH 192/368] Remove release-build.sh We don't need it anymore now that we have a CI pipeline for release binaries. --- release-build.sh | 77 ------------------------------------------------ 1 file changed, 77 deletions(-) delete mode 100755 release-build.sh diff --git a/release-build.sh b/release-build.sh deleted file mode 100755 index 26567a4..0000000 --- a/release-build.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -VERSION=$(grep '^version = ' Cargo.toml | sed 's/.*"\([0-9\.]*\)".*/\1/') -GPG_KEY=EA456E8BAF0109429583EED83578F667F2F3A5FA - -declare -a targets=( - "x86_64-musl" - "i686-musl" - "armv7-musleabihf" - "arm-musleabi" - "arm-musleabihf" -) - -declare -a rusttargets=( - "x86_64-unknown-linux-musl" - "i686-unknown-linux-musl" - "armv7-unknown-linux-musleabihf" - "arm-unknown-linux-musleabi" - "arm-unknown-linux-musleabihf" -) - -declare -a completions=( - "bash" - "fish" - "zsh" -) - -function docker-download { - echo "==> Downloading Docker image: messense/rust-musl-cross:$1" - docker pull messense/rust-musl-cross:$1 -} - -function docker-build { - echo "==> Building target: $1" - docker run --rm -it -v "$(pwd)":/home/rust/src messense/rust-musl-cross:$1 cargo build --release -} - -echo -e "==> Version $VERSION\n" - -for target in ${targets[@]}; do docker-download $target; done -echo "" -for target in ${targets[@]}; do docker-build $target; done -echo "" - -rm -rf "dist-$VERSION" -mkdir "dist-$VERSION" - -for i in ${!targets[@]}; do - echo "==> Copying ${targets[$i]}" - cp "target/${rusttargets[$i]}/release/tldr" "dist-$VERSION/tldr-linux-${targets[$i]}" -done -echo "" - -for target in ${targets[@]}; do - echo "==> Stripping $target" - docker run --rm -it -v "$(pwd)":/home/rust/src messense/rust-musl-cross:$target musl-strip -s /home/rust/src/dist-$VERSION/tldr-linux-$target -done -echo "" - -for target in ${targets[@]}; do - echo "==> Signing $target" - gpg -a --output "dist-$VERSION/tldr-linux-$target.sig" --detach-sig "dist-$VERSION/tldr-linux-$target" -done -echo "" - -for completion in ${completions[@]}; do - echo "==> Copying ${completion} completion" - cp "${completion}_tealdeer" "dist-$VERSION/completions_${completion}" -done -echo "" - -echo "==> Copying licenses" -cp LICENSE-* "dist-$VERSION/" - -echo "Done." From 20b7c5c33f151d0b63be205427d7fab5405d5add Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 31 Dec 2021 18:36:45 +0100 Subject: [PATCH 193/368] Run cargo update --- Cargo.lock | 159 ++++++++++++++++++++------------------------- Cargo.toml | 2 +- docs/src/usage.txt | 2 - 3 files changed, 72 insertions(+), 91 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c937fc5..692eb44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,9 +130,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.0.0-rc.4" +version = "3.0.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "967965e82fc46fee1a88147a7a977a66d615ed5f83eb95b18577b342c08f90ff" +checksum = "e6f243c7279f09ffed852a0a564c72091331651484cdbb32b7287f16df8611a7" dependencies = [ "atty", "bitflags", @@ -147,9 +147,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.0.0-rc.4" +version = "3.0.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85946d4034625800196413478a1c6d3a57c12785e1f3970e590e0137dfa07342" +checksum = "8cd9992739777a4a23535089a8d235eac43044ba8b431d9f54fe334dfa779930" dependencies = [ "heck", "proc-macro-error", @@ -228,17 +228,6 @@ dependencies = [ "syn", ] -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "difflib" version = "0.4.0" @@ -322,9 +311,9 @@ dependencies = [ [[package]] name = "escargot" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ead7d8a70259beb627c1ffdd19b0372381f247f88e46a3bd52bb797182690b3" +checksum = "f5584ba17d7ab26a8a7284f13e5bd196294dd2f2d79773cff29b9e9edef601a6" dependencies = [ "log", "once_cell", @@ -383,42 +372,42 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc8cd39e3dbf865f7340dce6a2d401d24fd37c6fe6c4f0ee0de8bfca2252d27" +checksum = "ba3dda0b6588335f360afc675d0564c17a77a2bda81ca178a4b6081bd86c7f0b" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629316e42fe7c2a0b9a65b47d159ceaa5453ab14e8f0a3c5eedbb8cd55b4a445" +checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7" [[package]] name = "futures-io" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e481354db6b5c353246ccf6a728b0c5511d752c08da7260546fc0933869daa11" +checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2" [[package]] name = "futures-sink" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "996c6442437b62d21a32cd9906f9c41e7dc1e19a9579843fad948696769305af" +checksum = "e3055baccb68d74ff6480350f8d6eb8fcfa3aa11bdc1a1ae3afdd0514617d508" [[package]] name = "futures-task" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dabf1872aaab32c886832f2276d2f5399887e2bd613698a02359e4ea83f8de12" +checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72" [[package]] name = "futures-util" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d22213122356472061ac0f1ab2cee28d2bac8491410fd68c2af53d1cedb83e" +checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164" dependencies = [ "futures-core", "futures-io", @@ -485,13 +474,13 @@ dependencies = [ [[package]] name = "http" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" +checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" dependencies = [ "bytes", "fnv", - "itoa", + "itoa 1.0.1", ] [[package]] @@ -538,7 +527,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", + "itoa 0.4.8", "pin-project-lite", "socket2", "tokio", @@ -608,6 +597,12 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +[[package]] +name = "itoa" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" + [[package]] name = "jni" version = "0.19.0" @@ -645,9 +640,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.109" +version = "0.2.112" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01" +checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" [[package]] name = "log" @@ -780,9 +775,9 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ "hermit-abi", "libc", @@ -790,19 +785,18 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9bd055fb730c4f8f4f57d45d35cd6b3f0980535b056dc7ff119cee6a66ed6f" +checksum = "720d3ea1055e4e4574c0c0b0f8c3fd4f24c4cdaf465948206dea090b57b526ad" dependencies = [ - "derivative", "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486ea01961c4a818096de679a8b740b26d9033146ac5291b1c98557658f8cdd9" +checksum = "0d992b768490d7fe0d8586d9b5745f6c49f557da6d81dc982b1d167ad4edbb21" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -812,9 +806,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" [[package]] name = "openssl-probe" @@ -849,9 +843,9 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" [[package]] name = "pin-utils" @@ -861,9 +855,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "ppv-lite86" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" +checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "predicates" @@ -940,18 +934,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a" +checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" dependencies = [ "unicode-xid", ] [[package]] name = "quote" -version = "1.0.10" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "47aa80447ce4daf1717500037052af176af5d38cc3e571d9ec1c7353fc10c87d" dependencies = [ "proc-macro2", ] @@ -1049,9 +1043,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.7" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bea77bc708afa10e59905c3d4af7c8fd43c9214251673095ff8b14345fcbc5" +checksum = "7c4e0a76dc12a116108933f6301b95e83634e0c47b0afbed6abbaa0601e99258" dependencies = [ "base64", "bytes", @@ -1109,7 +1103,7 @@ dependencies = [ "log", "ring", "sct", - "webpki 0.22.0", + "webpki", ] [[package]] @@ -1135,9 +1129,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "254df5081ce98661a883445175e52efe99d1cb2a5552891d965d2f5d0cad1c16" +checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" [[package]] name = "same-file" @@ -1193,18 +1187,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.131" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ad69dfbd3e45369132cc64e6748c2d65cdfb001a2b1c232d128b4ad60561c1" +checksum = "8b9875c23cf305cd1fd7eb77234cbb705f21ea6a72c637a5c6db5fe4b8e7f008" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.131" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b710a83c4e0dff6a3d511946b95274ad9ca9e5d3ae497b63fda866ac955358d2" +checksum = "ecc0db5cb2556c0e558887d9bbdcf6ac4471e83ff66cf696e5419024d1606276" dependencies = [ "proc-macro2", "quote", @@ -1213,11 +1207,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.72" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527" +checksum = "bcbd0344bc6533bc7ec56df11d42fb70f1b912351c0825ccb7211b59d8af7cf5" dependencies = [ - "itoa", + "itoa 1.0.1", "ryu", "serde", ] @@ -1229,7 +1223,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" dependencies = [ "form_urlencoded", - "itoa", + "itoa 0.4.8", "ryu", "serde", ] @@ -1270,9 +1264,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.82" +version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" +checksum = "ecb2e6da8ee5eb9a61068762a32fa9619cc591ceb055b3687f4cd4051ec2e06b" dependencies = [ "proc-macro2", "quote", @@ -1375,11 +1369,10 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e992e41e0d2fb9f755b37446f20900f64446ef54874f40a60c78f021ac6144" +checksum = "fbbf1c778ec206785635ce8ad57fe52b3009ae9e0c9f574a728f3049d3e55838" dependencies = [ - "autocfg", "bytes", "libc", "memchr", @@ -1391,13 +1384,13 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4baa378e417d780beff82bf54ceb0d195193ea6a00c14e22359e7f39456b5689" +checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b" dependencies = [ "rustls", "tokio", - "webpki 0.22.0", + "webpki", ] [[package]] @@ -1502,9 +1495,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wait-timeout" @@ -1618,16 +1611,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki" version = "0.22.0" @@ -1640,11 +1623,11 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.21.1" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" +checksum = "552ceb903e957524388c4d3475725ff2c8b7960922063af6ce53c9a43da07449" dependencies = [ - "webpki 0.21.4", + "webpki", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 5caf131..9ea2c9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ path = "src/main.rs" ansi_term = "0.12.0" app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" -clap = { version = "3.0.0-rc.4", features = ["std", "derive", "suggestions", "color"], default-features = false } +clap = { version = "=3.0.0-rc.11", features = ["std", "derive", "suggestions", "color"], default-features = false } env_logger = { version = "0.9", optional = true } log = "0.4" reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls", "rustls-tls-native-roots"], default-features = false } diff --git a/docs/src/usage.txt b/docs/src/usage.txt index a1df753..d410139 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -1,7 +1,5 @@ tealdeer 1.4.1 - Danilo Bargen , Niklas Mohrin - A fast TLDR client USAGE: From 81c30bfb77fcb4ac1d9ee2d645ef9a17c516d48e Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 31 Dec 2021 19:53:57 +0100 Subject: [PATCH 194/368] Release v1.5.0 --- CHANGELOG.md | 160 ++++++++++++++++++++++++++++++++++++++++----- Cargo.lock | 2 +- Cargo.toml | 2 +- RELEASING.md | 8 ++- docs/src/usage.txt | 2 +- 5 files changed, 153 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14718ee..cdf6e5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,95 @@ Possible log types: - `[removed]` for deprecated features removed in this release. - `[fixed]` for any bug fixes. - `[security]` to invite users to upgrade in case of vulnerabilities. +- `[docs]` for documentation changes. +- `[chore]` for maintenance work. + + +### [v1.5.0][v1.5.0] (2021-12-31) + +This is quite a big release with many new features. In the 15 months since the +last release, 59 pull requests from 16 different contributors were merged! + +The highlights: + +- **Custom pages and patches**: You can now create your own local-only tldr + pages. But not just that, you can also extend existing upstream pages with + your own examples. For more details, see + [the docs](https://dbrgn.github.io/tealdeer/usage_custom_pages.html). +- **Change argument parsing from docopt to clap**: We replaced docopt.rs as + argument parsing library with clap v3, resulting in almost 1 MiB smaller + binaries and a 22% speed increase when rendering a tldr page. +- **Multi-language support**: You can now override the language with `-L/--language`. +- **A new `--show-paths` command**: By running `tldr --show-paths`, you can list + the currently used config dir, cache dir, upstream pages dir and custom pages dir. +- **Compliance with the tldr client spec v1.5**: We renamed `-o/--os` to + `-p/--platform` and implemented transparent lowercasing of the page names. +- **Docs**: The README based documentation has reached its limits. There are + now new mdbook based docs over at + [dbrgn.github.io/tealdeer/](https://dbrgn.github.io/tealdeer/), we hope these + make using tealdeer easier. Of course, documentation improvements are + welcome! Also, if you're confused about how to use a certain feature, feel + free to open an issue, this way we can improve the docs. + +Note that the MSRV (Minimal Supported Rust Version) of the project +[changed][i190]: + +> When publishing a Tealdeer release, the Rust version required to build it +> should be stable for at least a month. + +Changes: + +- [added] Support custom pages and patches ([#142][i142]) +- [added] Multi-language support ([#125][i125], [#161][i161]) +- [added] Add support for ANSI code and RGB colors ([#148][i148]) +- [added] Implement new `--show-paths` command ([#162][i162]) +- [added] Support for italic text styling ([#197][i197]) +- [added] Allow SunOS platform override ([#176][i176]) +- [added] Automatically lowercase page names before lookup ([#227][i227]) +- [added] Add "macos" alias for "osx" ([#215][i215]) +- [fixed] Consider only standalone command names for styling ([#157][i157]) +- [fixed] Fixed and improved zsh completions ([#168][i168]) +- [fixed] Create cache directory path if it does not exist ([#174][i174]) +- [fixed] Use default style if user-defined style is missing ([#210][i210]) +- [changed] Switch from docopt to clap for argument parsing ([#108][i108]) +- [changed] Performance improvements ([#187][i187]) +- [changed] Send all progress logging messages to stderr ([#171][i171]) +- [changed] Rename `-o/--os` to `-p/--platform` ([#217][i217]) +- [changed] Rename `-m/--markdown` to `-r/--raw` ([#108][i108]) +- [deprecated] The `--config-path` command is deprecated, use `--show-paths` instead ([#162][i162]) +- [deprecated] The `-o/--os` command is deprecated, use `-p/--platform` instead ([#217][i217]) +- [deprecated] The `-m/--markdown` command is deprecated, use `-r/--raw` instead ([#108][i108]) +- [docs] New docs at [dbrgn.github.io/tealdeer/](https://dbrgn.github.io/tealdeer/) +- [docs] Add comparative benchmarks with hyperfine ([#163][i163], [README](https://github.com/dbrgn/tealdeer#goals)) +- [chore] Download tldr pages archive from their website, not from GitHub ([#213][i213]) +- [chore] Bump MSRV to 1.54 and change MSRV policy ([#190][i190]) +- [chore] The `master` branch was renamed to `main` +- [chore] All release binaries are now generated in CI. Binaries for macOS and Windows are also provided. ([#240][i240]) +- [chore] Update all dependencies + +Contributors to this version: + +- [@bl-ue][@bl-ue] +- [Cameron Tod][@cam8001] +- [Dalton][@dmaahs2017] +- [Danilo Bargen][@dbrgn] +- [Danny Mösch][@SimplyDanny] +- [Marcin Puc][@tranzystorek-io] +- [Michael Cho][@cho-m] +- [MS_Y][@black7375] +- [Niklas Mohrin][@niklasmohrin] +- [Rithvik Vibhu][@rithvikvibhu] +- [rnd][@0ndorio] +- [Sondre Nilsen][@sondr3] +- [Tomás Farías Santana][@tomasfarias] +- [Tsvetomir Bonev][@invakid404] +- [@tveness][@tveness] +- [ギャラ][@laxect] + +Thanks! + +Last but not least, [Niklas Mohrin][@niklasmohrin] has joined the project as +co-maintainer. Thank you for your help! ### [v1.4.1][v1.4.1] (2020-09-04) @@ -18,8 +107,9 @@ Possible log types: Contributors to this version: -- [Francesco][@BachoSeven] +- [Danilo Bargen][@dbrgn] - [Bruno A. Muciño][@mucinoab] +- [Francesco][@BachoSeven] Thanks! @@ -35,6 +125,7 @@ Thanks! Contributors to this version: - [Atul Bhosale][@Atul9] +- [Danilo Bargen][@dbrgn] - [Danny Mösch][@SimplyDanny] - [Ilaï Deutel][@ilai-deutel] - [Kornel][@kornelski] @@ -59,13 +150,14 @@ Thanks! Contributors to this version: -- [@Calinou][@Calinou] -- [@Delapouite][@Delapouite] -- [@james2doyle][@james2doyle] -- [@jesdazrez][@jesdazrez] +- [Bruno Heridet][@Delapouite] +- [Danilo Bargen][@dbrgn] +- [Hugo Locurcio][@Calinou] +- [Isak Johansson][@Plommonsorbet] +- [James Doyle][@james2doyle] +- [Jesús Trinidad Díaz Ramírez][@jesdazrez] - [@korrat][@korrat] -- [@ma-renaud][@ma-renaud] -- [@Plommonsorbet][@Plommonsorbet] +- [Marc-André Renaud][@ma-renaud] Thanks! @@ -84,14 +176,15 @@ Thanks! Contributors to this version: -- [@aldanor][@aldanor] -- [@Bassets][@Bassets] -- [@das-g][@das-g] -- [@jcgruenhage][@jcgruenhage] -- [@jdvr][@jdvr] -- [@jedahan][@jedahan] -- [@mystal][@mystal] -- [@natpen][@natpen] +- [Bar Hatsor][@Bassets] +- [Danilo Bargen][@dbrgn] +- [Gabriel Martinez][@mystal] +- [Ivan Smirnov][@aldanor] +- [Jan Christian Grünhage][@jcgruenhage] +- [Jonathan Dahan][@jedahan] +- [Juan D. Vega][@jdvr] +- [Natalie Pendragon][@natpen] +- [Raphael Das Gupta][@das-g] Thanks! @@ -106,6 +199,7 @@ Thanks! Contributors to this version: +- [Danilo Bargen][@dbrgn] - [@equal-l2][@equal-l2] - [Jonathan Dahan][@jedahan] - [Lukas Bergdoll][@Voultapher] @@ -137,15 +231,23 @@ Thanks! - First crates.io release +[@0ndorio]: https://github.com/0ndorio [@aldanor]: https://github.com/aldanor [@Atul9]: https://github.com/Atul9 [@BachoSeven]: https://github.com/BachoSeven [@Bassets]: https://github.com/Bassets +[@black7375]: https://github.com/black7375 +[@bl-ue]: https://github.com/bl-ue [@Calinou]: https://github.com/Calinou +[@cam8001]: https://github.com/cam8001 +[@cho-m]: https://github.com/cho-m [@das-g]: https://github.com/das-g +[@dbrgn]: https://github.com/dbrgn [@Delapouite]: https://github.com/Delapouite +[@dmaahs2017]: https://github.com/dmaahs2017 [@equal-l2]: https://github.com/equal-l2 [@ilai-deutel]: https://github.com/ilai-deutel +[@invakid404]: https://github.com/invakid404 [@james2doyle]: https://github.com/james2doyle [@jcgruenhage]: https://github.com/jcgruenhage [@jdvr]: https://github.com/jdvr @@ -153,6 +255,7 @@ Thanks! [@jesdazrez]: https://github.com/jesdazrez [@kornelski]: https://github.com/kornelski [@korrat]: https://github.com/korrat +[@laxect]: https://github.com/laxect [@LovecraftianHorror]: https://github.com/LovecraftianHorror [@ma-renaud]: https://github.com/ma-renaud [@michaeldel]: https://github.com/michaeldel @@ -161,7 +264,12 @@ Thanks! [@natpen]: https://github.com/natpen [@niklasmohrin]: https://github.com/niklasmohrin [@Plommonsorbet]: https://github.com/Plommonsorbet +[@rithvikvibhu]: https://github.com/rithvikvibhu [@SimplyDanny]: https://github.com/SimplyDanny +[@sondr3]: https://github.com/sondr3 +[@tomasfarias]: https://github.com/tomasfarias +[@tranzystorek-io]: https://github.com/tranzystorek-io +[@tveness]: https://github.com/tveness [@Voultapher]: https://github.com/Voultapher [v1.0.0]: https://github.com/dbrgn/tealdeer/compare/v0.4.0...v1.0.0 @@ -170,6 +278,7 @@ Thanks! [v1.3.0]: https://github.com/dbrgn/tealdeer/compare/v1.2.0...v1.3.0 [v1.4.0]: https://github.com/dbrgn/tealdeer/compare/v1.3.0...v1.4.0 [v1.4.1]: https://github.com/dbrgn/tealdeer/compare/v1.4.0...v1.4.1 +[v1.5.0]: https://github.com/dbrgn/tealdeer/compare/v1.4.1...v1.5.0 [i34]: https://github.com/dbrgn/tealdeer/issues/34 [i43]: https://github.com/dbrgn/tealdeer/issues/43 @@ -191,8 +300,29 @@ Thanks! [i95]: https://github.com/dbrgn/tealdeer/issues/95 [i97]: https://github.com/dbrgn/tealdeer/issues/97 [i99]: https://github.com/dbrgn/tealdeer/issues/99 +[i108]: https://github.com/dbrgn/tealdeer/pull/108 [i111]: https://github.com/dbrgn/tealdeer/issues/111 [i112]: https://github.com/dbrgn/tealdeer/issues/112 [i113]: https://github.com/dbrgn/tealdeer/issues/113 [i115]: https://github.com/dbrgn/tealdeer/issues/115 +[i125]: https://github.com/dbrgn/tealdeer/pull/125 [i138]: https://github.com/dbrgn/tealdeer/issues/138 +[i142]: https://github.com/dbrgn/tealdeer/pull/142 +[i148]: https://github.com/dbrgn/tealdeer/pull/148 +[i157]: https://github.com/dbrgn/tealdeer/pull/157 +[i161]: https://github.com/dbrgn/tealdeer/pull/161 +[i162]: https://github.com/dbrgn/tealdeer/pull/162 +[i163]: https://github.com/dbrgn/tealdeer/pull/163 +[i168]: https://github.com/dbrgn/tealdeer/pull/168 +[i171]: https://github.com/dbrgn/tealdeer/pull/171 +[i174]: https://github.com/dbrgn/tealdeer/pull/174 +[i176]: https://github.com/dbrgn/tealdeer/pull/176 +[i187]: https://github.com/dbrgn/tealdeer/pull/187 +[i190]: https://github.com/dbrgn/tealdeer/issues/190 +[i197]: https://github.com/dbrgn/tealdeer/pull/197 +[i210]: https://github.com/dbrgn/tealdeer/pull/210 +[i213]: https://github.com/dbrgn/tealdeer/pull/213 +[i215]: https://github.com/dbrgn/tealdeer/pull/215 +[i217]: https://github.com/dbrgn/tealdeer/pull/217 +[i227]: https://github.com/dbrgn/tealdeer/pull/227 +[i240]: https://github.com/dbrgn/tealdeer/pull/240 diff --git a/Cargo.lock b/Cargo.lock index 692eb44..0c55e8f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1275,7 +1275,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.4.1" +version = "1.5.0" dependencies = [ "ansi_term", "app_dirs2", diff --git a/Cargo.toml b/Cargo.toml index 9ea2c9d..22c9ca3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ name = "tealdeer" readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" documentation = "https://dbrgn.github.io/tealdeer/" -version = "1.4.1" +version = "1.5.0" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "/bash_tealdeer", "/fish_tealdeer"] edition = "2018" diff --git a/RELEASING.md b/RELEASING.md index 28ccc28..6eb868c 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -14,6 +14,10 @@ Update version numbers: $ vim Cargo.toml $ cargo update -p tealdeer +Update docs: + + $ cargo run -- --help > docs/src/usage.txt + Update changelog: $ vim CHANGELOG.md @@ -28,6 +32,4 @@ Publish: $ cargo publish $ git push && git push --tags -Create release binaries: - - $ ./release-build.sh +Then publish the release on GitHub. diff --git a/docs/src/usage.txt b/docs/src/usage.txt index d410139..8e7ae5b 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -1,4 +1,4 @@ -tealdeer 1.4.1 +tealdeer 1.5.0 Danilo Bargen , Niklas Mohrin A fast TLDR client From 8228d3145107d7e6429f23125abb0c31d6757b4c Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 1 Jan 2022 14:43:58 +0100 Subject: [PATCH 195/368] upload-asset script: Change release name --- scripts/upload-asset.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upload-asset.sh b/scripts/upload-asset.sh index 7f0a9c3..4f9de09 100644 --- a/scripts/upload-asset.sh +++ b/scripts/upload-asset.sh @@ -29,7 +29,7 @@ create_release() { --header "Authorization: Bearer $token" \ --header "Content-Type:application/json" \ "https://api.github.com/repos/$repo/releases" \ - -d '{"tag_name":"'"$tag"'","name":"'"${tag/v/Release }"'","draft":true,"body":"'"${description/\"/\\\"}"'"}' + -d '{"tag_name":"'"$tag"'","name":"'"${tag/v/Version }"'","draft":true,"body":"'"${description/\"/\\\"}"'"}' ) if [ "$http_code" == "201" ]; then echo "Release for tag $tag created." From b09f25037045b4c7b04e26fda8007a3f639696aa Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 1 Jan 2022 15:10:20 +0100 Subject: [PATCH 196/368] Use clap 3 stable (#243) --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0c55e8f..e8e1073 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,9 +130,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.0.0-rc.11" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f243c7279f09ffed852a0a564c72091331651484cdbb32b7287f16df8611a7" +checksum = "d17bf219fcd37199b9a29e00ba65dfb8cd5b2688b7297ec14ff829c40ac50ca9" dependencies = [ "atty", "bitflags", @@ -147,9 +147,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.0.0-rc.11" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd9992739777a4a23535089a8d235eac43044ba8b431d9f54fe334dfa779930" +checksum = "e1b9752c030a14235a0bd5ef3ad60a1dcac8468c30921327fc8af36b20c790b9" dependencies = [ "heck", "proc-macro-error", diff --git a/Cargo.toml b/Cargo.toml index 22c9ca3..45a2f5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ path = "src/main.rs" ansi_term = "0.12.0" app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" -clap = { version = "=3.0.0-rc.11", features = ["std", "derive", "suggestions", "color"], default-features = false } +clap = { version = "3", features = ["std", "derive", "suggestions", "color"], default-features = false } env_logger = { version = "0.9", optional = true } log = "0.4" reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls", "rustls-tls-native-roots"], default-features = false } From 47a4d6d7ca3be54aca13c183127e4aedb5e486d1 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Jan 2022 02:04:52 +0100 Subject: [PATCH 197/368] Docs: Remove note about patch concatenation (#245) --- docs/src/usage_custom_pages.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/src/usage_custom_pages.md b/docs/src/usage_custom_pages.md index bdae7a9..d3d1e81 100644 --- a/docs/src/usage_custom_pages.md +++ b/docs/src/usage_custom_pages.md @@ -33,9 +33,6 @@ want to extend it with your own examples that you frequently need. In this case, use a file called `.patch`, it will be appended to existing pages. -> **Note:** Because the patch file will be concatenated directly to the page -> file, it needs to start with an empty line. - Path: $CUSTOM_PAGES_DIR/.patch From eadfe973351bce9624e0b55a2a2e94cd42f1311f Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Jan 2022 20:51:44 +0100 Subject: [PATCH 198/368] CHANGELOG: Mention the switch to Rustls --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdf6e5e..5546cc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ Changes: - [fixed] Create cache directory path if it does not exist ([#174][i174]) - [fixed] Use default style if user-defined style is missing ([#210][i210]) - [changed] Switch from docopt to clap for argument parsing ([#108][i108]) +- [changed] Switch from OpenSSL to Rustls ([#187][i187]) - [changed] Performance improvements ([#187][i187]) - [changed] Send all progress logging messages to stderr ([#171][i171]) - [changed] Rename `-o/--os` to `-p/--platform` ([#217][i217]) From 84277cc31ef93cbd9767fe502d89d2675be261e7 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 8 Jan 2022 22:01:36 +0100 Subject: [PATCH 199/368] Cache: Return error if HTTP client cannot be created (#247) Apparently `Client::new` can panic (see #244), so let's return the error instead. --- src/cache.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cache.rs b/src/cache.rs index 87db30c..2eef24a 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -153,7 +153,9 @@ impl Cache { builder = builder.proxy(proxy); } } - let client = builder.build().unwrap_or_else(|_| Client::new()); + let client = builder.build().map_err(|e| { + TealdeerError::UpdateError(format!("Could not instantiate HTTP client: {}", e)) + })?; let mut resp = client.get(&self.url).send()?; let mut buf: Vec = vec![]; let bytes_downloaded = resp.copy_to(&mut buf)?; From 9e97d454f090fc2b3dcd30a0fc9d2a68f130bac0 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Jan 2022 20:13:17 +0100 Subject: [PATCH 200/368] Add anyhow dependency --- Cargo.lock | 7 +++++++ Cargo.toml | 1 + 2 files changed, 8 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index e8e1073..12da210 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -26,6 +26,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "anyhow" +version = "1.0.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84450d0b4a8bd1ba4144ce8ce718fbc5d071358b1e5384bace6536b3d1f2d5b3" + [[package]] name = "app_dirs2" version = "2.3.3" @@ -1278,6 +1284,7 @@ name = "tealdeer" version = "1.5.0" dependencies = [ "ansi_term", + "anyhow", "app_dirs2", "assert_cmd", "atty", diff --git a/Cargo.toml b/Cargo.toml index 45a2f5d..82d7cc1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,7 @@ path = "src/main.rs" [dependencies] ansi_term = "0.12.0" +anyhow = "1" app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" clap = { version = "3", features = ["std", "derive", "suggestions", "color"], default-features = false } From 405a2c9c8f09facb658975067b81171201348b55 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Jan 2022 20:13:52 +0100 Subject: [PATCH 201/368] Port config module to anyhow results --- src/config.rs | 87 +++++++++++++++++++++------------------------------ src/error.rs | 4 +-- src/main.rs | 31 ++++-------------- src/utils.rs | 11 +++++++ 4 files changed, 53 insertions(+), 80 deletions(-) diff --git a/src/config.rs b/src/config.rs index 32e902e..60c8879 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,19 +1,17 @@ use std::{ env, fs, - io::{Error as IoError, Read, Write}, + io::{Read, Write}, path::PathBuf, time::Duration, }; use ansi_term::{Color, Style}; +use anyhow::{ensure, Context, Result}; use app_dirs::{get_app_root, AppDataType}; use log::debug; use serde_derive::{Deserialize, Serialize}; -use crate::{ - error::TealdeerError::{self, ConfigError}, - types::PathSource, -}; +use crate::types::PathSource; pub const CONFIG_FILE_NAME: &str = "config.toml"; pub const MAX_CACHE_AGE: Duration = Duration::from_secs(2_592_000); // 30 days @@ -278,32 +276,24 @@ impl From for Config { } } -#[allow(clippy::needless_pass_by_value)] -fn map_io_err_to_config_err(e: IoError) -> TealdeerError { - ConfigError(format!("Io Error: {}", e)) -} - impl Config { - pub fn load(enable_styles: bool) -> Result { + pub fn load(enable_styles: bool) -> Result { debug!("Loading config"); // Determine path - let (config_file_path, _) = get_config_path() - .map_err(|e| ConfigError(format!("Could not determine config path: {}", e)))?; + let (config_file_path, _) = get_config_path().context("Could not determine config path")?; // Load raw config let raw_config: RawConfig = if config_file_path.exists() && config_file_path.is_file() { - let mut config_file = - fs::File::open(&config_file_path).map_err(map_io_err_to_config_err)?; + let mut config_file = fs::File::open(&config_file_path).with_context(|| { + format!("Failed to open config file path at {:?}", &config_file_path) + })?; let mut contents = String::new(); - let _ = config_file - .read_to_string(&mut contents) - .map_err(map_io_err_to_config_err)?; - toml::from_str(&contents).map_err(|err| { - ConfigError(format!( - "Failed to parse config file at {:?}:\n{}", - config_file_path, err - )) + config_file.read_to_string(&mut contents).with_context(|| { + format!("Failed to read from config file at {:?}", &config_file_path) + })?; + toml::from_str(&contents).with_context(|| { + format!("Failed to parse TOML config file at {:?}", config_file_path) })? } else { RawConfig::new() @@ -334,7 +324,7 @@ impl Config { /// /// Note that this function does not verify whether the directory at that /// location exists, or is a directory. -pub fn get_config_dir() -> Result<(PathBuf, PathSource), TealdeerError> { +pub fn get_config_dir() -> Result<(PathBuf, PathSource)> { // Allow overriding the config directory by setting the // $TEALDEER_CONFIG_DIR env variable. if let Ok(value) = env::var("TEALDEER_CONFIG_DIR") { @@ -342,61 +332,54 @@ pub fn get_config_dir() -> Result<(PathBuf, PathSource), TealdeerError> { }; // Otherwise, fall back to the user config directory. - match get_app_root(AppDataType::UserConfig, &crate::APP_INFO) { - Ok(dirs) => Ok((dirs, PathSource::OsConvention)), - Err(_) => Err(ConfigError( - "Could not determine the user config directory.".into(), - )), - } + let dirs = get_app_root(AppDataType::UserConfig, &crate::APP_INFO) + .context("Failed to determine the user config directory")?; + Ok((dirs, PathSource::OsConvention)) } /// Return the path to the config file. /// /// Note that this function does not verify whether the file at that location /// exists, or is a file. -pub fn get_config_path() -> Result<(PathBuf, PathSource), TealdeerError> { +pub fn get_config_path() -> Result<(PathBuf, PathSource)> { let (config_dir, source) = get_config_dir()?; let config_file_path = config_dir.join(CONFIG_FILE_NAME); Ok((config_file_path, source)) } /// Create default config file. -pub fn make_default_config() -> Result { +pub fn make_default_config() -> Result { let (config_dir, _) = get_config_dir()?; // Ensure that config directory exists - if !config_dir.exists() { - if let Err(e) = fs::create_dir_all(&config_dir) { - return Err(ConfigError(format!( - "Could not create config directory: {}", - e - ))); - } - } else if !config_dir.is_dir() { - return Err(ConfigError(format!( + if config_dir.exists() { + ensure!( + config_dir.is_dir(), "Config directory could not be created: {} already exists but is not a directory", config_dir.to_string_lossy(), - ))); + ); + } else { + fs::create_dir_all(&config_dir).context("Could not create config directory")?; } // Ensure that a config file doesn't get overwritten let config_file_path = config_dir.join(CONFIG_FILE_NAME); - if config_file_path.is_file() { - return Err(ConfigError(format!( - "A configuration file already exists at {}, no action was taken.", - config_file_path.to_str().unwrap() - ))); - } + ensure!( + !config_file_path.is_file(), + "A configuration file already exists at {}, no action was taken.", + config_file_path.to_str().unwrap() + ); // Create default config - let serialized_config = toml::to_string(&RawConfig::new()) - .map_err(|err| ConfigError(format!("Failed to serialize default config: {}", err)))?; + let serialized_config = + toml::to_string(&RawConfig::new()).context("Failed to serialize default config")?; // Write default config - let mut config_file = fs::File::create(&config_file_path).map_err(map_io_err_to_config_err)?; + let mut config_file = + fs::File::create(&config_file_path).context("Could not create config file")?; let _wc = config_file .write(serialized_config.as_bytes()) - .map_err(map_io_err_to_config_err)?; + .context("Could not write to config file")?; Ok(config_file_path) } diff --git a/src/error.rs b/src/error.rs index 548c39f..77169e6 100644 --- a/src/error.rs +++ b/src/error.rs @@ -2,11 +2,11 @@ use std::fmt; use reqwest::Error as ReqwestError; + #[derive(Debug)] #[allow(clippy::enum_variant_names)] pub enum TealdeerError { CacheError(String), - ConfigError(String), UpdateError(String), WriteError(String), } @@ -15,7 +15,6 @@ impl TealdeerError { pub fn message(&self) -> &str { match self { Self::CacheError(msg) - | Self::ConfigError(msg) | Self::UpdateError(msg) | Self::WriteError(msg) => msg, } @@ -32,7 +31,6 @@ impl fmt::Display for TealdeerError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { Self::CacheError(e) => write!(f, "CacheError: {}", e), - Self::ConfigError(e) => write!(f, "ConfigError: {}", e), Self::UpdateError(e) => write!(f, "UpdateError: {}", e), Self::WriteError(e) => write!(f, "WriteError: {}", e), } diff --git a/src/main.rs b/src/main.rs index e6d79df..3644361 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,11 +37,10 @@ mod utils; use crate::{ cache::{Cache, CacheFreshness, PageLookupResult, TLDR_PAGES_DIR}, config::{get_config_dir, get_config_path, make_default_config, Config}, - error::TealdeerError::ConfigError, extensions::Dedup, output::print_page, types::{ColorOptions, PlatformType}, - utils::{print_error, print_warning}, + utils::{print_anyhow_error, print_error, print_warning}, }; const NAME: &str = "tealdeer"; @@ -242,15 +241,8 @@ fn show_config_path(enable_styles: bool) { Ok((config_file_path, _)) => { println!("Config path is: {}", config_file_path.to_str().unwrap()); } - Err(ConfigError(msg)) => { - print_error( - enable_styles, - &format!("Could not look up config_path: {}", msg), - ); - process::exit(1); - } - Err(_) => { - print_error(enable_styles, "Unknown error"); + Err(e) => { + print_anyhow_error(enable_styles, &e.context("Could not look up config path")); process::exit(1); } } @@ -316,15 +308,8 @@ fn create_config_and_exit(enable_styles: bool) { ); process::exit(0); } - Err(ConfigError(msg)) => { - print_error( - enable_styles, - &format!("Could not create seed config: {}", msg), - ); - process::exit(1); - } - Err(_) => { - print_error(enable_styles, "Unknown error"); + Err(e) => { + print_anyhow_error(enable_styles, &e); process::exit(1); } } @@ -428,12 +413,8 @@ fn main() { // Look up config file, if none is found fall back to default config. let config = match Config::load(enable_styles) { Ok(config) => config, - Err(ConfigError(msg)) => { - print_error(enable_styles, &format!("Could not load config: {}", msg)); - process::exit(1); - } Err(e) => { - print_error(enable_styles, &format!("Could not load config: {}", e)); + print_anyhow_error(enable_styles, &e.context("Could not load config")); process::exit(1); } }; diff --git a/src/utils.rs b/src/utils.rs index e6f65f5..912e147 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -12,6 +12,17 @@ pub fn print_error(enable_styles: bool, message: &str) { print_msg(enable_styles, message, "Error: ", Color::Red); } +/// Print an anyhow error to stderr. If `enable_styles` is true, then a red +/// message will be printed. +pub fn print_anyhow_error(enable_styles: bool, error: &anyhow::Error) { + print_msg( + enable_styles, + &format!("{:?}", error), + "Error: ", + Color::Red, + ); +} + fn print_msg(enable_styles: bool, message: &str, prefix: &'static str, color: Color) { if enable_styles { let style = Style::new().fg(color); From fd307757d71ec68fec8c63938490b8266753fd31 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Jan 2022 20:17:22 +0100 Subject: [PATCH 202/368] Port cache and output modules to anyhow results --- src/cache.rs | 116 ++++++++++++++++++++++++-------------------------- src/error.rs | 15 ------- src/main.rs | 31 +++++--------- src/output.rs | 20 ++++----- src/utils.rs | 8 +--- tests/lib.rs | 2 +- 6 files changed, 77 insertions(+), 115 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 2eef24a..457d68e 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -4,19 +4,17 @@ use std::{ fs::{self, File}, io::{BufReader, Cursor, Read, Seek}, path::{Path, PathBuf}, + time::{Duration, SystemTime}, }; +use anyhow::{ensure, Context, Result}; use app_dirs::{get_app_root, AppDataType}; use log::debug; use reqwest::{blocking::Client, Proxy}; -use std::time::{Duration, SystemTime}; use walkdir::{DirEntry, WalkDir}; use zip::ZipArchive; -use crate::{ - error::TealdeerError::{self, CacheError, UpdateError}, - types::{PathSource, PlatformType}, -}; +use crate::types::{PathSource, PlatformType}; static CACHE_DIR_ENV_VAR: &str = "TEALDEER_CACHE_DIR"; @@ -53,16 +51,16 @@ impl PageLookupResult { /// /// This will return an error if either the page file or the patch file /// cannot be opened. - pub fn reader(&self) -> Result>, String> { + pub fn reader(&self) -> Result>> { // Open page file let page_file = File::open(&self.page_path) - .map_err(|msg| format!("Could not open page file at {:?}: {}", self.page_path, msg))?; + .with_context(|| format!("Could not open page file at {:?}", self.page_path))?; // Open patch file let patch_file_opt = match &self.patch_path { Some(path) => Some( File::open(path) - .map_err(|msg| format!("Could not open patch file at {:?}: {}", path, msg))?, + .with_context(|| format!("Could not open patch file at {:?}", path))?, ), None => None, }; @@ -102,26 +100,25 @@ impl Cache { } /// Return the path to the cache directory. - pub fn get_cache_dir() -> Result<(PathBuf, PathSource), TealdeerError> { + pub fn get_cache_dir() -> Result<(PathBuf, PathSource)> { // Allow overriding the cache directory by setting the env variable. if let Ok(value) = env::var(CACHE_DIR_ENV_VAR) { let path = PathBuf::from(value); let (path_exists, path_is_dir) = path .metadata() .map_or((false, false), |md| (true, md.is_dir())); - if path_exists && !path_is_dir { - return Err(CacheError(format!( - "Path specified by ${} is not a directory.", - CACHE_DIR_ENV_VAR - ))); - } + ensure!( + !path_exists || path_is_dir, + "Path specified by ${} is not a directory", + CACHE_DIR_ENV_VAR + ); if !path_exists { // Try to create the complete directory path. - fs::create_dir_all(&path).map_err(|_| { - CacheError(format!( - "Directory path specified by ${} cannot be created.", + fs::create_dir_all(&path).with_context(|| { + format!( + "Directory path specified by ${} cannot be created", CACHE_DIR_ENV_VAR - )) + ) })?; eprintln!( "Successfully created cache directory path `{}`.", @@ -132,16 +129,13 @@ impl Cache { }; // Otherwise, fall back to user cache directory. - match get_app_root(AppDataType::UserCache, &crate::APP_INFO) { - Ok(dirs) => Ok((dirs, PathSource::OsConvention)), - Err(_) => Err(CacheError( - "Could not determine user cache directory.".into(), - )), - } + let dirs = get_app_root(AppDataType::UserCache, &crate::APP_INFO) + .context("Could not determine user cache directory")?; + Ok((dirs, PathSource::OsConvention)) } /// Download the archive - fn download(&self) -> Result, TealdeerError> { + fn download(&self) -> Result> { let mut builder = Client::builder(); if let Ok(ref host) = env::var("HTTP_PROXY") { if let Ok(proxy) = Proxy::http(host) { @@ -153,9 +147,9 @@ impl Cache { builder = builder.proxy(proxy); } } - let client = builder.build().map_err(|e| { - TealdeerError::UpdateError(format!("Could not instantiate HTTP client: {}", e)) - })?; + let client = builder + .build() + .context("Could not instantiate HTTP client")?; let mut resp = client.get(&self.url).send()?; let mut buf: Vec = vec![]; let bytes_downloaded = resp.copy_to(&mut buf)?; @@ -169,7 +163,7 @@ impl Cache { } /// Update the pages cache. - pub fn update(&self) -> Result<(), TealdeerError> { + pub fn update(&self) -> Result<()> { // First, download the compressed data let bytes: Vec = self.download()?; @@ -182,8 +176,7 @@ impl Cache { // Make sure that cache directory exists debug!("Ensure cache directory {:?} exists", &cache_dir); - fs::create_dir_all(&cache_dir) - .map_err(|e| UpdateError(format!("Could not create cache directory: {}", e)))?; + fs::create_dir_all(&cache_dir).context("Could not create cache directory")?; // Clear cache directory // Note: This is not the best solution. Ideally we would download the @@ -191,12 +184,12 @@ impl Cache { // But renaming a directory doesn't work across filesystems and Rust // does not yet offer a recursive directory copying function. So for // now, we'll use this approach. - Self::clear()?; + Self::clear().context("Could not clear the cache directory")?; // Extract archive archive .extract(&pages_dir) - .map_err(|e| UpdateError(format!("Could not unpack compressed data: {}", e)))?; + .context("Could not unpack compressed data")?; Ok(()) } @@ -308,7 +301,7 @@ impl Cache { } /// Return the available pages. - pub fn list_pages(&self) -> Result, TealdeerError> { + pub fn list_pages(&self) -> Result> { // Determine platforms directory and platform let (cache_dir, _) = Self::get_cache_dir()?; let platforms_dir = cache_dir.join(TLDR_PAGES_DIR).join("pages"); @@ -353,35 +346,36 @@ impl Cache { } /// Delete the cache directory. - pub fn clear() -> Result<(), TealdeerError> { + pub fn clear() -> Result<()> { let (path, _) = Self::get_cache_dir()?; - if path.exists() && path.is_dir() { - // Delete old tldr-pages cache location as well if present - // TODO: To be removed in the future - for pages_dir_name in [TLDR_PAGES_DIR, TLDR_OLD_PAGES_DIR] { - let pages_dir = path.join(pages_dir_name); - if pages_dir.exists() { - fs::remove_dir_all(&pages_dir).map_err(|e| { - CacheError(format!( - "Could not remove cache directory ({}): {}", - pages_dir.display(), - e - )) - })?; - } + // Check preconditions + ensure!( + path.exists(), + "Cache path ({}) does not exist.", + path.display(), + ); + ensure!( + path.is_dir(), + "Cache path ({}) is not a directory.", + path.display() + ); + + // Delete old tldr-pages cache location as well if present + // TODO: To be removed in the future + for pages_dir_name in [TLDR_PAGES_DIR, TLDR_OLD_PAGES_DIR] { + let pages_dir = path.join(pages_dir_name); + + if pages_dir.exists() { + fs::remove_dir_all(&pages_dir).with_context(|| { + format!( + "Could not remove the cache directory at {}", + pages_dir.display() + ) + })?; } - } else if path.exists() { - return Err(CacheError(format!( - "Cache path ({}) is not a directory.", - path.display() - ))); - } else { - return Err(CacheError(format!( - "Cache path ({}) does not exist.", - path.display() - ))); - }; + } + Ok(()) } } diff --git a/src/error.rs b/src/error.rs index 77169e6..4a1b0b3 100644 --- a/src/error.rs +++ b/src/error.rs @@ -2,23 +2,10 @@ use std::fmt; use reqwest::Error as ReqwestError; - #[derive(Debug)] #[allow(clippy::enum_variant_names)] pub enum TealdeerError { - CacheError(String), UpdateError(String), - WriteError(String), -} - -impl TealdeerError { - pub fn message(&self) -> &str { - match self { - Self::CacheError(msg) - | Self::UpdateError(msg) - | Self::WriteError(msg) => msg, - } - } } impl From for TealdeerError { @@ -30,9 +17,7 @@ impl From for TealdeerError { impl fmt::Display for TealdeerError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { - Self::CacheError(e) => write!(f, "CacheError: {}", e), Self::UpdateError(e) => write!(f, "UpdateError: {}", e), - Self::WriteError(e) => write!(f, "WriteError: {}", e), } } } diff --git a/src/main.rs b/src/main.rs index 3644361..25f31e4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -40,7 +40,7 @@ use crate::{ extensions::Dedup, output::print_page, types::{ColorOptions, PlatformType}, - utils::{print_anyhow_error, print_error, print_warning}, + utils::{print_error, print_warning}, }; const NAME: &str = "tealdeer"; @@ -210,10 +210,7 @@ fn check_cache(args: &Args, enable_styles: bool) -> CheckCacheResult { /// Clear the cache fn clear_cache(quietly: bool, enable_styles: bool) { Cache::clear().unwrap_or_else(|e| { - print_error( - enable_styles, - &format!("Could not delete cache: {}", e.message()), - ); + print_error(enable_styles, &e.context("Could not clear cache")); process::exit(1); }); if !quietly { @@ -224,10 +221,7 @@ fn clear_cache(quietly: bool, enable_styles: bool) { /// Update the cache fn update_cache(cache: &Cache, quietly: bool, enable_styles: bool) { cache.update().unwrap_or_else(|e| { - print_error( - enable_styles, - &format!("Could not update cache: {}", e.message()), - ); + print_error(enable_styles, &e.context("Could not update cache")); process::exit(1); }); if !quietly { @@ -242,7 +236,7 @@ fn show_config_path(enable_styles: bool) { println!("Config path is: {}", config_file_path.to_str().unwrap()); } Err(e) => { - print_anyhow_error(enable_styles, &e.context("Could not look up config path")); + print_error(enable_styles, &e.context("Could not look up config path")); process::exit(1); } } @@ -309,7 +303,7 @@ fn create_config_and_exit(enable_styles: bool) { process::exit(0); } Err(e) => { - print_anyhow_error(enable_styles, &e); + print_error(enable_styles, &e); process::exit(1); } } @@ -414,7 +408,7 @@ fn main() { let config = match Config::load(enable_styles) { Ok(config) => config, Err(e) => { - print_anyhow_error(enable_styles, &e.context("Could not load config")); + print_error(enable_styles, &e.context("Could not load config")); process::exit(1); } }; @@ -440,8 +434,8 @@ fn main() { // If a local file was passed in, render it and exit if let Some(file) = args.render { let path = PageLookupResult::with_page(file); - if let Err(msg) = print_page(&path, args.raw, &config) { - print_error(enable_styles, &msg); + if let Err(ref e) = print_page(&path, args.raw, &config) { + print_error(enable_styles, e); process::exit(1); } else { process::exit(0); @@ -476,10 +470,7 @@ fn main() { if args.list { // Get list of pages let pages = cache.list_pages().unwrap_or_else(|e| { - print_error( - enable_styles, - &format!("Could not get list of pages: {}", e.message()), - ); + print_error(enable_styles, &e.context("Could not get list of pages")); process::exit(1); }); @@ -506,8 +497,8 @@ fn main() { &languages, config.directories.custom_pages_dir.as_deref(), ) { - if let Err(msg) = print_page(&lookup_result, args.raw, &config) { - print_error(enable_styles, &msg); + if let Err(ref e) = print_page(&lookup_result, args.raw, &config) { + print_error(enable_styles, e); process::exit(1); } process::exit(0); diff --git a/src/output.rs b/src/output.rs index cad0690..44464dd 100644 --- a/src/output.rs +++ b/src/output.rs @@ -2,10 +2,11 @@ use std::io::{self, BufRead, Write}; +use anyhow::{Context, Result}; + use crate::{ cache::PageLookupResult, config::{Config, StyleConfig}, - error::TealdeerError::WriteError, formatter::{highlight_lines, PageSnippet}, line_iterator::LineIterator, }; @@ -15,7 +16,7 @@ pub fn print_page( lookup_result: &PageLookupResult, enable_markdown: bool, config: &Config, -) -> Result<(), String> { +) -> Result<()> { // Create reader from file(s) let reader = lookup_result.reader()?; @@ -26,8 +27,8 @@ pub fn print_page( if enable_markdown { // Print the raw markdown of the file. for line in reader.lines() { - writeln!(handle, "{}", line.unwrap()) - .map_err(|_| "Could not write to stdout".to_string())?; + let line = line.context("Error while reading from a page")?; + writeln!(handle, "{}", line).context("Could not write to stdout")?; } } else { // Closure that processes a page snippet and writes it to stdout @@ -35,8 +36,7 @@ pub fn print_page( if snip.is_empty() { Ok(()) } else { - print_snippet(&mut handle, snip, &config.style) - .map_err(|e| WriteError(e.to_string())) + print_snippet(&mut handle, snip, &config.style).context("Failed to print snippet") } }; @@ -46,13 +46,11 @@ pub fn print_page( &mut process_snippet, !config.display.compact, ) - .map_err(|e| format!("Could not write to stdout: {}", e.message()))?; + .context("Could not write to stdout")?; }; // We're done outputting data, flush stdout now! - handle - .flush() - .map_err(|_| "Could not flush stdout".to_string())?; + handle.flush().context("Could not flush stdout")?; Ok(()) } @@ -61,7 +59,7 @@ fn print_snippet( writer: &mut impl Write, snip: PageSnippet<'_>, style: &StyleConfig, -) -> Result<(), io::Error> { +) -> io::Result<()> { use PageSnippet::*; match snip { diff --git a/src/utils.rs b/src/utils.rs index 912e147..b47d9f6 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -6,15 +6,9 @@ pub fn print_warning(enable_styles: bool, message: &str) { print_msg(enable_styles, message, "Warning: ", Color::Yellow); } -/// Print an error to stderr. If `enable_styles` is true, then a red message -/// will be printed. -pub fn print_error(enable_styles: bool, message: &str) { - print_msg(enable_styles, message, "Error: ", Color::Red); -} - /// Print an anyhow error to stderr. If `enable_styles` is true, then a red /// message will be printed. -pub fn print_anyhow_error(enable_styles: bool, error: &anyhow::Error) { +pub fn print_error(enable_styles: bool, error: &anyhow::Error) { print_msg( enable_styles, &format!("{:?}", error), diff --git a/tests/lib.rs b/tests/lib.rs index dd03135..0f3128e 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -263,7 +263,7 @@ fn test_cache_location_not_a_directory() { .assert() .failure() .stderr(contains(format!( - "Path specified by ${} is not a directory.", + "Path specified by ${} is not a directory", CACHE_DIR_ENV_VAR ))); } From 52622348466aaf0670162f7940bdf4083b2e2270 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Jan 2022 20:20:48 +0100 Subject: [PATCH 203/368] Remove error module and clean up --- src/error.rs | 23 ----------------------- src/formatter.rs | 4 ++-- src/main.rs | 3 +-- src/types.rs | 11 ++++++----- 4 files changed, 9 insertions(+), 32 deletions(-) delete mode 100644 src/error.rs diff --git a/src/error.rs b/src/error.rs deleted file mode 100644 index 4a1b0b3..0000000 --- a/src/error.rs +++ /dev/null @@ -1,23 +0,0 @@ -use std::fmt; - -use reqwest::Error as ReqwestError; - -#[derive(Debug)] -#[allow(clippy::enum_variant_names)] -pub enum TealdeerError { - UpdateError(String), -} - -impl From for TealdeerError { - fn from(err: ReqwestError) -> Self { - Self::UpdateError(format!("HTTP error: {}", err.to_string())) - } -} - -impl fmt::Display for TealdeerError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match self { - Self::UpdateError(e) => write!(f, "UpdateError: {}", e), - } - } -} diff --git a/src/formatter.rs b/src/formatter.rs index 9789975..c87d39b 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -1,9 +1,9 @@ //! Functions related to formatting and printing lines from a `Tokenizer`. -use crate::{extensions::FindFrom, types::LineType}; - use log::debug; +use crate::{extensions::FindFrom, types::LineType}; + #[derive(Debug, Clone, Copy, PartialEq, Eq)] /// Represents a snippet from a page of a specific highlighting class. pub enum PageSnippet<'a> { diff --git a/src/main.rs b/src/main.rs index 25f31e4..a7d376d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,6 @@ use pager::Pager; mod cache; mod config; -mod error; pub mod extensions; mod formatter; mod line_iterator; @@ -303,7 +302,7 @@ fn create_config_and_exit(enable_styles: bool) { process::exit(0); } Err(e) => { - print_error(enable_styles, &e); + print_error(enable_styles, &e.context("Could not create seed config")); process::exit(1); } } diff --git a/src/types.rs b/src/types.rs index 3981776..f80aa98 100644 --- a/src/types.rs +++ b/src/types.rs @@ -2,6 +2,7 @@ use std::{fmt, str}; +use anyhow::{anyhow, Result}; use serde_derive::{Deserialize, Serialize}; #[derive(Debug, Eq, PartialEq, Copy, Clone, Serialize, Deserialize)] @@ -26,7 +27,7 @@ impl fmt::Display for PlatformType { } impl str::FromStr for PlatformType { - type Err = String; + type Err = anyhow::Error; fn from_str(s: &str) -> Result { match s { @@ -34,7 +35,7 @@ impl str::FromStr for PlatformType { "osx" | "macos" => Ok(Self::OsX), "sunos" => Ok(Self::SunOs), "windows" => Ok(Self::Windows), - other => Err(format!( + other => Err(anyhow!( "Unknown OS: {}. Possible values: linux, macos, osx, sunos, windows", other )), @@ -87,14 +88,14 @@ pub enum ColorOptions { } impl str::FromStr for ColorOptions { - type Err = String; + type Err = anyhow::Error; - fn from_str(s: &str) -> Result { + fn from_str(s: &str) -> Result { match s { "always" => Ok(Self::Always), "auto" => Ok(Self::Auto), "never" => Ok(Self::Never), - other => Err(format!( + other => Err(anyhow!( "Unknown color option: {}. Possible values: always, auto, never", other )), From 82e4b97f92083407b46939d0d8db0317cb8e9060 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Sun, 5 Dec 2021 21:11:31 +0100 Subject: [PATCH 204/368] Move pager configuration near render logic --- src/main.rs | 24 ++++-------------------- src/output.rs | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/main.rs b/src/main.rs index a7d376d..a37715f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,8 +21,6 @@ use std::{env, path::PathBuf, process}; use app_dirs::AppInfo; use atty::Stream; use clap::{AppSettings, ArgGroup, Parser}; -#[cfg(not(target_os = "windows"))] -use pager::Pager; mod cache; mod config; @@ -155,17 +153,6 @@ struct Args { version: bool, } -/// Set up display pager -#[cfg(not(target_os = "windows"))] -fn configure_pager(_: bool) { - Pager::with_default_pager("less -R").setup(); -} - -#[cfg(target_os = "windows")] -fn configure_pager(enable_styles: bool) { - print_warning(enable_styles, "--pager flag not available on Windows!"); -} - /// The cache should get updated if this was requested by the user, or if auto /// updates are enabled and the cache age is longer than the auto update interval. fn should_update_cache(args: &Args, config: &Config) -> bool { @@ -412,11 +399,6 @@ fn main() { } }; - // Set up pager - if args.pager || config.display.use_pager { - configure_pager(enable_styles); - } - // Show various paths if args.show_paths { show_paths(&config); @@ -433,7 +415,7 @@ fn main() { // If a local file was passed in, render it and exit if let Some(file) = args.render { let path = PageLookupResult::with_page(file); - if let Err(ref e) = print_page(&path, args.raw, &config) { + if let Err(ref e) = print_page(&path, args.raw, enable_styles, args.pager, &config) { print_error(enable_styles, e); process::exit(1); } else { @@ -496,7 +478,9 @@ fn main() { &languages, config.directories.custom_pages_dir.as_deref(), ) { - if let Err(ref e) = print_page(&lookup_result, args.raw, &config) { + if let Err(ref e) = + print_page(&lookup_result, args.raw, enable_styles, args.pager, &config) + { print_error(enable_styles, e); process::exit(1); } diff --git a/src/output.rs b/src/output.rs index 44464dd..288dc37 100644 --- a/src/output.rs +++ b/src/output.rs @@ -11,15 +11,34 @@ use crate::{ line_iterator::LineIterator, }; +// Set up display pager +#[cfg(not(target_os = "windows"))] +fn configure_pager(_: bool) { + pager::Pager::with_default_pager("less -R").setup(); +} + +#[cfg(target_os = "windows")] +fn configure_pager(enable_styles: bool) { + use crate::utils::print_warning; + print_warning(enable_styles, "--pager flag not available on Windows!"); +} + /// Print page by path pub fn print_page( lookup_result: &PageLookupResult, enable_markdown: bool, + enable_styles: bool, + use_pager: bool, config: &Config, ) -> Result<()> { // Create reader from file(s) let reader = lookup_result.reader()?; + // Configure pager if applicable + if use_pager || config.display.use_pager { + configure_pager(enable_styles); + } + // Lock stdout only once, this improves performance considerably let stdout = io::stdout(); let mut handle = stdout.lock(); From 4a9763a78335ddea8d6c5614a739318a7c266d05 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Sun, 9 Jan 2022 01:43:06 +0100 Subject: [PATCH 205/368] Ensure that pager configuration is run at most once --- src/output.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/output.rs b/src/output.rs index 288dc37..e09481e 100644 --- a/src/output.rs +++ b/src/output.rs @@ -11,10 +11,14 @@ use crate::{ line_iterator::LineIterator, }; -// Set up display pager +/// Set up display pager +/// +/// SAFETY: this function may be called multiple times #[cfg(not(target_os = "windows"))] fn configure_pager(_: bool) { - pager::Pager::with_default_pager("less -R").setup(); + use std::sync::Once; + static INIT: Once = Once::new(); + INIT.call_once(|| pager::Pager::with_default_pager("less -R").setup()); } #[cfg(target_os = "windows")] From 71b6e037a7488cfbacc343ddc5a2a83252df2449 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 9 Jan 2022 15:20:50 +0100 Subject: [PATCH 206/368] When decompressing ZIP fails, propagate error Do not unwrap. Instead, propagate the error with a anyhow context. --- src/cache.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 457d68e..3760067 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -2,7 +2,7 @@ use std::{ env, ffi::OsStr, fs::{self, File}, - io::{BufReader, Cursor, Read, Seek}, + io::{BufReader, Cursor, Read}, path::{Path, PathBuf}, time::{Duration, SystemTime}, }; @@ -157,18 +157,14 @@ impl Cache { Ok(buf) } - /// Decompress and open the archive - fn decompress(reader: R) -> ZipArchive { - ZipArchive::new(reader).unwrap() - } - /// Update the pages cache. pub fn update(&self) -> Result<()> { // First, download the compressed data let bytes: Vec = self.download()?; // Decompress the response body into an `Archive` - let mut archive = Self::decompress(Cursor::new(bytes)); + let mut archive = ZipArchive::new(Cursor::new(bytes)) + .context("Could not decompress downloaded ZIP archive")?; // Determine paths let (cache_dir, _) = Self::get_cache_dir()?; From 77a6d483817862b4b284a2136b4a7ef5f6c94ebc Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 9 Jan 2022 15:23:49 +0100 Subject: [PATCH 207/368] Pages download: Check return status --- src/cache.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cache.rs b/src/cache.rs index 3760067..411a6dd 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -150,7 +150,11 @@ impl Cache { let client = builder .build() .context("Could not instantiate HTTP client")?; - let mut resp = client.get(&self.url).send()?; + let mut resp = client + .get(&self.url) + .send()? + .error_for_status() + .with_context(|| format!("Could not download tldr pages from {}", &self.url))?; let mut buf: Vec = vec![]; let bytes_downloaded = resp.copy_to(&mut buf)?; debug!("{} bytes downloaded", bytes_downloaded); From ef7432c76206df0e9cc8bbdf22735b3633d2d298 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Sun, 16 Jan 2022 16:45:11 +0800 Subject: [PATCH 208/368] Enforce default rustfmt settings (#257) --- rustfmt.toml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 rustfmt.toml diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..e69de29 From 3b4451f8fa352d8a9ffdb293d96ceab90f2d1c7c Mon Sep 17 00:00:00 2001 From: Danny Moesch Date: Wed, 19 Jan 2022 23:49:23 +0100 Subject: [PATCH 209/368] Move definition of CLI arguments and options into own file (#258) --- src/cli.rs | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main.rs | 112 ++------------------------------------------------- 2 files changed, 117 insertions(+), 108 deletions(-) create mode 100644 src/cli.rs diff --git a/src/cli.rs b/src/cli.rs new file mode 100644 index 0000000..38a451a --- /dev/null +++ b/src/cli.rs @@ -0,0 +1,113 @@ +//! Definition of the CLI arguments and options. + +use std::path::PathBuf; + +use clap::{AppSettings, ArgGroup, Parser}; + +use crate::types::{ColorOptions, PlatformType}; + +// Note: flag names are specified explicitly in clap attributes +// to improve readability and allow contributors to grep names like "clear-cache" +#[derive(Parser, Debug)] +#[clap(about = "A fast TLDR client", author, version)] +#[clap(setting = AppSettings::ArgRequiredElseHelp)] +#[clap(setting = AppSettings::DeriveDisplayOrder)] +#[clap(setting = AppSettings::DisableColoredHelp)] +#[clap( + after_help = "To view the user documentation, please visit https://dbrgn.github.io/tealdeer/." +)] +#[clap(group = ArgGroup::new("command_or_file").args(&["command", "render"]))] +pub(crate) struct Args { + /// The command to show (e.g. `tar` or `git log`) + #[clap(min_values = 1)] + pub command: Vec, + + /// List all commands in the cache + #[clap(short = 'l', long = "list")] + pub list: bool, + + /// Render a specific markdown file + #[clap( + short = 'f', + long = "render", + value_name = "FILE", + conflicts_with = "command" + )] + pub render: Option, + + /// Override the operating system + #[clap( + short = 'p', + long = "platform", + possible_values = ["linux", "macos", "windows", "sunos", "osx"], + )] + pub platform: Option, + + /// Deprecated alias of `platform` + #[clap( + short = 'o', + long = "os", + possible_values = ["linux", "macos", "windows", "sunos", "osx"], + hide = true + )] + pub os: Option, + + /// Override the language + #[clap(short = 'L', long = "language")] + pub language: Option, + + /// Update the local cache + #[clap(short = 'u', long = "update")] + pub update: bool, + + /// Clear the local cache + #[clap(short = 'c', long = "clear-cache")] + pub clear_cache: bool, + + /// Use a pager to page output + #[clap(long = "pager", requires = "command_or_file")] + pub pager: bool, + + /// Display the raw markdown instead of rendering it + #[clap(short = 'r', long = "--raw", requires = "command_or_file")] + pub raw: bool, + + /// Deprecated alias of `raw` + #[clap( + long = "markdown", + short = 'm', + requires = "command_or_file", + hide = true + )] + pub markdown: bool, + + /// Suppress informational messages + #[clap(short = 'q', long = "quiet")] + pub quiet: bool, + + /// Show file and directory paths used by tealdeer + #[clap(long = "show-paths")] + pub show_paths: bool, + + /// Show config file path + #[clap(long = "config-path")] + pub config_path: bool, + + /// Create a basic config + #[clap(long = "seed-config")] + pub seed_config: bool, + + /// Control whether to use color + #[clap( + long = "color", + value_name = "WHEN", + possible_values = ["always", "auto", "never"] + )] + pub color: Option, + + /// Print the version + // Note: We override the version flag because clap uses `-V` by default, + // while TLDR specification requires `-v` to be used. + #[clap(short = 'v', long = "version")] + pub version: bool, +} diff --git a/src/main.rs b/src/main.rs index a37715f..d96b03d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,13 +16,14 @@ #![allow(clippy::struct_excessive_bools)] #![allow(clippy::too_many_lines)] -use std::{env, path::PathBuf, process}; +use std::{env, process}; use app_dirs::AppInfo; use atty::Stream; -use clap::{AppSettings, ArgGroup, Parser}; +use clap::Parser; mod cache; +mod cli; mod config; pub mod extensions; mod formatter; @@ -33,6 +34,7 @@ mod utils; use crate::{ cache::{Cache, CacheFreshness, PageLookupResult, TLDR_PAGES_DIR}, + cli::Args, config::{get_config_dir, get_config_path, make_default_config, Config}, extensions::Dedup, output::print_page, @@ -47,112 +49,6 @@ const APP_INFO: AppInfo = AppInfo { }; const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; -// Note: flag names are specified explicitly in clap attributes -// to improve readability and allow contributors to grep names like "clear-cache" -#[derive(Parser, Debug)] -#[clap(about = "A fast TLDR client", author, version)] -#[clap(setting = AppSettings::ArgRequiredElseHelp)] -#[clap(setting = AppSettings::DeriveDisplayOrder)] -#[clap(setting = AppSettings::DisableColoredHelp)] -#[clap( - after_help = "To view the user documentation, please visit https://dbrgn.github.io/tealdeer/." -)] -#[clap(group = ArgGroup::new("command_or_file").args(&["command", "render"]))] -struct Args { - /// The command to show (e.g. `tar` or `git log`) - #[clap(min_values = 1)] - command: Vec, - - /// List all commands in the cache - #[clap(short = 'l', long = "list")] - list: bool, - - /// Render a specific markdown file - #[clap( - short = 'f', - long = "render", - value_name = "FILE", - conflicts_with = "command" - )] - render: Option, - - /// Override the operating system - #[clap( - short = 'p', - long = "platform", - possible_values = ["linux", "macos", "windows", "sunos", "osx"], - )] - platform: Option, - - /// Deprecated alias of `platform` - #[clap( - short = 'o', - long = "os", - possible_values = ["linux", "macos", "windows", "sunos", "osx"], - hide = true - )] - os: Option, - - /// Override the language - #[clap(short = 'L', long = "language")] - language: Option, - - /// Update the local cache - #[clap(short = 'u', long = "update")] - update: bool, - - /// Clear the local cache - #[clap(short = 'c', long = "clear-cache")] - clear_cache: bool, - - /// Use a pager to page output - #[clap(long = "pager", requires = "command_or_file")] - pager: bool, - - /// Display the raw markdown instead of rendering it - #[clap(short = 'r', long = "--raw", requires = "command_or_file")] - raw: bool, - - /// Deprecated alias of `raw` - #[clap( - long = "markdown", - short = 'm', - requires = "command_or_file", - hide = true - )] - markdown: bool, - - /// Suppress informational messages - #[clap(short = 'q', long = "quiet")] - quiet: bool, - - /// Show file and directory paths used by tealdeer - #[clap(long = "show-paths")] - show_paths: bool, - - /// Show config file path - #[clap(long = "config-path")] - config_path: bool, - - /// Create a basic config - #[clap(long = "seed-config")] - seed_config: bool, - - /// Control whether to use color - #[clap( - long = "color", - value_name = "WHEN", - possible_values = ["always", "auto", "never"] - )] - color: Option, - - /// Print the version - // Note: We override the version flag because clap uses `-V` by default, - // while TLDR specification requires `-v` to be used. - #[clap(short = 'v', long = "version")] - version: bool, -} - /// The cache should get updated if this was requested by the user, or if auto /// updates are enabled and the cache age is longer than the auto update interval. fn should_update_cache(args: &Args, config: &Config) -> bool { From 21772978718a71e9d216cdcae2431bf08853a843 Mon Sep 17 00:00:00 2001 From: Danny Moesch Date: Thu, 20 Jan 2022 09:10:18 +0100 Subject: [PATCH 210/368] Move shell completion scripts to their own directory (#259) * Move shell completion scripts to their own directory * Remove completion scripts from published Cargo package --- .github/workflows/release.yml | 2 +- Cargo.toml | 2 +- bash_tealdeer => completion/bash_tealdeer | 0 fish_tealdeer => completion/fish_tealdeer | 0 zsh_tealdeer => completion/zsh_tealdeer | 0 docs/src/installing.md | 9 ++++++--- 6 files changed, 8 insertions(+), 5 deletions(-) rename bash_tealdeer => completion/bash_tealdeer (100%) rename fish_tealdeer => completion/fish_tealdeer (100%) rename zsh_tealdeer => completion/zsh_tealdeer (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0a7f1c..eb0c0cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: run: | source ./scripts/upload-asset.sh # Upload: - upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} ${{ matrix.target }}_tealdeer completions_${{ matrix.target }} + upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} completion/${{ matrix.target }}_tealdeer completions_${{ matrix.target }} upload-license: needs: diff --git a/Cargo.toml b/Cargo.toml index 82d7cc1..6752a3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" documentation = "https://dbrgn.github.io/tealdeer/" version = "1.5.0" -include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "/bash_tealdeer", "/fish_tealdeer"] +include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png"] edition = "2018" [[bin]] diff --git a/bash_tealdeer b/completion/bash_tealdeer similarity index 100% rename from bash_tealdeer rename to completion/bash_tealdeer diff --git a/fish_tealdeer b/completion/fish_tealdeer similarity index 100% rename from fish_tealdeer rename to completion/fish_tealdeer diff --git a/zsh_tealdeer b/completion/zsh_tealdeer similarity index 100% rename from zsh_tealdeer rename to completion/zsh_tealdeer diff --git a/docs/src/installing.md b/docs/src/installing.md index ed16a33..9ad35e2 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -57,6 +57,9 @@ To enable the log output, set the `RUST_LOG` env variable: ## Autocompletion -- *Bash*: copy `bash_tealdeer` to `/usr/share/bash-completion/completions/tldr` -- *Fish*: copy `fish_tealdeer` to `~/.config/fish/completions/tldr.fish` -- *Zsh*: copy `zsh_tealdeer` to `/usr/share/zsh/site-functions/_tldr` +Shell completion scripts are located in the folder `completion`. +Just copy them to their designated location: + +- *Bash*: `cp completion/bash_tealdeer /usr/share/bash-completion/completions/tldr` +- *Fish*: `cp completion/fish_tealdeer ~/.config/fish/completions/tldr.fish` +- *Zsh*: `cp completion/zsh_tealdeer /usr/share/zsh/site-functions/_tldr` From d5dbe3084ba36d5e9c549bc8ba948d9275014b3b Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Fri, 21 Jan 2022 16:12:10 +0800 Subject: [PATCH 211/368] Add `no-auto-update` flag (#257) * Added `no-auto-update` * Updated usage.txt * Add `no-auto-update` to completion scripts * Apply review suggestions --- completion/bash_tealdeer | 2 +- completion/fish_tealdeer | 27 ++++++++++++++------------- completion/zsh_tealdeer | 1 + docs/src/usage.txt | 1 + src/cli.rs | 4 ++++ src/main.rs | 7 ++++--- 6 files changed, 25 insertions(+), 17 deletions(-) diff --git a/completion/bash_tealdeer b/completion/bash_tealdeer index 2a1429d..ec54b89 100644 --- a/completion/bash_tealdeer +++ b/completion/bash_tealdeer @@ -6,7 +6,7 @@ _tealdeer() _init_completion || return case $prev in - -h|--help|-v|--version|-l|--list|-u|--update|-c|--clear-cache|-p|--pager|-r|--raw|--show-paths|--seed-config|-q|--quiet) + -h|--help|-v|--version|-l|--list|-u|--update|--no-auto-update|-c|--clear-cache|-p|--pager|-r|--raw|--show-paths|--seed-config|-q|--quiet) return ;; -f|--render) diff --git a/completion/fish_tealdeer b/completion/fish_tealdeer index ee68e2a..2bcf551 100644 --- a/completion/fish_tealdeer +++ b/completion/fish_tealdeer @@ -3,19 +3,20 @@ # https://github.com/dbrgn/tealdeer/ # -complete -c tldr -s h -l help -d 'Print the help message.' -f -complete -c tldr -s v -l version -d 'Show version information.' -f -complete -c tldr -s l -l list -d 'List all commands in the cache.' -f -complete -c tldr -s f -l render -d 'Render a specific markdown file.' -r -complete -c tldr -s p -l platform -d 'Override the operating system.' -xa 'linux macos sunos windows' -complete -c tldr -s u -l update -d 'Update the local cache.' -f -complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f -complete -c tldr -s p -l pager -d 'Use a pager to page output.' -f -complete -c tldr -s r -l raw -d 'Display the raw markdown instead of rendering it.' -f -complete -c tldr -s q -l quiet -d 'Suppress informational messages.' -f -complete -c tldr -l show-paths -d 'Show file and directory paths used by tealdeer.' -f -complete -c tldr -l seed-config -d 'Create a basic config.' -f -complete -c tldr -l color -d 'Controls when to use color.' -xa 'always auto never' +complete -c tldr -s h -l help -d 'Print the help message.' -f +complete -c tldr -s v -l version -d 'Show version information.' -f +complete -c tldr -s l -l list -d 'List all commands in the cache.' -f +complete -c tldr -s f -l render -d 'Render a specific markdown file.' -r +complete -c tldr -s p -l platform -d 'Override the operating system.' -xa 'linux macos sunos windows' +complete -c tldr -s u -l update -d 'Update the local cache.' -f +complete -c tldr -l no-auto-update -d 'Disable auto-update, override config file' -f +complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f +complete -c tldr -s p -l pager -d 'Use a pager to page output.' -f +complete -c tldr -s r -l raw -d 'Display the raw markdown instead of rendering it.' -f +complete -c tldr -s q -l quiet -d 'Suppress informational messages.' -f +complete -c tldr -l show-paths -d 'Show file and directory paths used by tealdeer.' -f +complete -c tldr -l seed-config -d 'Create a basic config.' -f +complete -c tldr -l color -d 'Controls when to use color.' -xa 'always auto never' function __tealdeer_entries tldr --list | string replace -a -i -r "\,\s" "\n" diff --git a/completion/zsh_tealdeer b/completion/zsh_tealdeer index 28cd34b..872b474 100644 --- a/completion/zsh_tealdeer +++ b/completion/zsh_tealdeer @@ -22,6 +22,7 @@ _tealdeer() { ))' "($I -L --language)"{-L,--language}"[Override the language settings]:lang" "($I -u --update)"{-u,--update}"[Update the local cache]" + "($I)--no-auto-update[Disable auto-update, override config file]" "($I -c --clear-cache)"{-c,--clear-cache}"[Clear the local cache]" "($I)--pager[Use a pager to page output]" "($I -r --raw)"{-r,--raw}"[Display the raw markdown instead of rendering it]" diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 8e7ae5b..789b6e3 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -15,6 +15,7 @@ OPTIONS: windows, sunos, osx] -L, --language Override the language -u, --update Update the local cache + --no-auto-update If auto update is configured, disable it for this run -c, --clear-cache Clear the local cache --pager Use a pager to page output -r, --raw Display the raw markdown instead of rendering it diff --git a/src/cli.rs b/src/cli.rs index 38a451a..c7bf0aa 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -60,6 +60,10 @@ pub(crate) struct Args { #[clap(short = 'u', long = "update")] pub update: bool, + /// If auto update is configured, disable it for this run + #[clap(long = "no-auto-update", requires = "command_or_file")] + pub no_auto_update: bool, + /// Clear the local cache #[clap(short = 'c', long = "clear-cache")] pub clear_cache: bool, diff --git a/src/main.rs b/src/main.rs index d96b03d..17e7358 100644 --- a/src/main.rs +++ b/src/main.rs @@ -49,11 +49,12 @@ const APP_INFO: AppInfo = AppInfo { }; const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; -/// The cache should get updated if this was requested by the user, or if auto -/// updates are enabled and the cache age is longer than the auto update interval. +/// The cache should be updated if it was explicitly requested, +/// or if an automatic update is due and allowed. fn should_update_cache(args: &Args, config: &Config) -> bool { args.update - || (config.updates.auto_update + || (!args.no_auto_update + && config.updates.auto_update && Cache::last_update().map_or(true, |ago| ago >= config.updates.auto_update_interval)) } From cab6666ffb014aa8bb0a9a31fa36caa85bb78ed1 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 21 Jan 2022 09:14:30 +0100 Subject: [PATCH 212/368] Fix completions: Remove -p for pager --- completion/bash_tealdeer | 2 +- completion/fish_tealdeer | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/completion/bash_tealdeer b/completion/bash_tealdeer index ec54b89..439f546 100644 --- a/completion/bash_tealdeer +++ b/completion/bash_tealdeer @@ -6,7 +6,7 @@ _tealdeer() _init_completion || return case $prev in - -h|--help|-v|--version|-l|--list|-u|--update|--no-auto-update|-c|--clear-cache|-p|--pager|-r|--raw|--show-paths|--seed-config|-q|--quiet) + -h|--help|-v|--version|-l|--list|-u|--update|--no-auto-update|-c|--clear-cache|--pager|-r|--raw|--show-paths|--seed-config|-q|--quiet) return ;; -f|--render) diff --git a/completion/fish_tealdeer b/completion/fish_tealdeer index 2bcf551..77bc02f 100644 --- a/completion/fish_tealdeer +++ b/completion/fish_tealdeer @@ -11,7 +11,7 @@ complete -c tldr -s p -l platform -d 'Override the operating system.' -xa complete -c tldr -s u -l update -d 'Update the local cache.' -f complete -c tldr -l no-auto-update -d 'Disable auto-update, override config file' -f complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f -complete -c tldr -s p -l pager -d 'Use a pager to page output.' -f +complete -c tldr -l pager -d 'Use a pager to page output.' -f complete -c tldr -s r -l raw -d 'Display the raw markdown instead of rendering it.' -f complete -c tldr -s q -l quiet -d 'Suppress informational messages.' -f complete -c tldr -l show-paths -d 'Show file and directory paths used by tealdeer.' -f From cc22760e5ad438f6fce2e5da4ae62294d6589ef1 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 21 Jan 2022 09:15:52 +0100 Subject: [PATCH 213/368] Align help text and completion descriptions --- completion/fish_tealdeer | 2 +- completion/zsh_tealdeer | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/completion/fish_tealdeer b/completion/fish_tealdeer index 77bc02f..acf7f5f 100644 --- a/completion/fish_tealdeer +++ b/completion/fish_tealdeer @@ -9,7 +9,7 @@ complete -c tldr -s l -l list -d 'List all commands in the cache.' -f complete -c tldr -s f -l render -d 'Render a specific markdown file.' -r complete -c tldr -s p -l platform -d 'Override the operating system.' -xa 'linux macos sunos windows' complete -c tldr -s u -l update -d 'Update the local cache.' -f -complete -c tldr -l no-auto-update -d 'Disable auto-update, override config file' -f +complete -c tldr -l no-auto-update -d 'If auto update is configured, disable it for this run.' -f complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f complete -c tldr -l pager -d 'Use a pager to page output.' -f complete -c tldr -s r -l raw -d 'Display the raw markdown instead of rendering it.' -f diff --git a/completion/zsh_tealdeer b/completion/zsh_tealdeer index 872b474..7ed5750 100644 --- a/completion/zsh_tealdeer +++ b/completion/zsh_tealdeer @@ -22,7 +22,7 @@ _tealdeer() { ))' "($I -L --language)"{-L,--language}"[Override the language settings]:lang" "($I -u --update)"{-u,--update}"[Update the local cache]" - "($I)--no-auto-update[Disable auto-update, override config file]" + "($I)--no-auto-update[If auto update is configured, disable it for this run]" "($I -c --clear-cache)"{-c,--clear-cache}"[Clear the local cache]" "($I)--pager[Use a pager to page output]" "($I -r --raw)"{-r,--raw}"[Display the raw markdown instead of rendering it]" From 5a1a21b8ab9c8d76fc781ec639cc6d298b25c6fe Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 6 Feb 2022 22:53:48 +0100 Subject: [PATCH 214/368] Add note about auto-updates when cache is missing (#254) --- src/main.rs | 14 ++++++++++++-- tests/lib.rs | 8 ++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 17e7358..216c349 100644 --- a/src/main.rs +++ b/src/main.rs @@ -81,10 +81,20 @@ fn check_cache(args: &Args, enable_styles: bool) -> CheckCacheResult { CheckCacheResult::CacheFound } CacheFreshness::Missing => { - print_warning( + print_error( enable_styles, - "Cache not found. Please run `tldr --update`.", + &anyhow::anyhow!( + "Page cache not found. Please run `tldr --update` to download the cache." + ), ); + println!("\nNote: You can optionally enable automatic cache updates by adding the"); + println!("following config to your config file:\n"); + println!(" [updates]"); + println!(" auto_update = true\n"); + println!("The path to your config file can be looked up with `tldr --show-paths`."); + println!("To create an initial config file, use `tldr --seed-config`.\n"); + println!("You can find more tips and tricks in our docs:\n"); + println!(" https://dbrgn.github.io/tealdeer/config_updates.html"); CheckCacheResult::CacheMissing } } diff --git a/tests/lib.rs b/tests/lib.rs index 0f3128e..7c54477 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -131,7 +131,7 @@ fn test_missing_cache() { .args(["sl"]) .assert() .failure() - .stderr(contains("Cache not found. Please run `tldr --update`.")); + .stderr(contains("Page cache not found. Please run `tldr --update`")); } #[test] @@ -143,7 +143,7 @@ fn test_update_cache() { .args(["sl"]) .assert() .failure() - .stderr(contains("Cache not found. Please run `tldr --update`.")); + .stderr(contains("Page cache not found. Please run `tldr --update`")); testenv .command() @@ -518,7 +518,7 @@ fn test_list_flag_rendering() { .args(["--list"]) .assert() .failure() - .stderr(contains("Cache not found. Please run `tldr --update`.")); + .stderr(contains("Page cache not found. Please run `tldr --update`")); testenv.add_entry("foo", ""); @@ -551,7 +551,7 @@ fn test_autoupdate_cache() { .args(["--list"]) .assert() .failure() - .stderr(contains("Cache not found. Please run `tldr --update`.")); + .stderr(contains("Page cache not found. Please run `tldr --update`")); let config_file_path = testenv.config_dir.path().join("config.toml"); let cache_file_path = testenv.cache_dir.path().join(TLDR_PAGES_DIR); From 786933e5078ff69ed8b0559779bb02e72ae8814a Mon Sep 17 00:00:00 2001 From: Simon Perdrisat Date: Sat, 9 Apr 2022 17:10:22 +0200 Subject: [PATCH 215/368] Docs: Add MacPorts in the list of package managers (#270) --- docs/src/installing.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/installing.md b/docs/src/installing.md index 9ad35e2..67c3748 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -19,6 +19,7 @@ Tealdeer has been added to a few package managers: - FreeBSD: [`sysutils/tealdeer`](https://www.freshports.org/sysutils/tealdeer/) - Funtoo: [`app-misc/tealdeer`](https://github.com/funtoo/core-kit/tree/1.4-release/app-misc/tealdeer) - Homebrew: [`tealdeer`](https://formulae.brew.sh/formula/tealdeer) +- MacPorts: [`tealdeer`](https://ports.macports.org/port/tealdeer/) - NetBSD: [`sysutils/tealdeer`](https://pkgsrc.se/sysutils/tealdeer) - Nix: [`tealdeer`](https://nixos.org/nixos/packages.html#tealdeer) - openSUSE: [`tealdeer`](https://software.opensuse.org/package/tealdeer?search_term=tealdeer) From 6e09af2f8b8bbbf25c347453ff07bd7be1090398 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 3 May 2022 21:47:15 +0200 Subject: [PATCH 216/368] Run cargo update --- Cargo.lock | 637 +++++++++++++++++++++-------------------------------- 1 file changed, 252 insertions(+), 385 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 12da210..f870127 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,27 +28,27 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.52" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84450d0b4a8bd1ba4144ce8ce718fbc5d071358b1e5384bace6536b3d1f2d5b3" +checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" [[package]] name = "app_dirs2" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dd95d9b31f552568dcad90bb809b795f63795fba32f733eb7435a4d13f5d28f" +checksum = "d6f731ef6e0f345c835c86724f619d3a73d8be0a9505b83d5e2fa34fd1d50261" dependencies = [ "jni", - "ndk-glue", + "ndk-context", "winapi", "xdg", ] [[package]] name = "assert_cmd" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e996dc7940838b7ef1096b882e29ec30a3149a3a443cdc8dba19ed382eca1fe2" +checksum = "93ae1ddd39efd67689deb1979d80bad3bf7f2b09c6e6117c8d1f2443b5e2f83e" dependencies = [ "bstr", "doc-comment", @@ -71,9 +71,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 = "base64" @@ -100,9 +100,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.8.0" +version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" +checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" [[package]] name = "byteorder" @@ -118,9 +118,9 @@ checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" [[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" [[package]] name = "cesu8" @@ -136,26 +136,26 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.0.0" +version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d17bf219fcd37199b9a29e00ba65dfb8cd5b2688b7297ec14ff829c40ac50ca9" +checksum = "85a35a599b11c089a7f49105658d089b8f2cf0882993c17daf6de15285c2c35d" dependencies = [ "atty", "bitflags", "clap_derive", + "clap_lex", "indexmap", "lazy_static", - "os_str_bytes", - "strsim 0.10.0", + "strsim", "termcolor", "textwrap", ] [[package]] name = "clap_derive" -version = "3.0.0" +version = "3.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b9752c030a14235a0bd5ef3ad60a1dcac8468c30921327fc8af36b20c790b9" +checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" dependencies = [ "heck", "proc-macro-error", @@ -165,10 +165,19 @@ dependencies = [ ] [[package]] -name = "combine" -version = "4.6.2" +name = "clap_lex" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b2f5d0ee456f3928812dfc8c6d9a1d592b98678f6d56db9b0cd2b7bc6c8db5" +checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "combine" +version = "4.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a604e93b79d1808327a6fca85a6f2d69de66461e7620f5a4cbf5fb4d1d7c948" dependencies = [ "bytes", "memchr", @@ -176,9 +185,9 @@ dependencies = [ [[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", @@ -192,48 +201,13 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "crc32fast" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if", ] -[[package]] -name = "darling" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.9.3", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" -dependencies = [ - "darling_core", - "quote", - "syn", -] - [[package]] name = "difflib" version = "0.4.0" @@ -242,18 +216,18 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] name = "dirs" -version = "3.0.2" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ "dirs-sys", ] [[package]] name = "dirs-sys" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", "redox_users", @@ -274,9 +248,9 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "encoding_rs" -version = "0.8.30" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ "cfg-if", ] @@ -328,10 +302,19 @@ dependencies = [ ] [[package]] -name = "filetime" -version = "0.2.15" +name = "fastrand" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" +checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +dependencies = [ + "instant", +] + +[[package]] +name = "filetime" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c" dependencies = [ "cfg-if", "libc", @@ -341,9 +324,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" +checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af" dependencies = [ "cfg-if", "crc32fast", @@ -378,42 +361,42 @@ 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", ] [[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-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-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-core", "futures-io", @@ -426,20 +409,20 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.10.2+wasi-snapshot-preview1", ] [[package]] name = "h2" -version = "0.3.9" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f072413d126e57991455e0a922b31e4c8ba7c2ffbebf6b78b4f8521397d65cd" +checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" dependencies = [ "bytes", "fnv", @@ -462,12 +445,9 @@ checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" [[package]] name = "heck" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" [[package]] name = "hermit-abi" @@ -480,13 +460,13 @@ dependencies = [ [[package]] name = "http" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" +checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" dependencies = [ "bytes", "fnv", - "itoa 1.0.1", + "itoa", ] [[package]] @@ -502,9 +482,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.5.1" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" [[package]] name = "httpdate" @@ -520,9 +500,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.16" +version = "0.14.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" +checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" dependencies = [ "bytes", "futures-channel", @@ -533,7 +513,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 0.4.8", + "itoa", "pin-project-lite", "socket2", "tokio", @@ -555,12 +535,6 @@ dependencies = [ "tokio-rustls", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.2.3" @@ -574,19 +548,28 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" dependencies = [ "autocfg", "hashbrown", ] [[package]] -name = "ipnet" -version = "2.3.1" +name = "instant" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipnet" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "itertools" @@ -597,12 +580,6 @@ dependencies = [ "either", ] -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - [[package]] name = "itoa" version = "1.0.1" @@ -631,9 +608,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.55" +version = "0.3.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" dependencies = [ "wasm-bindgen", ] @@ -646,15 +623,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.112" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" +checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" [[package]] name = "log" -version = "0.4.14" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] @@ -667,9 +644,9 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "mime" @@ -679,24 +656,24 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "miniz_oxide" -version = "0.4.4" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" dependencies = [ "adler", - "autocfg", ] [[package]] name = "mio" -version = "0.7.14" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" dependencies = [ "libc", "log", "miow", "ntapi", + "wasi 0.11.0+wasi-snapshot-preview1", "winapi", ] @@ -710,50 +687,10 @@ dependencies = [ ] [[package]] -name = "ndk" -version = "0.4.0" +name = "ndk-context" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d64d6af06fde0e527b1ba5c7b79a6cc89cfc46325b0b2887dffe8f70197e0c3c" -dependencies = [ - "bitflags", - "jni-sys", - "ndk-sys", - "num_enum", - "thiserror", -] - -[[package]] -name = "ndk-glue" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e9e94628f24e7a3cb5b96a2dc5683acd9230bf11991c2a1677b87695138420" -dependencies = [ - "lazy_static", - "libc", - "log", - "ndk", - "ndk-macro", - "ndk-sys", -] - -[[package]] -name = "ndk-macro" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" -dependencies = [ - "darling", - "proc-macro-crate 0.1.5", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "ndk-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1bcdd74c20ad5d95aacd60ef9ba40fdf77f767051040541df557b7a9b2a2121" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "normalize-line-endings" @@ -763,18 +700,18 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[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", ] [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] @@ -789,47 +726,23 @@ dependencies = [ "libc", ] -[[package]] -name = "num_enum" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "720d3ea1055e4e4574c0c0b0f8c3fd4f24c4cdaf465948206dea090b57b526ad" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d992b768490d7fe0d8586d9b5745f6c49f557da6d81dc982b1d167ad4edbb21" -dependencies = [ - "proc-macro-crate 1.1.0", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "once_cell" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" +checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" [[package]] name = "openssl-probe" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "os_str_bytes" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" -dependencies = [ - "memchr", -] [[package]] name = "pager" @@ -849,9 +762,9 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pin-project-lite" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -859,17 +772,11 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "ppv-lite86" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" - [[package]] name = "predicates" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95e5a7689e456ab905c22c2b48225bb921aba7c8dfa58440d68ba13f6222a715" +checksum = "a5aab5be6e4732b473071984b3164dbbfb7a3674d30ea5ff44410b6bcd960c3c" dependencies = [ "difflib", "float-cmp", @@ -881,39 +788,20 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e35a3326b75e49aa85f5dc6ec15b41108cf5aee58eabb1f274dd18b73c2451" +checksum = "da1c2388b1513e1b605fcec39a95e0a9e8ef088f71443ef37099fa9ae6673fcb" [[package]] name = "predicates-tree" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338c7be2905b732ae3984a2f40032b5e94fd8f52505b186c7d4d68d193445df7" +checksum = "4d86de6de25020a36c6d3643a86d9a6a9f552107c0559c60ea03551b5e16c032" dependencies = [ "predicates-core", "termtree", ] -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", -] - -[[package]] -name = "proc-macro-crate" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" -dependencies = [ - "thiserror", - "toml", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -940,86 +828,47 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" +checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" dependencies = [ "unicode-xid", ] [[package]] name = "quote" -version = "1.0.14" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47aa80447ce4daf1717500037052af176af5d38cc3e571d9ec1c7353fc10c87d" +checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core", -] - [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ "bitflags", ] [[package]] name = "redox_users" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", "redox_syscall", + "thiserror", ] [[package]] name = "regex" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" dependencies = [ "aho-corasick", "memchr", @@ -1049,15 +898,16 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.8" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c4e0a76dc12a116108933f6301b95e83634e0c47b0afbed6abbaa0601e99258" +checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" dependencies = [ "base64", "bytes", "encoding_rs", "futures-core", "futures-util", + "h2", "http", "http-body", "hyper", @@ -1071,7 +921,7 @@ dependencies = [ "pin-project-lite", "rustls", "rustls-native-certs", - "rustls-pemfile", + "rustls-pemfile 0.3.0", "serde", "serde_json", "serde_urlencoded", @@ -1102,9 +952,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.2" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37e5e2290f3e040b594b1a9e04377c2c671f1a1cfd9bfdef82106ac1c113f84" +checksum = "4fbfeb8d0ddb84706bc597a5574ab8912817c52a397f819e5b614e2265206921" dependencies = [ "log", "ring", @@ -1114,21 +964,30 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca9ebdfa27d3fc180e42879037b5338ab1c040c06affd00d8338598e7800943" +checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.0", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" +dependencies = [ + "base64", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" dependencies = [ "base64", ] @@ -1170,9 +1029,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.4.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" +checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ "bitflags", "core-foundation", @@ -1183,9 +1042,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.4.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -1193,18 +1052,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.132" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9875c23cf305cd1fd7eb77234cbb705f21ea6a72c637a5c6db5fe4b8e7f008" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.132" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc0db5cb2556c0e558887d9bbdcf6ac4471e83ff66cf696e5419024d1606276" +checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", @@ -1213,38 +1072,38 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.73" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcbd0344bc6533bc7ec56df11d42fb70f1b912351c0825ccb7211b59d8af7cf5" +checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" dependencies = [ - "itoa 1.0.1", + "itoa", "ryu", "serde", ] [[package]] name = "serde_urlencoded" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 0.4.8", + "itoa", "ryu", "serde", ] [[package]] name = "slab" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" +checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" [[package]] name = "socket2" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" +checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" dependencies = [ "libc", "winapi", @@ -1256,12 +1115,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "strsim" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" - [[package]] name = "strsim" version = "0.10.0" @@ -1270,9 +1123,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.84" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecb2e6da8ee5eb9a61068762a32fa9619cc591ceb055b3687f4cd4051ec2e06b" +checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52" dependencies = [ "proc-macro2", "quote", @@ -1306,13 +1159,13 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", "winapi", @@ -1320,39 +1173,39 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] [[package]] name = "termtree" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" +checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" [[package]] name = "textwrap" -version = "0.14.2" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2", "quote", @@ -1361,9 +1214,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -1376,24 +1229,26 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.15.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbbf1c778ec206785635ce8ad57fe52b3009ae9e0c9f574a728f3049d3e55838" +checksum = "dce653fb475565de9f6fb0614b28bca8df2c430c0cf84bcd9c843f15de5414cc" dependencies = [ "bytes", "libc", "memchr", "mio", "num_cpus", + "once_cell", "pin-project-lite", + "socket2", "winapi", ] [[package]] name = "tokio-rustls" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b" +checksum = "4151fda0cf2798550ad0b34bcfc9b9dcc2a9d2471c895c68f3a8818e54f2389e" dependencies = [ "rustls", "tokio", @@ -1402,23 +1257,23 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.9" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" dependencies = [ "bytes", "futures-core", "futures-sink", - "log", "pin-project-lite", "tokio", + "tracing", ] [[package]] name = "toml" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ "serde", ] @@ -1431,20 +1286,32 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.29" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" dependencies = [ "cfg-if", "pin-project-lite", + "tracing-attributes", "tracing-core", ] [[package]] -name = "tracing-core" +name = "tracing-attributes" version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" dependencies = [ "lazy_static", ] @@ -1457,9 +1324,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "unicode-bidi" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-normalization" @@ -1470,17 +1337,11 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" - [[package]] name = "unicode-xid" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" [[package]] name = "untrusted" @@ -1543,10 +1404,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] -name = "wasm-bindgen" -version = "0.2.78" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1554,9 +1421,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.78" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4" dependencies = [ "bumpalo", "lazy_static", @@ -1569,9 +1436,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.28" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" +checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2" dependencies = [ "cfg-if", "js-sys", @@ -1581,9 +1448,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.78" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1591,9 +1458,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.78" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" dependencies = [ "proc-macro2", "quote", @@ -1604,15 +1471,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.78" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" +checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" [[package]] name = "web-sys" -version = "0.3.55" +version = "0.3.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283" dependencies = [ "js-sys", "wasm-bindgen", @@ -1630,9 +1497,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552ceb903e957524388c4d3475725ff2c8b7960922063af6ce53c9a43da07449" +checksum = "44d8de8415c823c8abd270ad483c6feeac771fad964890779f9a8cb24fbbc1bf" dependencies = [ "webpki", ] @@ -1670,18 +1537,18 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winreg" -version = "0.7.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ "winapi", ] [[package]] name = "xdg" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a23fe958c70412687039c86f578938b4a0bb50ec788e96bce4d6ab00ddd5803" +checksum = "0c4583db5cbd4c4c0303df2d15af80f0539db703fa1c68802d4cbbd2dd0f88f6" dependencies = [ "dirs", ] From 3629002d5cd22fd53b6a945ae8a662ca11fab029 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 3 May 2022 21:49:44 +0200 Subject: [PATCH 217/368] =?UTF-8?q?Upgrade=20zip:=200.5=20=E2=86=92=200.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 16 +++++++++++++--- Cargo.toml | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f870127..5d2a872 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -208,6 +208,16 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-utils" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +dependencies = [ + "cfg-if", + "lazy_static", +] + [[package]] name = "difflib" version = "0.4.0" @@ -1555,12 +1565,12 @@ dependencies = [ [[package]] name = "zip" -version = "0.5.13" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ab48844d61251bb3835145c521d88aa4031d7139e8485990f60ca911fa0815" +checksum = "bf225bcf73bb52cbb496e70475c7bd7a3f769df699c0020f6c7bd9a96dcf0b8d" dependencies = [ "byteorder", "crc32fast", + "crossbeam-utils", "flate2", - "thiserror", ] diff --git a/Cargo.toml b/Cargo.toml index 6752a3b..6715a8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ serde = "1.0.21" serde_derive = "1.0.21" toml = "0.5.1" walkdir = "2.0.1" -zip = { version = "0.5", default-features = false, features = ["deflate"] } +zip = { version = "0.6", default-features = false, features = ["deflate"] } [target.'cfg(not(windows))'.dependencies] pager = "0.16" From 62b6405685aa8a2a125d65a6725ef3f1ef35860f Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 3 May 2022 22:10:18 +0200 Subject: [PATCH 218/368] Fix clap deprecation warnings --- src/cli.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index c7bf0aa..ffef863 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -10,12 +10,12 @@ use crate::types::{ColorOptions, PlatformType}; // to improve readability and allow contributors to grep names like "clear-cache" #[derive(Parser, Debug)] #[clap(about = "A fast TLDR client", author, version)] -#[clap(setting = AppSettings::ArgRequiredElseHelp)] -#[clap(setting = AppSettings::DeriveDisplayOrder)] -#[clap(setting = AppSettings::DisableColoredHelp)] #[clap( after_help = "To view the user documentation, please visit https://dbrgn.github.io/tealdeer/." )] +#[clap(setting = AppSettings::DeriveDisplayOrder)] +#[clap(arg_required_else_help(true))] +#[clap(disable_colored_help(true))] #[clap(group = ArgGroup::new("command_or_file").args(&["command", "render"]))] pub(crate) struct Args { /// The command to show (e.g. `tar` or `git log`) From 750ebf653cee3ee56651668c98b7e4db4c2a5090 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 3 May 2022 22:20:13 +0200 Subject: [PATCH 219/368] CI: Bump rustfmt toolchain to 1.60 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 390e565..8fd0512 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - rust: [1.54, stable] + rust: ['1.54', stable] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 @@ -60,7 +60,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.54 + toolchain: '1.60' override: true - run: rustup component add rustfmt - uses: actions-rs/cargo@v1 From 0f82aa5950e3966b0c1ded6512841d7324a2ba18 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 6 May 2022 12:43:30 +0200 Subject: [PATCH 220/368] Create macOS release builds with bundled root certificates (#272) As reported in https://github.com/dbrgn/tealdeer/issues/244, some users on macOS had problems with `rustls-tls-native-roots`. Since we did not find the root cause of this, we'll build macOS release builds with `rustls-tls-webpki-roots` instead. Fixes #244. --- .github/workflows/ci.yml | 7 +++---- .github/workflows/release.yml | 2 +- Cargo.toml | 5 ++++- src/main.rs | 8 ++++++++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fd0512..148913c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,16 +27,15 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - - name: Build with all features + - name: Build with logging and webpki roots uses: actions-rs/cargo@v1 with: command: build - args: --all-features + args: --features logging,webpki-roots --no-default-features - name: Run tests uses: actions-rs/cargo@v1 with: command: test - args: --all-features clippy: name: run clippy lints @@ -51,7 +50,7 @@ jobs: - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features + args: --features logging fmt: name: run rustfmt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eb0c0cf..1e42acc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,7 +83,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - args: --release --target x86_64-apple-darwin + args: --release --target x86_64-apple-darwin --no-default-features --features webpki-roots - uses: actions/upload-artifact@v2 with: name: "tealdeer-macos-x86_64" diff --git a/Cargo.toml b/Cargo.toml index 6715a8e..842a9e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ atty = "0.2" clap = { version = "3", features = ["std", "derive", "suggestions", "color"], default-features = false } env_logger = { version = "0.9", optional = true } log = "0.4" -reqwest = { version = "0.11.3", features = ["blocking", "rustls-tls", "rustls-tls-native-roots"], default-features = false } +reqwest = { version = "0.11.3", features = ["blocking"], default-features = false } serde = "1.0.21" serde_derive = "1.0.21" toml = "0.5.1" @@ -44,6 +44,9 @@ tempfile = "3.1.0" filetime = "0.2.10" [features] +default = ["native-roots"] +native-roots = ["reqwest/rustls-tls-native-roots"] +webpki-roots = ["reqwest/rustls-tls-webpki-roots"] logging = ["env_logger"] [profile.release] diff --git a/src/main.rs b/src/main.rs index 216c349..8449565 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,14 @@ #![allow(clippy::struct_excessive_bools)] #![allow(clippy::too_many_lines)] +#[cfg(any( + all(feature = "native-roots", feature = "webpki-roots"), + not(any(feature = "native-roots", feature = "webpki-roots")), +))] +compile_error!( + "exactly one of feature \"native-roots\" and feature \"webpki-roots\" must be enabled" +); + use std::{env, process}; use app_dirs::AppInfo; From 4a5410fd0b7944d354c7c50c8b912c80f2acef03 Mon Sep 17 00:00:00 2001 From: Evan Lloyd New-Schmidt Date: Thu, 2 Jun 2022 11:45:11 -0400 Subject: [PATCH 221/368] Add support for android platform tldr added android-specific commands under a new 'android' platform last year: --- completion/bash_tealdeer | 2 +- completion/fish_tealdeer | 2 +- completion/zsh_tealdeer | 1 + docs/src/usage.txt | 2 +- src/cache.rs | 1 + src/cli.rs | 2 +- src/types.rs | 5 ++++- 7 files changed, 10 insertions(+), 5 deletions(-) diff --git a/completion/bash_tealdeer b/completion/bash_tealdeer index 439f546..507e956 100644 --- a/completion/bash_tealdeer +++ b/completion/bash_tealdeer @@ -14,7 +14,7 @@ _tealdeer() return ;; -p|--platform) - COMPREPLY=( $(compgen -W 'linux macos sunos windows' -- "${cur}") ) + COMPREPLY=( $(compgen -W 'linux macos sunos windows android' -- "${cur}") ) return ;; --color) diff --git a/completion/fish_tealdeer b/completion/fish_tealdeer index acf7f5f..13f0742 100644 --- a/completion/fish_tealdeer +++ b/completion/fish_tealdeer @@ -7,7 +7,7 @@ complete -c tldr -s h -l help -d 'Print the help message.' -f complete -c tldr -s v -l version -d 'Show version information.' -f complete -c tldr -s l -l list -d 'List all commands in the cache.' -f complete -c tldr -s f -l render -d 'Render a specific markdown file.' -r -complete -c tldr -s p -l platform -d 'Override the operating system.' -xa 'linux macos sunos windows' +complete -c tldr -s p -l platform -d 'Override the operating system.' -xa 'linux macos sunos windows android' complete -c tldr -s u -l update -d 'Update the local cache.' -f complete -c tldr -l no-auto-update -d 'If auto update is configured, disable it for this run.' -f complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f diff --git a/completion/zsh_tealdeer b/completion/zsh_tealdeer index 7ed5750..99c12be 100644 --- a/completion/zsh_tealdeer +++ b/completion/zsh_tealdeer @@ -19,6 +19,7 @@ _tealdeer() { macos sunos windows + android ))' "($I -L --language)"{-L,--language}"[Override the language settings]:lang" "($I -u --update)"{-u,--update}"[Update the local cache]" diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 789b6e3..fdc0c9f 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -12,7 +12,7 @@ OPTIONS: -l, --list List all commands in the cache -f, --render Render a specific markdown file -p, --platform Override the operating system [possible values: linux, macos, - windows, sunos, osx] + windows, sunos, osx, android] -L, --language Override the language -u, --update Update the local cache --no-auto-update If auto update is configured, disable it for this run diff --git a/src/cache.rs b/src/cache.rs index 411a6dd..8df8424 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -223,6 +223,7 @@ impl Cache { PlatformType::OsX => "osx", PlatformType::SunOs => "sunos", PlatformType::Windows => "windows", + PlatformType::Android => "android", } } diff --git a/src/cli.rs b/src/cli.rs index ffef863..a35df31 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -39,7 +39,7 @@ pub(crate) struct Args { #[clap( short = 'p', long = "platform", - possible_values = ["linux", "macos", "windows", "sunos", "osx"], + possible_values = ["linux", "macos", "windows", "sunos", "osx", "android"], )] pub platform: Option, diff --git a/src/types.rs b/src/types.rs index f80aa98..aebd32f 100644 --- a/src/types.rs +++ b/src/types.rs @@ -13,6 +13,7 @@ pub enum PlatformType { OsX, SunOs, Windows, + Android, } impl fmt::Display for PlatformType { @@ -22,6 +23,7 @@ impl fmt::Display for PlatformType { Self::OsX => write!(f, "macOS / BSD"), Self::SunOs => write!(f, "SunOS"), Self::Windows => write!(f, "Windows"), + Self::Android => write!(f, "Android"), } } } @@ -35,8 +37,9 @@ impl str::FromStr for PlatformType { "osx" | "macos" => Ok(Self::OsX), "sunos" => Ok(Self::SunOs), "windows" => Ok(Self::Windows), + "android" => Ok(Self::Android), other => Err(anyhow!( - "Unknown OS: {}. Possible values: linux, macos, osx, sunos, windows", + "Unknown OS: {}. Possible values: linux, macos, osx, sunos, windows, android", other )), } From abbbbf01ed997c891a8fa24cf35c6bb1684b9367 Mon Sep 17 00:00:00 2001 From: Evan Lloyd New-Schmidt Date: Tue, 14 Jun 2022 15:50:18 -0400 Subject: [PATCH 222/368] Add PlatformType::current for android target --- src/types.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/types.rs b/src/types.rs index aebd32f..0cd82d0 100644 --- a/src/types.rs +++ b/src/types.rs @@ -68,6 +68,11 @@ impl PlatformType { Self::Windows } + #[cfg(target_os = "android")] + pub fn current() -> Self { + Self::Android + } + #[cfg(not(any( target_os = "linux", target_os = "macos", @@ -75,7 +80,8 @@ impl PlatformType { target_os = "netbsd", target_os = "openbsd", target_os = "dragonfly", - target_os = "windows" + target_os = "windows", + target_os = "android", )))] pub fn current() -> Self { Self::Other From 97b4395e258ae809060dd6cdceb5cab9c76dadcc Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Mon, 20 Jun 2022 20:35:17 +0800 Subject: [PATCH 223/368] Fix typos (#277) --- src/formatter.rs | 8 ++++---- tests/lib.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/formatter.rs b/src/formatter.rs index c87d39b..d5e3b32 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -83,7 +83,7 @@ fn highlight_code<'a, E>( Ok(()) } -/// Yields `NormalCode` and `CommandName` in alternating order according to the occurences of +/// Yields `NormalCode` and `CommandName` in alternating order according to the occurrences of /// `command_name` in `segment`. Variables are not detected here, see `highlight_code` /// instead. fn highlight_code_segment<'a, E>( @@ -113,15 +113,15 @@ fn highlight_code_segment<'a, E>( } /// Checks whether the characters right before and after the substring (given by half-open index interval) are whitespace (if they exist). -fn is_freestanding_substring(surrouding: &str, substring: (usize, usize)) -> bool { +fn is_freestanding_substring(surrounding: &str, substring: (usize, usize)) -> bool { let (start, end) = substring; // "okay" meaning or - let char_before_is_okay = surrouding[..start] + let char_before_is_okay = surrounding[..start] .chars() .last() .filter(|prev_char| !prev_char.is_whitespace()) .is_none(); - let char_after_is_okay = surrouding[end..] + let char_after_is_okay = surrounding[end..] .chars() .next() .filter(|next_char| !next_char.is_whitespace()) diff --git a/tests/lib.rs b/tests/lib.rs index 7c54477..1b25bdb 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -624,7 +624,7 @@ fn test_custom_page_overwrites() { .stdout(diff(expected)); } -/// End-End test to ensure that .patch files are appened to pages in the cache_dir +/// End-End test to ensure that .patch files are appended to pages in the cache_dir #[test] fn test_custom_patch_appends_to_common() { let testenv = TestEnv::new(); From b369678794a7062bdcbc0dceaee8f68910acabb2 Mon Sep 17 00:00:00 2001 From: bagohart Date: Mon, 18 Jul 2022 12:01:03 +0200 Subject: [PATCH 224/368] added missing fish completion for language (#280) --- completion/fish_tealdeer | 1 + 1 file changed, 1 insertion(+) diff --git a/completion/fish_tealdeer b/completion/fish_tealdeer index 13f0742..601b114 100644 --- a/completion/fish_tealdeer +++ b/completion/fish_tealdeer @@ -8,6 +8,7 @@ complete -c tldr -s v -l version -d 'Show version information.' -f complete -c tldr -s l -l list -d 'List all commands in the cache.' -f complete -c tldr -s f -l render -d 'Render a specific markdown file.' -r complete -c tldr -s p -l platform -d 'Override the operating system.' -xa 'linux macos sunos windows android' +complete -c tldr -s L -l language -d 'Override the language' -x complete -c tldr -s u -l update -d 'Update the local cache.' -f complete -c tldr -l no-auto-update -d 'If auto update is configured, disable it for this run.' -f complete -c tldr -s c -l clear-cache -d 'Clear the local cache.' -f From e94ee92db4dca201a3a91223b26c54c8ff8910aa Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sun, 21 Aug 2022 21:53:10 +0200 Subject: [PATCH 225/368] `cargo clippy --fix` --- src/config.rs | 6 +++--- src/types.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config.rs b/src/config.rs index 60c8879..06f5fd4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -224,19 +224,19 @@ pub struct StyleConfig { pub example_variable: Style, } -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct DisplayConfig { pub compact: bool, pub use_pager: bool, } -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct UpdatesConfig { pub auto_update: bool, pub auto_update_interval: Duration, } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct DirectoriesConfig { pub custom_pages_dir: Option, } diff --git a/src/types.rs b/src/types.rs index 0cd82d0..683a81a 100644 --- a/src/types.rs +++ b/src/types.rs @@ -185,7 +185,7 @@ impl LineType { } /// The reason why a certain path (e.g. config path or cache dir) was chosen. -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub enum PathSource { /// OS convention (e.g. XDG on Linux) OsConvention, From db492bc0cf0d16e47e9e9c357a4cbc037ba70e84 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sun, 21 Aug 2022 22:10:40 +0200 Subject: [PATCH 226/368] Upgrade to 2021 edition of Rust To do so, we need to bump the MSRV to 1.56 (released 10/2021). While at it, I actually bumped it all the way to 1.62, where the latest version, (1.62.1) has been released on July 19, which is just more than one month ago. Additionally, I removed `clippy.toml` and instead specified the MSRV in `Cargo.toml`. This will also print an error when trying to compile with an older compiler. --- .github/workflows/ci.yml | 2 +- Cargo.toml | 3 ++- clippy.toml | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 clippy.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 148913c..bfaa6db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - rust: ['1.54', stable] + rust: ['1.62', stable] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 diff --git a/Cargo.toml b/Cargo.toml index 842a9e4..91c87a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,8 @@ repository = "https://github.com/dbrgn/tealdeer/" documentation = "https://dbrgn.github.io/tealdeer/" version = "1.5.0" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png"] -edition = "2018" +rust-version = "1.62" +edition = "2021" [[bin]] name = "tldr" diff --git a/clippy.toml b/clippy.toml deleted file mode 100644 index ece14b8..0000000 --- a/clippy.toml +++ /dev/null @@ -1 +0,0 @@ -msrv = "1.54" From a6023a52349f35f533fcb7efee42119ee9ccca31 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sun, 21 Aug 2022 22:13:32 +0200 Subject: [PATCH 227/368] Small fixes in `ci.yml` - Add `profile: minimal` - Install `rustfmt` when installing the toolchain, not afterwards - Use stable toolchain for `rustfmt` - Replace `override` with `default`. I think this better reflects the "use what we just installed" intent. --- .github/workflows/ci.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfaa6db..8f53a47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,6 @@ on: name: CI jobs: - test: name: run tests strategy: @@ -22,7 +21,8 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.rust }} - override: true + profile: minimal + default: true - name: Build with default features uses: actions-rs/cargo@v1 with: @@ -45,8 +45,9 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable + profile: minimal + default: true components: clippy - override: true - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -59,9 +60,10 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: '1.60' - override: true - - run: rustup component add rustfmt + toolchain: stable + profile: minimal + default: true + components: rustfmt - uses: actions-rs/cargo@v1 with: command: fmt @@ -79,7 +81,8 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable - override: true + profile: minimal + default: true - name: Build uses: actions-rs/cargo@v1 with: From 65cbe80e9d441833eb37acac51ad964e2d5bf0ae Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sun, 21 Aug 2022 22:24:18 +0200 Subject: [PATCH 228/368] Add comment to empty `rustfmt.toml` --- rustfmt.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/rustfmt.toml b/rustfmt.toml index e69de29..f857430 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -0,0 +1 @@ +# Empty file, use defaults and disregard global settings From f4a94112f49b01570becaa2a5c45d2daeb3a79be Mon Sep 17 00:00:00 2001 From: Olav de Haas <23523462+Olavhaasie@users.noreply.github.com> Date: Sat, 24 Sep 2022 21:27:35 +0200 Subject: [PATCH 229/368] Add custom pages to list output (#285) Fixes #205. --- src/cache.rs | 38 +++++++++++++++++++++++++++++++------- src/main.rs | 10 ++++++---- tests/lib.rs | 12 +++++++++++- 3 files changed, 48 insertions(+), 12 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 8df8424..66b1ef7 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -302,7 +302,7 @@ impl Cache { } /// Return the available pages. - pub fn list_pages(&self) -> Result> { + pub fn list_pages(&self, custom_pages_dir: Option<&Path>) -> Result> { // Determine platforms directory and platform let (cache_dir, _) = Self::get_cache_dir()?; let platforms_dir = cache_dir.join(TLDR_PAGES_DIR).join("pages"); @@ -324,23 +324,47 @@ impl Cache { false }; + let to_stem = |entry: DirEntry| -> Option { + entry + .path() + .file_stem() + .and_then(OsStr::to_str) + .map(str::to_string) + }; + // Recursively walk through common and (if applicable) platform specific directory let mut pages = WalkDir::new(platforms_dir) .min_depth(1) // Skip root directory .into_iter() - .filter_entry(|e| should_walk(e)) // Filter out pages for other architectures + .filter_entry(should_walk) // Filter out pages for other architectures .filter_map(Result::ok) // Convert results to options, filter out errors .filter_map(|e| { - let path = e.path(); - let extension = &path.extension().and_then(OsStr::to_str).unwrap_or(""); - if e.file_type().is_file() && extension == &"md" { - path.file_stem() - .and_then(|stem| stem.to_str().map(Into::into)) + let extension = e.path().extension().unwrap_or_default(); + if e.file_type().is_file() && extension == "md" { + to_stem(e) } else { None } }) .collect::>(); + + if let Some(custom_pages_dir) = custom_pages_dir { + let is_page = |entry: &DirEntry| -> bool { + let extension = entry.path().extension().unwrap_or_default(); + entry.file_type().is_file() && extension == "page" + }; + + let custom_pages = WalkDir::new(custom_pages_dir) + .min_depth(1) + .max_depth(1) + .into_iter() + .filter_entry(is_page) + .filter_map(Result::ok) + .filter_map(to_stem); + + pages.extend(custom_pages); + } + pages.sort(); pages.dedup(); Ok(pages) diff --git a/src/main.rs b/src/main.rs index 8449565..d7d0091 100644 --- a/src/main.rs +++ b/src/main.rs @@ -365,10 +365,12 @@ fn main() { // List cached commands and exit if args.list { // Get list of pages - let pages = cache.list_pages().unwrap_or_else(|e| { - print_error(enable_styles, &e.context("Could not get list of pages")); - process::exit(1); - }); + let pages = cache + .list_pages(config.directories.custom_pages_dir.as_deref()) + .unwrap_or_else(|e| { + print_error(enable_styles, &e.context("Could not get list of pages")); + process::exit(1); + }); // Print pages println!("{}", pages.join("\n")); diff --git a/tests/lib.rs b/tests/lib.rs index 1b25bdb..6e66764 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -513,6 +513,12 @@ fn test_pager_flag_enable() { fn test_list_flag_rendering() { let testenv = TestEnv::new(); + // set custom pages directory + testenv.write_config(format!( + "[directories]\ncustom_pages_dir = '{}'", + testenv.custom_pages_dir.path().to_str().unwrap() + )); + testenv .command() .args(["--list"]) @@ -532,13 +538,17 @@ fn test_list_flag_rendering() { testenv.add_entry("bar", ""); testenv.add_entry("baz", ""); testenv.add_entry("qux", ""); + testenv.add_page_entry("faz", ""); + testenv.add_page_entry("bar", ""); + testenv.add_page_entry("fiz", ""); + testenv.add_patch_entry("buz", ""); testenv .command() .args(["--list"]) .assert() .success() - .stdout("bar\nbaz\nfoo\nqux\n"); + .stdout("bar\nbaz\nfaz\nfiz\nfoo\nqux\n"); } #[test] From f45a502383917c98b7bb3cace40f0e4c0efbdded Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 24 Sep 2022 22:54:01 +0200 Subject: [PATCH 230/368] Run cargo update (#287) --- Cargo.lock | 456 ++++++++++++++++++++++++++--------------------------- 1 file changed, 223 insertions(+), 233 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5d2a872..a5acd53 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,9 +10,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "0.7.18" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" dependencies = [ "memchr", ] @@ -28,15 +28,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.57" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" +checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" [[package]] name = "app_dirs2" -version = "2.4.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f731ef6e0f345c835c86724f619d3a73d8be0a9505b83d5e2fa34fd1d50261" +checksum = "47a8d2d8dbda5fca0a522259fb88e4f55d2b10ad39f5f03adeebf85031eba501" dependencies = [ "jni", "ndk-context", @@ -100,9 +100,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.9.1" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" [[package]] name = "byteorder" @@ -112,9 +112,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" [[package]] name = "cc" @@ -136,16 +136,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.1.15" +version = "3.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a35a599b11c089a7f49105658d089b8f2cf0882993c17daf6de15285c2c35d" +checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" dependencies = [ "atty", "bitflags", "clap_derive", "clap_lex", "indexmap", - "lazy_static", + "once_cell", "strsim", "termcolor", "textwrap", @@ -153,9 +153,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.7" +version = "3.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" +checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" dependencies = [ "heck", "proc-macro-error", @@ -166,18 +166,18 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.2.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" dependencies = [ "os_str_bytes", ] [[package]] name = "combine" -version = "4.6.4" +version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a604e93b79d1808327a6fca85a6f2d69de66461e7620f5a4cbf5fb4d1d7c948" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" dependencies = [ "bytes", "memchr", @@ -210,12 +210,12 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" dependencies = [ "cfg-if", - "lazy_static", + "once_cell", ] [[package]] @@ -252,9 +252,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "encoding_rs" @@ -267,9 +267,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272" dependencies = [ "atty", "humantime", @@ -313,34 +313,32 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" dependencies = [ "instant", ] [[package]] name = "filetime" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c" +checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c" dependencies = [ "cfg-if", "libc", "redox_syscall", - "winapi", + "windows-sys", ] [[package]] name = "flate2" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "cfg-if", "crc32fast", - "libc", "miniz_oxide", ] @@ -361,52 +359,51 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] [[package]] name = "futures-channel" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" +checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf" [[package]] name = "futures-io" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" +checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68" [[package]] name = "futures-sink" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" +checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56" [[package]] name = "futures-task" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" +checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" [[package]] name = "futures-util" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90" dependencies = [ "futures-core", "futures-io", @@ -419,20 +416,20 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ "cfg-if", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi", ] [[package]] name = "h2" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" +checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" dependencies = [ "bytes", "fnv", @@ -449,9 +446,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.11.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "heck" @@ -470,9 +467,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", @@ -481,9 +478,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", @@ -492,9 +489,9 @@ dependencies = [ [[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" @@ -510,9 +507,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.18" +version = "0.14.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" dependencies = [ "bytes", "futures-channel", @@ -547,20 +544,19 @@ dependencies = [ [[package]] name = "idna" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "indexmap" -version = "1.8.1" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", "hashbrown", @@ -583,18 +579,18 @@ checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "itertools" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" [[package]] name = "jni" @@ -618,9 +614,9 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.57" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] @@ -633,9 +629,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.125" +version = "0.2.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" +checksum = "c0f80d65747a3e43d1596c7c5492d95d5edddaabd45a7fcdb02b95f644164966" [[package]] name = "log" @@ -646,12 +642,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "memchr" version = "2.5.0" @@ -666,34 +656,23 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "miniz_oxide" -version = "0.5.1" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" +checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" +checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" dependencies = [ "libc", "log", - "miow", - "ntapi", - "wasi 0.11.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "wasi", + "windows-sys", ] [[package]] @@ -708,15 +687,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - [[package]] name = "num-traits" version = "0.2.15" @@ -738,9 +708,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.10.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" [[package]] name = "openssl-probe" @@ -750,15 +720,15 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" [[package]] name = "pager" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c7d08cf0d0b55c4f0ffedb5e06569ea212e85d622975071370393970491968" +checksum = "2599211a5c97fbbb1061d3dc751fa15f404927e4846e07c643287d6d1f462880" dependencies = [ "errno", "libc", @@ -766,9 +736,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pin-project-lite" @@ -838,27 +808,27 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.37" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "quote" -version = "1.0.18" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] [[package]] name = "redox_syscall" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] @@ -876,9 +846,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "aho-corasick", "memchr", @@ -893,9 +863,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "remove_dir_all" @@ -908,9 +878,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.10" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" +checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" dependencies = [ "base64", "bytes", @@ -924,19 +894,20 @@ dependencies = [ "hyper-rustls", "ipnet", "js-sys", - "lazy_static", "log", "mime", + "once_cell", "percent-encoding", "pin-project-lite", "rustls", "rustls-native-certs", - "rustls-pemfile 0.3.0", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-rustls", + "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -962,9 +933,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.4" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbfeb8d0ddb84706bc597a5574ab8912817c52a397f819e5b614e2265206921" +checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" dependencies = [ "log", "ring", @@ -979,34 +950,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.0", + "rustls-pemfile", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "0.3.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" -dependencies = [ - "base64", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" +checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" dependencies = [ "base64", ] [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "same-file" @@ -1019,12 +981,12 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "winapi", + "windows-sys", ] [[package]] @@ -1039,9 +1001,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ "bitflags", "core-foundation", @@ -1062,18 +1024,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.137" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" dependencies = [ "proc-macro2", "quote", @@ -1082,9 +1044,9 @@ 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", "ryu", @@ -1105,15 +1067,18 @@ dependencies = [ [[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 = "socket2" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", "winapi", @@ -1133,13 +1098,13 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.92" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52" +checksum = "52205623b1b0f064a4e71182c3b18ae902267282930c6d5462c91b859668426e" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1198,24 +1163,24 @@ checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" [[package]] name = "textwrap" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" +checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" [[package]] name = "thiserror" -version = "1.0.31" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" +checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.31" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" +checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783" dependencies = [ "proc-macro2", "quote", @@ -1239,10 +1204,11 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.18.1" +version = "1.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce653fb475565de9f6fb0614b28bca8df2c430c0cf84bcd9c843f15de5414cc" +checksum = "0020c875007ad96677dcc890298f4b942882c5d4eb7cc8f439fc3bf813dc9c95" dependencies = [ + "autocfg", "bytes", "libc", "memchr", @@ -1256,9 +1222,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.23.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4151fda0cf2798550ad0b34bcfc9b9dcc2a9d2471c895c68f3a8818e54f2389e" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ "rustls", "tokio", @@ -1267,9 +1233,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ "bytes", "futures-core", @@ -1290,40 +1256,28 @@ dependencies = [ [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" dependencies = [ "cfg-if", "pin-project-lite", - "tracing-attributes", "tracing-core", ] -[[package]] -name = "tracing-attributes" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "tracing-core" -version = "0.1.26" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] @@ -1339,20 +1293,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] -name = "unicode-normalization" -version = "0.1.19" +name = "unicode-ident" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-xid" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" - [[package]] name = "untrusted" version = "0.7.1" @@ -1361,13 +1315,12 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", ] @@ -1407,12 +1360,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -1421,9 +1368,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.80" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1431,13 +1378,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.80" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1446,9 +1393,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.30" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ "cfg-if", "js-sys", @@ -1458,9 +1405,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.80" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1468,9 +1415,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.80" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1481,15 +1428,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.80" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "web-sys" -version = "0.3.57" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", @@ -1507,9 +1454,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.3" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d8de8415c823c8abd270ad483c6feeac771fad964890779f9a8cb24fbbc1bf" +checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf" dependencies = [ "webpki", ] @@ -1545,6 +1492,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +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", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[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_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[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_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + [[package]] name = "winreg" version = "0.10.1" From 026ae7274220ac4805f22d40dcd8533441a28210 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 27 Sep 2022 23:55:50 +0200 Subject: [PATCH 231/368] Switch from ansi_term to yansi (#288) ansi_term is not actively maintained anymore (see https://rustsec.org/advisories/RUSTSEC-2021-0139). Replace it with a suitable alternative. I looked at termcolor, owo-colors and yansi and picked yansi: - It is very simple - It does not do terminal color support checking (we already do that in tealdeer) - Its color enum type is almost identical to the one from ansi_term, so migrating is easy The only change from a config API point of view is that "purple" is now renamed to "magenta", but "purple" still works. --- Cargo.lock | 17 +++++++---------- Cargo.toml | 2 +- docs/src/config_style.md | 2 +- src/config.rs | 13 +++++++------ src/main.rs | 2 +- src/utils.rs | 5 ++--- 6 files changed, 19 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a5acd53..a812506 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,15 +17,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "anyhow" version = "1.0.65" @@ -1111,7 +1102,6 @@ dependencies = [ name = "tealdeer" version = "1.5.0" dependencies = [ - "ansi_term", "anyhow", "app_dirs2", "assert_cmd", @@ -1129,6 +1119,7 @@ dependencies = [ "tempfile", "toml", "walkdir", + "yansi", "zip", ] @@ -1553,6 +1544,12 @@ dependencies = [ "dirs", ] +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + [[package]] name = "zip" version = "0.6.2" diff --git a/Cargo.toml b/Cargo.toml index 91c87a1..d845906 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,6 @@ name = "tldr" path = "src/main.rs" [dependencies] -ansi_term = "0.12.0" anyhow = "1" app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" @@ -32,6 +31,7 @@ serde = "1.0.21" serde_derive = "1.0.21" toml = "0.5.1" walkdir = "2.0.1" +yansi = "0.5" zip = { version = "0.6", default-features = false, features = ["deflate"] } [target.'cfg(not(windows))'.dependencies] diff --git a/docs/src/config_style.md b/docs/src/config_style.md index be2a4cc..527e3e5 100644 --- a/docs/src/config_style.md +++ b/docs/src/config_style.md @@ -22,7 +22,7 @@ Using the config file, the style (e.g. colors or underlines) can be customized. Colors can be specified in one of three ways: -- Color string (`black`, `red`, `green`, `yellow`, `blue`, `purple`, `cyan`, `white`): +- Color string (`black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`): Example: diff --git a/src/config.rs b/src/config.rs index 06f5fd4..74ba195 100644 --- a/src/config.rs +++ b/src/config.rs @@ -5,11 +5,11 @@ use std::{ time::Duration, }; -use ansi_term::{Color, Style}; use anyhow::{ensure, Context, Result}; use app_dirs::{get_app_root, AppDataType}; use log::debug; use serde_derive::{Deserialize, Serialize}; +use yansi::{Color, Style}; use crate::types::PathSource; @@ -37,7 +37,8 @@ pub enum RawColor { Green, Yellow, Blue, - Purple, + Magenta, + Purple, // Backwards compatibility with ansi_term (until tealdeer 1.5.0) Cyan, White, Ansi(u8), @@ -52,7 +53,7 @@ impl From for Color { RawColor::Green => Self::Green, RawColor::Yellow => Self::Yellow, RawColor::Blue => Self::Blue, - RawColor::Purple => Self::Purple, + RawColor::Magenta | RawColor::Purple => Self::Magenta, RawColor::Cyan => Self::Cyan, RawColor::White => Self::White, RawColor::Ansi(num) => Self::Fixed(num), @@ -95,7 +96,7 @@ impl From for Style { } if let Some(background) = raw_style.background { - style = style.on(Color::from(background)); + style = style.bg(Color::from(background)); } if raw_style.underline { @@ -215,7 +216,7 @@ impl Default for RawConfig { } } -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct StyleConfig { pub description: Style, pub command_name: Style, @@ -241,7 +242,7 @@ pub struct DirectoriesConfig { pub custom_pages_dir: Option, } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Config { pub style: StyleConfig, pub display: DisplayConfig, diff --git a/src/main.rs b/src/main.rs index d7d0091..6752358 100644 --- a/src/main.rs +++ b/src/main.rs @@ -263,7 +263,7 @@ fn main() { // Determine the usage of styles #[cfg(target_os = "windows")] - let ansi_support = ansi_term::enable_ansi_support().is_ok(); + let ansi_support = yansi::Paint::enable_windows_ascii(); #[cfg(not(target_os = "windows"))] let ansi_support = true; let enable_styles = match args.color.unwrap_or_default() { diff --git a/src/utils.rs b/src/utils.rs index b47d9f6..879733a 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,4 +1,4 @@ -use ansi_term::{Color, Style}; +use yansi::Color; /// Print a warning to stderr. If `enable_styles` is true, then a yellow /// message will be printed. @@ -19,8 +19,7 @@ pub fn print_error(enable_styles: bool, error: &anyhow::Error) { fn print_msg(enable_styles: bool, message: &str, prefix: &'static str, color: Color) { if enable_styles { - let style = Style::new().fg(color); - eprintln!("{}{}", style.paint(prefix), style.paint(message)); + eprintln!("{}{}", color.paint(prefix), color.paint(message)); } else { eprintln!("{}", message); } From 33f0f108d8c39f8039966d5b9a008ad5ddf754eb Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 16 Jun 2022 20:33:04 +0200 Subject: [PATCH 232/368] Allow overriding cache directory through config - Config: Add `cache_dir` to `[directories]` section - Logic to handle legacy env var, config override and default cache dir selection is now in the `Config::try_from(RawConfig)` impl - Deprecate old `TEALDEER_CACHE_DIR` env variable - Update docs Co-authored-by: Hans Gaiser --- docs/src/config_directories.md | 13 ++++ src/cache.rs | 137 ++++++++++++++------------------- src/config.rs | 94 +++++++++++++++------- src/main.rs | 71 ++++++++--------- tests/lib.rs | 9 ++- 5 files changed, 170 insertions(+), 154 deletions(-) diff --git a/docs/src/config_directories.md b/docs/src/config_directories.md index d894e90..b194dbb 100644 --- a/docs/src/config_directories.md +++ b/docs/src/config_directories.md @@ -2,6 +2,19 @@ This section allows overriding some directory paths. +## `cache_dir` + +Override the cache directory. Remember to use an absolute path. Variable +expansion will not be performed on the path. If the directory does not yet +exist, it will be created. + + [directories] + cache_dir = "/home/myuser/.tealdeer-cache/" + +If no `cache_dir` is specified, tealdeer will fall back to a location that +follows OS conventions. On Linux, it will usually be at `~/.cache/tealdeer/`. +Use `tldr --show-paths` to show the path that is being used. + ## `custom_pages_dir` Set the directory to be used to look up [custom diff --git a/src/cache.rs b/src/cache.rs index 66b1ef7..35807ea 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -8,15 +8,12 @@ use std::{ }; use anyhow::{ensure, Context, Result}; -use app_dirs::{get_app_root, AppDataType}; use log::debug; use reqwest::{blocking::Client, Proxy}; use walkdir::{DirEntry, WalkDir}; use zip::ZipArchive; -use crate::types::{PathSource, PlatformType}; - -static CACHE_DIR_ENV_VAR: &str = "TEALDEER_CACHE_DIR"; +use crate::types::PlatformType; pub static TLDR_PAGES_DIR: &str = "tldr-pages"; static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; @@ -25,6 +22,7 @@ static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; pub struct Cache { url: String, platform: PlatformType, + cache_dir: PathBuf, } #[derive(Debug)] @@ -54,13 +52,13 @@ impl PageLookupResult { pub fn reader(&self) -> Result>> { // Open page file let page_file = File::open(&self.page_path) - .with_context(|| format!("Could not open page file at {:?}", self.page_path))?; + .with_context(|| format!("Could not open page file at {}", self.page_path.display()))?; // Open patch file let patch_file_opt = match &self.patch_path { Some(path) => Some( File::open(path) - .with_context(|| format!("Could not open patch file at {:?}", path))?, + .with_context(|| format!("Could not open patch file at {}", path.display()))?, ), None => None, }; @@ -89,49 +87,42 @@ pub enum CacheFreshness { } impl Cache { - pub fn new(url: S, platform: PlatformType) -> Self + pub fn new(url: S, platform: PlatformType, cache_dir: P) -> Result where S: Into, + P: Into, { - Self { + // Check whether `cache_dir` exists and is a directory + let cache_dir = cache_dir.into(); + let (cache_dir_exists, cache_dir_is_dir) = cache_dir + .metadata() + .map_or((false, false), |md| (true, md.is_dir())); + ensure!( + !cache_dir_exists || cache_dir_is_dir, + "Cache directory path `{}` is not a directory", + cache_dir.display(), + ); + + // If necessary, create cache directory + if !cache_dir_exists { + // Try to create the complete directory path + fs::create_dir_all(&cache_dir).with_context(|| { + format!( + "Cache directory path `{}` cannot be created", + cache_dir.display(), + ) + })?; + eprintln!( + "Successfully created cache directory path `{}`.", + cache_dir.display(), + ); + } + + Ok(Self { url: url.into(), platform, - } - } - - /// Return the path to the cache directory. - pub fn get_cache_dir() -> Result<(PathBuf, PathSource)> { - // Allow overriding the cache directory by setting the env variable. - if let Ok(value) = env::var(CACHE_DIR_ENV_VAR) { - let path = PathBuf::from(value); - let (path_exists, path_is_dir) = path - .metadata() - .map_or((false, false), |md| (true, md.is_dir())); - ensure!( - !path_exists || path_is_dir, - "Path specified by ${} is not a directory", - CACHE_DIR_ENV_VAR - ); - if !path_exists { - // Try to create the complete directory path. - fs::create_dir_all(&path).with_context(|| { - format!( - "Directory path specified by ${} cannot be created", - CACHE_DIR_ENV_VAR - ) - })?; - eprintln!( - "Successfully created cache directory path `{}`.", - path.to_str().unwrap() - ); - } - return Ok((path, PathSource::EnvVar)); - }; - - // Otherwise, fall back to user cache directory. - let dirs = get_app_root(AppDataType::UserCache, &crate::APP_INFO) - .context("Could not determine user cache directory")?; - Ok((dirs, PathSource::OsConvention)) + cache_dir, + }) } /// Download the archive @@ -171,12 +162,7 @@ impl Cache { .context("Could not decompress downloaded ZIP archive")?; // Determine paths - let (cache_dir, _) = Self::get_cache_dir()?; - let pages_dir = cache_dir.join(TLDR_PAGES_DIR); - - // Make sure that cache directory exists - debug!("Ensure cache directory {:?} exists", &cache_dir); - fs::create_dir_all(&cache_dir).context("Could not create cache directory")?; + let pages_dir = self.cache_dir.join(TLDR_PAGES_DIR); // Clear cache directory // Note: This is not the best solution. Ideally we would download the @@ -184,7 +170,8 @@ impl Cache { // But renaming a directory doesn't work across filesystems and Rust // does not yet offer a recursive directory copying function. So for // now, we'll use this approach. - Self::clear().context("Could not clear the cache directory")?; + self.clear() + .context("Could not clear the cache directory")?; // Extract archive archive @@ -195,21 +182,19 @@ impl Cache { } /// Return the duration since the cache directory was last modified. - pub fn last_update() -> Option { - if let Ok((cache_dir, _)) = Self::get_cache_dir() { - if let Ok(metadata) = fs::metadata(cache_dir.join(TLDR_PAGES_DIR)) { - if let Ok(mtime) = metadata.modified() { - let now = SystemTime::now(); - return now.duration_since(mtime).ok(); - }; + pub fn last_update(&self) -> Option { + if let Ok(metadata) = fs::metadata(self.cache_dir.join(TLDR_PAGES_DIR)) { + if let Ok(mtime) = metadata.modified() { + let now = SystemTime::now(); + return now.duration_since(mtime).ok(); }; }; None } /// Return the freshness of the cache (fresh, stale or missing). - pub fn freshness() -> CacheFreshness { - match Cache::last_update() { + pub fn freshness(&self) -> CacheFreshness { + match self.last_update() { Some(ago) if ago > crate::config::MAX_CACHE_AGE => CacheFreshness::Stale(ago), Some(_) => CacheFreshness::Fresh, None => CacheFreshness::Missing, @@ -258,15 +243,8 @@ impl Cache { let patch_filename = format!("{}.patch", name); let custom_filename = format!("{}.page", name); - // Get cache dir - let cache_dir = match Self::get_cache_dir() { - Ok((cache_dir, _)) => cache_dir.join(TLDR_PAGES_DIR), - Err(e) => { - log::error!("Could not get cache directory: {}", e); - return None; - } - }; - + // Determine directories + let cache_dir = self.cache_dir.join(TLDR_PAGES_DIR); let lang_dirs: Vec = languages .iter() .map(|lang| { @@ -302,10 +280,9 @@ impl Cache { } /// Return the available pages. - pub fn list_pages(&self, custom_pages_dir: Option<&Path>) -> Result> { + pub fn list_pages(&self, custom_pages_dir: Option<&Path>) -> Vec { // Determine platforms directory and platform - let (cache_dir, _) = Self::get_cache_dir()?; - let platforms_dir = cache_dir.join(TLDR_PAGES_DIR).join("pages"); + let platforms_dir = self.cache_dir.join(TLDR_PAGES_DIR).join("pages"); let platform_dir = self.get_platform_dir(); // Closure that allows the WalkDir instance to traverse platform @@ -367,29 +344,27 @@ impl Cache { pages.sort(); pages.dedup(); - Ok(pages) + pages } /// Delete the cache directory. - pub fn clear() -> Result<()> { - let (path, _) = Self::get_cache_dir()?; - + pub fn clear(&self) -> Result<()> { // Check preconditions ensure!( - path.exists(), + self.cache_dir.exists(), "Cache path ({}) does not exist.", - path.display(), + self.cache_dir.display(), ); ensure!( - path.is_dir(), + self.cache_dir.is_dir(), "Cache path ({}) is not a directory.", - path.display() + self.cache_dir.display(), ); // Delete old tldr-pages cache location as well if present // TODO: To be removed in the future for pages_dir_name in [TLDR_PAGES_DIR, TLDR_OLD_PAGES_DIR] { - let pages_dir = path.join(pages_dir_name); + let pages_dir = self.cache_dir.join(pages_dir_name); if pages_dir.exists() { fs::remove_dir_all(&pages_dir).with_context(|| { diff --git a/src/config.rs b/src/config.rs index 74ba195..f5e996a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -5,7 +5,7 @@ use std::{ time::Duration, }; -use anyhow::{ensure, Context, Result}; +use anyhow::{bail, ensure, Context, Result}; use app_dirs::{get_app_root, AppDataType}; use log::debug; use serde_derive::{Deserialize, Serialize}; @@ -164,6 +164,8 @@ impl Default for RawUpdatesConfig { #[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] struct RawDirectoriesConfig { + #[serde(default)] + pub cache_dir: Option, #[serde(default)] pub custom_pages_dir: Option, } @@ -171,6 +173,7 @@ struct RawDirectoriesConfig { impl Default for RawDirectoriesConfig { fn default() -> Self { Self { + cache_dir: None, custom_pages_dir: get_app_root(AppDataType::UserData, &crate::APP_INFO) .map(|path| { // Note: The `join("")` call ensures that there's a trailing slash @@ -239,6 +242,7 @@ pub struct UpdatesConfig { #[derive(Clone, Debug, PartialEq, Eq)] pub struct DirectoriesConfig { + pub cache_dir: PathBuf, pub custom_pages_dir: Option, } @@ -250,34 +254,66 @@ pub struct Config { pub directories: DirectoriesConfig, } -impl From for Config { - fn from(raw_config: RawConfig) -> Self { - Self { - style: StyleConfig { - command_name: raw_config.style.command_name.into(), - description: raw_config.style.description.into(), - example_text: raw_config.style.example_text.into(), - example_code: raw_config.style.example_code.into(), - example_variable: raw_config.style.example_variable.into(), - }, - display: DisplayConfig { - compact: raw_config.display.compact, - use_pager: raw_config.display.use_pager, - }, - updates: UpdatesConfig { - auto_update: raw_config.updates.auto_update, - auto_update_interval: Duration::from_secs( - raw_config.updates.auto_update_interval_hours * 3600, - ), - }, - directories: DirectoriesConfig { - custom_pages_dir: raw_config.directories.custom_pages_dir, - }, - } - } -} - impl Config { + /// Convert a `RawConfig` to a high-level `Config`. + /// + /// For this, some values need to be converted to other types and some + /// defaults need to be set (sometimes based on env variables). + fn from_raw(raw_config: RawConfig) -> Result { + // Style config + let style = StyleConfig { + command_name: raw_config.style.command_name.into(), + description: raw_config.style.description.into(), + example_text: raw_config.style.example_text.into(), + example_code: raw_config.style.example_code.into(), + example_variable: raw_config.style.example_variable.into(), + }; + + // Display config + let display = DisplayConfig { + compact: raw_config.display.compact, + use_pager: raw_config.display.use_pager, + }; + + // Updates config + let updates = UpdatesConfig { + auto_update: raw_config.updates.auto_update, + auto_update_interval: Duration::from_secs( + raw_config.updates.auto_update_interval_hours * 3600, + ), + }; + + // Directories config + let cache_dir_env_var = "TEALDEER_CACHE_DIR"; + let cache_dir = if let Ok(env_var) = env::var(cache_dir_env_var) { + // For backwards compatibility reasons, the cache directory can be + // overridden using an env variable. This is deprecated and will be + // phased out in the future. + eprintln!("Warning: The ${} env variable is deprecated, use the `cache_dir` option in the config file instead.", cache_dir_env_var); + PathBuf::from(env_var) + } else if let Some(config_value) = raw_config.directories.cache_dir { + // If the user explicitly configured a cache directory, use that. + config_value + } else if let Ok(default_dir) = get_app_root(AppDataType::UserCache, &crate::APP_INFO) { + // Otherwise, fall back to the default user cache directory. + default_dir + } else { + // If everything fails, give up + bail!("Could not determine user cache directory"); + }; + let directories = DirectoriesConfig { + cache_dir, + custom_pages_dir: raw_config.directories.custom_pages_dir, + }; + + Ok(Self { + style, + display, + updates, + directories, + }) + } + pub fn load(enable_styles: bool) -> Result { debug!("Loading config"); @@ -301,7 +337,7 @@ impl Config { }; // Convert to config - let mut config = Self::from(raw_config); + let mut config = Self::from_raw(raw_config).context("Could not process raw config")?; // Potentially override styles if !enable_styles { diff --git a/src/main.rs b/src/main.rs index 6752358..83cb673 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,11 +59,13 @@ const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; /// The cache should be updated if it was explicitly requested, /// or if an automatic update is due and allowed. -fn should_update_cache(args: &Args, config: &Config) -> bool { +fn should_update_cache(cache: &Cache, args: &Args, config: &Config) -> bool { args.update || (!args.no_auto_update && config.updates.auto_update - && Cache::last_update().map_or(true, |ago| ago >= config.updates.auto_update_interval)) + && cache + .last_update() + .map_or(true, |ago| ago >= config.updates.auto_update_interval)) } #[derive(PartialEq)] @@ -73,8 +75,8 @@ enum CheckCacheResult { } /// Check the cache for freshness. If it's stale or missing, show a warning. -fn check_cache(args: &Args, enable_styles: bool) -> CheckCacheResult { - match Cache::freshness() { +fn check_cache(cache: &Cache, args: &Args, enable_styles: bool) -> CheckCacheResult { + match cache.freshness() { CacheFreshness::Fresh => CheckCacheResult::CacheFound, CacheFreshness::Stale(_) if args.quiet => CheckCacheResult::CacheFound, CacheFreshness::Stale(age) => { @@ -109,8 +111,8 @@ fn check_cache(args: &Args, enable_styles: bool) -> CheckCacheResult { } /// Clear the cache -fn clear_cache(quietly: bool, enable_styles: bool) { - Cache::clear().unwrap_or_else(|e| { +fn clear_cache(cache: &Cache, quietly: bool, enable_styles: bool) { + cache.clear().unwrap_or_else(|e| { print_error(enable_styles, &e.context("Could not clear cache")); process::exit(1); }); @@ -157,28 +159,15 @@ fn show_paths(config: &Config) { ); let config_path = get_config_path().map_or_else( |e| format!("[Error: {}]", e), - |(path, _)| path.to_str().unwrap_or("[Invalid]").to_string(), - ); - let cache_dir = Cache::get_cache_dir().map_or_else( - |e| format!("[Error: {}]", e), - |(mut path, source)| { - path.push(""); // Trailing path separator - match path.to_str() { - Some(path) => format!("{} ({})", path, source), - None => "[Invalid]".to_string(), - } - }, - ); - let pages_dir = Cache::get_cache_dir().map_or_else( - |e| format!("[Error: {}]", e), - |(mut path, _)| { - path.push(TLDR_PAGES_DIR); - path.push(""); // Trailing path separator - path.into_os_string() - .into_string() - .unwrap_or_else(|_| "[Invalid]".to_string()) - }, + |(path, _)| path.display().to_string(), ); + let cache_dir = config.directories.cache_dir.display(); + let pages_dir = { + let mut path = config.directories.cache_dir.clone(); + path.push(TLDR_PAGES_DIR); + path.push(""); // Trailing path separator + path.display().to_string() + }; let custom_pages_dir = config.directories.custom_pages_dir.as_deref().map_or_else( || "[None]".to_string(), |path| { @@ -339,15 +328,19 @@ fn main() { } // Initialize cache - let cache = Cache::new(ARCHIVE_URL, platform); + let cache = + Cache::new(ARCHIVE_URL, platform, &config.directories.cache_dir).unwrap_or_else(|e| { + print_error(enable_styles, &e.context("Could not initialize cache")); + process::exit(1); + }); // Clear cache, pass through if args.clear_cache { - clear_cache(args.quiet, enable_styles); + clear_cache(&cache, args.quiet, enable_styles); } // Cache update, pass through - let cache_updated = if should_update_cache(&args, &config) { + let cache_updated = if should_update_cache(&cache, &args, &config) { update_cache(&cache, args.quiet, enable_styles); true } else { @@ -357,23 +350,19 @@ fn main() { // Check cache presence and freshness if !cache_updated && (args.list || !args.command.is_empty()) - && check_cache(&args, enable_styles) == CheckCacheResult::CacheMissing + && check_cache(&cache, &args, enable_styles) == CheckCacheResult::CacheMissing { process::exit(1); } // List cached commands and exit if args.list { - // Get list of pages - let pages = cache - .list_pages(config.directories.custom_pages_dir.as_deref()) - .unwrap_or_else(|e| { - print_error(enable_styles, &e.context("Could not get list of pages")); - process::exit(1); - }); - - // Print pages - println!("{}", pages.join("\n")); + println!( + "{}", + cache + .list_pages(config.directories.custom_pages_dir.as_deref()) + .join("\n") + ); process::exit(0); } diff --git a/tests/lib.rs b/tests/lib.rs index 6e66764..71efe09 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -263,9 +263,12 @@ fn test_cache_location_not_a_directory() { .assert() .failure() .stderr(contains(format!( - "Path specified by ${} is not a directory", - CACHE_DIR_ENV_VAR - ))); + "Cache directory path `{}` is not a directory", + internal_file.display(), + ))) + .stderr(contains( + "Warning: The $TEALDEER_CACHE_DIR env variable is deprecated", + )); } #[test] From afbdfa674686e2e64bfa45a5555bbd013d4b5650 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 16 Jun 2022 20:57:03 +0200 Subject: [PATCH 233/368] Bring back path source for cache directory --- src/config.rs | 23 +++++++++++++++++++---- src/main.rs | 12 ++++++++---- src/types.rs | 10 ++++------ 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/src/config.rs b/src/config.rs index f5e996a..28c15ef 100644 --- a/src/config.rs +++ b/src/config.rs @@ -240,9 +240,15 @@ pub struct UpdatesConfig { pub auto_update_interval: Duration, } +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct PathWithSource { + pub path: PathBuf, + pub source: PathSource, +} + #[derive(Clone, Debug, PartialEq, Eq)] pub struct DirectoriesConfig { - pub cache_dir: PathBuf, + pub cache_dir: PathWithSource, pub custom_pages_dir: Option, } @@ -290,13 +296,22 @@ impl Config { // overridden using an env variable. This is deprecated and will be // phased out in the future. eprintln!("Warning: The ${} env variable is deprecated, use the `cache_dir` option in the config file instead.", cache_dir_env_var); - PathBuf::from(env_var) + PathWithSource { + path: PathBuf::from(env_var), + source: PathSource::EnvVar, + } } else if let Some(config_value) = raw_config.directories.cache_dir { // If the user explicitly configured a cache directory, use that. - config_value + PathWithSource { + path: config_value, + source: PathSource::ConfigFile, + } } else if let Ok(default_dir) = get_app_root(AppDataType::UserCache, &crate::APP_INFO) { // Otherwise, fall back to the default user cache directory. - default_dir + PathWithSource { + path: default_dir, + source: PathSource::OsConvention, + } } else { // If everything fails, give up bail!("Could not determine user cache directory"); diff --git a/src/main.rs b/src/main.rs index 83cb673..c1151bf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -161,9 +161,13 @@ fn show_paths(config: &Config) { |e| format!("[Error: {}]", e), |(path, _)| path.display().to_string(), ); - let cache_dir = config.directories.cache_dir.display(); + let cache_dir = format!( + "{} ({})", + config.directories.cache_dir.path.display(), + config.directories.cache_dir.source + ); let pages_dir = { - let mut path = config.directories.cache_dir.clone(); + let mut path = config.directories.cache_dir.path.clone(); path.push(TLDR_PAGES_DIR); path.push(""); // Trailing path separator path.display().to_string() @@ -328,8 +332,8 @@ fn main() { } // Initialize cache - let cache = - Cache::new(ARCHIVE_URL, platform, &config.directories.cache_dir).unwrap_or_else(|e| { + let cache = Cache::new(ARCHIVE_URL, platform, &config.directories.cache_dir.path) + .unwrap_or_else(|e| { print_error(enable_styles, &e.context("Could not initialize cache")); process::exit(1); }); diff --git a/src/types.rs b/src/types.rs index 683a81a..f3318a9 100644 --- a/src/types.rs +++ b/src/types.rs @@ -185,16 +185,14 @@ impl LineType { } /// The reason why a certain path (e.g. config path or cache dir) was chosen. -#[derive(Debug, PartialEq, Eq)] +#[derive(Debug, PartialEq, Eq, Copy, Clone)] pub enum PathSource { /// OS convention (e.g. XDG on Linux) OsConvention, /// Env variable (TEALDEER_*) EnvVar, - - #[allow(dead_code)] // Waiting for Pull Request #141 - /// Config file variable - ConfigVar, + /// Config file + ConfigFile, } impl fmt::Display for PathSource { @@ -205,7 +203,7 @@ impl fmt::Display for PathSource { match self { Self::OsConvention => "OS convention", Self::EnvVar => "env variable", - Self::ConfigVar => "config file variable", + Self::ConfigFile => "config file", } ) } From 7338933de543cc1c05db91aa396c8460513033a6 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 16 Jun 2022 21:20:05 +0200 Subject: [PATCH 234/368] Add integration test for cache_dir --- tests/lib.rs | 62 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/tests/lib.rs b/tests/lib.rs index 71efe09..230b2f2 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -10,9 +10,9 @@ use std::{ use assert_cmd::prelude::*; use predicates::{ boolean::PredicateBooleanExt, - prelude::predicate::str::{contains, diff, is_empty}, + prelude::predicate::str::{contains, diff, is_empty, is_match}, }; -use tempfile::{Builder, TempDir}; +use tempfile::{Builder as TempfileBuilder, TempDir}; // TODO: Should be 'cache::CACHE_DIR_ENV_VAR'. This requires to have a library crate for the logic. static CACHE_DIR_ENV_VAR: &str = "TEALDEER_CACHE_DIR"; @@ -31,13 +31,22 @@ struct TestEnv { impl TestEnv { fn new() -> Self { TestEnv { - cache_dir: Builder::new().prefix(".tldr.test.cache").tempdir().unwrap(), - config_dir: Builder::new().prefix(".tldr.test.conf").tempdir().unwrap(), - custom_pages_dir: Builder::new() + cache_dir: TempfileBuilder::new() + .prefix(".tldr.test.cache") + .tempdir() + .unwrap(), + config_dir: TempfileBuilder::new() + .prefix(".tldr.test.conf") + .tempdir() + .unwrap(), + custom_pages_dir: TempfileBuilder::new() .prefix(".tldr.test.custom-pages") .tempdir() .unwrap(), - input_dir: Builder::new().prefix(".tldr.test.input").tempdir().unwrap(), + input_dir: TempfileBuilder::new() + .prefix(".tldr.test.input") + .tempdir() + .unwrap(), default_features: true, features: vec![], } @@ -271,6 +280,47 @@ fn test_cache_location_not_a_directory() { )); } +#[test] +fn test_cache_location_source() { + let testenv = TestEnv::new(); + let default_cache_dir = testenv.cache_dir.path(); + let tmp_cache_dir = TempfileBuilder::new() + .prefix(".tldr.test.cache_dir") + .tempdir() + .unwrap(); + + // Source: Default (OS convention) + let mut command = testenv.command(); + command.env_remove(CACHE_DIR_ENV_VAR); + command + .arg("--show-paths") + .assert() + .success() + .stdout(is_match("\nCache dir: [^(]* \\(OS convention\\)\n").unwrap()); + + // Source: Config variable + let mut command = testenv.command(); + command.env_remove(CACHE_DIR_ENV_VAR); + testenv.write_config(format!( + "[directories]\ncache_dir = '{}'", + tmp_cache_dir.path().to_str().unwrap(), + )); + command + .arg("--show-paths") + .assert() + .success() + .stdout(is_match("\nCache dir: [^(]* \\(config file\\)\n").unwrap()); + + // Source: Env var + let mut command = testenv.command(); + command.env(CACHE_DIR_ENV_VAR, default_cache_dir.to_str().unwrap()); + command + .arg("--show-paths") + .assert() + .success() + .stdout(is_match("\nCache dir: [^(]* \\(env variable\\)\n").unwrap()); +} + #[test] fn test_setup_seed_config() { let testenv = TestEnv::new(); From fb89303e85a76e8f42e2e639d62df2cbcbd2c2b3 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Thu, 16 Jun 2022 21:51:16 +0200 Subject: [PATCH 235/368] Move custom_pages_dir business logic from RawConfig to Config This also introduces the path source information for that directory, which was previously unknown. --- src/config.rs | 54 +++++++++++++++++++++++++++++++++------------------ src/main.rs | 37 ++++++++++++++++------------------- 2 files changed, 52 insertions(+), 39 deletions(-) diff --git a/src/config.rs b/src/config.rs index 28c15ef..4907de0 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,7 +1,7 @@ use std::{ - env, fs, + env, fmt, fs, io::{Read, Write}, - path::PathBuf, + path::{Path, PathBuf}, time::Duration, }; @@ -162,7 +162,7 @@ impl Default for RawUpdatesConfig { } } -#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] +#[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] struct RawDirectoriesConfig { #[serde(default)] pub cache_dir: Option, @@ -170,20 +170,6 @@ struct RawDirectoriesConfig { pub custom_pages_dir: Option, } -impl Default for RawDirectoriesConfig { - fn default() -> Self { - Self { - cache_dir: None, - custom_pages_dir: get_app_root(AppDataType::UserData, &crate::APP_INFO) - .map(|path| { - // Note: The `join("")` call ensures that there's a trailing slash - path.join("pages").join("") - }) - .ok(), - } - } -} - #[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(default)] struct RawConfig { @@ -246,10 +232,22 @@ pub struct PathWithSource { pub source: PathSource, } +impl PathWithSource { + pub fn path(&self) -> &Path { + &self.path + } +} + +impl fmt::Display for PathWithSource { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{} ({})", self.path.display(), self.source) + } +} + #[derive(Clone, Debug, PartialEq, Eq)] pub struct DirectoriesConfig { pub cache_dir: PathWithSource, - pub custom_pages_dir: Option, + pub custom_pages_dir: Option, } #[derive(Clone, Debug, PartialEq, Eq)] @@ -316,9 +314,27 @@ impl Config { // If everything fails, give up bail!("Could not determine user cache directory"); }; + let custom_pages_dir = raw_config + .directories + .custom_pages_dir + .map(|path| PathWithSource { + path, + source: PathSource::OsConvention, + }) + .or_else(|| { + get_app_root(AppDataType::UserData, &crate::APP_INFO) + .map(|path| { + // Note: The `join("")` call ensures that there's a trailing slash + PathWithSource { + path: path.join("pages").join(""), + source: PathSource::ConfigFile, + } + }) + .ok() + }); let directories = DirectoriesConfig { cache_dir, - custom_pages_dir: raw_config.directories.custom_pages_dir, + custom_pages_dir, }; Ok(Self { diff --git a/src/main.rs b/src/main.rs index c1151bf..ab30391 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,7 +43,7 @@ mod utils; use crate::{ cache::{Cache, CacheFreshness, PageLookupResult, TLDR_PAGES_DIR}, cli::Args, - config::{get_config_dir, get_config_path, make_default_config, Config}, + config::{get_config_dir, get_config_path, make_default_config, Config, PathWithSource}, extensions::Dedup, output::print_page, types::{ColorOptions, PlatformType}, @@ -161,24 +161,17 @@ fn show_paths(config: &Config) { |e| format!("[Error: {}]", e), |(path, _)| path.display().to_string(), ); - let cache_dir = format!( - "{} ({})", - config.directories.cache_dir.path.display(), - config.directories.cache_dir.source - ); + let cache_dir = config.directories.cache_dir.to_string(); let pages_dir = { let mut path = config.directories.cache_dir.path.clone(); path.push(TLDR_PAGES_DIR); path.push(""); // Trailing path separator path.display().to_string() }; - let custom_pages_dir = config.directories.custom_pages_dir.as_deref().map_or_else( - || "[None]".to_string(), - |path| { - path.to_str() - .map_or_else(|| "[Invalid]".to_string(), ToString::to_string) - }, - ); + let custom_pages_dir = match config.directories.custom_pages_dir { + Some(ref path_with_source) => path_with_source.to_string(), + None => "[None]".to_string(), + }; println!("Config dir: {}", config_dir); println!("Config path: {}", config_path); println!("Cache dir: {}", cache_dir); @@ -361,12 +354,12 @@ fn main() { // List cached commands and exit if args.list { - println!( - "{}", - cache - .list_pages(config.directories.custom_pages_dir.as_deref()) - .join("\n") - ); + let custom_pages_dir = config + .directories + .custom_pages_dir + .as_ref() + .map(PathWithSource::path); + println!("{}", cache.list_pages(custom_pages_dir).join("\n")); process::exit(0); } @@ -386,7 +379,11 @@ fn main() { if let Some(lookup_result) = cache.find_page( &command, &languages, - config.directories.custom_pages_dir.as_deref(), + config + .directories + .custom_pages_dir + .as_ref() + .map(PathWithSource::path), ) { if let Err(ref e) = print_page(&lookup_result, args.raw, enable_styles, args.pager, &config) From 3e7dfb3c7165a257c9dbf1010e9cf4780baa0882 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 24 Sep 2022 21:55:06 +0200 Subject: [PATCH 236/368] Cache: Make URL a parameter, not a field --- src/cache.rs | 19 ++++++++----------- src/main.rs | 11 +++++------ 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 35807ea..659fd9f 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -20,7 +20,6 @@ static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; #[derive(Debug)] pub struct Cache { - url: String, platform: PlatformType, cache_dir: PathBuf, } @@ -87,9 +86,8 @@ pub enum CacheFreshness { } impl Cache { - pub fn new(url: S, platform: PlatformType, cache_dir: P) -> Result + pub fn new

(platform: PlatformType, cache_dir: P) -> Result where - S: Into, P: Into, { // Check whether `cache_dir` exists and is a directory @@ -119,14 +117,13 @@ impl Cache { } Ok(Self { - url: url.into(), platform, cache_dir, }) } - /// Download the archive - fn download(&self) -> Result> { + /// Download the archive from the specified URL. + fn download(archive_url: &str) -> Result> { let mut builder = Client::builder(); if let Ok(ref host) = env::var("HTTP_PROXY") { if let Ok(proxy) = Proxy::http(host) { @@ -142,20 +139,20 @@ impl Cache { .build() .context("Could not instantiate HTTP client")?; let mut resp = client - .get(&self.url) + .get(archive_url) .send()? .error_for_status() - .with_context(|| format!("Could not download tldr pages from {}", &self.url))?; + .with_context(|| format!("Could not download tldr pages from {}", archive_url))?; let mut buf: Vec = vec![]; let bytes_downloaded = resp.copy_to(&mut buf)?; debug!("{} bytes downloaded", bytes_downloaded); Ok(buf) } - /// Update the pages cache. - pub fn update(&self) -> Result<()> { + /// Update the pages cache from the specified URL. + pub fn update(&self, archive_url: &str) -> Result<()> { // First, download the compressed data - let bytes: Vec = self.download()?; + let bytes: Vec = Self::download(archive_url)?; // Decompress the response body into an `Archive` let mut archive = ZipArchive::new(Cursor::new(bytes)) diff --git a/src/main.rs b/src/main.rs index ab30391..9c8fe58 100644 --- a/src/main.rs +++ b/src/main.rs @@ -123,7 +123,7 @@ fn clear_cache(cache: &Cache, quietly: bool, enable_styles: bool) { /// Update the cache fn update_cache(cache: &Cache, quietly: bool, enable_styles: bool) { - cache.update().unwrap_or_else(|e| { + cache.update(ARCHIVE_URL).unwrap_or_else(|e| { print_error(enable_styles, &e.context("Could not update cache")); process::exit(1); }); @@ -325,11 +325,10 @@ fn main() { } // Initialize cache - let cache = Cache::new(ARCHIVE_URL, platform, &config.directories.cache_dir.path) - .unwrap_or_else(|e| { - print_error(enable_styles, &e.context("Could not initialize cache")); - process::exit(1); - }); + let cache = Cache::new(platform, &config.directories.cache_dir.path).unwrap_or_else(|e| { + print_error(enable_styles, &e.context("Could not initialize cache")); + process::exit(1); + }); // Clear cache, pass through if args.clear_cache { From d702a1fab678d34a6a2201270aed5fb15f66cdeb Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 24 Sep 2022 22:07:16 +0200 Subject: [PATCH 237/368] Cache: Add pages_dir helper method Additionally, rename `cache_dir` to `pages_dir` where terminology was wrong. --- src/cache.rs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 659fd9f..b7fab2a 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -122,6 +122,10 @@ impl Cache { }) } + fn pages_dir(&self) -> PathBuf { + self.cache_dir.join(TLDR_PAGES_DIR) + } + /// Download the archive from the specified URL. fn download(archive_url: &str) -> Result> { let mut builder = Client::builder(); @@ -158,9 +162,6 @@ impl Cache { let mut archive = ZipArchive::new(Cursor::new(bytes)) .context("Could not decompress downloaded ZIP archive")?; - // Determine paths - let pages_dir = self.cache_dir.join(TLDR_PAGES_DIR); - // Clear cache directory // Note: This is not the best solution. Ideally we would download the // archive to a temporary directory and then swap the two directories. @@ -170,9 +171,9 @@ impl Cache { self.clear() .context("Could not clear the cache directory")?; - // Extract archive + // Extract archive into pages dir archive - .extract(&pages_dir) + .extract(&self.pages_dir()) .context("Could not unpack compressed data")?; Ok(()) @@ -180,7 +181,7 @@ impl Cache { /// Return the duration since the cache directory was last modified. pub fn last_update(&self) -> Option { - if let Ok(metadata) = fs::metadata(self.cache_dir.join(TLDR_PAGES_DIR)) { + if let Ok(metadata) = fs::metadata(self.pages_dir()) { if let Ok(mtime) = metadata.modified() { let now = SystemTime::now(); return now.duration_since(mtime).ok(); @@ -212,13 +213,13 @@ impl Cache { /// Check for pages for a given platform in one of the given languages. fn find_page_for_platform( page_name: &str, - cache_dir: &Path, + pages_dir: &Path, platform: &str, language_dirs: &[String], ) -> Option { language_dirs .iter() - .map(|lang_dir| cache_dir.join(lang_dir).join(platform).join(page_name)) + .map(|lang_dir| pages_dir.join(lang_dir).join(platform).join(page_name)) .find(|path| path.exists() && path.is_file()) } @@ -240,8 +241,8 @@ impl Cache { let patch_filename = format!("{}.patch", name); let custom_filename = format!("{}.page", name); - // Determine directories - let cache_dir = self.cache_dir.join(TLDR_PAGES_DIR); + // Determine directory paths + let pages_dir = self.pages_dir(); let lang_dirs: Vec = languages .iter() .map(|lang| { @@ -266,20 +267,20 @@ impl Cache { // Try to find a platform specific path next, append custom patch to it. let platform_dir = self.get_platform_dir(); if let Some(page) = - Self::find_page_for_platform(&page_filename, &cache_dir, platform_dir, &lang_dirs) + Self::find_page_for_platform(&page_filename, &pages_dir, platform_dir, &lang_dirs) { return Some(PageLookupResult::with_page(page).with_optional_patch(patch_path)); } // Did not find platform specific results, fall back to "common" - Self::find_page_for_platform(&page_filename, &cache_dir, "common", &lang_dirs) + Self::find_page_for_platform(&page_filename, &pages_dir, "common", &lang_dirs) .map(|page| PageLookupResult::with_page(page).with_optional_patch(patch_path)) } /// Return the available pages. pub fn list_pages(&self, custom_pages_dir: Option<&Path>) -> Vec { // Determine platforms directory and platform - let platforms_dir = self.cache_dir.join(TLDR_PAGES_DIR).join("pages"); + let platforms_dir = self.pages_dir().join("pages"); let platform_dir = self.get_platform_dir(); // Closure that allows the WalkDir instance to traverse platform From 3f528ba5cb2724502a847f9b9dc798dc7714df19 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 24 Sep 2022 22:13:59 +0200 Subject: [PATCH 238/368] Impl From for more config types - StyleConfig - DisplayConfig - UpdatesConfig --- src/config.rs | 61 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/src/config.rs b/src/config.rs index 4907de0..0889271 100644 --- a/src/config.rs +++ b/src/config.rs @@ -129,6 +129,18 @@ struct RawStyleConfig { pub example_variable: RawStyle, } +impl From for StyleConfig { + fn from(raw_style_config: RawStyleConfig) -> Self { + Self { + command_name: raw_style_config.command_name.into(), + description: raw_style_config.description.into(), + example_text: raw_style_config.example_text.into(), + example_code: raw_style_config.example_code.into(), + example_variable: raw_style_config.example_variable.into(), + } + } +} + #[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] struct RawDisplayConfig { #[serde(default)] @@ -137,6 +149,15 @@ struct RawDisplayConfig { pub use_pager: bool, } +impl From for DisplayConfig { + fn from(raw_display_config: RawDisplayConfig) -> Self { + Self { + compact: raw_display_config.compact, + use_pager: raw_display_config.use_pager, + } + } +} + /// Serde doesn't support default values yet (tracking issue: /// ), so we need to wrap /// `DEFAULT_UPDATE_INTERVAL_HOURS` in a function to be able to use @@ -162,6 +183,17 @@ impl Default for RawUpdatesConfig { } } +impl From for UpdatesConfig { + fn from(raw_updates_config: RawUpdatesConfig) -> Self { + Self { + auto_update: raw_updates_config.auto_update, + auto_update_interval: Duration::from_secs( + raw_updates_config.auto_update_interval_hours * 3600, + ), + } + } +} + #[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] struct RawDirectoriesConfig { #[serde(default)] @@ -264,30 +296,13 @@ impl Config { /// For this, some values need to be converted to other types and some /// defaults need to be set (sometimes based on env variables). fn from_raw(raw_config: RawConfig) -> Result { - // Style config - let style = StyleConfig { - command_name: raw_config.style.command_name.into(), - description: raw_config.style.description.into(), - example_text: raw_config.style.example_text.into(), - example_code: raw_config.style.example_code.into(), - example_variable: raw_config.style.example_variable.into(), - }; + let style = raw_config.style.into(); + let display = raw_config.display.into(); + let updates = raw_config.updates.into(); - // Display config - let display = DisplayConfig { - compact: raw_config.display.compact, - use_pager: raw_config.display.use_pager, - }; - - // Updates config - let updates = UpdatesConfig { - auto_update: raw_config.updates.auto_update, - auto_update_interval: Duration::from_secs( - raw_config.updates.auto_update_interval_hours * 3600, - ), - }; - - // Directories config + // Determine directories config. For this, we need to take some + // additional factory into account, like env variables, or the + // user config. let cache_dir_env_var = "TEALDEER_CACHE_DIR"; let cache_dir = if let Ok(env_var) = env::var(cache_dir_env_var) { // For backwards compatibility reasons, the cache directory can be From c44faf2b0919e2eab408a24ef9d06d9382572435 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 28 Sep 2022 23:31:40 +0200 Subject: [PATCH 239/368] Lazy creation of cache directory --- src/cache.rs | 55 +++++++++++++++++++++++++++++++--------------------- src/main.rs | 19 +++++++++++------- 2 files changed, 45 insertions(+), 29 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index b7fab2a..57b1a30 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -86,40 +86,49 @@ pub enum CacheFreshness { } impl Cache { - pub fn new

(platform: PlatformType, cache_dir: P) -> Result + pub fn new

(platform: PlatformType, cache_dir: P) -> Self where P: Into, { + Self { + platform, + cache_dir: cache_dir.into(), + } + } + + pub fn cache_dir(&self) -> &Path { + &self.cache_dir + } + + /// Make sure that the cache directory exists and is a directory. + /// If necessary, create the directory. + fn ensure_cache_dir_exists(&self) -> Result<()> { // Check whether `cache_dir` exists and is a directory - let cache_dir = cache_dir.into(); - let (cache_dir_exists, cache_dir_is_dir) = cache_dir + let (cache_dir_exists, cache_dir_is_dir) = self + .cache_dir .metadata() .map_or((false, false), |md| (true, md.is_dir())); ensure!( !cache_dir_exists || cache_dir_is_dir, "Cache directory path `{}` is not a directory", - cache_dir.display(), + self.cache_dir.display(), ); - // If necessary, create cache directory if !cache_dir_exists { - // Try to create the complete directory path - fs::create_dir_all(&cache_dir).with_context(|| { + // If missing, try to create the complete directory path + fs::create_dir_all(&self.cache_dir).with_context(|| { format!( "Cache directory path `{}` cannot be created", - cache_dir.display(), + self.cache_dir.display(), ) })?; eprintln!( "Successfully created cache directory path `{}`.", - cache_dir.display(), + self.cache_dir.display(), ); } - Ok(Self { - platform, - cache_dir, - }) + Ok(()) } fn pages_dir(&self) -> PathBuf { @@ -155,6 +164,8 @@ impl Cache { /// Update the pages cache from the specified URL. pub fn update(&self, archive_url: &str) -> Result<()> { + self.ensure_cache_dir_exists()?; + // First, download the compressed data let bytes: Vec = Self::download(archive_url)?; @@ -345,14 +356,14 @@ impl Cache { pages } - /// Delete the cache directory. - pub fn clear(&self) -> Result<()> { - // Check preconditions - ensure!( - self.cache_dir.exists(), - "Cache path ({}) does not exist.", - self.cache_dir.display(), - ); + /// Delete the cache directory + /// + /// Returns true if the cache was deleted and false if the cache dir did + /// not exist. + pub fn clear(&self) -> Result { + if !self.cache_dir.exists() { + return Ok(false); + } ensure!( self.cache_dir.is_dir(), "Cache path ({}) is not a directory.", @@ -374,7 +385,7 @@ impl Cache { } } - Ok(()) + Ok(true) } } diff --git a/src/main.rs b/src/main.rs index 9c8fe58..ffacae2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -112,12 +112,20 @@ fn check_cache(cache: &Cache, args: &Args, enable_styles: bool) -> CheckCacheRes /// Clear the cache fn clear_cache(cache: &Cache, quietly: bool, enable_styles: bool) { - cache.clear().unwrap_or_else(|e| { + let cache_dir_found = cache.clear().unwrap_or_else(|e| { print_error(enable_styles, &e.context("Could not clear cache")); process::exit(1); }); if !quietly { - eprintln!("Successfully deleted cache."); + let cache_dir = cache.cache_dir().display(); + if cache_dir_found { + eprintln!("Successfully cleared cache at `{}`.", cache_dir); + } else { + eprintln!( + "Cache directory not found at `{}`, nothing to do.", + cache_dir + ); + } } } @@ -324,11 +332,8 @@ fn main() { }; } - // Initialize cache - let cache = Cache::new(platform, &config.directories.cache_dir.path).unwrap_or_else(|e| { - print_error(enable_styles, &e.context("Could not initialize cache")); - process::exit(1); - }); + // Instantiate cache. This will not yet create the cache directory! + let cache = Cache::new(platform, &config.directories.cache_dir.path); // Clear cache, pass through if args.clear_cache { From 0c93a4cfe9c51422170c18c5ea4b22f2d069cccd Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 1 Oct 2022 23:52:03 +0200 Subject: [PATCH 240/368] Remove deprecated --config-path command --- docs/src/usage.txt | 1 - src/cli.rs | 4 ---- src/main.rs | 22 ---------------------- 3 files changed, 27 deletions(-) diff --git a/docs/src/usage.txt b/docs/src/usage.txt index fdc0c9f..f6b159d 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -21,7 +21,6 @@ OPTIONS: -r, --raw Display the raw markdown instead of rendering it -q, --quiet Suppress informational messages --show-paths Show file and directory paths used by tealdeer - --config-path Show config file path --seed-config Create a basic config --color Control whether to use color [possible values: always, auto, never] -v, --version Print the version diff --git a/src/cli.rs b/src/cli.rs index a35df31..2108a1d 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -93,10 +93,6 @@ pub(crate) struct Args { #[clap(long = "show-paths")] pub show_paths: bool, - /// Show config file path - #[clap(long = "config-path")] - pub config_path: bool, - /// Create a basic config #[clap(long = "seed-config")] pub seed_config: bool, diff --git a/src/main.rs b/src/main.rs index ffacae2..156eba6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -140,19 +140,6 @@ fn update_cache(cache: &Cache, quietly: bool, enable_styles: bool) { } } -/// Show the config path (DEPRECATED) -fn show_config_path(enable_styles: bool) { - match get_config_path() { - Ok((config_file_path, _)) => { - println!("Config path is: {}", config_file_path.to_str().unwrap()); - } - Err(e) => { - print_error(enable_styles, &e.context("Could not look up config path")); - process::exit(1); - } - } -} - /// Show file paths fn show_paths(config: &Config) { let config_dir = get_config_dir().map_or_else( @@ -290,15 +277,6 @@ fn main() { } args.platform = args.platform.or(args.os); - // Show config file and path, pass through - if args.config_path { - print_warning( - enable_styles, - "The --config-path flag is deprecated, use --show-paths instead", - ); - show_config_path(enable_styles); - } - // Look up config file, if none is found fall back to default config. let config = match Config::load(enable_styles) { Ok(config) => config, From efe1b5769638e96fcb02b9cbef70ccdd20a04d30 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 1 Oct 2022 23:53:28 +0200 Subject: [PATCH 241/368] Remove deprecated -o/--os command --- src/cli.rs | 9 --------- src/main.rs | 7 ------- 2 files changed, 16 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 2108a1d..5c8e238 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -43,15 +43,6 @@ pub(crate) struct Args { )] pub platform: Option, - /// Deprecated alias of `platform` - #[clap( - short = 'o', - long = "os", - possible_values = ["linux", "macos", "windows", "sunos", "osx"], - hide = true - )] - pub os: Option, - /// Override the language #[clap(short = 'L', long = "language")] pub language: Option, diff --git a/src/main.rs b/src/main.rs index 156eba6..f4a4687 100644 --- a/src/main.rs +++ b/src/main.rs @@ -269,13 +269,6 @@ fn main() { "The -m / --markdown flag is deprecated, use -r / --raw instead", ); } - if args.os.is_some() { - print_warning( - enable_styles, - "The -o / --os flag is deprecated, use -p / --platform instead", - ); - } - args.platform = args.platform.or(args.os); // Look up config file, if none is found fall back to default config. let config = match Config::load(enable_styles) { From 2ebf86b265f1cc6f24e649f938056ff4afdfc661 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 1 Oct 2022 23:54:37 +0200 Subject: [PATCH 242/368] Remove deprecated -m/--markdown command --- src/cli.rs | 9 --------- src/main.rs | 11 +---------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 5c8e238..8646cac 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -67,15 +67,6 @@ pub(crate) struct Args { #[clap(short = 'r', long = "--raw", requires = "command_or_file")] pub raw: bool, - /// Deprecated alias of `raw` - #[clap( - long = "markdown", - short = 'm', - requires = "command_or_file", - hide = true - )] - pub markdown: bool, - /// Suppress informational messages #[clap(short = 'q', long = "quiet")] pub quiet: bool, diff --git a/src/main.rs b/src/main.rs index f4a4687..8f601e4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -240,7 +240,7 @@ fn main() { init_log(); // Parse arguments - let mut args = Args::parse(); + let args = Args::parse(); // Determine the usage of styles #[cfg(target_os = "windows")] @@ -261,15 +261,6 @@ fn main() { ColorOptions::Never => false, }; - // Handle renamed arguments - if args.markdown { - args.raw = true; - print_warning( - enable_styles, - "The -m / --markdown flag is deprecated, use -r / --raw instead", - ); - } - // Look up config file, if none is found fall back to default config. let config = match Config::load(enable_styles) { Ok(config) => config, From 7ded00eda02611a021d10ef252200b3346bfa1e9 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Oct 2022 00:23:26 +0200 Subject: [PATCH 243/368] Run cargo update (#291) --- Cargo.lock | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a812506..7ee4185 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -201,12 +201,11 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" +checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" dependencies = [ "cfg-if", - "once_cell", ] [[package]] @@ -620,9 +619,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.133" +version = "0.2.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f80d65747a3e43d1596c7c5492d95d5edddaabd45a7fcdb02b95f644164966" +checksum = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb" [[package]] name = "log" @@ -799,9 +798,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" dependencies = [ "unicode-ident", ] @@ -1089,9 +1088,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.100" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52205623b1b0f064a4e71182c3b18ae902267282930c6d5462c91b859668426e" +checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2" dependencies = [ "proc-macro2", "quote", @@ -1160,18 +1159,18 @@ checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" [[package]] name = "thiserror" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -1195,9 +1194,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.21.1" +version = "1.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0020c875007ad96677dcc890298f4b942882c5d4eb7cc8f439fc3bf813dc9c95" +checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" dependencies = [ "autocfg", "bytes", @@ -1205,7 +1204,6 @@ dependencies = [ "memchr", "mio", "num_cpus", - "once_cell", "pin-project-lite", "socket2", "winapi", @@ -1445,9 +1443,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.4" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf" +checksum = "368bfe657969fb01238bb756d351dcade285e0f6fcbd36dcb23359a5169975be" dependencies = [ "webpki", ] From 357f0e7e717f83dc4564c918f08b6a400a7fd318 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Oct 2022 00:28:34 +0200 Subject: [PATCH 244/368] Release v1.6.0 --- CHANGELOG.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- docs/src/usage.txt | 2 +- 4 files changed, 77 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5546cc6..e7d61ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,55 @@ Possible log types: - `[chore]` for maintenance work. +### [v1.6.0][v1.6.0] (2022-10-02) + +It's been 9 months since the last release already! This is not a huge update +feature-wise, but it still contains a few nice new improvements and a few +bugfixes, contributed by 11 different people. The most important new feature is +probably the option to override the cache directory through the config file. +The `TEALDEER_CACHE_DIR` env variable is now deprecated. + +A note to packagers: Shell completions have been moved to the `completion/` +subdirectory! Packaging scripst might need to be updated. + +Changes: + +- [added] Allow overriding cache directory through config ([#276]) +- [added] Add `--no-auto-update` CLI flag ([#257]) +- [added] Show note about auto-updates when cache is missing ([#254]) +- [added] Add support for android platform ([#274]) +- [added] Add custom pages to list output ([#285]) +- [fixed] Cache: Return error if HTTP client cannot be created ([#247]) +- [fixed] Handle cache download errors ([#253]) +- [fixed] Do not page output of `tldr --update` ([#231]) +- [fixed] Create macOS release builds with bundled root certificates ([#272]) +- [fixed] Clean up and fix shell completions ([#262]) +- [deprecated] The `TEALDEER_CACHE_DIR` env variable is now deprecated ([#276]) +- [removed] The `--config-path` command was removed, use `--show-paths` instead ([#290]) +- [removed] The `-o/--os` command was removed, use `-p/--platform` instead ([#290]) +- [removed] The `-m/--markdown` command was removed, use `-r/--raw` instead ([#290]) +- [chore] Move shell completion scripts to their own directory ([#259]) +- [chore] Update dependencies ([#271], [#287], [#291]) +- [chore] Use anyhow for error handling ([#249]) +- [chore] Switch to Rust 2021 edition ([#284]) + +Contributors to this version: + +- [@bagohart][@bagohart] +- [@cyqsimon][@cyqsimon] +- [Danilo Bargen][@dbrgn] +- [Danny Mösch][@SimplyDanny] +- [Evan Lloyd New-Schmidt][@newsch] +- [Hans Gaiser][@hgaiser] +- [Kian-Meng Ang][@kianmeng] +- [Marcin Puc][@tranzystorek-io] +- [Niklas Mohrin][@niklasmohrin] +- [Olav de Haas][@Olavhaasie] +- [Simon Perdrisat][@gagarine] + +Thanks! + + ### [v1.5.0][v1.5.0] (2021-12-31) This is quite a big release with many new features. In the 15 months since the @@ -236,17 +285,21 @@ Thanks! [@aldanor]: https://github.com/aldanor [@Atul9]: https://github.com/Atul9 [@BachoSeven]: https://github.com/BachoSeven +[@bagohart]: https://github.com/bagohart [@Bassets]: https://github.com/Bassets [@black7375]: https://github.com/black7375 [@bl-ue]: https://github.com/bl-ue [@Calinou]: https://github.com/Calinou [@cam8001]: https://github.com/cam8001 +[@cyqsimon]: https://github.com/cyqsimon [@cho-m]: https://github.com/cho-m [@das-g]: https://github.com/das-g [@dbrgn]: https://github.com/dbrgn [@Delapouite]: https://github.com/Delapouite [@dmaahs2017]: https://github.com/dmaahs2017 [@equal-l2]: https://github.com/equal-l2 +[@gagarine]: https://github.com/gagarine +[@hgaiser]: https://github.com/hgaiser [@ilai-deutel]: https://github.com/ilai-deutel [@invakid404]: https://github.com/invakid404 [@james2doyle]: https://github.com/james2doyle @@ -254,6 +307,7 @@ Thanks! [@jdvr]: https://github.com/jdvr [@jedahan]: https://github.com/jedahan [@jesdazrez]: https://github.com/jesdazrez +[@kianmeng]: https://github.com/kianmeng [@kornelski]: https://github.com/kornelski [@korrat]: https://github.com/korrat [@laxect]: https://github.com/laxect @@ -263,7 +317,9 @@ Thanks! [@mucinoab]: https://github.com/mucinoab [@mystal]: https://github.com/mystal [@natpen]: https://github.com/natpen +[@newsch]: https://github.com/newsch [@niklasmohrin]: https://github.com/niklasmohrin +[@Olavhaasie]: https://github.com/Olavhaasie [@Plommonsorbet]: https://github.com/Plommonsorbet [@rithvikvibhu]: https://github.com/rithvikvibhu [@SimplyDanny]: https://github.com/SimplyDanny @@ -280,6 +336,7 @@ Thanks! [v1.4.0]: https://github.com/dbrgn/tealdeer/compare/v1.3.0...v1.4.0 [v1.4.1]: https://github.com/dbrgn/tealdeer/compare/v1.4.0...v1.4.1 [v1.5.0]: https://github.com/dbrgn/tealdeer/compare/v1.4.1...v1.5.0 +[v1.6.0]: https://github.com/dbrgn/tealdeer/compare/v1.5.0...v1.6.0 [i34]: https://github.com/dbrgn/tealdeer/issues/34 [i43]: https://github.com/dbrgn/tealdeer/issues/43 @@ -326,4 +383,21 @@ Thanks! [i215]: https://github.com/dbrgn/tealdeer/pull/215 [i217]: https://github.com/dbrgn/tealdeer/pull/217 [i227]: https://github.com/dbrgn/tealdeer/pull/227 +[#231]: https://github.com/dbrgn/tealdeer/pull/231 [i240]: https://github.com/dbrgn/tealdeer/pull/240 +[#247]: https://github.com/dbrgn/tealdeer/pull/247 +[#249]: https://github.com/dbrgn/tealdeer/pull/249 +[#253]: https://github.com/dbrgn/tealdeer/pull/253 +[#254]: https://github.com/dbrgn/tealdeer/pull/254 +[#257]: https://github.com/dbrgn/tealdeer/pull/257 +[#259]: https://github.com/dbrgn/tealdeer/pull/259 +[#262]: https://github.com/dbrgn/tealdeer/pull/262 +[#271]: https://github.com/dbrgn/tealdeer/pull/271 +[#272]: https://github.com/dbrgn/tealdeer/pull/272 +[#274]: https://github.com/dbrgn/tealdeer/pull/274 +[#276]: https://github.com/dbrgn/tealdeer/pull/276 +[#284]: https://github.com/dbrgn/tealdeer/pull/284 +[#285]: https://github.com/dbrgn/tealdeer/pull/285 +[#287]: https://github.com/dbrgn/tealdeer/pull/287 +[#290]: https://github.com/dbrgn/tealdeer/pull/290 +[#291]: https://github.com/dbrgn/tealdeer/pull/291 diff --git a/Cargo.lock b/Cargo.lock index 7ee4185..752737c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1099,7 +1099,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.5.0" +version = "1.6.0" dependencies = [ "anyhow", "app_dirs2", diff --git a/Cargo.toml b/Cargo.toml index d845906..9d4b7b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ name = "tealdeer" readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" documentation = "https://dbrgn.github.io/tealdeer/" -version = "1.5.0" +version = "1.6.0" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png"] rust-version = "1.62" edition = "2021" diff --git a/docs/src/usage.txt b/docs/src/usage.txt index f6b159d..9977a03 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -1,4 +1,4 @@ -tealdeer 1.5.0 +tealdeer 1.6.0 Danilo Bargen , Niklas Mohrin A fast TLDR client From 86c850282e395497f88f2020f3c8c7cc0fd3d843 Mon Sep 17 00:00:00 2001 From: Cyrus Yip <60951091+CyrusYip@users.noreply.github.com> Date: Tue, 11 Oct 2022 20:08:41 +0800 Subject: [PATCH 245/368] Docs: improve grammar (#296) --- docs/src/intro.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/src/intro.md b/docs/src/intro.md index 71ebce0..09106b0 100644 --- a/docs/src/intro.md +++ b/docs/src/intro.md @@ -1,7 +1,8 @@ # Tealdeer: Introduction -Tealdeer very fast implementation of [tldr](https://github.com/tldr-pages/tldr) -in Rust: Simplified, example based and community-driven man pages. +Tealdeer is a very fast implementation of +[tldr](https://github.com/tldr-pages/tldr) in Rust: Simplified, example based +and community-driven man pages. ![Screenshot](screenshot-default.png) From ab5148f237a8eacddba6ab25e0761b6dfa9c5e1b Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 22 Oct 2022 22:00:29 +0200 Subject: [PATCH 246/368] Fix path source for custom pages dir (#297) --- src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 0889271..e1bc4ba 100644 --- a/src/config.rs +++ b/src/config.rs @@ -334,7 +334,7 @@ impl Config { .custom_pages_dir .map(|path| PathWithSource { path, - source: PathSource::OsConvention, + source: PathSource::ConfigFile, }) .or_else(|| { get_app_root(AppDataType::UserData, &crate::APP_INFO) @@ -342,7 +342,7 @@ impl Config { // Note: The `join("")` call ensures that there's a trailing slash PathWithSource { path: path.join("pages").join(""), - source: PathSource::ConfigFile, + source: PathSource::OsConvention, } }) .ok() From b10f8a9485b9803282634756008bc7eafb49c57d Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 22 Oct 2022 22:24:57 +0200 Subject: [PATCH 247/368] Run cargo update (#299) --- Cargo.lock | 169 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 113 insertions(+), 56 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 752737c..68ed79c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.65" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" +checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" [[package]] name = "app_dirs2" @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ae1ddd39efd67689deb1979d80bad3bf7f2b09c6e6117c8d1f2443b5e2f83e" +checksum = "d5c2ca00549910ec251e3bd15f87aeeb206c9456b9a77b43ff6c97c54042a472" dependencies = [ "bstr", "doc-comment", @@ -68,9 +68,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "bitflags" @@ -91,9 +91,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.11.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "byteorder" @@ -312,14 +312,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c" +checksum = "4b9663d381d07ae25dc88dbdf27df458faa83a9b25336bcac83d5e452b5fc9d3" dependencies = [ "cfg-if", "libc", "redox_syscall", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -358,42 +358,42 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" [[package]] name = "futures-io" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" [[package]] name = "futures-sink" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" [[package]] name = "futures-task" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" [[package]] name = "futures-util" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" dependencies = [ "futures-core", "futures-io", @@ -406,9 +406,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "libc", @@ -578,9 +578,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "jni" @@ -619,9 +619,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.134" +version = "0.2.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb" +checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" [[package]] name = "log" @@ -662,7 +662,7 @@ dependencies = [ "libc", "log", "wasi", - "windows-sys", + "windows-sys 0.36.1", ] [[package]] @@ -798,9 +798,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ "unicode-ident", ] @@ -923,9 +923,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.6" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" +checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" dependencies = [ "log", "ring", @@ -976,7 +976,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "windows-sys", + "windows-sys 0.36.1", ] [[package]] @@ -1014,18 +1014,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.145" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" +checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.145" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" +checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ "proc-macro2", "quote", @@ -1034,9 +1034,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.85" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" +checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" dependencies = [ "itoa", "ryu", @@ -1088,9 +1088,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.101" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2" +checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" dependencies = [ "proc-macro2", "quote", @@ -1251,9 +1251,9 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.36" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "pin-project-lite", @@ -1262,9 +1262,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.29" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ "once_cell", ] @@ -1283,9 +1283,9 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-ident" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "unicode-normalization" @@ -1487,43 +1487,100 @@ 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" @@ -1550,9 +1607,9 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zip" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf225bcf73bb52cbb496e70475c7bd7a3f769df699c0020f6c7bd9a96dcf0b8d" +checksum = "537ce7411d25e54e8ae21a7ce0b15840e7bfcff15b51d697ec3266cc76bdf080" dependencies = [ "byteorder", "crc32fast", From 7c371a6852d4b2bdad280be766283abbf93e56ff Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 24 Oct 2022 14:42:37 +0200 Subject: [PATCH 248/368] Release v1.6.1 --- CHANGELOG.md | 20 +++++++++++++++++++- Cargo.lock | 2 +- Cargo.toml | 2 +- docs/src/usage.txt | 2 +- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7d61ae..874b2b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,20 @@ Possible log types: - `[chore]` for maintenance work. +### [v1.6.1][v1.6.1] (2022-10-24) + +Changes: + +- [fixed] Fix path source for custom pages dir ([#297]) +- [chore] Update dependendencies ([#299]) + +Contributors to this version: + +- [Cyrus Yip][@CyrusYip] + +Thanks! + + ### [v1.6.0][v1.6.0] (2022-10-02) It's been 9 months since the last release already! This is not a huge update @@ -291,8 +305,9 @@ Thanks! [@bl-ue]: https://github.com/bl-ue [@Calinou]: https://github.com/Calinou [@cam8001]: https://github.com/cam8001 -[@cyqsimon]: https://github.com/cyqsimon [@cho-m]: https://github.com/cho-m +[@cyqsimon]: https://github.com/cyqsimon +[@CyrusYip]: https://github.com/CyrusYip [@das-g]: https://github.com/das-g [@dbrgn]: https://github.com/dbrgn [@Delapouite]: https://github.com/Delapouite @@ -337,6 +352,7 @@ Thanks! [v1.4.1]: https://github.com/dbrgn/tealdeer/compare/v1.4.0...v1.4.1 [v1.5.0]: https://github.com/dbrgn/tealdeer/compare/v1.4.1...v1.5.0 [v1.6.0]: https://github.com/dbrgn/tealdeer/compare/v1.5.0...v1.6.0 +[v1.6.1]: https://github.com/dbrgn/tealdeer/compare/v1.6.0...v1.6.1 [i34]: https://github.com/dbrgn/tealdeer/issues/34 [i43]: https://github.com/dbrgn/tealdeer/issues/43 @@ -401,3 +417,5 @@ Thanks! [#287]: https://github.com/dbrgn/tealdeer/pull/287 [#290]: https://github.com/dbrgn/tealdeer/pull/290 [#291]: https://github.com/dbrgn/tealdeer/pull/291 +[#297]: https://github.com/dbrgn/tealdeer/pull/297 +[#299]: https://github.com/dbrgn/tealdeer/pull/299 diff --git a/Cargo.lock b/Cargo.lock index 68ed79c..baf16a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1099,7 +1099,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.6.0" +version = "1.6.1" dependencies = [ "anyhow", "app_dirs2", diff --git a/Cargo.toml b/Cargo.toml index 9d4b7b4..de29b01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ name = "tealdeer" readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" documentation = "https://dbrgn.github.io/tealdeer/" -version = "1.6.0" +version = "1.6.1" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png"] rust-version = "1.62" edition = "2021" diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 9977a03..09edc5e 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -1,4 +1,4 @@ -tealdeer 1.6.0 +tealdeer 1.6.1 Danilo Bargen , Niklas Mohrin A fast TLDR client From 76bb4e72bc1a9ba23b527dd01ddf5707e7200700 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 24 Oct 2022 15:04:23 +0200 Subject: [PATCH 249/368] Update CHANGELOG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Forgot to add myself 🙃 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 874b2b6..baccbf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ Changes: Contributors to this version: - [Cyrus Yip][@CyrusYip] +- [Danilo Bargen][@dbrgn] Thanks! From fc8266d1c990996d4aa20a64958bbd2cf0af34c5 Mon Sep 17 00:00:00 2001 From: Mohit Raj Date: Mon, 19 Dec 2022 04:10:27 +0530 Subject: [PATCH 250/368] Docs: Add scoop package manager as supported installation method (#305) --- docs/src/installing.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/installing.md b/docs/src/installing.md index 67c3748..fd8f202 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -23,6 +23,7 @@ Tealdeer has been added to a few package managers: - NetBSD: [`sysutils/tealdeer`](https://pkgsrc.se/sysutils/tealdeer) - Nix: [`tealdeer`](https://nixos.org/nixos/packages.html#tealdeer) - openSUSE: [`tealdeer`](https://software.opensuse.org/package/tealdeer?search_term=tealdeer) +- Scoop: [`tealdeer`](https://github.com/ScoopInstaller/Main/blob/master/bucket/tealdeer.json) - Solus: [`tealdeer`](https://packages.getsol.us/shannon/t/tealdeer/) - Void Linux: [`tealdeer`](https://github.com/void-linux/void-packages/tree/master/srcpkgs/tealdeer) From e75f8142948cd6437e6e44b731cc58c04273fecf Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 24 Dec 2022 14:54:40 +0100 Subject: [PATCH 251/368] Run cargo update --- Cargo.lock | 196 ++++++++++++++++++++++++++++------------------------- 1 file changed, 103 insertions(+), 93 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index baf16a6..346c47b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,18 +10,18 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "0.7.19" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] [[package]] name = "anyhow" -version = "1.0.66" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" +checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" [[package]] name = "app_dirs2" @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "2.0.5" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5c2ca00549910ec251e3bd15f87aeeb206c9456b9a77b43ff6c97c54042a472" +checksum = "fa3d466004a8b4cb1bc34044240a2fd29d17607e2e3bd613eb44fd48e8100da3" dependencies = [ "bstr", "doc-comment", @@ -55,7 +55,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -80,13 +80,14 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bstr" -version = "0.2.17" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +checksum = "b45ea9b00a7b3f2988e9a65ad3917e62123c38dba709b666506207be96d1790b" dependencies = [ - "lazy_static", "memchr", + "once_cell", "regex-automata", + "serde", ] [[package]] @@ -103,15 +104,15 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" [[package]] name = "cc" -version = "1.0.73" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" [[package]] name = "cesu8" @@ -127,9 +128,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.2.22" +version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" +checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", "bitflags", @@ -201,9 +202,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.12" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ "cfg-if", ] @@ -257,9 +258,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" dependencies = [ "atty", "humantime", @@ -312,9 +313,9 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9663d381d07ae25dc88dbdf27df458faa83a9b25336bcac83d5e452b5fc9d3" +checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" dependencies = [ "cfg-if", "libc", @@ -324,9 +325,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" dependencies = [ "crc32fast", "miniz_oxide", @@ -417,9 +418,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ "bytes", "fnv", @@ -455,6 +456,15 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + [[package]] name = "http" version = "0.2.8" @@ -497,9 +507,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.20" +version = "0.14.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" dependencies = [ "bytes", "futures-channel", @@ -521,9 +531,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.0" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" +checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ "http", "hyper", @@ -544,9 +554,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", "hashbrown", @@ -563,9 +573,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.5.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" [[package]] name = "itertools" @@ -578,9 +588,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] name = "jni" @@ -619,9 +629,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.135" +version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "log" @@ -646,23 +656,23 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "miniz_oxide" -version = "0.5.4" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", "wasi", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] @@ -688,19 +698,19 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc", ] [[package]] name = "once_cell" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "openssl-probe" @@ -710,9 +720,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "os_str_bytes" -version = "6.3.0" +version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" +checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" [[package]] name = "pager" @@ -744,9 +754,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "predicates" -version = "2.1.1" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5aab5be6e4732b473071984b3164dbbfb7a3674d30ea5ff44410b6bcd960c3c" +checksum = "f54fc5dc63ed3bbf19494623db4f3af16842c0d975818e469022d09e53f0aa05" dependencies = [ "difflib", "float-cmp", @@ -758,15 +768,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da1c2388b1513e1b605fcec39a95e0a9e8ef088f71443ef37099fa9ae6673fcb" +checksum = "72f883590242d3c6fc5bf50299011695fa6590c2c70eac95ee1bdb9a733ad1a2" [[package]] name = "predicates-tree" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d86de6de25020a36c6d3643a86d9a6a9f552107c0559c60ea03551b5e16c032" +checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" dependencies = [ "predicates-core", "termtree", @@ -798,18 +808,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ "proc-macro2", ] @@ -836,9 +846,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" dependencies = [ "aho-corasick", "memchr", @@ -853,9 +863,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.27" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "remove_dir_all" @@ -868,9 +878,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.12" +version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" +checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" dependencies = [ "base64", "bytes", @@ -956,9 +966,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" [[package]] name = "same-file" @@ -1014,18 +1024,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.147" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" +checksum = "97fed41fc1a24994d044e6db6935e69511a1153b52c15eb42493b26fa87feba0" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.147" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" +checksum = "255abe9a125a985c05190d687b320c12f9b1f0b99445e608c21ba0782c719ad8" dependencies = [ "proc-macro2", "quote", @@ -1034,9 +1044,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.87" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" dependencies = [ "itoa", "ryu", @@ -1088,9 +1098,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.103" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ "proc-macro2", "quote", @@ -1147,30 +1157,30 @@ dependencies = [ [[package]] name = "termtree" -version = "0.2.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" +checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" [[package]] name = "textwrap" -version = "0.15.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", @@ -1194,9 +1204,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.21.2" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" +checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46" dependencies = [ "autocfg", "bytes", @@ -1206,7 +1216,7 @@ dependencies = [ "num_cpus", "pin-project-lite", "socket2", - "winapi", + "windows-sys 0.42.0", ] [[package]] @@ -1236,9 +1246,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" dependencies = [ "serde", ] @@ -1283,9 +1293,9 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" [[package]] name = "unicode-normalization" @@ -1443,9 +1453,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.5" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368bfe657969fb01238bb756d351dcade285e0f6fcbd36dcb23359a5169975be" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ "webpki", ] From b5f2c6ff3994e985e4d8eb7d2c89e86a4217b897 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 24 Dec 2022 14:55:45 +0100 Subject: [PATCH 252/368] =?UTF-8?q?Upgrade=20env=5Flogger:=200.9=20?= =?UTF-8?q?=E2=86=92=200.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 48 +++++++++++++++++++++++++++++++++++++++++++++--- Cargo.toml | 2 +- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 346c47b..755b774 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -258,12 +258,12 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" dependencies = [ - "atty", "humantime", + "is-terminal", "log", "regex", "termcolor", @@ -571,12 +571,34 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "io-lifetimes" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c" +dependencies = [ + "libc", + "windows-sys 0.42.0", +] + [[package]] name = "ipnet" version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" +[[package]] +name = "is-terminal" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" +dependencies = [ + "hermit-abi 0.2.6", + "io-lifetimes", + "rustix", + "windows-sys 0.42.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -633,6 +655,12 @@ version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + [[package]] name = "log" version = "0.4.17" @@ -931,6 +959,20 @@ dependencies = [ "winapi", ] +[[package]] +name = "rustix" +version = "0.36.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys 0.42.0", +] + [[package]] name = "rustls" version = "0.20.7" diff --git a/Cargo.toml b/Cargo.toml index de29b01..6522fd0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ anyhow = "1" app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" clap = { version = "3", features = ["std", "derive", "suggestions", "color"], default-features = false } -env_logger = { version = "0.9", optional = true } +env_logger = { version = "0.10", optional = true } log = "0.4" reqwest = { version = "0.11.3", features = ["blocking"], default-features = false } serde = "1.0.21" From c077ff05e4545fd4ba9c218d87c932b2ec916a82 Mon Sep 17 00:00:00 2001 From: "Y.D.X" <73375426+YDX-2147483647@users.noreply.github.com> Date: Wed, 11 Jan 2023 18:22:49 +0800 Subject: [PATCH 253/368] =?UTF-8?q?Docs:=20Fix=20typo=20(irregular=20space?= =?UTF-8?q?=20=E2=86=92=20regular=20space)=20(#310)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was a no-break space (U+00A0), which causes mdBook to ignore the line break and [render wrongly](https://dbrgn.github.io/tealdeer/installing.html#package-managers). Instead, a regular space (U+0020) should be used. --- docs/src/installing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/installing.md b/docs/src/installing.md index fd8f202..61c1fcf 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -23,7 +23,7 @@ Tealdeer has been added to a few package managers: - NetBSD: [`sysutils/tealdeer`](https://pkgsrc.se/sysutils/tealdeer) - Nix: [`tealdeer`](https://nixos.org/nixos/packages.html#tealdeer) - openSUSE: [`tealdeer`](https://software.opensuse.org/package/tealdeer?search_term=tealdeer) -- Scoop: [`tealdeer`](https://github.com/ScoopInstaller/Main/blob/master/bucket/tealdeer.json) +- Scoop: [`tealdeer`](https://github.com/ScoopInstaller/Main/blob/master/bucket/tealdeer.json) - Solus: [`tealdeer`](https://packages.getsol.us/shannon/t/tealdeer/) - Void Linux: [`tealdeer`](https://github.com/void-linux/void-packages/tree/master/srcpkgs/tealdeer) From 76d9d0bbdaa50503a192821e4c2215aedac59117 Mon Sep 17 00:00:00 2001 From: tveness Date: Tue, 7 Feb 2023 20:56:41 +0000 Subject: [PATCH 254/368] Obey 1.67 clippy lints (#313) --- src/cache.rs | 10 +++++----- src/config.rs | 4 ++-- src/main.rs | 23 ++++++++++------------- src/output.rs | 2 +- src/utils.rs | 9 ++------- tests/lib.rs | 18 +++++++++--------- 6 files changed, 29 insertions(+), 37 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 57b1a30..b0d1fce 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -155,7 +155,7 @@ impl Cache { .get(archive_url) .send()? .error_for_status() - .with_context(|| format!("Could not download tldr pages from {}", archive_url))?; + .with_context(|| format!("Could not download tldr pages from {archive_url}"))?; let mut buf: Vec = vec![]; let bytes_downloaded = resp.copy_to(&mut buf)?; debug!("{} bytes downloaded", bytes_downloaded); @@ -248,9 +248,9 @@ impl Cache { languages: &[String], custom_pages_dir: Option<&Path>, ) -> Option { - let page_filename = format!("{}.md", name); - let patch_filename = format!("{}.patch", name); - let custom_filename = format!("{}.page", name); + let page_filename = format!("{name}.md"); + let patch_filename = format!("{name}.patch"); + let custom_filename = format!("{name}.page"); // Determine directory paths let pages_dir = self.pages_dir(); @@ -260,7 +260,7 @@ impl Cache { if lang == "en" { String::from("pages") } else { - format!("pages.{}", lang) + format!("pages.{lang}") } }) .collect(); diff --git a/src/config.rs b/src/config.rs index e1bc4ba..98d4e46 100644 --- a/src/config.rs +++ b/src/config.rs @@ -308,7 +308,7 @@ impl Config { // For backwards compatibility reasons, the cache directory can be // overridden using an env variable. This is deprecated and will be // phased out in the future. - eprintln!("Warning: The ${} env variable is deprecated, use the `cache_dir` option in the config file instead.", cache_dir_env_var); + eprintln!("Warning: The ${cache_dir_env_var} env variable is deprecated, use the `cache_dir` option in the config file instead."); PathWithSource { path: PathBuf::from(env_var), source: PathSource::EnvVar, @@ -376,7 +376,7 @@ impl Config { format!("Failed to read from config file at {:?}", &config_file_path) })?; toml::from_str(&contents).with_context(|| { - format!("Failed to parse TOML config file at {:?}", config_file_path) + format!("Failed to parse TOML config file at {config_file_path:?}") })? } else { RawConfig::new() diff --git a/src/main.rs b/src/main.rs index 8f601e4..fed5f6e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -119,12 +119,9 @@ fn clear_cache(cache: &Cache, quietly: bool, enable_styles: bool) { if !quietly { let cache_dir = cache.cache_dir().display(); if cache_dir_found { - eprintln!("Successfully cleared cache at `{}`.", cache_dir); + eprintln!("Successfully cleared cache at `{cache_dir}`."); } else { - eprintln!( - "Cache directory not found at `{}`, nothing to do.", - cache_dir - ); + eprintln!("Cache directory not found at `{cache_dir}`, nothing to do."); } } } @@ -143,17 +140,17 @@ fn update_cache(cache: &Cache, quietly: bool, enable_styles: bool) { /// Show file paths fn show_paths(config: &Config) { let config_dir = get_config_dir().map_or_else( - |e| format!("[Error: {}]", e), + |e| format!("[Error: {e}]"), |(mut path, source)| { path.push(""); // Trailing path separator match path.to_str() { - Some(path) => format!("{} ({})", path, source), + Some(path) => format!("{path} ({source})"), None => "[Invalid]".to_string(), } }, ); let config_path = get_config_path().map_or_else( - |e| format!("[Error: {}]", e), + |e| format!("[Error: {e}]"), |(path, _)| path.display().to_string(), ); let cache_dir = config.directories.cache_dir.to_string(); @@ -167,11 +164,11 @@ fn show_paths(config: &Config) { Some(ref path_with_source) => path_with_source.to_string(), None => "[None]".to_string(), }; - println!("Config dir: {}", config_dir); - println!("Config path: {}", config_path); - println!("Cache dir: {}", cache_dir); - println!("Pages dir: {}", pages_dir); - println!("Custom pages dir: {}", custom_pages_dir); + println!("Config dir: {config_dir}"); + println!("Config path: {config_path}"); + println!("Cache dir: {cache_dir}"); + println!("Pages dir: {pages_dir}"); + println!("Custom pages dir: {custom_pages_dir}"); } /// Create seed config file and exit diff --git a/src/output.rs b/src/output.rs index e09481e..357b988 100644 --- a/src/output.rs +++ b/src/output.rs @@ -51,7 +51,7 @@ pub fn print_page( // Print the raw markdown of the file. for line in reader.lines() { let line = line.context("Error while reading from a page")?; - writeln!(handle, "{}", line).context("Could not write to stdout")?; + writeln!(handle, "{line}").context("Could not write to stdout")?; } } else { // Closure that processes a page snippet and writes it to stdout diff --git a/src/utils.rs b/src/utils.rs index 879733a..1649281 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -9,18 +9,13 @@ pub fn print_warning(enable_styles: bool, message: &str) { /// Print an anyhow error to stderr. If `enable_styles` is true, then a red /// message will be printed. pub fn print_error(enable_styles: bool, error: &anyhow::Error) { - print_msg( - enable_styles, - &format!("{:?}", error), - "Error: ", - Color::Red, - ); + print_msg(enable_styles, &format!("{error:?}"), "Error: ", Color::Red); } fn print_msg(enable_styles: bool, message: &str, prefix: &'static str, color: Color) { if enable_styles { eprintln!("{}{}", color.paint(prefix), color.paint(message)); } else { - eprintln!("{}", message); + eprintln!("{message}"); } } diff --git a/tests/lib.rs b/tests/lib.rs index 230b2f2..07092b0 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -55,7 +55,7 @@ impl TestEnv { /// Write `content` to "config.toml" in the `config_dir` directory fn write_config(&self, content: impl AsRef) { let config_file_name = self.config_dir.path().join("config.toml"); - println!("Config path: {:?}", config_file_name); + println!("Config path: {config_file_name:?}"); let mut config_file = File::create(&config_file_name).unwrap(); config_file.write_all(content.as_ref().as_bytes()).unwrap(); @@ -76,7 +76,7 @@ impl TestEnv { .join(os); create_dir_all(&dir).unwrap(); - let mut file = File::create(&dir.join(format!("{}.md", name))).unwrap(); + let mut file = File::create(dir.join(format!("{name}.md"))).unwrap(); file.write_all(contents.as_bytes()).unwrap(); } @@ -84,7 +84,7 @@ impl TestEnv { fn add_page_entry(&self, name: &str, contents: &str) { let dir = self.custom_pages_dir.path(); create_dir_all(dir).unwrap(); - let mut file = File::create(&dir.join(format!("{}.page", name))).unwrap(); + let mut file = File::create(dir.join(format!("{name}.page"))).unwrap(); file.write_all(contents.as_bytes()).unwrap(); } @@ -92,7 +92,7 @@ impl TestEnv { fn add_patch_entry(&self, name: &str, contents: &str) { let dir = self.custom_pages_dir.path(); create_dir_all(dir).unwrap(); - let mut file = File::create(&dir.join(format!("{}.patch", name))).unwrap(); + let mut file = File::create(dir.join(format!("{name}.patch"))).unwrap(); file.write_all(contents.as_bytes()).unwrap(); } @@ -120,7 +120,7 @@ impl TestEnv { build = build.arg("--no-default-features"); } if !self.features.is_empty() { - build = build.arg(&format!("--feature {}", self.features.join(","))); + build = build.arg(format!("--feature {}", self.features.join(","))); } let run = build.run().unwrap(); let mut cmd = run.command(); @@ -426,7 +426,7 @@ fn _test_correct_rendering( // Create input file let file_path = testenv.input_dir.path().join(filename); - println!("Testfile path: {:?}", file_path); + println!("Testfile path: {file_path:?}"); let mut file = File::create(&file_path).unwrap(); file.write_all(input_file.as_bytes()).unwrap(); @@ -501,7 +501,7 @@ fn test_correct_rendering_with_config() { // Setup config file // TODO should be config::CONFIG_FILE_NAME let config_file_path = testenv.config_dir.path().join("config.toml"); - println!("Config path: {:?}", config_file_path); + println!("Config path: {config_file_path:?}"); let mut config_file = File::create(&config_file_path).unwrap(); config_file @@ -510,7 +510,7 @@ fn test_correct_rendering_with_config() { // Create input file let file_path = testenv.input_dir.path().join("inkscape-v2.md"); - println!("Testfile path: {:?}", file_path); + println!("Testfile path: {file_path:?}"); let mut file = File::create(&file_path).unwrap(); file.write_all(include_bytes!("inkscape-v2.md")).unwrap(); @@ -620,7 +620,7 @@ fn test_autoupdate_cache() { let cache_file_path = testenv.cache_dir.path().join(TLDR_PAGES_DIR); // Activate automatic updates, set the auto-update interval to 24 hours - let mut config_file = File::create(&config_file_path).unwrap(); + let mut config_file = File::create(config_file_path).unwrap(); config_file .write_all(b"[updates]\nauto_update = true\nauto_update_interval_hours = 24") .unwrap(); From 0c8cb42664ed1c27df5c41ca82b88d3f9a32687f Mon Sep 17 00:00:00 2001 From: Blair Noctis <4474501+bnoctis@users.noreply.github.com> Date: Sat, 11 Feb 2023 06:28:45 +0800 Subject: [PATCH 255/368] Docs: Add Debian to packaged list (#315) --- docs/src/installing.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/installing.md b/docs/src/installing.md index 61c1fcf..c2d6067 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -15,6 +15,7 @@ autocompletions](#autocompletion). Tealdeer has been added to a few package managers: - Arch Linux: [`tealdeer`](https://archlinux.org/packages/community/x86_64/tealdeer/) +- Debian: [`tealdeer`](https://tracker.debian.org/tealdeer) - Fedora: [`tealdeer`](https://src.fedoraproject.org/rpms/rust-tealdeer) - FreeBSD: [`sysutils/tealdeer`](https://www.freshports.org/sysutils/tealdeer/) - Funtoo: [`app-misc/tealdeer`](https://github.com/funtoo/core-kit/tree/1.4-release/app-misc/tealdeer) From 72362769deb7124b344724022af64da0599cfe30 Mon Sep 17 00:00:00 2001 From: qknogxxb <117920064+qknogxxb@users.noreply.github.com> Date: Mon, 13 Feb 2023 01:45:53 +0800 Subject: [PATCH 256/368] Line iterator: Drop empty line without allocating (#314) Co-authored-by: Niklas Mohrin --- src/line_iterator.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/line_iterator.rs b/src/line_iterator.rs index 4d0eab6..a02b1be 100644 --- a/src/line_iterator.rs +++ b/src/line_iterator.rs @@ -1,6 +1,6 @@ //! Code to split a `BufRead` instance into an iterator of `LineType`s. -use std::io::BufRead; +use std::io::{BufRead, Read}; use log::warn; @@ -64,9 +64,10 @@ impl Iterator for LineIterator { self.format = TldrFormat::V1; } else { // It's the new format! Drop next line. - // (Hmm, is there a way to do this without an allocation?) - let mut devnull = String::new(); - if let Err(e) = self.reader.read_line(&mut devnull) { + if let Err(e) = Read::bytes(&mut self.reader) + .find(|b| matches!(b, Ok(b'\n') | Err(_))) + .transpose() + { warn!("Could not read line from reader: {:?}", e); return None; } From 2fa1994c762135d0d66a5f83d894290bb60c53ae Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Oct 2022 01:23:08 +0200 Subject: [PATCH 257/368] CHANGELOG: Fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index baccbf0..b50e687 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,7 +38,7 @@ probably the option to override the cache directory through the config file. The `TEALDEER_CACHE_DIR` env variable is now deprecated. A note to packagers: Shell completions have been moved to the `completion/` -subdirectory! Packaging scripst might need to be updated. +subdirectory! Packaging scripts might need to be updated. Changes: From b07a6728f3c2af471c63bcde7ba5a014c3c4a2ae Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Oct 2022 01:23:52 +0200 Subject: [PATCH 258/368] Docs: Remove note about OpenSSL OpenSSL is not used anymore since version 1.5.0. --- docs/src/installing.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/src/installing.md b/docs/src/installing.md index c2d6067..8aa2e19 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -40,10 +40,6 @@ Build and install the tool via cargo... $ cargo install tealdeer -*(Note: You might need to install OpenSSL development headers, otherwise you get -a "failed to run custom build command for openssl-sys" error message. The -package is called `libssl-dev` on Ubuntu.)* - ## Build From Source Debug build with logging enabled: @@ -60,7 +56,7 @@ To enable the log output, set the `RUST_LOG` env variable: ## Autocompletion -Shell completion scripts are located in the folder `completion`. +Shell completion scripts are located in the folder `completion`. Just copy them to their designated location: - *Bash*: `cp completion/bash_tealdeer /usr/share/bash-completion/completions/tldr` From 74d1ade88414e543e1d7ec969edf7f725f7af152 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Oct 2022 01:26:17 +0200 Subject: [PATCH 259/368] Docs: Mention building with bundled roots --- docs/src/installing.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/src/installing.md b/docs/src/installing.md index 8aa2e19..d6b2a9a 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -42,17 +42,19 @@ Build and install the tool via cargo... ## Build From Source -Debug build with logging enabled: - - $ cargo build --features logging - -Release build without logging: +Release build: $ cargo build --release -To enable the log output, set the `RUST_LOG` env variable: +Release build with bundled CA roots: - $ export RUST_LOG=tldr=debug + $ cargo build --release --no-default-features --features webpki-roots + +Debug build with logging support: + + $ cargo build --features logging + +(To enable logging at runtime, export the `RUST_LOG=tldr=debug` env variable.) ## Autocompletion From c9ec88354a51ce7af561853720d2b48c31bfee94 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Oct 2022 01:28:42 +0200 Subject: [PATCH 260/368] Docs: Remove section about overriding cache dir The env var `TEALDEER_CACHE_DIR` is deprecated. The new way to configure the cache dir is documented in the "[directories]" section. --- docs/src/config.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/src/config.md b/docs/src/config.md index 020687e..ece2706 100644 --- a/docs/src/config.md +++ b/docs/src/config.md @@ -52,11 +52,3 @@ auto_update = true The directory where the configuration file resides may be overwritten by the environment variable `TEALDEER_CONFIG_DIR`. Remember to use an absolute path. Variable expansion will not be performed on the path. - -## Override Cache Directory - -Similarly, the cache directory where the pages are downloaded to, also follows -OS conventions. On Linux, it will usually be at `~/.cache/tealdeer/`. The path -can be overwritten using the environment variable `TEALDEER_CACHE_DIR`. -Remember to use an absolute path. Variable expansion will not be performed on -the path. From fb755ba8dc497b62df4672af2654103bccdb7331 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 2 Oct 2022 01:30:40 +0200 Subject: [PATCH 261/368] Docs: Consistent capitalization of tealdeer Capitalize at the start of a sentence, lowercase otherwise. --- CHANGELOG.md | 2 +- README.md | 2 +- docs/src/config_style.md | 4 ++-- docs/src/config_updates.md | 2 +- docs/src/installing.md | 2 +- docs/src/intro.md | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b50e687..e26c474 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -107,7 +107,7 @@ The highlights: Note that the MSRV (Minimal Supported Rust Version) of the project [changed][i190]: -> When publishing a Tealdeer release, the Rust version required to build it +> When publishing a tealdeer release, the Rust version required to build it > should be stable for at least a month. Changes: diff --git a/README.md b/README.md index 1746860..fb38ea6 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ To run lints: ## MSRV (Minimally Supported Rust Version) -When publishing a Tealdeer release, the Rust version required to build it +When publishing a tealdeer release, the Rust version required to build it should be stable for at least a month. diff --git a/docs/src/config_style.md b/docs/src/config_style.md index 527e3e5..190df4c 100644 --- a/docs/src/config_style.md +++ b/docs/src/config_style.md @@ -28,13 +28,13 @@ Colors can be specified in one of three ways: foreground = "green" -- 256 color ANSI code (*Tealdeer v1.5.0+*) +- 256 color ANSI code (*tealdeer v1.5.0+*) Example: foreground = { ansi = 4 } -- 24-bit RGB color (*Tealdeer v1.5.0+*) +- 24-bit RGB color (*tealdeer v1.5.0+*) Example: diff --git a/docs/src/config_updates.md b/docs/src/config_updates.md index 5eb8f95..f010cc6 100644 --- a/docs/src/config_updates.md +++ b/docs/src/config_updates.md @@ -2,7 +2,7 @@ ## Automatic updates -tealdeer can refresh the cache automatically when it is outdated. This +Tealdeer can refresh the cache automatically when it is outdated. This behavior can be configured in the `updates` section and is disabled by default. diff --git a/docs/src/installing.md b/docs/src/installing.md index d6b2a9a..1163a14 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -1,6 +1,6 @@ # Installing -There are a few different ways to install Tealdeer: +There are a few different ways to install tealdeer: - Through [package managers](#package-managers) - Through [static binaries](#static-binaries-linux) diff --git a/docs/src/intro.md b/docs/src/intro.md index 09106b0..ca9f8cc 100644 --- a/docs/src/intro.md +++ b/docs/src/intro.md @@ -6,7 +6,7 @@ and community-driven man pages. ![Screenshot](screenshot-default.png) -This documentation shows how to install, use and configure Tealdeer. +This documentation shows how to install, use and configure tealdeer. ## Links From 94d56c01a787f574fc380c5fb9fcced767efccea Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 14 Feb 2023 18:21:07 +0100 Subject: [PATCH 262/368] Allow building with native-tls (#303) Right now we only support building with Rustls. However, there are quite a few architectures that aren't yet supported by "ring" (the crypto library used by Rustls), for example MIPS, PowerPC or SPARC. To offer an alternative, I added the "native-tls" feature that can be used instead of "native-roots". When used, the native TLS stack is used instead of Rustls (i.e. SChannel on Windows, Secure Transport on macOS and OpenSSL otherwise). --- Cargo.lock | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 13 ++++++- src/main.rs | 10 ++++- 3 files changed, 130 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 755b774..972c24e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -348,6 +348,21 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.1.0" @@ -542,6 +557,19 @@ dependencies = [ "tokio-rustls", ] +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + [[package]] name = "idna" version = "0.3.0" @@ -703,6 +731,24 @@ dependencies = [ "windows-sys 0.42.0", ] +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "ndk-context" version = "0.1.1" @@ -740,12 +786,51 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +[[package]] +name = "openssl" +version = "0.10.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29d971fd5722fec23977260f6e81aa67d2f22cadbdc2aa049f1022d9a3be1566" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "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.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5454462c0eced1e97f2ec09036abc8da362e66802f66fd20f86854d9d8cbcbc4" +dependencies = [ + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "os_str_bytes" version = "6.4.1" @@ -780,6 +865,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkg-config" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" + [[package]] name = "predicates" version = "2.1.4" @@ -920,10 +1011,12 @@ dependencies = [ "http-body", "hyper", "hyper-rustls", + "hyper-tls", "ipnet", "js-sys", "log", "mime", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", @@ -934,6 +1027,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "tokio", + "tokio-native-tls", "tokio-rustls", "tower-service", "url", @@ -1261,6 +1355,16 @@ dependencies = [ "windows-sys 0.42.0", ] +[[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", +] + [[package]] name = "tokio-rustls" version = "0.23.4" @@ -1365,6 +1469,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.4" diff --git a/Cargo.toml b/Cargo.toml index 6522fd0..e3223a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,9 +46,20 @@ filetime = "0.2.10" [features] default = ["native-roots"] +logging = ["env_logger"] + +# Reqwest (the HTTP client library) can handle TLS connections in three +# different modes: +# +# - Rustls with native roots +# - Rustls with WebPK roots +# - Native TLS (SChannel on Windows, Secure Transport on macOS and OpenSSL otherwise) +# +# Exactly one of the three variants must be selected. By default, Rustls with +# native roots is enabled. native-roots = ["reqwest/rustls-tls-native-roots"] webpki-roots = ["reqwest/rustls-tls-webpki-roots"] -logging = ["env_logger"] +native-tls = ["reqwest/native-tls"] [profile.release] lto = true diff --git a/src/main.rs b/src/main.rs index fed5f6e..08afe20 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,10 +18,16 @@ #[cfg(any( all(feature = "native-roots", feature = "webpki-roots"), - not(any(feature = "native-roots", feature = "webpki-roots")), + all(feature = "native-roots", feature = "native-tls"), + all(feature = "webpki-roots", feature = "native-tls"), + not(any( + feature = "native-roots", + feature = "webpki-roots", + feature = "native-tls" + )), ))] compile_error!( - "exactly one of feature \"native-roots\" and feature \"webpki-roots\" must be enabled" + "exactly one of the features \"native-roots\", \"webpki-roots\" or \"native-tls\" must be enabled" ); use std::{env, process}; From 8c6754ae78e48b91b343cdafa9918919c160b332 Mon Sep 17 00:00:00 2001 From: qknogxxb <117920064+qknogxxb@users.noreply.github.com> Date: Thu, 6 Jul 2023 05:33:39 +0800 Subject: [PATCH 263/368] Line iterator: Improve test functions (#316) --- src/line_iterator.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/line_iterator.rs b/src/line_iterator.rs index a02b1be..75a56bd 100644 --- a/src/line_iterator.rs +++ b/src/line_iterator.rs @@ -96,21 +96,27 @@ mod test { #[test] fn test_first_line_old_format() { - let input = "# The Title\n\n"; + let input = "# The Title\n> Description\n"; let mut lines = LineIterator::new(input.as_bytes()); let title = lines.next().unwrap(); assert_eq!(title, LineType::Title("The Title".to_string())); - let empty = lines.next().unwrap(); - assert_eq!(empty, LineType::Empty); + let description = lines.next().unwrap(); + assert_eq!( + description, + LineType::Description("Description".to_string()) + ); } #[test] fn test_first_line_new_format() { - let input = "The Title\n=========\n\n"; + let input = "The Title\n=========\n> Description\n"; let mut lines = LineIterator::new(input.as_bytes()); let title = lines.next().unwrap(); assert_eq!(title, LineType::Title("The Title".to_string())); - let empty = lines.next().unwrap(); - assert_eq!(empty, LineType::Empty); + let description = lines.next().unwrap(); + assert_eq!( + description, + LineType::Description("Description".to_string()) + ); } } From 45b3db6dc4a28c06077ed666c828da9e699cbd08 Mon Sep 17 00:00:00 2001 From: Adam Henley Date: Fri, 7 Jul 2023 02:20:46 +1200 Subject: [PATCH 264/368] Guard Fish completion when cache is empty (#331) Signed-off-by: Adam Henley --- completion/fish_tealdeer | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/completion/fish_tealdeer b/completion/fish_tealdeer index 601b114..dcb41c3 100644 --- a/completion/fish_tealdeer +++ b/completion/fish_tealdeer @@ -20,7 +20,9 @@ complete -c tldr -l seed-config -d 'Create a basic config.' -f complete -c tldr -l color -d 'Controls when to use color.' -xa 'always auto never' function __tealdeer_entries - tldr --list | string replace -a -i -r "\,\s" "\n" + if set entries (tldr --list 2>/dev/null) + string replace -a -i -r "\,\s" "\n" $entries + end end complete -f -c tldr -a '(__tealdeer_entries)' From de9cf431a8dd4ac827244953f70166c5dc2cf489 Mon Sep 17 00:00:00 2001 From: Iliia Maleki <53195438+iliya-malecki@users.noreply.github.com> Date: Thu, 6 Jul 2023 16:22:50 +0200 Subject: [PATCH 265/368] Completions: Add checks for wrong `tldr --list` output (#327) --- completion/bash_tealdeer | 5 +++-- completion/zsh_tealdeer | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/completion/bash_tealdeer b/completion/bash_tealdeer index 507e956..1fc0655 100644 --- a/completion/bash_tealdeer +++ b/completion/bash_tealdeer @@ -27,8 +27,9 @@ _tealdeer() COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) return fi - - COMPREPLY=( $(compgen -W '$( tldr -l | tr -d , )' -- "${cur}") ) + if tldrlist=$(tldr -l 2>/dev/null); then + COMPREPLY=( $(compgen -W '$( echo "$tldrlist" | tr -d , )' -- "${cur}") ) + fi } complete -F _tealdeer tldr diff --git a/completion/zsh_tealdeer b/completion/zsh_tealdeer index 99c12be..0d08745 100644 --- a/completion/zsh_tealdeer +++ b/completion/zsh_tealdeer @@ -2,8 +2,9 @@ _applications() { local -a commands - commands=(${(uonzf)"$(tldr --list 2>/dev/null)"//:/\\:}) - _describe -t commands 'command' commands + if commands=(${(uonzf)"$(tldr --list 2>/dev/null)"//:/\\:}); then + _describe -t commands 'command' commands + fi } _tealdeer() { From 7bd5ac566483d1beeeb7bdbf5f6c0909c086c08e Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Fri, 7 Jul 2023 03:20:14 +0530 Subject: [PATCH 266/368] Update CI workflows (#324) --- .github/workflows/ci.yml | 72 ++++++++++++---------------------- .github/workflows/gh-pages.yml | 4 +- .github/workflows/release.yml | 54 +++++++++++++------------ 3 files changed, 56 insertions(+), 74 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f53a47..7bb9bf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,79 +14,59 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - rust: ['1.62', stable] + toolchain: [stable, 1.62.1] runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master with: - toolchain: ${{ matrix.rust }} - profile: minimal - default: true + toolchain: ${{ matrix.toolchain }} - name: Build with default features - uses: actions-rs/cargo@v1 - with: - command: build + run: cargo build - name: Build with logging and webpki roots - uses: actions-rs/cargo@v1 - with: - command: build - args: --features logging,webpki-roots --no-default-features + run: cargo build --features logging,webpki-roots --no-default-features - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test clippy: name: run clippy lints runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true - components: clippy - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --features logging + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: clippy + - name: run clippy lints + run: cargo clippy --features logging fmt: name: run rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true - components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: rustfmt + - name: run rustfmt + run: cargo fmt --all -- --check docs: name: build docs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 with: mdbook-version: '0.4.4' - - uses: actions-rs/toolchain@v1 + - name: Setup toolchain + uses: dtolnay/rust-toolchain@master with: - toolchain: stable - profile: minimal - default: true + toolchain: stable - name: Build - uses: actions-rs/cargo@v1 - with: - command: build + run: cargo build - name: Ensure that docs can be built run: cd docs && mdbook build - name: Generate usage string diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index c32ec71..dafba80 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -7,9 +7,9 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e42acc..3795fc3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,9 +5,9 @@ on: jobs: create-release: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Create release for tag if: startsWith(github.ref, 'refs/tags/') run: | @@ -18,12 +18,12 @@ jobs: upload-completions: needs: - create-release - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: target: ["bash", "fish", "zsh"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Upload completion if: startsWith(github.ref, 'refs/tags/') run: | @@ -34,12 +34,12 @@ jobs: upload-license: needs: - create-release - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: target: ["MIT", "APACHE"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Upload license if: startsWith(github.ref, 'refs/tags/') run: | @@ -48,7 +48,7 @@ jobs: upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} LICENSE-${{ matrix.target }} LICENSE-${{ matrix.target }}.txt build-linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: include: @@ -63,42 +63,44 @@ jobs: - arch: "arm" libc: "musleabihf" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Pull Docker image run: docker pull messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} - name: Build in Docker run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} cargo build --release - name: Strip binary run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} musl-strip -s /home/rust/src/target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: "tealdeer-linux-${{ matrix.arch }}-${{ matrix.libc }}" path: "target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr" build-macos: - runs-on: macos-11 + runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - name: Build - uses: actions-rs/cargo@v1 + - uses: actions/checkout@v3 + - name: Setup toolchain + uses: dtolnay/rust-toolchain@master with: - command: build - args: --release --target x86_64-apple-darwin --no-default-features --features webpki-roots - - uses: actions/upload-artifact@v2 + toolchain: stable + - name: Build + run: cargo build --release --target x86_64-apple-darwin --no-default-features --features webpki-roots + - uses: actions/upload-artifact@v3 with: name: "tealdeer-macos-x86_64" path: "target/x86_64-apple-darwin/release/tldr" build-windows: - runs-on: windows-2022 + runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - name: Build - uses: actions-rs/cargo@v1 + - uses: actions/checkout@v3 + - name: Setup toolchain + uses: dtolnay/rust-toolchain@master with: - command: build - args: --release --target x86_64-pc-windows-msvc - - uses: actions/upload-artifact@v2 + toolchain: stable + - name: Build + run: cargo build --release --target x86_64-pc-windows-msvc + - uses: actions/upload-artifact@v3 with: name: "tealdeer-windows-x86_64-msvc" path: "target/x86_64-pc-windows-msvc/release/tldr.exe" @@ -109,7 +111,7 @@ jobs: - build-linux - build-macos - build-windows - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: target: @@ -121,8 +123,8 @@ jobs: - macos-x86_64 - windows-x86_64-msvc steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 - name: Upload binary if: startsWith(github.ref, 'refs/tags/') run: | From 4d2fc26dbea7229b37e08ca2ba0689a69925abb7 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Mon, 10 Jul 2023 18:22:20 +0200 Subject: [PATCH 267/368] Include `completion/*` in published crate (#333) --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index e3223a3..aedc55f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" documentation = "https://dbrgn.github.io/tealdeer/" version = "1.6.1" -include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png"] +include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"] rust-version = "1.62" edition = "2021" From 1764cee1bd0b857889cea9feaa79d52aeb697e3f Mon Sep 17 00:00:00 2001 From: Andrea Frigido Date: Sun, 13 Aug 2023 21:13:06 +0200 Subject: [PATCH 268/368] Cargo.toml: Update license field following SPDX 2.1 license expression standard (#336) --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index aedc55f..2953457 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ authors = [ ] description = "Fetch and show tldr help pages for many CLI commands. Full featured offline client with caching support." homepage = "https://github.com/dbrgn/tealdeer/" -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" name = "tealdeer" readme = "README.md" repository = "https://github.com/dbrgn/tealdeer/" From 9e1489bbc549dc86f8efe47d924512d48add10ed Mon Sep 17 00:00:00 2001 From: JJ Style Date: Sun, 27 Aug 2023 21:52:20 +0000 Subject: [PATCH 269/368] Allow querying multiple platforms (#300) --- docs/src/usage.txt | 33 +++++------ src/cache.rs | 36 +++++++----- src/cli.rs | 5 +- src/main.rs | 15 +++-- tests/lib.rs | 138 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 191 insertions(+), 36 deletions(-) diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 09edc5e..74b3b2e 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -9,21 +9,22 @@ ARGS: ... The command to show (e.g. `tar` or `git log`) OPTIONS: - -l, --list List all commands in the cache - -f, --render Render a specific markdown file - -p, --platform Override the operating system [possible values: linux, macos, - windows, sunos, osx, android] - -L, --language Override the language - -u, --update Update the local cache - --no-auto-update If auto update is configured, disable it for this run - -c, --clear-cache Clear the local cache - --pager Use a pager to page output - -r, --raw Display the raw markdown instead of rendering it - -q, --quiet Suppress informational messages - --show-paths Show file and directory paths used by tealdeer - --seed-config Create a basic config - --color Control whether to use color [possible values: always, auto, never] - -v, --version Print the version - -h, --help Print help information + -l, --list List all commands in the cache + -f, --render Render a specific markdown file + -p, --platform Override the operating system [possible values: linux, macos, + windows, sunos, osx, android] + -L, --language Override the language + -u, --update Update the local cache + --no-auto-update If auto update is configured, disable it for this run + -c, --clear-cache Clear the local cache + --pager Use a pager to page output + -r, --raw Display the raw markdown instead of rendering it + -q, --quiet Suppress informational messages + --show-paths Show file and directory paths used by tealdeer + --seed-config Create a basic config + --color Control whether to use color [possible values: always, auto, + never] + -v, --version Print the version + -h, --help Print help information To view the user documentation, please visit https://dbrgn.github.io/tealdeer/. diff --git a/src/cache.rs b/src/cache.rs index b0d1fce..aa64f5e 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -20,7 +20,6 @@ static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; #[derive(Debug)] pub struct Cache { - platform: PlatformType, cache_dir: PathBuf, } @@ -86,12 +85,11 @@ pub enum CacheFreshness { } impl Cache { - pub fn new

(platform: PlatformType, cache_dir: P) -> Self + pub fn new

(cache_dir: P) -> Self where P: Into, { Self { - platform, cache_dir: cache_dir.into(), } } @@ -211,8 +209,8 @@ impl Cache { } /// Return the platform directory. - fn get_platform_dir(&self) -> &'static str { - match self.platform { + fn get_platform_dir(platform: PlatformType) -> &'static str { + match platform { PlatformType::Linux => "linux", PlatformType::OsX => "osx", PlatformType::SunOs => "sunos", @@ -247,6 +245,7 @@ impl Cache { name: &str, languages: &[String], custom_pages_dir: Option<&Path>, + platforms: &[PlatformType], ) -> Option { let page_filename = format!("{name}.md"); let patch_filename = format!("{name}.patch"); @@ -275,12 +274,14 @@ impl Cache { let patch_path = Self::find_patch(&patch_filename, custom_pages_dir); - // Try to find a platform specific path next, append custom patch to it. - let platform_dir = self.get_platform_dir(); - if let Some(page) = - Self::find_page_for_platform(&page_filename, &pages_dir, platform_dir, &lang_dirs) - { - return Some(PageLookupResult::with_page(page).with_optional_patch(patch_path)); + // Try to find a platform specific path next, in the order supplied by the user, and append custom patch to it. + for &platform in platforms { + let platform_dir = Cache::get_platform_dir(platform); + if let Some(page) = + Self::find_page_for_platform(&page_filename, &pages_dir, platform_dir, &lang_dirs) + { + return Some(PageLookupResult::with_page(page).with_optional_patch(patch_path)); + } } // Did not find platform specific results, fall back to "common" @@ -289,10 +290,17 @@ impl Cache { } /// Return the available pages. - pub fn list_pages(&self, custom_pages_dir: Option<&Path>) -> Vec { + pub fn list_pages( + &self, + custom_pages_dir: Option<&Path>, + platforms: &[PlatformType], + ) -> Vec { // Determine platforms directory and platform let platforms_dir = self.pages_dir().join("pages"); - let platform_dir = self.get_platform_dir(); + let platform_dirs: Vec<&'static str> = platforms + .iter() + .map(|&p| Self::get_platform_dir(p)) + .collect(); // Closure that allows the WalkDir instance to traverse platform // specific and common page directories, but not others. @@ -303,7 +311,7 @@ impl Cache { None => return false, }; if file_type.is_dir() { - return file_name == "common" || file_name == platform_dir; + return file_name == "common" || platform_dirs.contains(&file_name); } else if file_type.is_file() { return true; } diff --git a/src/cli.rs b/src/cli.rs index 8646cac..ed71ef8 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -2,7 +2,7 @@ use std::path::PathBuf; -use clap::{AppSettings, ArgGroup, Parser}; +use clap::{AppSettings, ArgAction, ArgGroup, Parser}; use crate::types::{ColorOptions, PlatformType}; @@ -39,9 +39,10 @@ pub(crate) struct Args { #[clap( short = 'p', long = "platform", + action = ArgAction::Append, possible_values = ["linux", "macos", "windows", "sunos", "osx", "android"], )] - pub platform: Option, + pub platforms: Option>, /// Override the language #[clap(short = 'L', long = "language")] diff --git a/src/main.rs b/src/main.rs index 08afe20..15110e6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -283,8 +283,11 @@ fn main() { create_config_and_exit(enable_styles); } - // Specify target OS - let platform: PlatformType = args.platform.unwrap_or_else(PlatformType::current); + let fallback_platforms: &[PlatformType] = &[PlatformType::current()]; + let platforms = args + .platforms + .as_ref() + .map_or(fallback_platforms, Vec::as_slice); // If a local file was passed in, render it and exit if let Some(file) = args.render { @@ -298,7 +301,7 @@ fn main() { } // Instantiate cache. This will not yet create the cache directory! - let cache = Cache::new(platform, &config.directories.cache_dir.path); + let cache = Cache::new(&config.directories.cache_dir.path); // Clear cache, pass through if args.clear_cache { @@ -328,7 +331,10 @@ fn main() { .custom_pages_dir .as_ref() .map(PathWithSource::path); - println!("{}", cache.list_pages(custom_pages_dir).join("\n")); + println!( + "{}", + cache.list_pages(custom_pages_dir, platforms).join("\n") + ); process::exit(0); } @@ -353,6 +359,7 @@ fn main() { .custom_pages_dir .as_ref() .map(PathWithSource::path), + platforms, ) { if let Err(ref e) = print_page(&lookup_result, args.raw, enable_styles, args.pager, &config) diff --git a/tests/lib.rs b/tests/lib.rs index 07092b0..0afac46 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -562,6 +562,71 @@ fn test_pager_flag_enable() { .success(); } +#[test] +fn test_multiple_platform_command_search() { + let testenv = TestEnv::new(); + testenv.add_os_entry("linux", "linux-only", "this command only exists for linux"); + testenv.add_os_entry( + "linux", + "windows-and-linux", + "# windows-and-linux \n\n > linux version", + ); + testenv.add_os_entry( + "windows", + "windows-and-linux", + "# windows-and-linux \n\n > windows version", + ); + + testenv + .command() + .args(["--platform", "windows", "--platform", "linux", "linux-only"]) + .assert() + .success(); + + // test order of platforms supplied if preserved + testenv + .command() + .args([ + "--platform", + "windows", + "--platform", + "linux", + "windows-and-linux", + ]) + .assert() + .success() + .stdout(contains("windows version")); + + testenv + .command() + .args([ + "--platform", + "linux", + "--platform", + "windows", + "windows-and-linux", + ]) + .assert() + .success() + .stdout(contains("linux version")); +} + +#[test] +fn test_multiple_platform_command_search_not_found() { + let testenv = TestEnv::new(); + testenv.add_os_entry( + "windows", + "windows-only", + "this command only exists for Windows", + ); + + testenv + .command() + .args(["--platform", "macos", "--platform", "linux", "windows-only"]) + .assert() + .stderr(contains("Page `windows-only` not found in cache.")); +} + #[test] fn test_list_flag_rendering() { let testenv = TestEnv::new(); @@ -604,6 +669,79 @@ fn test_list_flag_rendering() { .stdout("bar\nbaz\nfaz\nfiz\nfoo\nqux\n"); } +#[test] +fn test_multi_platform_list_flag_rendering() { + let testenv = TestEnv::new(); + + // set custom pages directory + testenv.write_config(format!( + "[directories]\ncustom_pages_dir = '{}'", + testenv.custom_pages_dir.path().to_str().unwrap() + )); + + testenv.add_entry("common", ""); + + testenv + .command() + .args(["--list"]) + .assert() + .success() + .stdout("common\n"); + + testenv + .command() + .args(["--platform", "linux", "--list"]) + .assert() + .success() + .stdout("common\n"); + + testenv + .command() + .args(["--platform", "windows", "--list"]) + .assert() + .success() + .stdout("common\n"); + + testenv.add_os_entry("linux", "rm", ""); + testenv.add_os_entry("linux", "ls", ""); + testenv.add_os_entry("windows", "del", ""); + testenv.add_os_entry("windows", "dir", ""); + testenv.add_os_entry("linux", "winux", ""); + testenv.add_os_entry("windows", "winux", ""); + + // test `--list` for `--platform linux` by itself + testenv + .command() + .args(["--platform", "linux", "--list"]) + .assert() + .success() + .stdout("common\nls\nrm\nwinux\n"); + + // test `--list` for `--platform windows` by itself + testenv + .command() + .args(["--platform", "windows", "--list"]) + .assert() + .success() + .stdout("common\ndel\ndir\nwinux\n"); + + // test `--list` for `--platform linux --platform windows` + testenv + .command() + .args(["--platform", "linux", "--platform", "windows", "--list"]) + .assert() + .success() + .stdout("common\ndel\ndir\nls\nrm\nwinux\n"); + + // test `--list` for `--platform windows --platform linux` + testenv + .command() + .args(["--platform", "linux", "--platform", "windows", "--list"]) + .assert() + .success() + .stdout("common\ndel\ndir\nls\nrm\nwinux\n"); +} + #[test] fn test_autoupdate_cache() { let testenv = TestEnv::new(); From a82bc4b8d2b0356372521e0b2133dad8650eb7cf Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Mon, 2 Oct 2023 21:06:09 +0200 Subject: [PATCH 270/368] Add "Tips and Tricks" chapter to user manual (#342) --- docs/src/SUMMARY.md | 1 + docs/src/tips_and_tricks.md | 52 +++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 docs/src/tips_and_tricks.md diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 8d1a634..2d5c716 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -10,3 +10,4 @@ - [Section: \[style\]](./config_style.md) - [Section: \[updates\]](./config_updates.md) - [Section: \[directories\]](./config_directories.md) +- [Tips and Tricks](./tips_and_tricks.md) diff --git a/docs/src/tips_and_tricks.md b/docs/src/tips_and_tricks.md new file mode 100644 index 0000000..99a49c7 --- /dev/null +++ b/docs/src/tips_and_tricks.md @@ -0,0 +1,52 @@ +# Tips and Tricks + +This page features some example use cases of Tealdeer. + +## Showing a random page on shell start + +To display a randomly selected page, you can invoke `tldr` twice: One time to +select a page and a second time to display this page. To randomly select a page, +we use `shuf` from the GNU coreutils: + +```bash +tldr --quiet $(tldr --quiet --list | shuf -n1) +``` + +You can also add the above command to your `.bashrc` (or similar shell +configuration file) to display a random page every time you start a new shell +session. + +## Displaying all pages with their summary + +If you want to extend the output of `tldr --list` with the first line summary of +each page, you can run the following Python script: + +```python +#!/usr/bin/env python3 + +import subprocess + +commands = subprocess.run( + ["tldr", "--quiet", "--list"], + capture_output=True, + encoding="utf-8", +).stdout.splitlines() + +for command in commands: + output = subprocess.run( + ["tldr", "--quiet", command], + capture_output=True, + encoding="utf-8", + ).stdout + description = output.lstrip().split("\n\n")[0] + description = " ".join(description.split()) + print(f"{command} => {description}") +``` + +Note that there are a lot of pages and the script will run Tealdeer once for +every page, so the script may take a couple of seconds to finish. + +## Extending this chapter + +If you have an interesting setup with Tealdeer, feel free to share your +configuration on [our Github repository](https://github.com/dbrgn/tealdeer). From efbdebb4261aef8f6d5e26c27070550ef5ac60af Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sat, 21 Oct 2023 14:51:16 +0200 Subject: [PATCH 271/368] Update Github actions badge (#346) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fb38ea6..2203b40 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,6 @@ Thanks to @severen for coming up with the name "tealdeer"! [github-actions]: https://github.com/dbrgn/tealdeer/actions?query=branch%3Amain -[github-actions-badge]: https://github.com/dbrgn/tealdeer/workflows/CI/badge.svg +[github-actions-badge]: https://github.com/dbrgn/tealdeer/actions/workflows/ci.yml/badge.svg?branch=main [crates-io]: https://crates.io/crates/tealdeer [crates-io-badge]: https://img.shields.io/crates/v/tealdeer.svg From 5bdcd6ae9c71caae12b6a3b63e9dc5b8cffb15b5 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Tue, 21 Nov 2023 19:34:22 +0800 Subject: [PATCH 272/368] Update Arch Linux package URL in installing.md (#348) The old URL returns 404 now. --- docs/src/installing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/installing.md b/docs/src/installing.md index 1163a14..9d60898 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -14,7 +14,7 @@ autocompletions](#autocompletion). Tealdeer has been added to a few package managers: -- Arch Linux: [`tealdeer`](https://archlinux.org/packages/community/x86_64/tealdeer/) +- Arch Linux: [`tealdeer`](https://archlinux.org/packages/extra/x86_64/tealdeer/) - Debian: [`tealdeer`](https://tracker.debian.org/tealdeer) - Fedora: [`tealdeer`](https://src.fedoraproject.org/rpms/rust-tealdeer) - FreeBSD: [`sysutils/tealdeer`](https://www.freshports.org/sysutils/tealdeer/) From d04e671c46434813a22d26b9f2f5adb166eaf31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolai=20Fr=C3=B6hlich?= Date: Wed, 17 Jan 2024 23:30:03 +0100 Subject: [PATCH 273/368] Add release build target "linux-aarch64-musl" for platform "linux/arm64" (#351) --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3795fc3..52aadc6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,6 +54,8 @@ jobs: include: - arch: "x86_64" libc: "musl" + - arch: "aarch64" + libc: "musl" - arch: "i686" libc: "musl" - arch: "armv7" @@ -116,6 +118,7 @@ jobs: matrix: target: - linux-x86_64-musl + - linux-aarch64-musl - linux-i686-musl - linux-armv7-musleabihf - linux-arm-musleabi From 2e731d7d17b33f917b58587eacf552c44c54e80d Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 11 Feb 2024 15:20:11 +0100 Subject: [PATCH 274/368] Bump MSRV to 1.64 (#352) --- .github/workflows/ci.yml | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bb9bf4..017a390 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - toolchain: [stable, 1.62.1] + toolchain: [stable, 1.64.0] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v3 diff --git a/Cargo.toml b/Cargo.toml index 2953457..5f9d019 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/dbrgn/tealdeer/" documentation = "https://dbrgn.github.io/tealdeer/" version = "1.6.1" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"] -rust-version = "1.62" +rust-version = "1.64" edition = "2021" [[bin]] From ad69985e42418f609600b32a925e256749580389 Mon Sep 17 00:00:00 2001 From: Zacchary Dempsey-Plante Date: Sun, 11 Feb 2024 15:58:06 -0500 Subject: [PATCH 275/368] Update the Nix package link in the documentation (#353) --- docs/src/installing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/installing.md b/docs/src/installing.md index 9d60898..5e51afa 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -22,7 +22,7 @@ Tealdeer has been added to a few package managers: - Homebrew: [`tealdeer`](https://formulae.brew.sh/formula/tealdeer) - MacPorts: [`tealdeer`](https://ports.macports.org/port/tealdeer/) - NetBSD: [`sysutils/tealdeer`](https://pkgsrc.se/sysutils/tealdeer) -- Nix: [`tealdeer`](https://nixos.org/nixos/packages.html#tealdeer) +- Nix: [`tealdeer`](https://search.nixos.org/packages?query=tealdeer) - openSUSE: [`tealdeer`](https://software.opensuse.org/package/tealdeer?search_term=tealdeer) - Scoop: [`tealdeer`](https://github.com/ScoopInstaller/Main/blob/master/bucket/tealdeer.json) - Solus: [`tealdeer`](https://packages.getsol.us/shannon/t/tealdeer/) From 17c08f026180204a47d7a1914c36de61e94ff991 Mon Sep 17 00:00:00 2001 From: Zacchary Dempsey-Plante Date: Thu, 15 Feb 2024 14:27:56 -0500 Subject: [PATCH 276/368] Change custom page files to use a `.md` extension (#322) * Change custom page files to use a `.md` extension. * Add a breaking change warning to the documentation for the usage of custom pages. * Add a temporary check for old custom pages to assist in the migration to the new naming convention. Co-authored-by: Danilo Bargen --- RELEASING.md | 3 + docs/src/usage_custom_pages.md | 23 ++++-- src/cache.rs | 75 ++++++++++++++++--- src/main.rs | 2 +- ...inkscape-v2.patch => inkscape-v2.patch.md} | 0 tests/lib.rs | 20 ++--- 6 files changed, 94 insertions(+), 29 deletions(-) rename tests/{inkscape-v2.patch => inkscape-v2.patch.md} (100%) diff --git a/RELEASING.md b/RELEASING.md index 6eb868c..16cb4e2 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -14,6 +14,9 @@ Update version numbers: $ vim Cargo.toml $ cargo update -p tealdeer +For release 1.7.0: Remove this note and uncomment warning in +`docs/src/usage_custom_pages.md`. + Update docs: $ cargo run -- --help > docs/src/usage.txt diff --git a/docs/src/usage_custom_pages.md b/docs/src/usage_custom_pages.md index d3d1e81..87344d7 100644 --- a/docs/src/usage_custom_pages.md +++ b/docs/src/usage_custom_pages.md @@ -1,5 +1,16 @@ # Custom Pages and Patches + + Tealdeer allows creating new custom pages, overriding existing pages as well as extending existing pages. @@ -15,28 +26,28 @@ file](config_directories.html). To document internal command line tools, or if you want to replace an existing tldr page with one that's better suited for you, place a file with the name -`.page` in the custom pages directory. When calling `tldr `, +`.page.md` in the custom pages directory. When calling `tldr `, your custom page will be shown instead of the upstream version in the cache. Path: - $CUSTOM_PAGES_DIR/.page + $CUSTOM_PAGES_DIR/.page.md Example: - ~/.local/share/tealdeer/pages/ufw.page + ~/.local/share/tealdeer/pages/ufw.page.md ## Custom Patches Sometimes you don't want to fully replace an existing upstream page, but just want to extend it with your own examples that you frequently need. In this -case, use a file called `.patch`, it will be appended to existing +case, use a file called `.patch.md`, it will be appended to existing pages. Path: - $CUSTOM_PAGES_DIR/.patch + $CUSTOM_PAGES_DIR/.patch.md Example: - ~/.local/share/tealdeer/pages/ufw.patch + ~/.local/share/tealdeer/pages/ufw.patch.md diff --git a/src/cache.rs b/src/cache.rs index aa64f5e..48be75e 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -13,7 +13,7 @@ use reqwest::{blocking::Client, Proxy}; use walkdir::{DirEntry, WalkDir}; use zip::ZipArchive; -use crate::types::PlatformType; +use crate::{types::PlatformType, utils::print_warning}; pub static TLDR_PAGES_DIR: &str = "tldr-pages"; static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; @@ -21,6 +21,7 @@ static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; #[derive(Debug)] pub struct Cache { cache_dir: PathBuf, + enable_styles: bool, } #[derive(Debug)] @@ -85,12 +86,13 @@ pub enum CacheFreshness { } impl Cache { - pub fn new

(cache_dir: P) -> Self + pub fn new

(cache_dir: P, enable_styles: bool) -> Self where P: Into, { Self { cache_dir: cache_dir.into(), + enable_styles, } } @@ -232,7 +234,7 @@ impl Cache { .find(|path| path.exists() && path.is_file()) } - /// Look up custom patch (.patch). If it exists, store it in a variable. + /// Look up custom patch (.patch.md). If it exists, store it in a variable. fn find_patch(patch_name: &str, custom_pages_dir: Option<&Path>) -> Option { custom_pages_dir .map(|custom_dir| custom_dir.join(patch_name)) @@ -248,8 +250,8 @@ impl Cache { platforms: &[PlatformType], ) -> Option { let page_filename = format!("{name}.md"); - let patch_filename = format!("{name}.patch"); - let custom_filename = format!("{name}.page"); + let patch_filename = format!("{name}.patch.md"); + let custom_filename = format!("{name}.page.md"); // Determine directory paths let pages_dir = self.pages_dir(); @@ -264,8 +266,11 @@ impl Cache { }) .collect(); - // Look up custom page (.page). If it exists, return it directly + // Look up custom page (.page.md). If it exists, return it directly if let Some(config_dir) = custom_pages_dir { + // TODO: Remove this check 1 year after version 1.7.0 was released + self.check_for_old_custom_pages(config_dir); + let custom_page = config_dir.join(custom_filename); if custom_page.exists() && custom_page.is_file() { return Some(PageLookupResult::with_page(custom_page)); @@ -326,6 +331,15 @@ impl Cache { .map(str::to_string) }; + let to_stem_custom = |entry: DirEntry| -> Option { + entry + .path() + .file_name() + .and_then(OsStr::to_str) + .and_then(|s| s.strip_suffix(".page.md")) + .map(str::to_string) + }; + // Recursively walk through common and (if applicable) platform specific directory let mut pages = WalkDir::new(platforms_dir) .min_depth(1) // Skip root directory @@ -344,8 +358,12 @@ impl Cache { if let Some(custom_pages_dir) = custom_pages_dir { let is_page = |entry: &DirEntry| -> bool { - let extension = entry.path().extension().unwrap_or_default(); - entry.file_type().is_file() && extension == "page" + entry.file_type().is_file() + && entry + .path() + .file_name() + .and_then(OsStr::to_str) + .map_or(false, |file_name| file_name.ends_with(".page.md")) }; let custom_pages = WalkDir::new(custom_pages_dir) @@ -354,7 +372,7 @@ impl Cache { .into_iter() .filter_entry(is_page) .filter_map(Result::ok) - .filter_map(to_stem); + .filter_map(to_stem_custom); pages.extend(custom_pages); } @@ -395,6 +413,39 @@ impl Cache { Ok(true) } + + /// Check for old custom pages (without .md suffix) and print a warning. + fn check_for_old_custom_pages(&self, custom_pages_dir: &Path) { + let old_custom_pages_exist = WalkDir::new(custom_pages_dir) + .min_depth(1) + .max_depth(1) + .into_iter() + .filter_entry(|entry| entry.file_type().is_file()) + .any(|entry| { + if let Ok(entry) = entry { + let extension = entry.path().extension(); + if let Some(extension) = extension { + extension == "page" || extension == "patch" + } else { + false + } + } else { + false + } + }); + if old_custom_pages_exist { + print_warning( + self.enable_styles, + &format!( + "Custom pages using the old naming convention were found in {}.\n\ + Please rename them to follow the new convention:\n\ + - `.page` → `.page.md`\n\ + - `.patch` → `.patch.md`", + custom_pages_dir.display() + ), + ); + } + } } /// Unit Tests for cache module @@ -411,8 +462,8 @@ mod tests { fn test_reader_with_patch() { // Write test files let dir = tempfile::tempdir().unwrap(); - let page_path = dir.path().join("test.page"); - let patch_path = dir.path().join("test.patch"); + let page_path = dir.path().join("test.page.md"); + let patch_path = dir.path().join("test.patch.md"); { let mut f1 = File::create(&page_path).unwrap(); f1.write_all(b"Hello\n").unwrap(); @@ -435,7 +486,7 @@ mod tests { fn test_reader_without_patch() { // Write test file let dir = tempfile::tempdir().unwrap(); - let page_path = dir.path().join("test.page"); + let page_path = dir.path().join("test.page.md"); { let mut f = File::create(&page_path).unwrap(); f.write_all(b"Hello\n").unwrap(); diff --git a/src/main.rs b/src/main.rs index 15110e6..66da7a1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -301,7 +301,7 @@ fn main() { } // Instantiate cache. This will not yet create the cache directory! - let cache = Cache::new(&config.directories.cache_dir.path); + let cache = Cache::new(&config.directories.cache_dir.path, enable_styles); // Clear cache, pass through if args.clear_cache { diff --git a/tests/inkscape-v2.patch b/tests/inkscape-v2.patch.md similarity index 100% rename from tests/inkscape-v2.patch rename to tests/inkscape-v2.patch.md diff --git a/tests/lib.rs b/tests/lib.rs index 0afac46..fa8d19c 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -84,7 +84,7 @@ impl TestEnv { fn add_page_entry(&self, name: &str, contents: &str) { let dir = self.custom_pages_dir.path(); create_dir_all(dir).unwrap(); - let mut file = File::create(dir.join(format!("{name}.page"))).unwrap(); + let mut file = File::create(dir.join(format!("{name}.page.md"))).unwrap(); file.write_all(contents.as_bytes()).unwrap(); } @@ -92,7 +92,7 @@ impl TestEnv { fn add_patch_entry(&self, name: &str, contents: &str) { let dir = self.custom_pages_dir.path(); create_dir_all(dir).unwrap(); - let mut file = File::create(dir.join(format!("{name}.patch"))).unwrap(); + let mut file = File::create(dir.join(format!("{name}.patch.md"))).unwrap(); file.write_all(contents.as_bytes()).unwrap(); } @@ -798,7 +798,7 @@ fn test_autoupdate_cache() { check_cache_updated(false); } -/// End-end test to ensure .page files overwrite pages in cache_dir +/// End-end test to ensure .page.md files overwrite pages in cache_dir #[test] fn test_custom_page_overwrites() { let testenv = TestEnv::new(); @@ -811,7 +811,7 @@ fn test_custom_page_overwrites() { // Add file that should be ignored to the cache dir testenv.add_entry("inkscape-v2", ""); - // Add .page file to custome_pages_dir + // Add .page.md file to custom_pages_dir testenv.add_page_entry("inkscape-v2", include_str!("inkscape-v2.md")); // Load expected output @@ -825,7 +825,7 @@ fn test_custom_page_overwrites() { .stdout(diff(expected)); } -/// End-End test to ensure that .patch files are appended to pages in the cache_dir +/// End-End test to ensure that .patch.md files are appended to pages in the cache_dir #[test] fn test_custom_patch_appends_to_common() { let testenv = TestEnv::new(); @@ -838,8 +838,8 @@ fn test_custom_patch_appends_to_common() { // Add page to the cache dir testenv.add_entry("inkscape-v2", include_str!("inkscape-v2.md")); - // Add .page file to custome_pages_dir - testenv.add_patch_entry("inkscape-v2", include_str!("inkscape-v2.patch")); + // Add .page.md file to custom_pages_dir + testenv.add_patch_entry("inkscape-v2", include_str!("inkscape-v2.patch.md")); // Load expected output let expected = include_str!("inkscape-patched-no-color.expected"); @@ -852,7 +852,7 @@ fn test_custom_patch_appends_to_common() { .stdout(diff(expected)); } -/// End-End test to ensure that .patch files are not appended to .page files in the custom_pages_dir +/// End-End test to ensure that .patch.md files are not appended to .page.md files in the custom_pages_dir /// Maybe this interaction should change but I put this test here for the coverage #[test] fn test_custom_patch_does_not_append_to_custom() { @@ -868,8 +868,8 @@ fn test_custom_patch_does_not_append_to_custom() { // Add page to the cache dir testenv.add_page_entry("inkscape-v2", include_str!("inkscape-v2.md")); - // Add .page file to custome_pages_dir - testenv.add_patch_entry("inkscape-v2", include_str!("inkscape-v2.patch")); + // Add .page.md file to custom_pages_dir + testenv.add_patch_entry("inkscape-v2", include_str!("inkscape-v2.patch.md")); // Load expected output let expected = include_str!("inkscape-default-no-color.expected"); From c8f2408373f3aeb329e1d4aea8010a400d22d579 Mon Sep 17 00:00:00 2001 From: Linus Walker <85013114+Walker-00@users.noreply.github.com> Date: Mon, 4 Mar 2024 00:05:09 +0630 Subject: [PATCH 277/368] Performance optimization with cargo flags (#355) --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 5f9d019..a49d924 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,4 +62,7 @@ webpki-roots = ["reqwest/rustls-tls-webpki-roots"] native-tls = ["reqwest/native-tls"] [profile.release] +strip = true +opt-level = 3 lto = true +codegen-units = 1 From ee6d2418f1b0b049d1b8b224b554af77dc9cc65e Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Wed, 10 Apr 2024 19:35:51 +0530 Subject: [PATCH 278/368] Add BSD platform support and update workflows (#354) --- .github/dependabot.yml | 6 ++++++ .github/workflows/ci.yml | 8 ++++---- .github/workflows/gh-pages.yml | 2 +- .github/workflows/release.yml | 22 +++++++++++----------- completion/bash_tealdeer | 2 +- completion/fish_tealdeer | 2 +- completion/zsh_tealdeer | 3 +++ docs/src/usage.txt | 2 +- src/cache.rs | 3 +++ src/cli.rs | 2 +- src/types.rs | 34 ++++++++++++++++++++++++++-------- 11 files changed, 58 insertions(+), 28 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8ac6b8c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 017a390..d8e33b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: toolchain: [stable, 1.64.0] runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} @@ -32,7 +32,7 @@ jobs: name: run clippy lints runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -44,7 +44,7 @@ jobs: name: run rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -56,7 +56,7 @@ jobs: name: build docs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 with: diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index dafba80..f4370ab 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -9,7 +9,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 52aadc6..a3ae0fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ jobs: create-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Create release for tag if: startsWith(github.ref, 'refs/tags/') run: | @@ -23,7 +23,7 @@ jobs: matrix: target: ["bash", "fish", "zsh"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Upload completion if: startsWith(github.ref, 'refs/tags/') run: | @@ -39,7 +39,7 @@ jobs: matrix: target: ["MIT", "APACHE"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Upload license if: startsWith(github.ref, 'refs/tags/') run: | @@ -65,14 +65,14 @@ jobs: - arch: "arm" libc: "musleabihf" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Pull Docker image run: docker pull messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} - name: Build in Docker run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} cargo build --release - name: Strip binary run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} musl-strip -s /home/rust/src/target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: "tealdeer-linux-${{ matrix.arch }}-${{ matrix.libc }}" path: "target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr" @@ -80,14 +80,14 @@ jobs: build-macos: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup toolchain uses: dtolnay/rust-toolchain@master with: toolchain: stable - name: Build run: cargo build --release --target x86_64-apple-darwin --no-default-features --features webpki-roots - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: "tealdeer-macos-x86_64" path: "target/x86_64-apple-darwin/release/tldr" @@ -95,14 +95,14 @@ jobs: build-windows: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup toolchain uses: dtolnay/rust-toolchain@master with: toolchain: stable - name: Build run: cargo build --release --target x86_64-pc-windows-msvc - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: "tealdeer-windows-x86_64-msvc" path: "target/x86_64-pc-windows-msvc/release/tldr.exe" @@ -126,8 +126,8 @@ jobs: - macos-x86_64 - windows-x86_64-msvc steps: - - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 - name: Upload binary if: startsWith(github.ref, 'refs/tags/') run: | diff --git a/completion/bash_tealdeer b/completion/bash_tealdeer index 1fc0655..d5420b6 100644 --- a/completion/bash_tealdeer +++ b/completion/bash_tealdeer @@ -14,7 +14,7 @@ _tealdeer() return ;; -p|--platform) - COMPREPLY=( $(compgen -W 'linux macos sunos windows android' -- "${cur}") ) + COMPREPLY=( $(compgen -W 'linux macos sunos windows android freebsd netbsd openbsd' -- "${cur}") ) return ;; --color) diff --git a/completion/fish_tealdeer b/completion/fish_tealdeer index dcb41c3..eb35e87 100644 --- a/completion/fish_tealdeer +++ b/completion/fish_tealdeer @@ -7,7 +7,7 @@ complete -c tldr -s h -l help -d 'Print the help message.' -f complete -c tldr -s v -l version -d 'Show version information.' -f complete -c tldr -s l -l list -d 'List all commands in the cache.' -f complete -c tldr -s f -l render -d 'Render a specific markdown file.' -r -complete -c tldr -s p -l platform -d 'Override the operating system.' -xa 'linux macos sunos windows android' +complete -c tldr -s p -l platform -d 'Override the operating system.' -xa 'linux macos sunos windows android freebsd netbsd openbsd' complete -c tldr -s L -l language -d 'Override the language' -x complete -c tldr -s u -l update -d 'Update the local cache.' -f complete -c tldr -l no-auto-update -d 'If auto update is configured, disable it for this run.' -f diff --git a/completion/zsh_tealdeer b/completion/zsh_tealdeer index 0d08745..fbab749 100644 --- a/completion/zsh_tealdeer +++ b/completion/zsh_tealdeer @@ -21,6 +21,9 @@ _tealdeer() { sunos windows android + freebsd + netbsd + openbsd ))' "($I -L --language)"{-L,--language}"[Override the language settings]:lang" "($I -u --update)"{-u,--update}"[Update the local cache]" diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 74b3b2e..5ab6fd9 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -12,7 +12,7 @@ OPTIONS: -l, --list List all commands in the cache -f, --render Render a specific markdown file -p, --platform Override the operating system [possible values: linux, macos, - windows, sunos, osx, android] + windows, sunos, osx, android, freebsd, netbsd, openbsd] -L, --language Override the language -u, --update Update the local cache --no-auto-update If auto update is configured, disable it for this run diff --git a/src/cache.rs b/src/cache.rs index 48be75e..8fccb62 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -218,6 +218,9 @@ impl Cache { PlatformType::SunOs => "sunos", PlatformType::Windows => "windows", PlatformType::Android => "android", + PlatformType::FreeBsd => "freebsd", + PlatformType::NetBsd => "netbsd", + PlatformType::OpenBsd => "openbsd", } } diff --git a/src/cli.rs b/src/cli.rs index ed71ef8..3825245 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -40,7 +40,7 @@ pub(crate) struct Args { short = 'p', long = "platform", action = ArgAction::Append, - possible_values = ["linux", "macos", "windows", "sunos", "osx", "android"], + possible_values = ["linux", "macos", "windows", "sunos", "osx", "android", "freebsd", "netbsd", "openbsd"], )] pub platforms: Option>, diff --git a/src/types.rs b/src/types.rs index f3318a9..2de2d2b 100644 --- a/src/types.rs +++ b/src/types.rs @@ -14,6 +14,9 @@ pub enum PlatformType { SunOs, Windows, Android, + FreeBsd, + NetBsd, + OpenBsd, } impl fmt::Display for PlatformType { @@ -24,6 +27,9 @@ impl fmt::Display for PlatformType { Self::SunOs => write!(f, "SunOS"), Self::Windows => write!(f, "Windows"), Self::Android => write!(f, "Android"), + Self::FreeBsd => write!(f, "FreeBSD"), + Self::NetBsd => write!(f, "NetBSD"), + Self::OpenBsd => write!(f, "OpenBSD"), } } } @@ -38,8 +44,11 @@ impl str::FromStr for PlatformType { "sunos" => Ok(Self::SunOs), "windows" => Ok(Self::Windows), "android" => Ok(Self::Android), + "freebsd" => Ok(Self::FreeBsd), + "netbsd" => Ok(Self::NetBsd), + "openbsd" => Ok(Self::OpenBsd), other => Err(anyhow!( - "Unknown OS: {}. Possible values: linux, macos, osx, sunos, windows, android", + "Unknown OS: {}. Possible values: linux, macos, osx, sunos, windows, android, freebsd, netbsd, openbsd", other )), } @@ -52,13 +61,7 @@ impl PlatformType { Self::Linux } - #[cfg(any( - target_os = "macos", - target_os = "freebsd", - target_os = "netbsd", - target_os = "openbsd", - target_os = "dragonfly" - ))] + #[cfg(any(target_os = "macos", target_os = "dragonfly"))] pub fn current() -> Self { Self::OsX } @@ -73,6 +76,21 @@ impl PlatformType { Self::Android } + #[cfg(any(target_os = "freebsd"))] + pub fn current() -> Self { + Self::FreeBsd + } + + #[cfg(any(target_os = "netbsd"))] + pub fn current() -> Self { + Self::NetBsd + } + + #[cfg(any(target_os = "openbsd"))] + pub fn current() -> Self { + Self::OpenBsd + } + #[cfg(not(any( target_os = "linux", target_os = "macos", From 7633e465419a9fa5cc87e5e25bbdf06f7d1a7aca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 18:50:44 +0200 Subject: [PATCH 279/368] Bump peaceiris/actions-gh-pages from 3 to 4 (#359) Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3 to 4. - [Release notes](https://github.com/peaceiris/actions-gh-pages/releases) - [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md) - [Commits](https://github.com/peaceiris/actions-gh-pages/compare/v3...v4) --- updated-dependencies: - dependency-name: peaceiris/actions-gh-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index f4370ab..89010b4 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -19,7 +19,7 @@ jobs: - run: cd docs && mdbook build - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/book From 9957dcea74c6f708132e6a3af51dc0f909411000 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 18:51:53 +0200 Subject: [PATCH 280/368] Bump peaceiris/actions-mdbook from 1 to 2 (#360) Bumps [peaceiris/actions-mdbook](https://github.com/peaceiris/actions-mdbook) from 1 to 2. - [Release notes](https://github.com/peaceiris/actions-mdbook/releases) - [Changelog](https://github.com/peaceiris/actions-mdbook/blob/main/CHANGELOG.md) - [Commits](https://github.com/peaceiris/actions-mdbook/compare/v1...v2) --- updated-dependencies: - dependency-name: peaceiris/actions-mdbook dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- .github/workflows/gh-pages.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8e33b9..b81754f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup mdBook - uses: peaceiris/actions-mdbook@v1 + uses: peaceiris/actions-mdbook@v2 with: mdbook-version: '0.4.4' - name: Setup toolchain diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 89010b4..e965e29 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - name: Setup mdBook - uses: peaceiris/actions-mdbook@v1 + uses: peaceiris/actions-mdbook@v2 with: mdbook-version: '0.4.4' From 3a1423210544343d430d20804ffa9567d69e73bc Mon Sep 17 00:00:00 2001 From: Adam Henley Date: Fri, 7 Jun 2024 03:17:20 +1200 Subject: [PATCH 281/368] Generate docs only upon release (#362) Signed-off-by: Adam Henley --- .github/workflows/gh-pages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index e965e29..55d016b 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -2,8 +2,8 @@ name: github pages on: push: - branches: - - main + tags: + - "v*" # push events matching `v` followed by anything, e.g. v1.0, v20.15.10 jobs: deploy: From de1684edb6a50d3fc0b9e2583df51862350a3d68 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 10 Jun 2024 21:33:29 +0200 Subject: [PATCH 282/368] Update to clap v4 --- Cargo.lock | 393 +++++++++++++++++++++++++++++++++++---------- Cargo.toml | 2 +- docs/src/usage.txt | 45 +++--- src/cli.rs | 61 +++---- src/main.rs | 8 +- src/types.rs | 62 +++---- 6 files changed, 387 insertions(+), 184 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 972c24e..13c88ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,55 @@ dependencies = [ "memchr", ] +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.68" @@ -78,6 +127,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" + [[package]] name = "bstr" version = "1.1.0" @@ -128,42 +183,49 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.2.23" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" dependencies = [ - "atty", - "bitflags", + "clap_builder", "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" +dependencies = [ + "anstream", + "anstyle", "clap_lex", - "indexmap", - "once_cell", - "strsim", - "termcolor", - "textwrap", + "terminal_size", ] [[package]] name = "clap_derive" -version = "3.2.18" +version = "4.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.66", ] [[package]] name = "clap_lex" -version = "0.2.4" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "combine" @@ -280,6 +342,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "errno-dragonfly" version = "0.1.2" @@ -458,9 +530,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "heck" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -623,10 +695,16 @@ checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" dependencies = [ "hermit-abi 0.2.6", "io-lifetimes", - "rustix", + "rustix 0.36.5", "windows-sys 0.42.0", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + [[package]] name = "itertools" version = "0.10.5" @@ -679,9 +757,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "linux-raw-sys" @@ -689,6 +767,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + [[package]] name = "log" version = "0.4.17" @@ -792,7 +876,7 @@ version = "0.10.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29d971fd5722fec23977260f6e81aa67d2f22cadbdc2aa049f1022d9a3be1566" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "foreign-types", "libc", @@ -809,7 +893,7 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -831,19 +915,13 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "os_str_bytes" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - [[package]] name = "pager" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2599211a5c97fbbb1061d3dc751fa15f404927e4846e07c643287d6d1f462880" dependencies = [ - "errno", + "errno 0.2.8", "libc", ] @@ -901,44 +979,20 @@ dependencies = [ "termtree", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro2" -version = "1.0.49" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -949,7 +1003,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1059,14 +1113,27 @@ version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588" dependencies = [ - "bitflags", - "errno", + "bitflags 1.3.2", + "errno 0.2.8", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.1.4", "windows-sys 0.42.0", ] +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.4.2", + "errno 0.3.9", + "libc", + "linux-raw-sys 0.4.14", + "windows-sys 0.52.0", +] + [[package]] name = "rustls" version = "0.20.7" @@ -1141,7 +1208,7 @@ version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -1175,7 +1242,7 @@ checksum = "255abe9a125a985c05190d687b320c12f9b1f0b99445e608c21ba0782c719ad8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1226,12 +1293,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "syn" version = "1.0.107" @@ -1243,6 +1304,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "tealdeer" version = "1.6.1" @@ -1291,18 +1363,22 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +dependencies = [ + "rustix 0.38.34", + "windows-sys 0.48.0", +] + [[package]] name = "termtree" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thiserror" version = "1.0.38" @@ -1320,7 +1396,7 @@ checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1469,18 +1545,18 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "vcpkg" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - [[package]] name = "wait-timeout" version = "0.2.0" @@ -1538,7 +1614,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.107", "wasm-bindgen-shared", ] @@ -1572,7 +1648,7 @@ checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1662,21 +1738,82 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.0", "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_gnullvm 0.42.0", "windows_x86_64_msvc 0.42.0", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + [[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_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -1689,6 +1826,18 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -1701,6 +1850,24 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -1713,6 +1880,18 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -1725,12 +1904,36 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + [[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_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -1743,6 +1946,18 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + [[package]] name = "winreg" version = "0.10.1" diff --git a/Cargo.toml b/Cargo.toml index a49d924..a1b61b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ path = "src/main.rs" anyhow = "1" app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" -clap = { version = "3", features = ["std", "derive", "suggestions", "color"], default-features = false } +clap = { version = "4", features = ["std", "derive", "help", "usage", "cargo", "error-context", "color", "wrap_help"], default-features = false } env_logger = { version = "0.10", optional = true } log = "0.4" reqwest = { version = "0.11.3", features = ["blocking"], default-features = false } diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 5ab6fd9..7e823c4 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -1,30 +1,27 @@ -tealdeer 1.6.1 +tealdeer 1.6.1: A fast TLDR client Danilo Bargen , Niklas Mohrin -A fast TLDR client -USAGE: - tldr [OPTIONS] [COMMAND]... +Usage: tldr [OPTIONS] [COMMAND]... -ARGS: - ... The command to show (e.g. `tar` or `git log`) +Arguments: + [COMMAND]... The command to show (e.g. `tar` or `git log`) -OPTIONS: - -l, --list List all commands in the cache - -f, --render Render a specific markdown file - -p, --platform Override the operating system [possible values: linux, macos, - windows, sunos, osx, android, freebsd, netbsd, openbsd] - -L, --language Override the language - -u, --update Update the local cache - --no-auto-update If auto update is configured, disable it for this run - -c, --clear-cache Clear the local cache - --pager Use a pager to page output - -r, --raw Display the raw markdown instead of rendering it - -q, --quiet Suppress informational messages - --show-paths Show file and directory paths used by tealdeer - --seed-config Create a basic config - --color Control whether to use color [possible values: always, auto, - never] - -v, --version Print the version - -h, --help Print help information +Options: + -l, --list List all commands in the cache + -f, --render Render a specific markdown file + -p, --platform Override the operating system [possible values: linux, macos, sunos, + windows, android, freebsd, netbsd, openbsd] + -L, --language Override the language + -u, --update Update the local cache + --no-auto-update If auto update is configured, disable it for this run + -c, --clear-cache Clear the local cache + --pager Use a pager to page output + -r, --raw Display the raw markdown instead of rendering it + -q, --quiet Suppress informational messages + --show-paths Show file and directory paths used by tealdeer + --seed-config Create a basic config + --color Control whether to use color [possible values: always, auto, never] + -v, --version Print the version + -h, --help Print help To view the user documentation, please visit https://dbrgn.github.io/tealdeer/. diff --git a/src/cli.rs b/src/cli.rs index 3825245..fd6c987 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -2,32 +2,38 @@ use std::path::PathBuf; -use clap::{AppSettings, ArgAction, ArgGroup, Parser}; +use clap::{arg, builder::ArgAction, command, ArgGroup, Parser}; use crate::types::{ColorOptions, PlatformType}; // Note: flag names are specified explicitly in clap attributes // to improve readability and allow contributors to grep names like "clear-cache" #[derive(Parser, Debug)] -#[clap(about = "A fast TLDR client", author, version)] -#[clap( - after_help = "To view the user documentation, please visit https://dbrgn.github.io/tealdeer/." +#[command( + about = "A fast TLDR client", + version, + disable_version_flag = true, + author, + help_template = "{before-help}{name} {version}: {about-with-newline}{author-with-newline} +{usage-heading} {usage} + +{all-args}{after-help}", + after_help = "To view the user documentation, please visit https://dbrgn.github.io/tealdeer/.", + arg_required_else_help = true, + help_expected = true, + group = ArgGroup::new("command_or_file").args(&["command", "render"]), )] -#[clap(setting = AppSettings::DeriveDisplayOrder)] -#[clap(arg_required_else_help(true))] -#[clap(disable_colored_help(true))] -#[clap(group = ArgGroup::new("command_or_file").args(&["command", "render"]))] -pub(crate) struct Args { +pub(crate) struct Cli { /// The command to show (e.g. `tar` or `git log`) - #[clap(min_values = 1)] + #[arg(num_args(1..))] pub command: Vec, /// List all commands in the cache - #[clap(short = 'l', long = "list")] + #[arg(short = 'l', long = "list")] pub list: bool, /// Render a specific markdown file - #[clap( + #[arg( short = 'f', long = "render", value_name = "FILE", @@ -36,61 +42,56 @@ pub(crate) struct Args { pub render: Option, /// Override the operating system - #[clap( + #[arg( short = 'p', long = "platform", action = ArgAction::Append, - possible_values = ["linux", "macos", "windows", "sunos", "osx", "android", "freebsd", "netbsd", "openbsd"], )] pub platforms: Option>, /// Override the language - #[clap(short = 'L', long = "language")] + #[arg(short = 'L', long = "language")] pub language: Option, /// Update the local cache - #[clap(short = 'u', long = "update")] + #[arg(short = 'u', long = "update")] pub update: bool, /// If auto update is configured, disable it for this run - #[clap(long = "no-auto-update", requires = "command_or_file")] + #[arg(long = "no-auto-update", requires = "command_or_file")] pub no_auto_update: bool, /// Clear the local cache - #[clap(short = 'c', long = "clear-cache")] + #[arg(short = 'c', long = "clear-cache")] pub clear_cache: bool, /// Use a pager to page output - #[clap(long = "pager", requires = "command_or_file")] + #[arg(long = "pager", requires = "command_or_file")] pub pager: bool, /// Display the raw markdown instead of rendering it - #[clap(short = 'r', long = "--raw", requires = "command_or_file")] + #[arg(short = 'r', long = "raw", requires = "command_or_file")] pub raw: bool, /// Suppress informational messages - #[clap(short = 'q', long = "quiet")] + #[arg(short = 'q', long = "quiet")] pub quiet: bool, /// Show file and directory paths used by tealdeer - #[clap(long = "show-paths")] + #[arg(long = "show-paths")] pub show_paths: bool, /// Create a basic config - #[clap(long = "seed-config")] + #[arg(long = "seed-config")] pub seed_config: bool, /// Control whether to use color - #[clap( - long = "color", - value_name = "WHEN", - possible_values = ["always", "auto", "never"] - )] + #[arg(long = "color", value_name = "WHEN")] pub color: Option, /// Print the version // Note: We override the version flag because clap uses `-V` by default, // while TLDR specification requires `-v` to be used. - #[clap(short = 'v', long = "version")] - pub version: bool, + #[arg(short = 'v', long = "version", action = ArgAction::Version)] + pub version: (), } diff --git a/src/main.rs b/src/main.rs index 66da7a1..4de0038 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,7 +48,7 @@ mod utils; use crate::{ cache::{Cache, CacheFreshness, PageLookupResult, TLDR_PAGES_DIR}, - cli::Args, + cli::Cli, config::{get_config_dir, get_config_path, make_default_config, Config, PathWithSource}, extensions::Dedup, output::print_page, @@ -65,7 +65,7 @@ const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; /// The cache should be updated if it was explicitly requested, /// or if an automatic update is due and allowed. -fn should_update_cache(cache: &Cache, args: &Args, config: &Config) -> bool { +fn should_update_cache(cache: &Cache, args: &Cli, config: &Config) -> bool { args.update || (!args.no_auto_update && config.updates.auto_update @@ -81,7 +81,7 @@ enum CheckCacheResult { } /// Check the cache for freshness. If it's stale or missing, show a warning. -fn check_cache(cache: &Cache, args: &Args, enable_styles: bool) -> CheckCacheResult { +fn check_cache(cache: &Cache, args: &Cli, enable_styles: bool) -> CheckCacheResult { match cache.freshness() { CacheFreshness::Fresh => CheckCacheResult::CacheFound, CacheFreshness::Stale(_) if args.quiet => CheckCacheResult::CacheFound, @@ -243,7 +243,7 @@ fn main() { init_log(); // Parse arguments - let args = Args::parse(); + let args = Cli::parse(); // Determine the usage of styles #[cfg(target_os = "windows")] diff --git a/src/types.rs b/src/types.rs index 2de2d2b..06a8e64 100644 --- a/src/types.rs +++ b/src/types.rs @@ -2,7 +2,6 @@ use std::{fmt, str}; -use anyhow::{anyhow, Result}; use serde_derive::{Deserialize, Serialize}; #[derive(Debug, Eq, PartialEq, Copy, Clone, Serialize, Deserialize)] @@ -11,8 +10,8 @@ use serde_derive::{Deserialize, Serialize}; pub enum PlatformType { Linux, OsX, - SunOs, Windows, + SunOs, Android, FreeBsd, NetBsd, @@ -24,8 +23,8 @@ impl fmt::Display for PlatformType { match self { Self::Linux => write!(f, "Linux"), Self::OsX => write!(f, "macOS / BSD"), - Self::SunOs => write!(f, "SunOS"), Self::Windows => write!(f, "Windows"), + Self::SunOs => write!(f, "SunOS"), Self::Android => write!(f, "Android"), Self::FreeBsd => write!(f, "FreeBSD"), Self::NetBsd => write!(f, "NetBSD"), @@ -34,23 +33,30 @@ impl fmt::Display for PlatformType { } } -impl str::FromStr for PlatformType { - type Err = anyhow::Error; +impl clap::ValueEnum for PlatformType { + fn value_variants<'a>() -> &'a [Self] { + &[ + Self::Linux, + Self::OsX, + Self::SunOs, + Self::Windows, + Self::Android, + Self::FreeBsd, + Self::NetBsd, + Self::OpenBsd, + ] + } - fn from_str(s: &str) -> Result { - match s { - "linux" => Ok(Self::Linux), - "osx" | "macos" => Ok(Self::OsX), - "sunos" => Ok(Self::SunOs), - "windows" => Ok(Self::Windows), - "android" => Ok(Self::Android), - "freebsd" => Ok(Self::FreeBsd), - "netbsd" => Ok(Self::NetBsd), - "openbsd" => Ok(Self::OpenBsd), - other => Err(anyhow!( - "Unknown OS: {}. Possible values: linux, macos, osx, sunos, windows, android, freebsd, netbsd, openbsd", - other - )), + fn to_possible_value<'a>(&self) -> Option { + match self { + Self::Linux => Some(clap::builder::PossibleValue::new("linux")), + Self::OsX => Some(clap::builder::PossibleValue::new("macos").alias("osx")), + Self::Windows => Some(clap::builder::PossibleValue::new("windows")), + Self::SunOs => Some(clap::builder::PossibleValue::new("sunos")), + Self::Android => Some(clap::builder::PossibleValue::new("android")), + Self::FreeBsd => Some(clap::builder::PossibleValue::new("freebsd")), + Self::NetBsd => Some(clap::builder::PossibleValue::new("netbsd")), + Self::OpenBsd => Some(clap::builder::PossibleValue::new("openbsd")), } } } @@ -106,7 +112,7 @@ impl PlatformType { } } -#[derive(Debug, Eq, PartialEq, Copy, Clone, Deserialize)] +#[derive(Debug, Eq, PartialEq, Copy, Clone, Deserialize, clap::ValueEnum)] #[serde(rename_all = "lowercase")] pub enum ColorOptions { Always, @@ -114,22 +120,6 @@ pub enum ColorOptions { Never, } -impl str::FromStr for ColorOptions { - type Err = anyhow::Error; - - fn from_str(s: &str) -> Result { - match s { - "always" => Ok(Self::Always), - "auto" => Ok(Self::Auto), - "never" => Ok(Self::Never), - other => Err(anyhow!( - "Unknown color option: {}. Possible values: always, auto, never", - other - )), - } - } -} - impl Default for ColorOptions { fn default() -> Self { Self::Auto From 86293c8723710355c4b341d4a74c5f04216fc429 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 10 Jun 2024 23:25:18 +0200 Subject: [PATCH 283/368] Bump MSRV to 1.75 --- .github/workflows/ci.yml | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b81754f..6b32aa9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - toolchain: [stable, 1.64.0] + toolchain: [stable, 1.75.0] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v4 diff --git a/Cargo.toml b/Cargo.toml index a1b61b5..21656ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/dbrgn/tealdeer/" documentation = "https://dbrgn.github.io/tealdeer/" version = "1.6.1" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"] -rust-version = "1.64" +rust-version = "1.75" edition = "2021" [[bin]] From 64f3fbbbc688da3ac4700ca80552efa67fc121c8 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 10 Jun 2024 23:28:22 +0200 Subject: [PATCH 284/368] Apply clippy suggestions --- src/cache.rs | 5 ++--- src/types.rs | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 8fccb62..f5e604c 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -314,9 +314,8 @@ impl Cache { // specific and common page directories, but not others. let should_walk = |entry: &DirEntry| -> bool { let file_type = entry.file_type(); - let file_name = match entry.file_name().to_str() { - Some(name) => name, - None => return false, + let Some(file_name) = entry.file_name().to_str() else { + return false; }; if file_type.is_dir() { return file_name == "common" || platform_dirs.contains(&file_name); diff --git a/src/types.rs b/src/types.rs index 06a8e64..8a111a6 100644 --- a/src/types.rs +++ b/src/types.rs @@ -82,17 +82,17 @@ impl PlatformType { Self::Android } - #[cfg(any(target_os = "freebsd"))] + #[cfg(target_os = "freebsd")] pub fn current() -> Self { Self::FreeBsd } - #[cfg(any(target_os = "netbsd"))] + #[cfg(target_os = "netbsd")] pub fn current() -> Self { Self::NetBsd } - #[cfg(any(target_os = "openbsd"))] + #[cfg(target_os = "openbsd")] pub fn current() -> Self { Self::OpenBsd } From 64f90a625eeb5cba9cf669bbd68ff9c4305bbfab Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 17 Jun 2024 00:50:41 +0200 Subject: [PATCH 285/368] CI: Create release builds for Apple silicon (ARM) --- .github/workflows/release.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a3ae0fc..eda277e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,18 +79,24 @@ jobs: build-macos: runs-on: macos-latest + strategy: + matrix: + include: + - arch: "x86_64" + - arch: "aarch64" steps: - uses: actions/checkout@v4 - name: Setup toolchain uses: dtolnay/rust-toolchain@master with: toolchain: stable + targets: "${{ matrix.arch }}-apple-darwin" - name: Build - run: cargo build --release --target x86_64-apple-darwin --no-default-features --features webpki-roots + run: cargo build --release --target ${{ matrix.arch }}-apple-darwin --no-default-features --features webpki-roots - uses: actions/upload-artifact@v4 with: - name: "tealdeer-macos-x86_64" - path: "target/x86_64-apple-darwin/release/tldr" + name: "tealdeer-macos-${{ matrix.arch }}" + path: "target/${{ matrix.arch }}-apple-darwin/release/tldr" build-windows: runs-on: windows-latest @@ -124,6 +130,7 @@ jobs: - linux-arm-musleabi - linux-arm-musleabihf - macos-x86_64 + - macos-aarch64 - windows-x86_64-msvc steps: - uses: actions/checkout@v4 From 706c1408a7139a41e842a9e640bc041559950310 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 17 Jun 2024 01:02:20 +0200 Subject: [PATCH 286/368] CI: Don't publish docs for 0.x test releases --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 55d016b..83a132b 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -3,7 +3,7 @@ name: github pages on: push: tags: - - "v*" # push events matching `v` followed by anything, e.g. v1.0, v20.15.10 + - "v[1-9]*" # push events matching `v` followed by anything larger than 0, e.g. v1.0, v20.15.10 jobs: deploy: From 7620a673061169424ac4c9d27c7e8c385fa1561c Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 17 Jun 2024 01:07:29 +0200 Subject: [PATCH 287/368] CI: Set name for every workflow --- .github/workflows/ci.yml | 3 +-- .github/workflows/gh-pages.yml | 3 +-- .github/workflows/release.yml | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b81754f..aabc3f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ +name: CI on: push: branches: @@ -6,8 +7,6 @@ on: schedule: - cron: '30 3 * * 2' -name: CI - jobs: test: name: run tests diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 83a132b..26fff6e 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,5 +1,4 @@ -name: github pages - +name: GitHub Pages on: push: tags: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eda277e..2c36ad5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,4 @@ +name: Release on: push: tags: From f3d74850a8a22816a39061137c3bf61148414a5f Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 6 Aug 2024 23:46:40 +0200 Subject: [PATCH 288/368] Make clippy happy (#373) --- src/cache.rs | 4 ++-- src/line_iterator.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index f5e604c..a4496ad 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -77,7 +77,7 @@ impl PageLookupResult { } pub enum CacheFreshness { - /// The cache is still fresh (less than MAX_CACHE_AGE old) + /// The cache is still fresh (less than `MAX_CACHE_AGE` old) Fresh, /// The cache is stale and should be updated Stale(Duration), @@ -184,7 +184,7 @@ impl Cache { // Extract archive into pages dir archive - .extract(&self.pages_dir()) + .extract(self.pages_dir()) .context("Could not unpack compressed data")?; Ok(()) diff --git a/src/line_iterator.rs b/src/line_iterator.rs index 75a56bd..2e11378 100644 --- a/src/line_iterator.rs +++ b/src/line_iterator.rs @@ -12,7 +12,7 @@ pub enum TldrFormat { Undecided, /// The original format V1, - /// The new format (see https://github.com/tldr-pages/tldr/pull/958) + /// The new format (see ) V2, } From 65495da5a59f056b3df2affce8d016db08a46309 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 12 Aug 2024 22:54:03 +0200 Subject: [PATCH 289/368] Run cargo update --- Cargo.lock | 1011 +++++++++++++++++++++++++--------------------------- 1 file changed, 482 insertions(+), 529 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 13c88ee..e7f99ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -10,18 +19,18 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -34,33 +43,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -68,15 +77,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.68" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "app_dirs2" -version = "2.5.4" +version = "2.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47a8d2d8dbda5fca0a522259fb88e4f55d2b10ad39f5f03adeebf85031eba501" +checksum = "a7e7b35733e3a8c1ccb90385088dd5b6eaa61325cb4d1ad56e683b5224ff352e" dependencies = [ "jni", "ndk-context", @@ -86,13 +95,15 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "2.0.7" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa3d466004a8b4cb1bc34044240a2fd29d17607e2e3bd613eb44fd48e8100da3" +checksum = "dc1835b7f27878de8525dc71410b5a31cdcc5f230aed5ba5df968e09c201b23d" dependencies = [ + "anstyle", "bstr", "doc-comment", - "predicates", + "libc", + "predicates 3.1.2", "predicates-core", "predicates-tree", "wait-timeout", @@ -111,15 +122,30 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "backtrace" +version = "0.3.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] [[package]] name = "base64" -version = "0.13.1" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bitflags" @@ -129,45 +155,44 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bstr" -version = "1.1.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45ea9b00a7b3f2988e9a65ad3917e62123c38dba709b666506207be96d1790b" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", - "once_cell", "regex-automata", "serde", ] [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.3.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cc" -version = "1.0.78" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" [[package]] name = "cesu8" @@ -183,9 +208,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.5.7" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" +checksum = "11d8838454fda655dafd3accb2b6e2bea645b9e4078abe84a22ceb947235c5cc" dependencies = [ "clap_builder", "clap_derive", @@ -193,9 +218,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.7" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", @@ -205,33 +230,33 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.5" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.66", + "syn", ] [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "memchr", @@ -239,9 +264,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -249,27 +274,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" -dependencies = [ - "cfg-if", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "difflib" @@ -277,26 +299,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "doc-comment" version = "0.3.3" @@ -305,24 +307,24 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" -version = "1.8.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encoding_rs" -version = "0.8.31" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -331,6 +333,12 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.2.8" @@ -364,9 +372,9 @@ dependencies = [ [[package]] name = "escargot" -version = "0.5.7" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5584ba17d7ab26a8a7284f13e5bd196294dd2f2d79773cff29b9e9edef601a6" +checksum = "c000f23e9d459aef148b7267e02b03b94a0aaacf4ec64c65612f67e02f525fb6" dependencies = [ "log", "once_cell", @@ -376,30 +384,27 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.8.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" -dependencies = [ - "instant", -] +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "filetime" -version = "0.2.19" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" +checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.42.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" dependencies = [ "crc32fast", "miniz_oxide", @@ -437,51 +442,51 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-io", @@ -494,9 +499,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -504,10 +509,16 @@ dependencies = [ ] [[package]] -name = "h2" -version = "0.3.15" +name = "gimli" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -524,9 +535,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" @@ -545,18 +556,15 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "http" -version = "0.2.8" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -565,9 +573,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -576,15 +584,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -594,9 +602,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.23" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -618,10 +626,11 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.2" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ + "futures-util", "http", "hyper", "rustls", @@ -644,9 +653,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -654,56 +663,36 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" dependencies = [ - "autocfg", + "equivalent", "hashbrown", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c" -dependencies = [ - "libc", - "windows-sys 0.42.0", -] - [[package]] name = "ipnet" -version = "2.7.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.2" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.2.6", - "io-lifetimes", - "rustix 0.36.5", - "windows-sys 0.42.0", + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -716,22 +705,24 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jni" -version = "0.19.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" dependencies = [ "cesu8", + "cfg-if", "combine", "jni-sys", "log", "thiserror", "walkdir", + "windows-sys 0.45.0", ] [[package]] @@ -742,19 +733,13 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - [[package]] name = "libc" version = "0.2.155" @@ -762,10 +747,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] -name = "linux-raw-sys" -version = "0.1.4" +name = "libredox" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.6.0", + "libc", + "redox_syscall", +] [[package]] name = "linux-raw-sys" @@ -775,53 +765,49 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.17" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", - "log", "wasi", - "windows-sys 0.42.0", + "windows-sys 0.52.0", ] [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -847,36 +833,35 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] -name = "num_cpus" -version = "1.15.0" +name = "object" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ - "hermit-abi 0.2.6", - "libc", + "memchr", ] [[package]] name = "once_cell" -version = "1.16.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.44" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d971fd5722fec23977260f6e81aa67d2f22cadbdc2aa049f1022d9a3be1566" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -887,13 +872,13 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn", ] [[package]] @@ -904,11 +889,10 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.79" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5454462c0eced1e97f2ec09036abc8da362e66802f66fd20f86854d9d8cbcbc4" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ - "autocfg", "cc", "libc", "pkg-config", @@ -927,15 +911,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -945,15 +929,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "predicates" -version = "2.1.4" +version = "2.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54fc5dc63ed3bbf19494623db4f3af16842c0d975818e469022d09e53f0aa05" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", @@ -964,16 +948,27 @@ dependencies = [ ] [[package]] -name = "predicates-core" -version = "1.0.5" +name = "predicates" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f883590242d3c6fc5bf50299011695fa6590c2c70eac95ee1bdb9a733ad1a2" +checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +dependencies = [ + "anstyle", + "difflib", + "predicates-core", +] + +[[package]] +name = "predicates-core" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.7" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", @@ -981,9 +976,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -999,61 +994,47 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom", - "redox_syscall", - "thiserror", + "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.7.0" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" - [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.11.13" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64", "bytes", @@ -1080,6 +1061,8 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", + "system-configuration", "tokio", "tokio-native-tls", "tokio-rustls", @@ -1094,32 +1077,24 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.20" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", + "getrandom", "libc", - "once_cell", "spin", "untrusted", - "web-sys", - "winapi", + "windows-sys 0.52.0", ] [[package]] -name = "rustix" -version = "0.36.5" +name = "rustc-demangle" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588" -dependencies = [ - "bitflags 1.3.2", - "errno 0.2.8", - "io-lifetimes", - "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.42.0", -] +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" @@ -1127,30 +1102,30 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "errno 0.3.9", "libc", - "linux-raw-sys 0.4.14", + "linux-raw-sys", "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.20.7" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", + "rustls-webpki", "sct", - "webpki", ] [[package]] name = "rustls-native-certs" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -1160,18 +1135,28 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ "base64", ] [[package]] -name = "ryu" -version = "1.0.12" +name = "rustls-webpki" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -1184,19 +1169,18 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "lazy_static", - "windows-sys 0.36.1", + "windows-sys 0.52.0", ] [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ "ring", "untrusted", @@ -1204,11 +1188,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.7.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -1217,9 +1201,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -1227,31 +1211,32 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.151" +version = "1.0.207" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fed41fc1a24994d044e6db6935e69511a1153b52c15eb42493b26fa87feba0" +checksum = "5665e14a49a4ea1b91029ba7d3bca9f299e1f7cfa194388ccc20f14743e784f2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.151" +version = "1.0.207" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255abe9a125a985c05190d687b320c12f9b1f0b99445e608c21ba0782c719ad8" +checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn", ] [[package]] name = "serde_json" -version = "1.0.91" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -1270,34 +1255,34 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "socket2" -version = "0.4.7" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "winapi", + "windows-sys 0.52.0", ] [[package]] name = "spin" -version = "0.5.2" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "syn" -version = "1.0.107" +version = "2.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" dependencies = [ "proc-macro2", "quote", @@ -1305,14 +1290,30 @@ dependencies = [ ] [[package]] -name = "syn" -version = "2.0.66" +name = "sync_wrapper" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", ] [[package]] @@ -1329,7 +1330,7 @@ dependencies = [ "filetime", "log", "pager", - "predicates", + "predicates 2.1.5", "reqwest", "serde", "serde_derive", @@ -1342,23 +1343,22 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.3.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "once_cell", + "rustix", + "windows-sys 0.59.0", ] [[package]] name = "termcolor" -version = "1.1.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -1369,73 +1369,71 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.38.34", + "rustix", "windows-sys 0.48.0", ] [[package]] name = "termtree" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn", ] [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.23.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", - "num_cpus", "pin-project-lite", "socket2", - "windows-sys 0.42.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-native-tls" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", "tokio", @@ -1443,34 +1441,32 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.23.4" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ "rustls", "tokio", - "webpki", ] [[package]] name = "tokio-util" -version = "0.7.4" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] name = "toml" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] @@ -1483,62 +1479,61 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-core", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.3.1" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -1568,22 +1563,20 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", - "winapi", "winapi-util", ] [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -1595,9 +1588,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1605,24 +1598,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.107", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.33" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -1632,9 +1625,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1642,51 +1635,38 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "winapi" @@ -1706,11 +1686,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -1721,30 +1701,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "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 0.42.0", - "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 0.42.0", - "windows_x86_64_msvc 0.42.0", + "windows-targets 0.42.2", ] [[package]] @@ -1762,7 +1723,31 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -1782,25 +1767,25 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" @@ -1810,21 +1795,15 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.42.2" 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" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" @@ -1834,21 +1813,15 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.42.2" 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" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" @@ -1858,27 +1831,21 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.42.2" 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" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" @@ -1888,21 +1855,15 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.42.2" 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" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" @@ -1912,15 +1873,15 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" @@ -1930,21 +1891,15 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.42.2" 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" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" @@ -1954,27 +1909,25 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] name = "xdg" -version = "2.4.1" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4583db5cbd4c4c0303df2d15af80f0539db703fa1c68802d4cbbd2dd0f88f6" -dependencies = [ - "dirs", -] +checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" [[package]] name = "yansi" @@ -1984,9 +1937,9 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zip" -version = "0.6.3" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537ce7411d25e54e8ae21a7ce0b15840e7bfcff15b51d697ec3266cc76bdf080" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ "byteorder", "crc32fast", From 13f2c4c7147c80afe23e838286c3e945ec3b5db7 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 12 Aug 2024 22:54:58 +0200 Subject: [PATCH 290/368] =?UTF-8?q?Upgrade=20env=5Flogger:=200.10=20?= =?UTF-8?q?=E2=86=92=200.11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 42 ++++++++++++++++-------------------------- Cargo.toml | 2 +- 2 files changed, 17 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e7f99ff..cf9c5c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -321,16 +321,26 @@ dependencies = [ ] [[package]] -name = "env_logger" -version = "0.10.2" +name = "env_filter" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ - "humantime", - "is-terminal", "log", "regex", - "termcolor", +] + +[[package]] +name = "env_logger" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", ] [[package]] @@ -677,17 +687,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "is-terminal" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -1354,15 +1353,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - [[package]] name = "terminal_size" version = "0.3.0" diff --git a/Cargo.toml b/Cargo.toml index 21656ac..be5d527 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ anyhow = "1" app_dirs = { version = "2", package = "app_dirs2" } atty = "0.2" clap = { version = "4", features = ["std", "derive", "help", "usage", "cargo", "error-context", "color", "wrap_help"], default-features = false } -env_logger = { version = "0.10", optional = true } +env_logger = { version = "0.11", optional = true } log = "0.4" reqwest = { version = "0.11.3", features = ["blocking"], default-features = false } serde = "1.0.21" From 13a3d58c8bb2aca58877733e0fd4ebb88d794b7f Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 12 Aug 2024 22:57:32 +0200 Subject: [PATCH 291/368] =?UTF-8?q?Upgrade=20predicates:=202.1.5=20?= =?UTF-8?q?=E2=86=92=203.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 36 +++++------------------------------- Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cf9c5c4..33db786 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -103,7 +103,7 @@ dependencies = [ "bstr", "doc-comment", "libc", - "predicates 3.1.2", + "predicates", "predicates-core", "predicates-tree", "wait-timeout", @@ -305,12 +305,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - [[package]] name = "encoding_rs" version = "0.8.34" @@ -693,15 +687,6 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.11" @@ -932,20 +917,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "predicates" -version = "2.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" -dependencies = [ - "difflib", - "float-cmp", - "itertools", - "normalize-line-endings", - "predicates-core", - "regex", -] - [[package]] name = "predicates" version = "3.1.2" @@ -954,7 +925,10 @@ checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" dependencies = [ "anstyle", "difflib", + "float-cmp", + "normalize-line-endings", "predicates-core", + "regex", ] [[package]] @@ -1329,7 +1303,7 @@ dependencies = [ "filetime", "log", "pager", - "predicates 2.1.5", + "predicates", "reqwest", "serde", "serde_derive", diff --git a/Cargo.toml b/Cargo.toml index be5d527..3c8d881 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ pager = "0.16" [dev-dependencies] assert_cmd = "2.0.1" escargot = "0.5" -predicates = "2.0.2" +predicates = "3.1.2" tempfile = "3.1.0" filetime = "0.2.10" From 9096d536b1749093a57918c9a02ea6bc8d82541f Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 12 Aug 2024 22:59:58 +0200 Subject: [PATCH 292/368] =?UTF-8?q?Upgrade=20reqwest:=200.11.27=20?= =?UTF-8?q?=E2=86=92=200.12.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 427 ++++++++++++++++++++++++++++++++++------------------- Cargo.toml | 2 +- 2 files changed, 275 insertions(+), 154 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 33db786..ef9ac51 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -143,15 +143,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.7" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" @@ -305,15 +299,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" -[[package]] -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] - [[package]] name = "env_filter" version = "0.1.2" @@ -337,12 +322,6 @@ dependencies = [ "log", ] -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - [[package]] name = "errno" version = "0.2.8" @@ -460,6 +439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", + "futures-sink", ] [[package]] @@ -494,6 +474,7 @@ checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-io", + "futures-sink", "futures-task", "memchr", "pin-project-lite", @@ -518,31 +499,6 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - [[package]] name = "heck" version = "0.5.0" @@ -566,9 +522,9 @@ checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "http" -version = "0.2.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -577,12 +533,24 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", "pin-project-lite", ] @@ -592,12 +560,6 @@ version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - [[package]] name = "humantime" version = "2.1.0" @@ -606,53 +568,76 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.30" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2", "http", "http-body", "httparse", - "httpdate", "itoa", "pin-project-lite", - "socket2", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] name = "hyper-rustls" -version = "0.24.2" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" dependencies = [ "futures-util", "http", "hyper", + "hyper-util", "rustls", + "rustls-native-certs", + "rustls-pki-types", "tokio", "tokio-rustls", + "tower-service", + "webpki-roots", ] [[package]] name = "hyper-tls" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", + "http-body-util", "hyper", + "hyper-util", "native-tls", "tokio", "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -665,16 +650,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "indexmap" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" -dependencies = [ - "equivalent", - "hashbrown", -] - [[package]] name = "ipnet" version = "2.9.0" @@ -736,7 +711,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags", "libc", "redox_syscall", ] @@ -845,7 +820,7 @@ version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -899,6 +874,26 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "pin-project-lite" version = "0.2.14" @@ -917,6 +912,15 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + [[package]] name = "predicates" version = "3.1.2" @@ -956,6 +960,54 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "quinn" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" +dependencies = [ + "bytes", + "rand", + "ring", + "rustc-hash", + "rustls", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +dependencies = [ + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "quote" version = "1.0.36" @@ -965,13 +1017,43 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + [[package]] name = "redox_syscall" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] @@ -1005,21 +1087,22 @@ checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" dependencies = [ "base64", "bytes", - "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2", "http", "http-body", + "http-body-util", "hyper", "hyper-rustls", "hyper-tls", + "hyper-util", "ipnet", "js-sys", "log", @@ -1028,14 +1111,15 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "quinn", "rustls", "rustls-native-certs", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", - "system-configuration", "tokio", "tokio-native-tls", "tokio-rustls", @@ -1069,13 +1153,19 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustix" version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno 0.3.9", "libc", "linux-raw-sys", @@ -1084,44 +1174,55 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.12" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ - "log", + "once_cell", "ring", + "rustls-pki-types", "rustls-webpki", - "sct", + "subtle", + "zeroize", ] [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" dependencies = [ "openssl-probe", "rustls-pemfile", + "rustls-pki-types", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ "base64", + "rustls-pki-types", ] [[package]] -name = "rustls-webpki" -version = "0.101.7" +name = "rustls-pki-types" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" + +[[package]] +name = "rustls-webpki" +version = "0.102.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" dependencies = [ "ring", + "rustls-pki-types", "untrusted", ] @@ -1149,23 +1250,13 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "security-framework" version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -1235,6 +1326,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + [[package]] name = "socket2" version = "0.5.7" @@ -1251,6 +1348,12 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "syn" version = "2.0.74" @@ -1264,30 +1367,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" [[package]] name = "tealdeer" @@ -1405,24 +1487,12 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ "rustls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", + "rustls-pki-types", "tokio", ] @@ -1435,6 +1505,27 @@ dependencies = [ "serde", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -1628,9 +1719,12 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.4" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "winapi" @@ -1879,9 +1973,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winreg" -version = "0.50.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ "cfg-if", "windows-sys 0.48.0", @@ -1899,6 +1993,33 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + [[package]] name = "zip" version = "0.6.6" diff --git a/Cargo.toml b/Cargo.toml index 3c8d881..5c8eb87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ atty = "0.2" clap = { version = "4", features = ["std", "derive", "help", "usage", "cargo", "error-context", "color", "wrap_help"], default-features = false } env_logger = { version = "0.11", optional = true } log = "0.4" -reqwest = { version = "0.11.3", features = ["blocking"], default-features = false } +reqwest = { version = "0.12.5", features = ["blocking"], default-features = false } serde = "1.0.21" serde_derive = "1.0.21" toml = "0.5.1" From 60855cedcf64503b2f046992efd5e937ffe070b9 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 12 Aug 2024 23:01:49 +0200 Subject: [PATCH 293/368] =?UTF-8?q?Upgrade=20toml:=200.5.11=20=E2=86=92=20?= =?UTF-8?q?0.8.19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- Cargo.toml | 2 +- 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef9ac51..e5f9400 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -322,6 +322,12 @@ dependencies = [ "log", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.2.8" @@ -499,6 +505,12 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + [[package]] name = "heck" version = "0.5.0" @@ -650,6 +662,16 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "indexmap" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +dependencies = [ + "equivalent", + "hashbrown", +] + [[package]] name = "ipnet" version = "2.9.0" @@ -1305,6 +1327,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -1498,11 +1529,36 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.11" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", ] [[package]] @@ -1971,6 +2027,15 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "winnow" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.52.0" diff --git a/Cargo.toml b/Cargo.toml index 5c8eb87..5ffe274 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ log = "0.4" reqwest = { version = "0.12.5", features = ["blocking"], default-features = false } serde = "1.0.21" serde_derive = "1.0.21" -toml = "0.5.1" +toml = "0.8.19" walkdir = "2.0.1" yansi = "0.5" zip = { version = "0.6", default-features = false, features = ["deflate"] } From 4f51ba090f0324683e8130c6e2c3d1ff0a4f72d3 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 12 Aug 2024 23:09:55 +0200 Subject: [PATCH 294/368] =?UTF-8?q?Upgrade=20zip:=200.6.6=20=E2=86=92=202.?= =?UTF-8?q?1.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++--- Cargo.toml | 2 +- 2 files changed, 66 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e5f9400..ab96b58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,6 +93,15 @@ dependencies = [ "xdg", ] +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + [[package]] name = "assert_cmd" version = "2.0.16" @@ -287,12 +296,34 @@ version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "difflib" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "doc-comment" version = "0.3.3" @@ -744,6 +775,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" version = "0.4.22" @@ -1348,6 +1385,12 @@ dependencies = [ "serde", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "slab" version = "0.4.9" @@ -2087,12 +2130,31 @@ checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zip" -version = "0.6.6" +version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +checksum = "40dd8c92efc296286ce1fbd16657c5dbefff44f1b4ca01cc5f517d8b7b3d3e2e" dependencies = [ - "byteorder", + "arbitrary", "crc32fast", "crossbeam-utils", + "displaydoc", "flate2", + "indexmap", + "memchr", + "thiserror", + "zopfli", +] + +[[package]] +name = "zopfli" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", ] diff --git a/Cargo.toml b/Cargo.toml index 5ffe274..e795725 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ serde_derive = "1.0.21" toml = "0.8.19" walkdir = "2.0.1" yansi = "0.5" -zip = { version = "0.6", default-features = false, features = ["deflate"] } +zip = { version = "2.1.6", default-features = false, features = ["deflate"] } [target.'cfg(not(windows))'.dependencies] pager = "0.16" From 7c245040b9df46e9577c16a43166380efe6dc025 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 13 Aug 2024 00:14:19 +0200 Subject: [PATCH 295/368] Command line help: Add hint about platform overrides (#375) - Rename PLATFORMS to PLATFORM - Add hint about specifying platform multiple times --- docs/src/usage.txt | 33 +++++++++++++++++---------------- src/cli.rs | 3 ++- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 7e823c4..b1e7e35 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -7,21 +7,22 @@ Arguments: [COMMAND]... The command to show (e.g. `tar` or `git log`) Options: - -l, --list List all commands in the cache - -f, --render Render a specific markdown file - -p, --platform Override the operating system [possible values: linux, macos, sunos, - windows, android, freebsd, netbsd, openbsd] - -L, --language Override the language - -u, --update Update the local cache - --no-auto-update If auto update is configured, disable it for this run - -c, --clear-cache Clear the local cache - --pager Use a pager to page output - -r, --raw Display the raw markdown instead of rendering it - -q, --quiet Suppress informational messages - --show-paths Show file and directory paths used by tealdeer - --seed-config Create a basic config - --color Control whether to use color [possible values: always, auto, never] - -v, --version Print the version - -h, --help Print help + -l, --list List all commands in the cache + -f, --render Render a specific markdown file + -p, --platform Override the operating system, can be specified multiple times in order + of preference [possible values: linux, macos, sunos, windows, android, + freebsd, netbsd, openbsd] + -L, --language Override the language + -u, --update Update the local cache + --no-auto-update If auto update is configured, disable it for this run + -c, --clear-cache Clear the local cache + --pager Use a pager to page output + -r, --raw Display the raw markdown instead of rendering it + -q, --quiet Suppress informational messages + --show-paths Show file and directory paths used by tealdeer + --seed-config Create a basic config + --color Control whether to use color [possible values: always, auto, never] + -v, --version Print the version + -h, --help Print help To view the user documentation, please visit https://dbrgn.github.io/tealdeer/. diff --git a/src/cli.rs b/src/cli.rs index fd6c987..77acf6b 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -41,10 +41,11 @@ pub(crate) struct Cli { )] pub render: Option, - /// Override the operating system + /// Override the operating system, can be specified multiple times in order of preference #[arg( short = 'p', long = "platform", + value_name = "PLATFORM", action = ArgAction::Append, )] pub platforms: Option>, From fc6d64415225fe9ee43213c5903b9912d71b89b2 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 30 Sep 2024 11:27:19 +0200 Subject: [PATCH 296/368] Update all URLs to point to new GitHub organization (#379) See https://github.com/tealdeer-rs/tealdeer/issues/376 for details. --- .github/workflows/release.yml | 2 +- CHANGELOG.md | 156 +++++++++++++++++----------------- Cargo.toml | 6 +- README.md | 12 +-- benchmarks/Dockerfile | 2 +- completion/fish_tealdeer | 2 +- docs/src/installing.md | 2 +- docs/src/intro.md | 2 +- docs/src/tips_and_tricks.md | 2 +- docs/src/usage.txt | 2 +- src/cli.rs | 2 +- src/main.rs | 2 +- 12 files changed, 96 insertions(+), 96 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c36ad5..e5ccdf9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: run: | source ./scripts/upload-asset.sh # Create: - create_release ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} "Tealdeer version ${GITHUB_REF#refs/*/v}.\n\nFor the full changelog, see https://github.com/dbrgn/tealdeer/blob/main/CHANGELOG.md.\n\nBinaries were generated automatically in CI, and are therefore unsigned. For a fully trusted release, please build from source." + create_release ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} "Tealdeer version ${GITHUB_REF#refs/*/v}.\n\nFor the full changelog, see https://github.com/tealdeer-rs/tealdeer/blob/main/CHANGELOG.md.\n\nBinaries were generated automatically in CI, and are therefore unsigned. For a fully trusted release, please build from source." upload-completions: needs: diff --git a/CHANGELOG.md b/CHANGELOG.md index e26c474..7e7c720 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,7 +88,7 @@ The highlights: - **Custom pages and patches**: You can now create your own local-only tldr pages. But not just that, you can also extend existing upstream pages with your own examples. For more details, see - [the docs](https://dbrgn.github.io/tealdeer/usage_custom_pages.html). + [the docs](https://tealdeer-rs.github.io/tealdeer/usage_custom_pages.html). - **Change argument parsing from docopt to clap**: We replaced docopt.rs as argument parsing library with clap v3, resulting in almost 1 MiB smaller binaries and a 22% speed increase when rendering a tldr page. @@ -99,7 +99,7 @@ The highlights: `-p/--platform` and implemented transparent lowercasing of the page names. - **Docs**: The README based documentation has reached its limits. There are now new mdbook based docs over at - [dbrgn.github.io/tealdeer/](https://dbrgn.github.io/tealdeer/), we hope these + [tealdeer-rs.github.io/tealdeer/](https://tealdeer-rs.github.io/tealdeer/), we hope these make using tealdeer easier. Of course, documentation improvements are welcome! Also, if you're confused about how to use a certain feature, feel free to open an issue, this way we can improve the docs. @@ -133,8 +133,8 @@ Changes: - [deprecated] The `--config-path` command is deprecated, use `--show-paths` instead ([#162][i162]) - [deprecated] The `-o/--os` command is deprecated, use `-p/--platform` instead ([#217][i217]) - [deprecated] The `-m/--markdown` command is deprecated, use `-r/--raw` instead ([#108][i108]) -- [docs] New docs at [dbrgn.github.io/tealdeer/](https://dbrgn.github.io/tealdeer/) -- [docs] Add comparative benchmarks with hyperfine ([#163][i163], [README](https://github.com/dbrgn/tealdeer#goals)) +- [docs] New docs at [tealdeer-rs.github.io/tealdeer/](https://tealdeer-rs.github.io/tealdeer/) +- [docs] Add comparative benchmarks with hyperfine ([#163][i163], [README](https://github.com/tealdeer-rs/tealdeer#goals)) - [chore] Download tldr pages archive from their website, not from GitHub ([#213][i213]) - [chore] Bump MSRV to 1.54 and change MSRV policy ([#190][i190]) - [chore] The `master` branch was renamed to `main` @@ -345,78 +345,78 @@ Thanks! [@tveness]: https://github.com/tveness [@Voultapher]: https://github.com/Voultapher -[v1.0.0]: https://github.com/dbrgn/tealdeer/compare/v0.4.0...v1.0.0 -[v1.1.0]: https://github.com/dbrgn/tealdeer/compare/v1.0.0...v1.1.0 -[v1.2.0]: https://github.com/dbrgn/tealdeer/compare/v1.1.0...v1.2.0 -[v1.3.0]: https://github.com/dbrgn/tealdeer/compare/v1.2.0...v1.3.0 -[v1.4.0]: https://github.com/dbrgn/tealdeer/compare/v1.3.0...v1.4.0 -[v1.4.1]: https://github.com/dbrgn/tealdeer/compare/v1.4.0...v1.4.1 -[v1.5.0]: https://github.com/dbrgn/tealdeer/compare/v1.4.1...v1.5.0 -[v1.6.0]: https://github.com/dbrgn/tealdeer/compare/v1.5.0...v1.6.0 -[v1.6.1]: https://github.com/dbrgn/tealdeer/compare/v1.6.0...v1.6.1 +[v1.0.0]: https://github.com/tealdeer-rs/tealdeer/compare/v0.4.0...v1.0.0 +[v1.1.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.0.0...v1.1.0 +[v1.2.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.1.0...v1.2.0 +[v1.3.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.2.0...v1.3.0 +[v1.4.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.3.0...v1.4.0 +[v1.4.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.4.0...v1.4.1 +[v1.5.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.4.1...v1.5.0 +[v1.6.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.5.0...v1.6.0 +[v1.6.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.6.0...v1.6.1 -[i34]: https://github.com/dbrgn/tealdeer/issues/34 -[i43]: https://github.com/dbrgn/tealdeer/issues/43 -[i44]: https://github.com/dbrgn/tealdeer/issues/44 -[i47]: https://github.com/dbrgn/tealdeer/issues/47 -[i48]: https://github.com/dbrgn/tealdeer/issues/48 -[i57]: https://github.com/dbrgn/tealdeer/issues/57 -[i58]: https://github.com/dbrgn/tealdeer/issues/58 -[i61]: https://github.com/dbrgn/tealdeer/issues/61 -[i68]: https://github.com/dbrgn/tealdeer/issues/68 -[i69]: https://github.com/dbrgn/tealdeer/issues/69 -[i71]: https://github.com/dbrgn/tealdeer/issues/71 -[i75]: https://github.com/dbrgn/tealdeer/issues/75 -[i77]: https://github.com/dbrgn/tealdeer/issues/77 -[i84]: https://github.com/dbrgn/tealdeer/issues/84 -[i86]: https://github.com/dbrgn/tealdeer/issues/86 -[i87]: https://github.com/dbrgn/tealdeer/issues/87 -[i89]: https://github.com/dbrgn/tealdeer/issues/89 -[i95]: https://github.com/dbrgn/tealdeer/issues/95 -[i97]: https://github.com/dbrgn/tealdeer/issues/97 -[i99]: https://github.com/dbrgn/tealdeer/issues/99 -[i108]: https://github.com/dbrgn/tealdeer/pull/108 -[i111]: https://github.com/dbrgn/tealdeer/issues/111 -[i112]: https://github.com/dbrgn/tealdeer/issues/112 -[i113]: https://github.com/dbrgn/tealdeer/issues/113 -[i115]: https://github.com/dbrgn/tealdeer/issues/115 -[i125]: https://github.com/dbrgn/tealdeer/pull/125 -[i138]: https://github.com/dbrgn/tealdeer/issues/138 -[i142]: https://github.com/dbrgn/tealdeer/pull/142 -[i148]: https://github.com/dbrgn/tealdeer/pull/148 -[i157]: https://github.com/dbrgn/tealdeer/pull/157 -[i161]: https://github.com/dbrgn/tealdeer/pull/161 -[i162]: https://github.com/dbrgn/tealdeer/pull/162 -[i163]: https://github.com/dbrgn/tealdeer/pull/163 -[i168]: https://github.com/dbrgn/tealdeer/pull/168 -[i171]: https://github.com/dbrgn/tealdeer/pull/171 -[i174]: https://github.com/dbrgn/tealdeer/pull/174 -[i176]: https://github.com/dbrgn/tealdeer/pull/176 -[i187]: https://github.com/dbrgn/tealdeer/pull/187 -[i190]: https://github.com/dbrgn/tealdeer/issues/190 -[i197]: https://github.com/dbrgn/tealdeer/pull/197 -[i210]: https://github.com/dbrgn/tealdeer/pull/210 -[i213]: https://github.com/dbrgn/tealdeer/pull/213 -[i215]: https://github.com/dbrgn/tealdeer/pull/215 -[i217]: https://github.com/dbrgn/tealdeer/pull/217 -[i227]: https://github.com/dbrgn/tealdeer/pull/227 -[#231]: https://github.com/dbrgn/tealdeer/pull/231 -[i240]: https://github.com/dbrgn/tealdeer/pull/240 -[#247]: https://github.com/dbrgn/tealdeer/pull/247 -[#249]: https://github.com/dbrgn/tealdeer/pull/249 -[#253]: https://github.com/dbrgn/tealdeer/pull/253 -[#254]: https://github.com/dbrgn/tealdeer/pull/254 -[#257]: https://github.com/dbrgn/tealdeer/pull/257 -[#259]: https://github.com/dbrgn/tealdeer/pull/259 -[#262]: https://github.com/dbrgn/tealdeer/pull/262 -[#271]: https://github.com/dbrgn/tealdeer/pull/271 -[#272]: https://github.com/dbrgn/tealdeer/pull/272 -[#274]: https://github.com/dbrgn/tealdeer/pull/274 -[#276]: https://github.com/dbrgn/tealdeer/pull/276 -[#284]: https://github.com/dbrgn/tealdeer/pull/284 -[#285]: https://github.com/dbrgn/tealdeer/pull/285 -[#287]: https://github.com/dbrgn/tealdeer/pull/287 -[#290]: https://github.com/dbrgn/tealdeer/pull/290 -[#291]: https://github.com/dbrgn/tealdeer/pull/291 -[#297]: https://github.com/dbrgn/tealdeer/pull/297 -[#299]: https://github.com/dbrgn/tealdeer/pull/299 +[i34]: https://github.com/tealdeer-rs/tealdeer/issues/34 +[i43]: https://github.com/tealdeer-rs/tealdeer/issues/43 +[i44]: https://github.com/tealdeer-rs/tealdeer/issues/44 +[i47]: https://github.com/tealdeer-rs/tealdeer/issues/47 +[i48]: https://github.com/tealdeer-rs/tealdeer/issues/48 +[i57]: https://github.com/tealdeer-rs/tealdeer/issues/57 +[i58]: https://github.com/tealdeer-rs/tealdeer/issues/58 +[i61]: https://github.com/tealdeer-rs/tealdeer/issues/61 +[i68]: https://github.com/tealdeer-rs/tealdeer/issues/68 +[i69]: https://github.com/tealdeer-rs/tealdeer/issues/69 +[i71]: https://github.com/tealdeer-rs/tealdeer/issues/71 +[i75]: https://github.com/tealdeer-rs/tealdeer/issues/75 +[i77]: https://github.com/tealdeer-rs/tealdeer/issues/77 +[i84]: https://github.com/tealdeer-rs/tealdeer/issues/84 +[i86]: https://github.com/tealdeer-rs/tealdeer/issues/86 +[i87]: https://github.com/tealdeer-rs/tealdeer/issues/87 +[i89]: https://github.com/tealdeer-rs/tealdeer/issues/89 +[i95]: https://github.com/tealdeer-rs/tealdeer/issues/95 +[i97]: https://github.com/tealdeer-rs/tealdeer/issues/97 +[i99]: https://github.com/tealdeer-rs/tealdeer/issues/99 +[i108]: https://github.com/tealdeer-rs/tealdeer/pull/108 +[i111]: https://github.com/tealdeer-rs/tealdeer/issues/111 +[i112]: https://github.com/tealdeer-rs/tealdeer/issues/112 +[i113]: https://github.com/tealdeer-rs/tealdeer/issues/113 +[i115]: https://github.com/tealdeer-rs/tealdeer/issues/115 +[i125]: https://github.com/tealdeer-rs/tealdeer/pull/125 +[i138]: https://github.com/tealdeer-rs/tealdeer/issues/138 +[i142]: https://github.com/tealdeer-rs/tealdeer/pull/142 +[i148]: https://github.com/tealdeer-rs/tealdeer/pull/148 +[i157]: https://github.com/tealdeer-rs/tealdeer/pull/157 +[i161]: https://github.com/tealdeer-rs/tealdeer/pull/161 +[i162]: https://github.com/tealdeer-rs/tealdeer/pull/162 +[i163]: https://github.com/tealdeer-rs/tealdeer/pull/163 +[i168]: https://github.com/tealdeer-rs/tealdeer/pull/168 +[i171]: https://github.com/tealdeer-rs/tealdeer/pull/171 +[i174]: https://github.com/tealdeer-rs/tealdeer/pull/174 +[i176]: https://github.com/tealdeer-rs/tealdeer/pull/176 +[i187]: https://github.com/tealdeer-rs/tealdeer/pull/187 +[i190]: https://github.com/tealdeer-rs/tealdeer/issues/190 +[i197]: https://github.com/tealdeer-rs/tealdeer/pull/197 +[i210]: https://github.com/tealdeer-rs/tealdeer/pull/210 +[i213]: https://github.com/tealdeer-rs/tealdeer/pull/213 +[i215]: https://github.com/tealdeer-rs/tealdeer/pull/215 +[i217]: https://github.com/tealdeer-rs/tealdeer/pull/217 +[i227]: https://github.com/tealdeer-rs/tealdeer/pull/227 +[#231]: https://github.com/tealdeer-rs/tealdeer/pull/231 +[i240]: https://github.com/tealdeer-rs/tealdeer/pull/240 +[#247]: https://github.com/tealdeer-rs/tealdeer/pull/247 +[#249]: https://github.com/tealdeer-rs/tealdeer/pull/249 +[#253]: https://github.com/tealdeer-rs/tealdeer/pull/253 +[#254]: https://github.com/tealdeer-rs/tealdeer/pull/254 +[#257]: https://github.com/tealdeer-rs/tealdeer/pull/257 +[#259]: https://github.com/tealdeer-rs/tealdeer/pull/259 +[#262]: https://github.com/tealdeer-rs/tealdeer/pull/262 +[#271]: https://github.com/tealdeer-rs/tealdeer/pull/271 +[#272]: https://github.com/tealdeer-rs/tealdeer/pull/272 +[#274]: https://github.com/tealdeer-rs/tealdeer/pull/274 +[#276]: https://github.com/tealdeer-rs/tealdeer/pull/276 +[#284]: https://github.com/tealdeer-rs/tealdeer/pull/284 +[#285]: https://github.com/tealdeer-rs/tealdeer/pull/285 +[#287]: https://github.com/tealdeer-rs/tealdeer/pull/287 +[#290]: https://github.com/tealdeer-rs/tealdeer/pull/290 +[#291]: https://github.com/tealdeer-rs/tealdeer/pull/291 +[#297]: https://github.com/tealdeer-rs/tealdeer/pull/297 +[#299]: https://github.com/tealdeer-rs/tealdeer/pull/299 diff --git a/Cargo.toml b/Cargo.toml index e795725..bc44343 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,12 +4,12 @@ authors = [ "Niklas Mohrin ", ] description = "Fetch and show tldr help pages for many CLI commands. Full featured offline client with caching support." -homepage = "https://github.com/dbrgn/tealdeer/" +homepage = "https://github.com/tealdeer-rs/tealdeer/" license = "MIT OR Apache-2.0" name = "tealdeer" readme = "README.md" -repository = "https://github.com/dbrgn/tealdeer/" -documentation = "https://dbrgn.github.io/tealdeer/" +repository = "https://github.com/tealdeer-rs/tealdeer/" +documentation = "https://tealdeer-rs.github.io/tealdeer/" version = "1.6.1" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"] rust-version = "1.75" diff --git a/README.md b/README.md index 2203b40..230dfa8 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,12 @@ Rust: Simplified, example based and community-driven man pages. If you pronounce "tldr" in English, it sounds somewhat like "tealdeer". Hence the project name :) In case you're in a hurry and just want to quickly try tealdeer, you can find static -binaries on the [GitHub releases page](https://github.com/dbrgn/tealdeer/releases/)! +binaries on the [GitHub releases page](https://github.com/tealdeer-rs/tealdeer/releases/)! ## Docs (Installing, Usage, Configuration) -User documentation is available at ! +User documentation is available at ! The docs are generated using [mdbook](https://rust-lang.github.io/mdBook/index.html). They can be edited through the markdown files in the `docs/src/` directory. @@ -120,13 +120,13 @@ Thanks to @severen for coming up with the name "tealdeer"! [outfieldr-gh]: https://gitlab.com/ve-nt/outfieldr [python-gh]: https://github.com/tldr-pages/tldr-python-client -[benchmark-dockerfile]: https://github.com/dbrgn/tealdeer/blob/main/benchmarks/Dockerfile +[benchmark-dockerfile]: https://github.com/tealdeer-rs/tealdeer/blob/main/benchmarks/Dockerfile [client-spec]: https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md [hyperfine-gh]: https://github.com/sharkdp/hyperfine -[outfieldr-comment-tls]: https://github.com/dbrgn/tealdeer/issues/129#issuecomment-833596765 +[outfieldr-comment-tls]: https://github.com/tealdeer-rs/tealdeer/issues/129#issuecomment-833596765 -[github-actions]: https://github.com/dbrgn/tealdeer/actions?query=branch%3Amain -[github-actions-badge]: https://github.com/dbrgn/tealdeer/actions/workflows/ci.yml/badge.svg?branch=main +[github-actions]: https://github.com/tealdeer-rs/tealdeer/actions?query=branch%3Amain +[github-actions-badge]: https://github.com/tealdeer-rs/tealdeer/actions/workflows/ci.yml/badge.svg?branch=main [crates-io]: https://crates.io/crates/tealdeer [crates-io-badge]: https://img.shields.io/crates/v/tealdeer.svg diff --git a/benchmarks/Dockerfile b/benchmarks/Dockerfile index d717eba..2a36fe0 100644 --- a/benchmarks/Dockerfile +++ b/benchmarks/Dockerfile @@ -18,7 +18,7 @@ FROM rust AS tealdeer-builder WORKDIR /build -RUN git clone https://github.com/dbrgn/tealdeer.git \ +RUN git clone https://github.com/tealdeer-rs/tealdeer.git \ && cd tealdeer \ && cargo build --release \ && mkdir /build-outputs \ diff --git a/completion/fish_tealdeer b/completion/fish_tealdeer index eb35e87..528be44 100644 --- a/completion/fish_tealdeer +++ b/completion/fish_tealdeer @@ -1,6 +1,6 @@ # # Completions for the tealdeer implementation of tldr -# https://github.com/dbrgn/tealdeer/ +# https://github.com/tealdeer-rs/tealdeer/ # complete -c tldr -s h -l help -d 'Print the help message.' -f diff --git a/docs/src/installing.md b/docs/src/installing.md index 5e51afa..71c8398 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -31,7 +31,7 @@ Tealdeer has been added to a few package managers: ## Static Binaries (Linux) Static binary builds (currently for Linux only) are available on the -[GitHub releases page](https://github.com/dbrgn/tealdeer/releases). +[GitHub releases page](https://github.com/tealdeer-rs/tealdeer/releases). Simply download the binary for your platform and run it! ## Through `cargo install` diff --git a/docs/src/intro.md b/docs/src/intro.md index ca9f8cc..a90ecec 100644 --- a/docs/src/intro.md +++ b/docs/src/intro.md @@ -10,5 +10,5 @@ This documentation shows how to install, use and configure tealdeer. ## Links -- [GitHub Project Page](https://github.com/dbrgn/tealdeer) +- [GitHub Project Page](https://github.com/tealdeer-rs/tealdeer) - [TLDR Pages Project](https://tldr.sh/) diff --git a/docs/src/tips_and_tricks.md b/docs/src/tips_and_tricks.md index 99a49c7..29f7216 100644 --- a/docs/src/tips_and_tricks.md +++ b/docs/src/tips_and_tricks.md @@ -49,4 +49,4 @@ every page, so the script may take a couple of seconds to finish. ## Extending this chapter If you have an interesting setup with Tealdeer, feel free to share your -configuration on [our Github repository](https://github.com/dbrgn/tealdeer). +configuration on [our Github repository](https://github.com/tealdeer-rs/tealdeer). diff --git a/docs/src/usage.txt b/docs/src/usage.txt index b1e7e35..11b7ebe 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -25,4 +25,4 @@ Options: -v, --version Print the version -h, --help Print help -To view the user documentation, please visit https://dbrgn.github.io/tealdeer/. +To view the user documentation, please visit https://tealdeer-rs.github.io/tealdeer/. diff --git a/src/cli.rs b/src/cli.rs index 77acf6b..e671507 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -18,7 +18,7 @@ use crate::types::{ColorOptions, PlatformType}; {usage-heading} {usage} {all-args}{after-help}", - after_help = "To view the user documentation, please visit https://dbrgn.github.io/tealdeer/.", + after_help = "To view the user documentation, please visit https://tealdeer-rs.github.io/tealdeer/.", arg_required_else_help = true, help_expected = true, group = ArgGroup::new("command_or_file").args(&["command", "render"]), diff --git a/src/main.rs b/src/main.rs index 4de0038..479eb4e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -110,7 +110,7 @@ fn check_cache(cache: &Cache, args: &Cli, enable_styles: bool) -> CheckCacheResu println!("The path to your config file can be looked up with `tldr --show-paths`."); println!("To create an initial config file, use `tldr --seed-config`.\n"); println!("You can find more tips and tricks in our docs:\n"); - println!(" https://dbrgn.github.io/tealdeer/config_updates.html"); + println!(" https://tealdeer-rs.github.io/tealdeer/config_updates.html"); CheckCacheResult::CacheMissing } } From ec2daa495c3ece2f4aa783daa9bee535e3228029 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 2 Oct 2024 22:32:17 +0200 Subject: [PATCH 297/368] Replace `atty` with `std::io::IsTerminal` (#380) --- Cargo.lock | 23 +---------------------- Cargo.toml | 1 - src/main.rs | 9 ++++++--- 3 files changed, 7 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ab96b58..64744a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -118,17 +118,6 @@ dependencies = [ "wait-timeout", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.3.0" @@ -548,15 +537,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.9" @@ -814,7 +794,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "wasi", "windows-sys 0.52.0", @@ -1452,7 +1432,6 @@ dependencies = [ "anyhow", "app_dirs2", "assert_cmd", - "atty", "clap", "env_logger", "escargot", diff --git a/Cargo.toml b/Cargo.toml index bc44343..cf374ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,6 @@ path = "src/main.rs" [dependencies] anyhow = "1" app_dirs = { version = "2", package = "app_dirs2" } -atty = "0.2" clap = { version = "4", features = ["std", "derive", "help", "usage", "cargo", "error-context", "color", "wrap_help"], default-features = false } env_logger = { version = "0.11", optional = true } log = "0.4" diff --git a/src/main.rs b/src/main.rs index 479eb4e..9dede44 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,10 +30,13 @@ compile_error!( "exactly one of the features \"native-roots\", \"webpki-roots\" or \"native-tls\" must be enabled" ); -use std::{env, process}; +use std::{ + env, + io::{self, IsTerminal}, + process, +}; use app_dirs::AppInfo; -use atty::Stream; use clap::Parser; mod cache; @@ -258,7 +261,7 @@ fn main() { // * NO_COLOR env var isn't set: https://no-color.org/ // * The output stream is stdout (not being piped) ColorOptions::Auto => { - ansi_support && env::var_os("NO_COLOR").is_none() && atty::is(Stream::Stdout) + ansi_support && env::var_os("NO_COLOR").is_none() && io::stdout().is_terminal() } // Disable styling ColorOptions::Never => false, From 713f6f913c3f8b804a9b8ef58924383ec0181ad9 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 2 Oct 2024 22:44:22 +0200 Subject: [PATCH 298/368] Run cargo update (#381) --- Cargo.lock | 457 +++++++++++++++++++++++------------------------------ 1 file changed, 195 insertions(+), 262 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 64744a2..cddbb31 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aho-corasick" @@ -77,9 +77,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "app_dirs2" @@ -120,23 +120,23 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -176,15 +176,18 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "cc" -version = "1.1.10" +version = "1.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" +checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" +dependencies = [ + "shlex", +] [[package]] name = "cesu8" @@ -200,9 +203,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.5.15" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d8838454fda655dafd3accb2b6e2bea645b9e4078abe84a22ceb947235c5cc" +checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" dependencies = [ "clap_builder", "clap_derive", @@ -210,9 +213,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.15" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" +checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" dependencies = [ "anstream", "anstyle", @@ -222,9 +225,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", "proc-macro2", @@ -393,15 +396,15 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "filetime" -version = "0.2.24" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", @@ -411,9 +414,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.31" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -521,15 +524,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "heck" @@ -579,9 +582,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "humantime" @@ -610,9 +613,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http", @@ -645,9 +648,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", @@ -658,7 +661,6 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -675,9 +677,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.3.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", "hashbrown", @@ -685,9 +687,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "is_terminal_polyfill" @@ -725,18 +727,18 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] [[package]] name = "libc" -version = "0.2.155" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libredox" @@ -781,11 +783,11 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -840,18 +842,21 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" +dependencies = [ + "portable-atomic", +] [[package]] name = "openssl" @@ -913,26 +918,6 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "pin-project-lite" version = "0.2.14" @@ -947,9 +932,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "ppv-lite86" @@ -1001,9 +992,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" dependencies = [ "bytes", "pin-project-lite", @@ -1019,9 +1010,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.6" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" dependencies = [ "bytes", "rand", @@ -1036,22 +1027,22 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" dependencies = [ "libc", "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1088,18 +1079,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", @@ -1109,9 +1100,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -1120,15 +1111,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ "base64", "bytes", @@ -1168,7 +1159,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "webpki-roots", - "winreg", + "windows-registry", ] [[package]] @@ -1200,9 +1191,9 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags", "errno 0.3.9", @@ -1213,9 +1204,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ "once_cell", "ring", @@ -1227,9 +1218,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -1240,25 +1231,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -1282,11 +1272,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1304,9 +1294,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -1314,18 +1304,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.207" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5665e14a49a4ea1b91029ba7d3bca9f299e1f7cfa194388ccc20f14743e784f2" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.207" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -1334,9 +1324,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.124" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -1346,9 +1336,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -1365,6 +1355,12 @@ dependencies = [ "serde", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "simd-adler32" version = "0.3.7" @@ -1410,9 +1406,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.74" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -1424,6 +1420,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "tealdeer" @@ -1451,9 +1450,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", @@ -1464,12 +1463,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" dependencies = [ "rustix", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -1480,18 +1479,18 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", @@ -1515,9 +1514,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.2" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -1572,9 +1571,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "serde", @@ -1583,32 +1582,11 @@ dependencies = [ "winnow", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -1637,21 +1615,21 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -1721,19 +1699,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", @@ -1746,9 +1725,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -1758,9 +1737,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1768,9 +1747,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", @@ -1781,15 +1760,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -1797,9 +1776,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] @@ -1835,6 +1814,36 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -1844,15 +1853,6 @@ dependencies = [ "windows-targets 0.42.2", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" @@ -1886,21 +1886,6 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - [[package]] name = "windows-targets" version = "0.52.6" @@ -1923,12 +1908,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -1941,12 +1920,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -1959,12 +1932,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -1983,12 +1950,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -2001,12 +1962,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -2019,12 +1974,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -2037,12 +1986,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -2051,23 +1994,13 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "xdg" version = "2.5.2" @@ -2109,9 +2042,9 @@ checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zip" -version = "2.1.6" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40dd8c92efc296286ce1fbd16657c5dbefff44f1b4ca01cc5f517d8b7b3d3e2e" +checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" dependencies = [ "arbitrary", "crc32fast", From d44613cf59445b910a75b7df489466f1948b5d44 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 2 Oct 2024 21:21:31 +0200 Subject: [PATCH 299/368] Release v1.7.0 --- CHANGELOG.md | 104 +++++++++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- RELEASING.md | 5 +- docs/src/usage.txt | 2 +- docs/src/usage_custom_pages.md | 3 - 6 files changed, 108 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e7c720..a8b1419 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,78 @@ Possible log types: - `[chore]` for maintenance work. +### [v1.7.0][v1.7.0] (2024-10-02) + +It's been 24 months since the last release, time for tealdeer 1.7.0! Thanks to +16 individual contributors, a few nice changes and features are included in +this release. + +One change is that you can **query multiple platforms at once**. For example: + + tldr --platform openbsd --platform linux df + +This will show the `df` page for OpenBSD (if available), followed by Linux (if +available), with fallback to the current platform on which tealdeer runs. + +What's that `openbsd` thing up there? Yes, there's now **support for the BSD +platforms `freebsd`, `netbsd` and `openbsd`**. + +And since we're already talking about platform support: Our **binary releases +now include builds for ARM64 (aka `aarch64`) on macOS (Apple Silicon, M1/M2/M3) +and Linux**. _(Keep in mind that binary releases are generated in CI and are +unsigned. For a trusted build, please compile from source.)_ + +There's also a breaking change for the folks using [custom pages and +patches](https://tealdeer-rs.github.io/tealdeer/usage_custom_pages.html): These +files now use a `.md` extension. Old files will continue to work, but will +result a deprecation warning being printed when used. + +On a personal note, this will be the last release from me +([Danilo](https://github.com/dbrgn/)) as primary maintainer of tealdeer. For +details, see [#376](https://github.com/tealdeer-rs/tealdeer/issues/376). + +Changes: + +- [added] Allow querying multiple platforms ([#300]) +- [added] Add BSD platform support ([#354]) +- [added] Allow building with native-tls in addition to rustls ([#303]) +- [changed] Change custom page files to use a `.md` file extension ([#322]) +- [changed] Update to clap v4 for doing command line parsing ([#298]) +- [changed] Performance optimization in LineIterator ([#314]) +- [changed] Performance optimizations by tweaking Cargo flags ([#355]) +- [changed] Include completions in published crate ([#333]) +- [changed] Minimal supported Rust version is now 1.75 ([#298]) +- [fixed] Fix bash/zsh/fish completions when cache is empty ([#327], [#331]) +- [docs] Publish docs only when tagging a release ([#362]) +- [docs] List Scoop and Debian packages ([#305], [#315]) +- [docs] Add "Tips and Tricks" chapter to user manual ([#342]) +- [docs] Various docs improvements ([#293]) +- [chore] Improvements to CI workflows ([#324]) +- [chore] Update Cargo.toml license field following SPDX 2.1 ([#336]) +- [chore] Dependency updates + +Contributors to this version: + +- [Adam Henley][@adamazing] +- [Andrea Frigido][@frisoft] +- [Blair Noctis][@nc7s] +- [Danilo Bargen][@dbrgn] +- [Felix Yan][@felixonmars] +- [Iliia Maleki][@iliya-malecki] +- [JJ Style][@jj-style] +- [K.B.Dharun Krishna][@kbdharun] +- [Linus Walker][@Walker-00] +- [Mohit Raj][@agrmohit] +- [Nicolai Fröhlich][@nifr] +- [Niklas Mohrin][@niklasmohrin] +- [@qknogxxb][@qknogxxb] +- [@tveness][@tveness] +- [Y.D.X.][@YDX-2147483647] +- [Zacchary Dempsey-Plante][@zedseven] + +Thanks! + + ### [v1.6.1][v1.6.1] (2022-10-24) Changes: @@ -296,7 +368,10 @@ Thanks! - First crates.io release + [@0ndorio]: https://github.com/0ndorio +[@adamazing]: https://github.com/adamazing +[@agrmohit]: https://github.com/agrmohit [@aldanor]: https://github.com/aldanor [@Atul9]: https://github.com/Atul9 [@BachoSeven]: https://github.com/BachoSeven @@ -314,15 +389,20 @@ Thanks! [@Delapouite]: https://github.com/Delapouite [@dmaahs2017]: https://github.com/dmaahs2017 [@equal-l2]: https://github.com/equal-l2 +[@felixonmars]: https://github.com/felixonmars +[@frisoft]: https://github.com/frisoft [@gagarine]: https://github.com/gagarine [@hgaiser]: https://github.com/hgaiser [@ilai-deutel]: https://github.com/ilai-deutel +[@iliya-malecki]: https://github.com/iliya-malecki [@invakid404]: https://github.com/invakid404 [@james2doyle]: https://github.com/james2doyle [@jcgruenhage]: https://github.com/jcgruenhage [@jdvr]: https://github.com/jdvr [@jedahan]: https://github.com/jedahan [@jesdazrez]: https://github.com/jesdazrez +[@jj-style]: https://github.com/jj-style +[@kbdharun]: https://github.com/kbdharun [@kianmeng]: https://github.com/kianmeng [@kornelski]: https://github.com/kornelski [@korrat]: https://github.com/korrat @@ -333,10 +413,13 @@ Thanks! [@mucinoab]: https://github.com/mucinoab [@mystal]: https://github.com/mystal [@natpen]: https://github.com/natpen +[@nc7s]: https://github.com/nc7s [@newsch]: https://github.com/newsch +[@nifr]: https://github.com/nifr [@niklasmohrin]: https://github.com/niklasmohrin [@Olavhaasie]: https://github.com/Olavhaasie [@Plommonsorbet]: https://github.com/Plommonsorbet +[@qknogxxb]: https://github.com/qknogxxb [@rithvikvibhu]: https://github.com/rithvikvibhu [@SimplyDanny]: https://github.com/SimplyDanny [@sondr3]: https://github.com/sondr3 @@ -344,6 +427,9 @@ Thanks! [@tranzystorek-io]: https://github.com/tranzystorek-io [@tveness]: https://github.com/tveness [@Voultapher]: https://github.com/Voultapher +[@Walker-00]: https://github.com/Walker-00 +[@YDX-2147483647]: https://github.com/YDX-2147483647 +[@zedseven]: https://github.com/zedseven [v1.0.0]: https://github.com/tealdeer-rs/tealdeer/compare/v0.4.0...v1.0.0 [v1.1.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.0.0...v1.1.0 @@ -354,6 +440,7 @@ Thanks! [v1.5.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.4.1...v1.5.0 [v1.6.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.5.0...v1.6.0 [v1.6.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.6.0...v1.6.1 +[v1.7.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.6.1...v1.7.0 [i34]: https://github.com/tealdeer-rs/tealdeer/issues/34 [i43]: https://github.com/tealdeer-rs/tealdeer/issues/43 @@ -418,5 +505,22 @@ Thanks! [#287]: https://github.com/tealdeer-rs/tealdeer/pull/287 [#290]: https://github.com/tealdeer-rs/tealdeer/pull/290 [#291]: https://github.com/tealdeer-rs/tealdeer/pull/291 +[#293]: https://github.com/tealdeer-rs/tealdeer/pull/293 [#297]: https://github.com/tealdeer-rs/tealdeer/pull/297 +[#298]: https://github.com/tealdeer-rs/tealdeer/pull/298 [#299]: https://github.com/tealdeer-rs/tealdeer/pull/299 +[#300]: https://github.com/tealdeer-rs/tealdeer/pull/300 +[#303]: https://github.com/tealdeer-rs/tealdeer/pull/303 +[#305]: https://github.com/tealdeer-rs/tealdeer/pull/305 +[#314]: https://github.com/tealdeer-rs/tealdeer/pull/314 +[#315]: https://github.com/tealdeer-rs/tealdeer/pull/315 +[#322]: https://github.com/tealdeer-rs/tealdeer/pull/322 +[#324]: https://github.com/tealdeer-rs/tealdeer/pull/324 +[#327]: https://github.com/tealdeer-rs/tealdeer/pull/327 +[#331]: https://github.com/tealdeer-rs/tealdeer/pull/331 +[#333]: https://github.com/tealdeer-rs/tealdeer/pull/333 +[#336]: https://github.com/tealdeer-rs/tealdeer/pull/336 +[#342]: https://github.com/tealdeer-rs/tealdeer/pull/342 +[#354]: https://github.com/tealdeer-rs/tealdeer/pull/354 +[#355]: https://github.com/tealdeer-rs/tealdeer/pull/355 +[#362]: https://github.com/tealdeer-rs/tealdeer/pull/362 diff --git a/Cargo.lock b/Cargo.lock index cddbb31..4a1c940 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1426,7 +1426,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.6.1" +version = "1.7.0" dependencies = [ "anyhow", "app_dirs2", diff --git a/Cargo.toml b/Cargo.toml index cf374ad..954a52c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ name = "tealdeer" readme = "README.md" repository = "https://github.com/tealdeer-rs/tealdeer/" documentation = "https://tealdeer-rs.github.io/tealdeer/" -version = "1.6.1" +version = "1.7.0" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"] rust-version = "1.75" edition = "2021" diff --git a/RELEASING.md b/RELEASING.md index 16cb4e2..f182519 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -7,16 +7,13 @@ Run linting: Set variables: $ export VERSION=X.Y.Z - $ export GPG_KEY=EA456E8BAF0109429583EED83578F667F2F3A5FA + $ export GPG_KEY=20EE002D778AE197EF7D0D2CB993FF98A90C9AB1 Update version numbers: $ vim Cargo.toml $ cargo update -p tealdeer -For release 1.7.0: Remove this note and uncomment warning in -`docs/src/usage_custom_pages.md`. - Update docs: $ cargo run -- --help > docs/src/usage.txt diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 11b7ebe..9307a40 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -1,4 +1,4 @@ -tealdeer 1.6.1: A fast TLDR client +tealdeer 1.7.0: A fast TLDR client Danilo Bargen , Niklas Mohrin Usage: tldr [OPTIONS] [COMMAND]... diff --git a/docs/src/usage_custom_pages.md b/docs/src/usage_custom_pages.md index 87344d7..d5d0f89 100644 --- a/docs/src/usage_custom_pages.md +++ b/docs/src/usage_custom_pages.md @@ -1,7 +1,5 @@ # Custom Pages and Patches - Tealdeer allows creating new custom pages, overriding existing pages as well as extending existing pages. From fb7492b0b555a7467b76321d915fa633a0432bc9 Mon Sep 17 00:00:00 2001 From: Blair Noctis <4474501+nc7s@users.noreply.github.com> Date: Thu, 14 Nov 2024 23:07:30 +0800 Subject: [PATCH 300/368] Upgrade yansi: 0.5.1 -> 1.0.1 (#389) - Adapt to `thing.paint(style)` API; was `style.paint(thing)` - Remove `yansi::Paint::enable_windows_ascii()` in style usage decision; removed in yansi commit b186eb5bfb, which introduced "automatic" support for Windows: "If support is not available, styling is disabled and no styling sequences are emitted", fitting the `Auto` option - Respect `--color=always` even if we know it won't work --------- Co-authored-by: Niklas Mohrin --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/config.rs | 2 +- src/main.rs | 14 +++++--------- src/output.rs | 11 ++++++----- src/utils.rs | 4 ++-- 6 files changed, 17 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4a1c940..0208435 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2009,9 +2009,9 @@ checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "zerocopy" diff --git a/Cargo.toml b/Cargo.toml index 954a52c..d567831 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ serde = "1.0.21" serde_derive = "1.0.21" toml = "0.8.19" walkdir = "2.0.1" -yansi = "0.5" +yansi = "1" zip = { version = "2.1.6", default-features = false, features = ["deflate"] } [target.'cfg(not(windows))'.dependencies] diff --git a/src/config.rs b/src/config.rs index 98d4e46..454fbf5 100644 --- a/src/config.rs +++ b/src/config.rs @@ -57,7 +57,7 @@ impl From for Color { RawColor::Cyan => Self::Cyan, RawColor::White => Self::White, RawColor::Ansi(num) => Self::Fixed(num), - RawColor::Rgb { r, g, b } => Self::RGB(r, g, b), + RawColor::Rgb { r, g, b } => Self::Rgb(r, g, b), } } } diff --git a/src/main.rs b/src/main.rs index 9dede44..5e6e739 100644 --- a/src/main.rs +++ b/src/main.rs @@ -249,20 +249,16 @@ fn main() { let args = Cli::parse(); // Determine the usage of styles - #[cfg(target_os = "windows")] - let ansi_support = yansi::Paint::enable_windows_ascii(); - #[cfg(not(target_os = "windows"))] - let ansi_support = true; let enable_styles = match args.color.unwrap_or_default() { // Attempt to use styling if instructed - ColorOptions::Always => true, + ColorOptions::Always => { + yansi::enable(); // disable yansi's automatic detection for ANSI support on Windows + true + } // Enable styling if: - // * There is `ansi_support` // * NO_COLOR env var isn't set: https://no-color.org/ // * The output stream is stdout (not being piped) - ColorOptions::Auto => { - ansi_support && env::var_os("NO_COLOR").is_none() && io::stdout().is_terminal() - } + ColorOptions::Auto => env::var_os("NO_COLOR").is_none() && io::stdout().is_terminal(), // Disable styling ColorOptions::Never => false, }; diff --git a/src/output.rs b/src/output.rs index 357b988..abef1db 100644 --- a/src/output.rs +++ b/src/output.rs @@ -3,6 +3,7 @@ use std::io::{self, BufRead, Write}; use anyhow::{Context, Result}; +use yansi::Paint; use crate::{ cache::PageLookupResult, @@ -86,11 +87,11 @@ fn print_snippet( use PageSnippet::*; match snip { - CommandName(s) => write!(writer, "{}", style.command_name.paint(s)), - Variable(s) => write!(writer, "{}", style.example_variable.paint(s)), - NormalCode(s) => write!(writer, "{}", style.example_code.paint(s)), - Description(s) => writeln!(writer, " {}", style.description.paint(s)), - Text(s) => writeln!(writer, " {}", style.example_text.paint(s)), + CommandName(s) => write!(writer, "{}", s.paint(style.command_name)), + Variable(s) => write!(writer, "{}", s.paint(style.example_variable)), + NormalCode(s) => write!(writer, "{}", s.paint(style.example_code)), + Description(s) => writeln!(writer, " {}", s.paint(style.description)), + Text(s) => writeln!(writer, " {}", s.paint(style.example_text)), Linebreak => writeln!(writer), } } diff --git a/src/utils.rs b/src/utils.rs index 1649281..f4d825a 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,4 +1,4 @@ -use yansi::Color; +use yansi::{Color, Paint}; /// Print a warning to stderr. If `enable_styles` is true, then a yellow /// message will be printed. @@ -14,7 +14,7 @@ pub fn print_error(enable_styles: bool, error: &anyhow::Error) { fn print_msg(enable_styles: bool, message: &str, prefix: &'static str, color: Color) { if enable_styles { - eprintln!("{}{}", color.paint(prefix), color.paint(message)); + eprintln!("{}{}", prefix.paint(color), message.paint(color)); } else { eprintln!("{message}"); } From d719f21f7bf8354f6475fe23ee844bc17640d92a Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Thu, 14 Nov 2024 21:59:23 +0100 Subject: [PATCH 301/368] Bump futures-util (0.3.30 is yanked) --- Cargo.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0208435..4f00b34 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -473,33 +473,33 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-io", From 1d9153e37e131ca56071213ba40ec01b16158ebf Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Thu, 14 Nov 2024 22:11:34 +0100 Subject: [PATCH 302/368] Release v1.7.1 --- CHANGELOG.md | 17 +++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- docs/src/usage.txt | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8b1419..04fdd4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,21 @@ Possible log types: - `[docs]` for documentation changes. - `[chore]` for maintenance work. +### [v1.7.1][v1.7.1] (2024-11-14) + +This patch release updates the `yansi` dependency to version 1, so that the +previous versions of `yansi` can be removed from the package sets of Linux +distributions. This change should not impact the behavior of tealdeer. + +Changes: + +- [chore] Upgrade yansi: 0.5.1 -> 1.0.1 ([#389]) + +Contributors to this version: + +- [Blair Noctis][@nc7s] + +Thanks! ### [v1.7.0][v1.7.0] (2024-10-02) @@ -441,6 +456,7 @@ Thanks! [v1.6.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.5.0...v1.6.0 [v1.6.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.6.0...v1.6.1 [v1.7.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.6.1...v1.7.0 +[v1.7.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.0...v1.7.1 [i34]: https://github.com/tealdeer-rs/tealdeer/issues/34 [i43]: https://github.com/tealdeer-rs/tealdeer/issues/43 @@ -524,3 +540,4 @@ Thanks! [#354]: https://github.com/tealdeer-rs/tealdeer/pull/354 [#355]: https://github.com/tealdeer-rs/tealdeer/pull/355 [#362]: https://github.com/tealdeer-rs/tealdeer/pull/362 +[#389]: https://github.com/tealdeer-rs/tealdeer/pull/389 diff --git a/Cargo.lock b/Cargo.lock index 4f00b34..ddb75c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1426,7 +1426,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.7.0" +version = "1.7.1" dependencies = [ "anyhow", "app_dirs2", diff --git a/Cargo.toml b/Cargo.toml index d567831..aa1f423 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ name = "tealdeer" readme = "README.md" repository = "https://github.com/tealdeer-rs/tealdeer/" documentation = "https://tealdeer-rs.github.io/tealdeer/" -version = "1.7.0" +version = "1.7.1" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"] rust-version = "1.75" edition = "2021" diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 9307a40..5129fbe 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -1,4 +1,4 @@ -tealdeer 1.7.0: A fast TLDR client +tealdeer 1.7.1: A fast TLDR client Danilo Bargen , Niklas Mohrin Usage: tldr [OPTIONS] [COMMAND]... From ee5418b5a8791cbfb215bd819cbb5c2d4f633a46 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 1 Jan 2025 19:07:40 +0100 Subject: [PATCH 303/368] Run `cargo clippy --fix` (Rust 1.83) (#397) --- src/formatter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/formatter.rs b/src/formatter.rs index d5e3b32..369efce 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -15,7 +15,7 @@ pub enum PageSnippet<'a> { Linebreak, } -impl<'a> PageSnippet<'a> { +impl PageSnippet<'_> { pub fn is_empty(&self) -> bool { use PageSnippet::*; From 6869837e79d74821126a2257b3100c1d7881145b Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 1 Jan 2025 19:21:04 +0100 Subject: [PATCH 304/368] Run `cargo update -p url` to bump `idna` --- Cargo.lock | 282 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 260 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ddb75c7..62f83f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -666,13 +666,142 @@ dependencies = [ ] [[package]] -name = "idna" -version = "0.5.0" +name = "icu_collections" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -757,6 +886,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "lockfree-object-pool" version = "0.1.6" @@ -1398,6 +1533,12 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "subtle" version = "2.6.1" @@ -1424,6 +1565,17 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tealdeer" version = "1.7.1" @@ -1497,6 +1649,16 @@ dependencies = [ "syn", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -1613,27 +1775,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "untrusted" version = "0.9.0" @@ -1642,15 +1789,27 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -2001,6 +2160,18 @@ dependencies = [ "memchr", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xdg" version = "2.5.2" @@ -2013,6 +2184,30 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -2034,12 +2229,55 @@ dependencies = [ "syn", ] +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zip" version = "2.2.0" From e3a06eefe3e06127335919f2bb3e436042466ad4 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 1 Jan 2025 19:21:36 +0100 Subject: [PATCH 305/368] Run `cargo update -p hashbrown` --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 62f83f3..184c204 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -530,9 +530,9 @@ checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" From 0c55a4b82affc878298cb6fdb569547768e07c91 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 1 Jan 2025 19:22:25 +0100 Subject: [PATCH 306/368] Run `cargo update --recursive -p rustls` --- Cargo.lock | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 184c204..008695c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -182,9 +182,9 @@ checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "cc" -version = "1.1.24" +version = "1.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" +checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333" dependencies = [ "shlex", ] @@ -865,9 +865,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.159" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libredox" @@ -986,12 +986,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.1" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" -dependencies = [ - "portable-atomic", -] +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" @@ -1071,12 +1068,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" -[[package]] -name = "portable-atomic" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" - [[package]] name = "ppv-lite86" version = "0.2.20" @@ -1339,9 +1330,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ "once_cell", "ring", @@ -1375,9 +1366,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" [[package]] name = "rustls-webpki" From 909bad9c65ab0d67dc4cc2eba968cd4a7e8c0bca Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 1 Jan 2025 22:48:37 +0100 Subject: [PATCH 307/368] Fix feature selection in integration tests --- tests/lib.rs | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/tests/lib.rs b/tests/lib.rs index fa8d19c..885989f 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -97,14 +97,12 @@ impl TestEnv { } /// Disable default features. - #[allow(dead_code)] // Might be useful in the future fn no_default_features(mut self) -> Self { self.default_features = false; self } /// Add the specified feature. - #[allow(dead_code)] // Might be useful in the future fn with_feature>(mut self, feature: S) -> Self { self.features.push(feature.into()); self @@ -114,15 +112,16 @@ impl TestEnv { fn command(&self) -> Command { let mut build = escargot::CargoBuild::new() .bin("tldr") + .arg("--color=never") .current_release() .current_target(); if !self.default_features { - build = build.arg("--no-default-features"); + build = build.no_default_features(); } if !self.features.is_empty() { - build = build.arg(format!("--feature {}", self.features.join(","))); + build = build.features(self.features.join(" ")) } - let run = build.run().unwrap(); + let run = build.run().expect("Failed to build tealdeer for testing"); let mut cmd = run.command(); cmd.env(CACHE_DIR_ENV_VAR, self.cache_dir.path().to_str().unwrap()); cmd.env( @@ -133,6 +132,12 @@ impl TestEnv { } } +#[test] +#[should_panic] +fn test_cannot_build_without_tls_feature() { + let _ = TestEnv::new().no_default_features().command(); +} + #[test] fn test_missing_cache() { TestEnv::new() @@ -144,7 +149,7 @@ fn test_missing_cache() { } #[test] -fn test_update_cache() { +fn test_update_cache_default_features() { let testenv = TestEnv::new(); testenv @@ -164,6 +169,29 @@ fn test_update_cache() { testenv.command().args(["sl"]).assert().success(); } +#[test] +fn test_update_cache_rustls_webpki() { + let testenv = TestEnv::new() + .no_default_features() + .with_feature("webpki-roots"); + + testenv + .command() + .args(["sl"]) + .assert() + .failure() + .stderr(contains("Page cache not found. Please run `tldr --update`")); + + testenv + .command() + .args(["--update"]) + .assert() + .success() + .stderr(contains("Successfully updated cache.")); + + testenv.command().args(["sl"]).assert().success(); +} + #[test] fn test_quiet_cache() { let testenv = TestEnv::new(); From e85de336edf8f47ba7ceea964c331079f1a14b6e Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 1 Jan 2025 22:50:53 +0100 Subject: [PATCH 308/368] Structure test fixtures like page cache --- tests/cache/pages.ja/common/apt.md | 37 +++ tests/cache/pages/common/git-checkout.md | 36 +++ tests/{ => cache/pages/common}/inkscape-v1.md | 0 tests/{ => cache/pages/common}/inkscape-v2.md | 0 .../pages/common/which.md} | 0 tests/chmod.ru.expected | 32 -- tests/chmod.ru.md | 32 -- tests/{ => custom-pages}/inkscape-v2.patch.md | 0 tests/lib.rs | 283 ++++++++---------- tests/rendered/apt.ja.expected | 37 +++ .../inkscape-default-no-color.expected | 0 .../{ => rendered}/inkscape-default.expected | 0 .../inkscape-patched-no-color.expected | 0 .../inkscape-with-config.expected | 0 14 files changed, 227 insertions(+), 230 deletions(-) create mode 100644 tests/cache/pages.ja/common/apt.md create mode 100644 tests/cache/pages/common/git-checkout.md rename tests/{ => cache/pages/common}/inkscape-v1.md (100%) rename tests/{ => cache/pages/common}/inkscape-v2.md (100%) rename tests/{which-markdown.expected => cache/pages/common/which.md} (100%) delete mode 100644 tests/chmod.ru.expected delete mode 100644 tests/chmod.ru.md rename tests/{ => custom-pages}/inkscape-v2.patch.md (100%) create mode 100644 tests/rendered/apt.ja.expected rename tests/{ => rendered}/inkscape-default-no-color.expected (100%) rename tests/{ => rendered}/inkscape-default.expected (100%) rename tests/{ => rendered}/inkscape-patched-no-color.expected (100%) rename tests/{ => rendered}/inkscape-with-config.expected (100%) diff --git a/tests/cache/pages.ja/common/apt.md b/tests/cache/pages.ja/common/apt.md new file mode 100644 index 0000000..fe16a3d --- /dev/null +++ b/tests/cache/pages.ja/common/apt.md @@ -0,0 +1,37 @@ +# apt + +> Debian系ディストリビューションで使われるパッケージ管理システムです。 +> Ubuntuのバージョンが16.04か、それ以降で対話モードを使う場合`apt-get`の代わりとして使用します。 +> 詳しくはこちら: + +- 利用可能なパーケージとバージョンのリストの更新(他の`apt`コマンドの前での実行を推奨): + +`sudo apt update` + +- 指定されたパッケージの検索: + +`apt search {{パッケージ}}` + +- パッケージの情報を出力: + +`apt show {{パッケージ}}` + +- パッケージのインストール、または利用可能な最新バージョンに更新: + +`sudo apt install {{パッケージ}}` + +- パッケージの削除(`sudo apt remove --purge`の場合設定ファイルも削除): + +`sudo apt remove {{パッケージ}}` + +- インストールされている全てのパッケージを最新のバージョンにアップグレード: + +`sudo apt upgrade` + +- インストールできるすべてのパッケージを表示: + +`apt list` + +- インストールされた全てのパッケージを表示(依存関係も表示): + +`apt list --installed` diff --git a/tests/cache/pages/common/git-checkout.md b/tests/cache/pages/common/git-checkout.md new file mode 100644 index 0000000..ca1bacc --- /dev/null +++ b/tests/cache/pages/common/git-checkout.md @@ -0,0 +1,36 @@ +# git checkout + +> Checkout a branch or paths to the working tree. +> More information: . + +- Create and switch to a new branch: + +`git checkout -b {{branch_name}}` + +- Create and switch to a new branch based on a specific reference (branch, remote/branch, tag are examples of valid references): + +`git checkout -b {{branch_name}} {{reference}}` + +- Switch to an existing local branch: + +`git checkout {{branch_name}}` + +- Switch to the previously checked out branch: + +`git checkout -` + +- Switch to an existing remote branch: + +`git checkout --track {{remote_name}}/{{branch_name}}` + +- Discard all unstaged changes in the current directory (see `git reset` for more undo-like commands): + +`git checkout .` + +- Discard unstaged changes to a given file: + +`git checkout {{path/to/file}}` + +- Replace a file in the current directory with the version of it committed in a given branch: + +`git checkout {{branch_name}} -- {{path/to/file}}` diff --git a/tests/inkscape-v1.md b/tests/cache/pages/common/inkscape-v1.md similarity index 100% rename from tests/inkscape-v1.md rename to tests/cache/pages/common/inkscape-v1.md diff --git a/tests/inkscape-v2.md b/tests/cache/pages/common/inkscape-v2.md similarity index 100% rename from tests/inkscape-v2.md rename to tests/cache/pages/common/inkscape-v2.md diff --git a/tests/which-markdown.expected b/tests/cache/pages/common/which.md similarity index 100% rename from tests/which-markdown.expected rename to tests/cache/pages/common/which.md diff --git a/tests/chmod.ru.expected b/tests/chmod.ru.expected deleted file mode 100644 index c7f92c2..0000000 --- a/tests/chmod.ru.expected +++ /dev/null @@ -1,32 +0,0 @@ - - Изменить права доступа файлу или папке. - Больше информации: . - - Дать [u]пользователю, который владеет файлом, права на его [x]исполнение: - - chmod u+x файл - - Дать права [u]пользователю права [r]чтения и [w]записи в файл/папку: - - chmod u+rw файл_или_папка - - Убрать права на [x]исполнение у [g]группы: - - chmod g-x файл - - Дать [a]всем пользователям права на [r]чтение и [x]исполенеие: - - chmod a+rx файл - - Дать [o]другим (не из группы владельцев файлом) такие же права как и у [g]группы: - - chmod o=g файл - - Убрать все права у [o]других: - - chmod o= файл - - Изменить права рекурсивно, дав [g]группе и [o]другим возможность [w]записи в папку: - - chmod -R g+w,o+w папка - diff --git a/tests/chmod.ru.md b/tests/chmod.ru.md deleted file mode 100644 index 4b92329..0000000 --- a/tests/chmod.ru.md +++ /dev/null @@ -1,32 +0,0 @@ -# chmod - -> Изменить права доступа файлу или папке. -> Больше информации: . - -- Дать [u]пользователю, который владеет файлом, права на его [x]исполнение: - -`chmod u+x {{файл}}` - -- Дать права [u]пользователю права [r]чтения и [w]записи в файл/папку: - -`chmod u+rw {{файл_или_папка}}` - -- Убрать права на [x]исполнение у [g]группы: - -`chmod g-x {{файл}}` - -- Дать [a]всем пользователям права на [r]чтение и [x]исполенеие: - -`chmod a+rx {{файл}}` - -- Дать [o]другим (не из группы владельцев файлом) такие же права как и у [g]группы: - -`chmod o=g {{файл}}` - -- Убрать все права у [o]других: - -`chmod o= {{файл}}` - -- Изменить права рекурсивно, дав [g]группе и [o]другим возможность [w]записи в папку: - -`chmod -R g+w,o+w {{папка}}` diff --git a/tests/inkscape-v2.patch.md b/tests/custom-pages/inkscape-v2.patch.md similarity index 100% rename from tests/inkscape-v2.patch.md rename to tests/custom-pages/inkscape-v2.patch.md diff --git a/tests/lib.rs b/tests/lib.rs index 885989f..99e736f 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -1,8 +1,9 @@ //! Integration tests. use std::{ - fs::{create_dir_all, File}, - io::Write, + fs::{self, create_dir_all, File}, + io::{self, Write}, + path::{Path, PathBuf}, process::Command, time::{Duration, SystemTime}, }; @@ -23,7 +24,6 @@ struct TestEnv { pub cache_dir: TempDir, pub custom_pages_dir: TempDir, pub config_dir: TempDir, - pub input_dir: TempDir, pub default_features: bool, pub features: Vec, } @@ -43,10 +43,6 @@ impl TestEnv { .prefix(".tldr.test.custom-pages") .tempdir() .unwrap(), - input_dir: TempfileBuilder::new() - .prefix(".tldr.test.input") - .tempdir() - .unwrap(), default_features: true, features: vec![], } @@ -57,8 +53,7 @@ impl TestEnv { let config_file_name = self.config_dir.path().join("config.toml"); println!("Config path: {config_file_name:?}"); - let mut config_file = File::create(&config_file_name).unwrap(); - config_file.write_all(content.as_ref().as_bytes()).unwrap(); + fs::write(config_file_name, content.as_ref().as_bytes()).unwrap(); } /// Add entry for that environment to the "common" pages. @@ -130,6 +125,49 @@ impl TestEnv { ); cmd } + + fn install_default_cache(self) -> Self { + copy_recursively( + &PathBuf::from_iter([env!("CARGO_MANIFEST_DIR"), "tests", "cache"]), + &self.cache_dir.path().join(TLDR_PAGES_DIR), + ) + .expect("Failed to copy the cache to the test environment"); + + self + } + + fn install_default_custom_pages(self) -> Self { + copy_recursively( + &PathBuf::from_iter([env!("CARGO_MANIFEST_DIR"), "tests", "custom-pages"]), + self.custom_pages_dir.path(), + ) + .expect("Failed to copy the custom pages to the test environment"); + + self.write_custom_pages_config() + } + + fn write_custom_pages_config(self) -> Self { + self.write_config(format!( + "[directories]\ncustom_pages_dir = '{}'", + self.custom_pages_dir.path().to_str().unwrap() + )); + + self + } +} + +fn copy_recursively(source: &Path, destination: &Path) -> io::Result<()> { + if source.is_dir() { + fs::create_dir_all(destination)?; + for entry in fs::read_dir(source)? { + let entry = entry?; + copy_recursively(&entry.path(), &destination.join(entry.file_name()))?; + } + } else { + fs::copy(source, destination)?; + } + + Ok(()) } #[test] @@ -212,14 +250,7 @@ fn test_quiet_cache() { #[test] fn test_quiet_failures() { - let testenv = TestEnv::new(); - - testenv - .command() - .args(["--update", "-q"]) - .assert() - .success() - .stdout(is_empty()); + let testenv = TestEnv::new().install_default_cache(); testenv .command() @@ -231,14 +262,7 @@ fn test_quiet_failures() { #[test] fn test_quiet_old_cache() { - let testenv = TestEnv::new(); - - testenv - .command() - .args(["--update", "-q"]) - .assert() - .success() - .stdout(is_empty()); + let testenv = TestEnv::new().install_default_cache(); filetime::set_file_mtime( testenv.cache_dir.path().join(TLDR_PAGES_DIR), @@ -248,14 +272,14 @@ fn test_quiet_old_cache() { testenv .command() - .args(["tldr"]) + .args(["which"]) .assert() .success() .stderr(contains("The cache hasn't been updated for ")); testenv .command() - .args(["tldr", "--quiet"]) + .args(["which", "--quiet"]) .assert() .success() .stderr(contains("The cache hasn't been updated for ").not()); @@ -359,6 +383,8 @@ fn test_setup_seed_config() { .assert() .success() .stderr(contains("Successfully created seed config file here")); + + assert!(testenv.config_dir.path().join("config.toml").is_file()); } #[test] @@ -431,11 +457,9 @@ fn test_os_specific_page() { #[test] fn test_markdown_rendering() { - let testenv = TestEnv::new(); + let testenv = TestEnv::new().install_default_cache(); - testenv.add_entry("which", include_str!("which-markdown.expected")); - - let expected = include_str!("which-markdown.expected"); + let expected = include_str!("cache/pages/common/which.md"); testenv .command() .args(["--raw", "which"]) @@ -444,23 +468,13 @@ fn test_markdown_rendering() { .stdout(diff(expected)); } -fn _test_correct_rendering( - input_file: &str, - filename: &str, - expected: &'static str, - color_option: &str, -) { - let testenv = TestEnv::new(); - - // Create input file - let file_path = testenv.input_dir.path().join(filename); - println!("Testfile path: {file_path:?}"); - let mut file = File::create(&file_path).unwrap(); - file.write_all(input_file.as_bytes()).unwrap(); +fn _test_correct_rendering(page: &str, expected: &'static str, additional_args: &[&str]) { + let testenv = TestEnv::new().install_default_cache(); testenv .command() - .args(["--color", color_option, "-f", file_path.to_str().unwrap()]) + .args(additional_args) + .arg(page) .assert() .success() .stdout(diff(expected)); @@ -470,10 +484,9 @@ fn _test_correct_rendering( #[test] fn test_correct_rendering_v1() { _test_correct_rendering( - include_str!("inkscape-v1.md"), - "inkscape-v1.md", - include_str!("inkscape-default.expected"), - "always", + "inkscape-v1", + include_str!("rendered/inkscape-default.expected"), + &["--color", "always"], ); } @@ -481,10 +494,9 @@ fn test_correct_rendering_v1() { #[test] fn test_correct_rendering_v2() { _test_correct_rendering( - include_str!("inkscape-v2.md"), - "inkscape-v2.md", - include_str!("inkscape-default.expected"), - "always", + "inkscape-v2", + include_str!("rendered/inkscape-default.expected"), + &["--color", "always"], ); } @@ -493,10 +505,9 @@ fn test_correct_rendering_v2() { /// will not use styling since output is not stdout. fn test_rendering_color_auto() { _test_correct_rendering( - include_str!("inkscape-v2.md"), - "inkscape-v2.md", - include_str!("inkscape-default-no-color.expected"), - "auto", + "inkscape-v2", + include_str!("rendered/inkscape-default-no-color.expected"), + &["--color", "auto"], ); } @@ -504,51 +515,39 @@ fn test_rendering_color_auto() { /// An end-to-end integration test for direct file rendering with the `--color never` option. fn test_rendering_color_never() { _test_correct_rendering( - include_str!("inkscape-v2.md"), - "inkscape-v2.md", - include_str!("inkscape-default-no-color.expected"), - "never", + "inkscape-v2", + include_str!("rendered/inkscape-default-no-color.expected"), + &["--color", "never"], ); } #[test] fn test_rendering_i18n() { _test_correct_rendering( - include_str!("chmod.ru.md"), - "chmod.ru.md", - include_str!("chmod.ru.expected"), - "always", + "apt", + include_str!("rendered/apt.ja.expected"), + &["--color", "always", "--language", "ja"], ); } /// An end-to-end integration test for rendering with custom syntax config. #[test] fn test_correct_rendering_with_config() { - let testenv = TestEnv::new(); + let testenv = TestEnv::new().install_default_cache(); // Setup config file // TODO should be config::CONFIG_FILE_NAME - let config_file_path = testenv.config_dir.path().join("config.toml"); - println!("Config path: {config_file_path:?}"); + fs::write( + testenv.config_dir.path().join("config.toml"), + include_bytes!("config.toml"), + ) + .unwrap(); - let mut config_file = File::create(&config_file_path).unwrap(); - config_file - .write_all(include_bytes!("config.toml")) - .unwrap(); - - // Create input file - let file_path = testenv.input_dir.path().join("inkscape-v2.md"); - println!("Testfile path: {file_path:?}"); - - let mut file = File::create(&file_path).unwrap(); - file.write_all(include_bytes!("inkscape-v2.md")).unwrap(); - - // Load expected output - let expected = include_str!("inkscape-with-config.expected"); + let expected = include_str!("rendered/inkscape-with-config.expected"); testenv .command() - .args(["--color", "always", "-f", file_path.to_str().unwrap()]) + .args(["--color", "always", "inkscape-v2"]) .assert() .success() .stdout(diff(expected)); @@ -556,14 +555,7 @@ fn test_correct_rendering_with_config() { #[test] fn test_spaces_find_command() { - let testenv = TestEnv::new(); - - testenv - .command() - .args(["--update"]) - .assert() - .success() - .stderr(contains("Successfully updated cache.")); + let testenv = TestEnv::new().install_default_cache(); testenv .command() @@ -574,14 +566,7 @@ fn test_spaces_find_command() { #[test] fn test_pager_flag_enable() { - let testenv = TestEnv::new(); - - testenv - .command() - .args(["--update"]) - .assert() - .success() - .stderr(contains("Successfully updated cache.")); + let testenv = TestEnv::new().install_default_cache(); testenv .command() @@ -657,13 +642,7 @@ fn test_multiple_platform_command_search_not_found() { #[test] fn test_list_flag_rendering() { - let testenv = TestEnv::new(); - - // set custom pages directory - testenv.write_config(format!( - "[directories]\ncustom_pages_dir = '{}'", - testenv.custom_pages_dir.path().to_str().unwrap() - )); + let testenv = TestEnv::new().write_custom_pages_config(); testenv .command() @@ -699,13 +678,7 @@ fn test_list_flag_rendering() { #[test] fn test_multi_platform_list_flag_rendering() { - let testenv = TestEnv::new(); - - // set custom pages directory - testenv.write_config(format!( - "[directories]\ncustom_pages_dir = '{}'", - testenv.custom_pages_dir.path().to_str().unwrap() - )); + let testenv = TestEnv::new().write_custom_pages_config(); testenv.add_entry("common", ""); @@ -829,21 +802,18 @@ fn test_autoupdate_cache() { /// End-end test to ensure .page.md files overwrite pages in cache_dir #[test] fn test_custom_page_overwrites() { - let testenv = TestEnv::new(); - - // set custom pages directory - testenv.write_config(format!( - "[directories]\ncustom_pages_dir = '{}'", - testenv.custom_pages_dir.path().to_str().unwrap() - )); + let testenv = TestEnv::new().write_custom_pages_config(); // Add file that should be ignored to the cache dir testenv.add_entry("inkscape-v2", ""); // Add .page.md file to custom_pages_dir - testenv.add_page_entry("inkscape-v2", include_str!("inkscape-v2.md")); + testenv.add_page_entry( + "inkscape-v2", + include_str!("cache/pages/common/inkscape-v2.md"), + ); // Load expected output - let expected = include_str!("inkscape-default-no-color.expected"); + let expected = include_str!("rendered/inkscape-default-no-color.expected"); testenv .command() @@ -856,21 +826,12 @@ fn test_custom_page_overwrites() { /// End-End test to ensure that .patch.md files are appended to pages in the cache_dir #[test] fn test_custom_patch_appends_to_common() { - let testenv = TestEnv::new(); - - // set custom pages directory - testenv.write_config(format!( - "[directories]\ncustom_pages_dir = '{}'", - testenv.custom_pages_dir.path().to_str().unwrap() - )); - - // Add page to the cache dir - testenv.add_entry("inkscape-v2", include_str!("inkscape-v2.md")); - // Add .page.md file to custom_pages_dir - testenv.add_patch_entry("inkscape-v2", include_str!("inkscape-v2.patch.md")); + let testenv = TestEnv::new() + .install_default_cache() + .install_default_custom_pages(); // Load expected output - let expected = include_str!("inkscape-patched-no-color.expected"); + let expected = include_str!("rendered/inkscape-patched-no-color.expected"); testenv .command() @@ -884,23 +845,18 @@ fn test_custom_patch_appends_to_common() { /// Maybe this interaction should change but I put this test here for the coverage #[test] fn test_custom_patch_does_not_append_to_custom() { - let testenv = TestEnv::new(); + let testenv = TestEnv::new() + .install_default_cache() + .install_default_custom_pages(); - // set custom pages directory - testenv.write_config(format!( - "[directories]\ncustom_pages_dir = '{}'", - testenv.custom_pages_dir.path().to_str().unwrap() - )); - - testenv.add_entry("test", ""); - - // Add page to the cache dir - testenv.add_page_entry("inkscape-v2", include_str!("inkscape-v2.md")); - // Add .page.md file to custom_pages_dir - testenv.add_patch_entry("inkscape-v2", include_str!("inkscape-v2.patch.md")); + // In addition to the page in the cache, add the same page as a custom page. + testenv.add_page_entry( + "inkscape-v2", + include_str!("cache/pages/common/inkscape-v2.md"), + ); // Load expected output - let expected = include_str!("inkscape-default-no-color.expected"); + let expected = include_str!("rendered/inkscape-default-no-color.expected"); testenv .command() @@ -913,13 +869,7 @@ fn test_custom_patch_does_not_append_to_custom() { #[test] #[cfg(target_os = "windows")] fn test_pager_warning() { - let testenv = TestEnv::new(); - testenv - .command() - .args(["--update"]) - .assert() - .success() - .stderr(contains("Successfully updated cache.")); + let testenv = TestEnv::new().install_default_cache(); // Regular call should not show a "pager flag not available on windows" warning testenv @@ -960,15 +910,14 @@ fn test_lowercased_page_lookup() { /// Regression test for #219: It should be possible to combine `--raw` and `-f`. #[test] fn test_raw_render_file() { - let testenv = TestEnv::new(); + let testenv = TestEnv::new().install_default_cache(); - // Create input file - let file_path = testenv.input_dir.path().join("inkscape.md"); - let mut file = File::create(&file_path).unwrap(); - file.write_all(include_bytes!("inkscape-v1.md")).unwrap(); - - // Base args - let mut args = vec!["--color", "never", "-f", file_path.to_str().unwrap()]; + let path = testenv + .cache_dir + .path() + .join(TLDR_PAGES_DIR) + .join("pages/common/inkscape-v1.md"); + let mut args = vec!["--color", "never", "-f", &path.to_str().unwrap()]; // Default render testenv @@ -976,7 +925,9 @@ fn test_raw_render_file() { .args(&args) .assert() .success() - .stdout(diff(include_str!("inkscape-default-no-color.expected"))); + .stdout(diff(include_str!( + "rendered/inkscape-default-no-color.expected" + ))); // Raw render args.push("--raw"); @@ -985,5 +936,5 @@ fn test_raw_render_file() { .args(&args) .assert() .success() - .stdout(diff(include_str!("inkscape-v1.md"))); + .stdout(diff(include_str!("cache/pages/common/inkscape-v1.md"))); } diff --git a/tests/rendered/apt.ja.expected b/tests/rendered/apt.ja.expected new file mode 100644 index 0000000..22424e3 --- /dev/null +++ b/tests/rendered/apt.ja.expected @@ -0,0 +1,37 @@ + + Debian系ディストリビューションで使われるパッケージ管理システムです。 + Ubuntuのバージョンが16.04か、それ以降で対話モードを使う場合`apt-get`の代わりとして使用します。 + 詳しくはこちら: + + 利用可能なパーケージとバージョンのリストの更新(他の`apt`コマンドの前での実行を推奨): + + sudo apt update + + 指定されたパッケージの検索: + + apt search パッケージ + + パッケージの情報を出力: + + apt show パッケージ + + パッケージのインストール、または利用可能な最新バージョンに更新: + + sudo apt install パッケージ + + パッケージの削除(`sudo apt remove --purge`の場合設定ファイルも削除): + + sudo apt remove パッケージ + + インストールされている全てのパッケージを最新のバージョンにアップグレード: + + sudo apt upgrade + + インストールできるすべてのパッケージを表示: + + apt list + + インストールされた全てのパッケージを表示(依存関係も表示): + + apt list --installed + diff --git a/tests/inkscape-default-no-color.expected b/tests/rendered/inkscape-default-no-color.expected similarity index 100% rename from tests/inkscape-default-no-color.expected rename to tests/rendered/inkscape-default-no-color.expected diff --git a/tests/inkscape-default.expected b/tests/rendered/inkscape-default.expected similarity index 100% rename from tests/inkscape-default.expected rename to tests/rendered/inkscape-default.expected diff --git a/tests/inkscape-patched-no-color.expected b/tests/rendered/inkscape-patched-no-color.expected similarity index 100% rename from tests/inkscape-patched-no-color.expected rename to tests/rendered/inkscape-patched-no-color.expected diff --git a/tests/inkscape-with-config.expected b/tests/rendered/inkscape-with-config.expected similarity index 100% rename from tests/inkscape-with-config.expected rename to tests/rendered/inkscape-with-config.expected From fc19206029b14042b9fdac6ed03b92223c9d115f Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 1 Jan 2025 23:17:49 +0100 Subject: [PATCH 309/368] Add `ignore-online-tests` feature Since these tests require internet access, they are undesirable in reproducible builds [1] (and in general, I guess). The overall goal is to shrink this list to a minimum. At some point we might remove the feature again and ignore online tests by default. Before putting much thought into refactoring the remaining tests, we should wait until we have introduced the `updates.archive_url` option. Then, we could run a local webserver that serves a known file. Until then, having the feature already helps discourage using `--update` in tests that don't need it and allows for quicker test execution locally if wanted. - [1]: https://github.com/NixOS/nixpkgs/blob/edf04b75c13c2ac0e54df5ec5c543e300f76f1c9/pkgs/by-name/te/tealdeer/package.nix#L34-L44 --- Cargo.toml | 2 ++ tests/lib.rs | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index aa1f423..bd0d07a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,6 +60,8 @@ native-roots = ["reqwest/rustls-tls-native-roots"] webpki-roots = ["reqwest/rustls-tls-webpki-roots"] native-tls = ["reqwest/native-tls"] +ignore-online-tests = [] + [profile.release] strip = true opt-level = 3 diff --git a/tests/lib.rs b/tests/lib.rs index 99e736f..fc99688 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -186,6 +186,7 @@ fn test_missing_cache() { .stderr(contains("Page cache not found. Please run `tldr --update`")); } +#[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] #[test] fn test_update_cache_default_features() { let testenv = TestEnv::new(); @@ -207,6 +208,7 @@ fn test_update_cache_default_features() { testenv.command().args(["sl"]).assert().success(); } +#[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] #[test] fn test_update_cache_rustls_webpki() { let testenv = TestEnv::new() @@ -230,6 +232,7 @@ fn test_update_cache_rustls_webpki() { testenv.command().args(["sl"]).assert().success(); } +#[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] #[test] fn test_quiet_cache() { let testenv = TestEnv::new(); @@ -285,6 +288,7 @@ fn test_quiet_old_cache() { .stderr(contains("The cache hasn't been updated for ").not()); } +#[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] #[test] fn test_create_cache_directory_path() { let testenv = TestEnv::new(); @@ -297,7 +301,7 @@ fn test_create_cache_directory_path() { assert!(!internal_cache_dir.exists()); command - .arg("-u") + .arg("--update") .assert() .success() .stderr(contains(format!( @@ -309,6 +313,7 @@ fn test_create_cache_directory_path() { assert!(internal_cache_dir.is_dir()); } +#[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] #[test] fn test_cache_location_not_a_directory() { let testenv = TestEnv::new(); @@ -320,7 +325,7 @@ fn test_cache_location_not_a_directory() { command.env(CACHE_DIR_ENV_VAR, internal_file.to_str().unwrap()); command - .arg("-u") + .arg("--update") .assert() .failure() .stderr(contains(format!( @@ -743,6 +748,7 @@ fn test_multi_platform_list_flag_rendering() { .stdout("common\ndel\ndir\nls\nrm\nwinux\n"); } +#[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] #[test] fn test_autoupdate_cache() { let testenv = TestEnv::new(); From e7b434d06ab039a5ade2a6ce62742cc935bee9a6 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Thu, 2 Jan 2025 00:00:29 +0100 Subject: [PATCH 310/368] Prefer config file over TEALDEER_CACHE_DIR in integration tests --- tests/lib.rs | 110 ++++++++++++----------- tests/{config.toml => style-config.toml} | 8 -- 2 files changed, 56 insertions(+), 62 deletions(-) rename tests/{config.toml => style-config.toml} (73%) diff --git a/tests/lib.rs b/tests/lib.rs index fc99688..a397285 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -15,9 +15,6 @@ use predicates::{ }; use tempfile::{Builder as TempfileBuilder, TempDir}; -// TODO: Should be 'cache::CACHE_DIR_ENV_VAR'. This requires to have a library crate for the logic. -static CACHE_DIR_ENV_VAR: &str = "TEALDEER_CACHE_DIR"; - pub static TLDR_PAGES_DIR: &str = "tldr-pages"; struct TestEnv { @@ -30,7 +27,7 @@ struct TestEnv { impl TestEnv { fn new() -> Self { - TestEnv { + let this = TestEnv { cache_dir: TempfileBuilder::new() .prefix(".tldr.test.cache") .tempdir() @@ -45,15 +42,29 @@ impl TestEnv { .unwrap(), default_features: true, features: vec![], - } + }; + + this.append_to_config(format!( + "directories.cache_dir = '{}'\n", + this.cache_dir.path().to_str().unwrap(), + )); + + this } - /// Write `content` to "config.toml" in the `config_dir` directory - fn write_config(&self, content: impl AsRef) { - let config_file_name = self.config_dir.path().join("config.toml"); - println!("Config path: {config_file_name:?}"); + fn append_to_config(&self, content: impl AsRef) { + File::options() + .create(true) + .append(true) + .open(self.config_dir.path().join("config.toml")) + .expect("Failed to open config file") + .write_all(content.as_ref().as_bytes()) + .expect("Failed to append to config file."); + } - fs::write(config_file_name, content.as_ref().as_bytes()).unwrap(); + fn remove_initial_config(self) -> Self { + let _ = fs::remove_file(self.config_dir.path().join("config.toml")); + self } /// Add entry for that environment to the "common" pages. @@ -71,24 +82,21 @@ impl TestEnv { .join(os); create_dir_all(&dir).unwrap(); - let mut file = File::create(dir.join(format!("{name}.md"))).unwrap(); - file.write_all(contents.as_bytes()).unwrap(); + fs::write(dir.join(format!("{name}.md")), contents.as_bytes()).unwrap(); } /// Add custom patch entry to the custom_pages_dir fn add_page_entry(&self, name: &str, contents: &str) { let dir = self.custom_pages_dir.path(); create_dir_all(dir).unwrap(); - let mut file = File::create(dir.join(format!("{name}.page.md"))).unwrap(); - file.write_all(contents.as_bytes()).unwrap(); + fs::write(dir.join(format!("{name}.page.md")), contents.as_bytes()).unwrap(); } /// Add custom patch entry to the custom_pages_dir fn add_patch_entry(&self, name: &str, contents: &str) { let dir = self.custom_pages_dir.path(); create_dir_all(dir).unwrap(); - let mut file = File::create(dir.join(format!("{name}.patch.md"))).unwrap(); - file.write_all(contents.as_bytes()).unwrap(); + fs::write(dir.join(format!("{name}.patch.md")), contents.as_bytes()).unwrap(); } /// Disable default features. @@ -118,7 +126,6 @@ impl TestEnv { } let run = build.run().expect("Failed to build tealdeer for testing"); let mut cmd = run.command(); - cmd.env(CACHE_DIR_ENV_VAR, self.cache_dir.path().to_str().unwrap()); cmd.env( "TEALDEER_CONFIG_DIR", self.config_dir.path().to_str().unwrap(), @@ -147,8 +154,8 @@ impl TestEnv { } fn write_custom_pages_config(self) -> Self { - self.write_config(format!( - "[directories]\ncustom_pages_dir = '{}'", + self.append_to_config(format!( + "directories.custom_pages_dir = '{}'\n", self.custom_pages_dir.path().to_str().unwrap() )); @@ -291,12 +298,15 @@ fn test_quiet_old_cache() { #[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] #[test] fn test_create_cache_directory_path() { - let testenv = TestEnv::new(); + let testenv = TestEnv::new().remove_initial_config(); let cache_dir = testenv.cache_dir.path(); let internal_cache_dir = cache_dir.join("internal"); + testenv.append_to_config(format!( + "directories.cache_dir = '{}'\n", + internal_cache_dir.to_str().unwrap() + )); let mut command = testenv.command(); - command.env(CACHE_DIR_ENV_VAR, internal_cache_dir.to_str().unwrap()); assert!(!internal_cache_dir.exists()); @@ -316,30 +326,30 @@ fn test_create_cache_directory_path() { #[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] #[test] fn test_cache_location_not_a_directory() { - let testenv = TestEnv::new(); + let testenv = TestEnv::new().remove_initial_config(); let cache_dir = testenv.cache_dir.path(); let internal_file = cache_dir.join("internal"); File::create(&internal_file).unwrap(); - let mut command = testenv.command(); - command.env(CACHE_DIR_ENV_VAR, internal_file.to_str().unwrap()); + testenv.append_to_config(format!( + "directories.cache_dir = '{}'\n", + internal_file.to_str().unwrap() + )); - command + testenv + .command() .arg("--update") .assert() .failure() .stderr(contains(format!( "Cache directory path `{}` is not a directory", internal_file.display(), - ))) - .stderr(contains( - "Warning: The $TEALDEER_CACHE_DIR env variable is deprecated", - )); + ))); } #[test] fn test_cache_location_source() { - let testenv = TestEnv::new(); + let testenv = TestEnv::new().remove_initial_config(); let default_cache_dir = testenv.cache_dir.path(); let tmp_cache_dir = TempfileBuilder::new() .prefix(".tldr.test.cache_dir") @@ -348,7 +358,6 @@ fn test_cache_location_source() { // Source: Default (OS convention) let mut command = testenv.command(); - command.env_remove(CACHE_DIR_ENV_VAR); command .arg("--show-paths") .assert() @@ -357,9 +366,8 @@ fn test_cache_location_source() { // Source: Config variable let mut command = testenv.command(); - command.env_remove(CACHE_DIR_ENV_VAR); - testenv.write_config(format!( - "[directories]\ncache_dir = '{}'", + testenv.append_to_config(format!( + "directories.cache_dir = '{}'\n", tmp_cache_dir.path().to_str().unwrap(), )); command @@ -370,7 +378,7 @@ fn test_cache_location_source() { // Source: Env var let mut command = testenv.command(); - command.env(CACHE_DIR_ENV_VAR, default_cache_dir.to_str().unwrap()); + command.env("TEALDEER_CACHE_DIR", default_cache_dir.to_str().unwrap()); command .arg("--show-paths") .assert() @@ -382,6 +390,15 @@ fn test_cache_location_source() { fn test_setup_seed_config() { let testenv = TestEnv::new(); + testenv + .command() + .args(["--seed-config"]) + .assert() + .failure() + .stderr(contains("A configuration file already exists")); + + let testenv = testenv.remove_initial_config(); + testenv .command() .args(["--seed-config"]) @@ -429,11 +446,7 @@ fn test_show_paths() { .unwrap(), ))); - // Set custom pages directory - testenv.write_config(format!( - "[directories]\ncustom_pages_dir = '{}'", - testenv.custom_pages_dir.path().to_str().unwrap() - )); + let testenv = testenv.write_custom_pages_config(); // Now ensure that this path is contained in the output testenv @@ -540,13 +553,7 @@ fn test_rendering_i18n() { fn test_correct_rendering_with_config() { let testenv = TestEnv::new().install_default_cache(); - // Setup config file - // TODO should be config::CONFIG_FILE_NAME - fs::write( - testenv.config_dir.path().join("config.toml"), - include_bytes!("config.toml"), - ) - .unwrap(); + testenv.append_to_config(include_str!("style-config.toml")); let expected = include_str!("rendered/inkscape-with-config.expected"); @@ -761,15 +768,10 @@ fn test_autoupdate_cache() { .failure() .stderr(contains("Page cache not found. Please run `tldr --update`")); - let config_file_path = testenv.config_dir.path().join("config.toml"); let cache_file_path = testenv.cache_dir.path().join(TLDR_PAGES_DIR); - // Activate automatic updates, set the auto-update interval to 24 hours - let mut config_file = File::create(config_file_path).unwrap(); - config_file - .write_all(b"[updates]\nauto_update = true\nauto_update_interval_hours = 24") - .unwrap(); - config_file.flush().unwrap(); + testenv + .append_to_config("updates.auto_update = true\nupdates.auto_update_interval_hours = 24\n"); // Helper function that runs `tldr --list` and asserts that the cache is automatically updated // or not, depending on the value of `expected`. diff --git a/tests/config.toml b/tests/style-config.toml similarity index 73% rename from tests/config.toml rename to tests/style-config.toml index 3b90d90..c68f2cc 100644 --- a/tests/config.toml +++ b/tests/style-config.toml @@ -19,11 +19,3 @@ underline = false underline = true bold = false italic = true - -[display] -use_pager = false -compact = false - -[updates] -auto_update = false -auto_update_interval_hours = 720 From dbab55a2b454b7fd0fa84f8e2cfda190d893124d Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Thu, 2 Jan 2025 23:41:09 +0100 Subject: [PATCH 311/368] Use only one test thread Otherwise the builds made by `TestEnv::command` will conflict with each other. This manifested itself on Windows with > linking with `link.exe` failed: exit code: 1104 > LINK : fatal error LNK1104: cannot open file '...' --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9274a0f..dee3fd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - name: Build with logging and webpki roots run: cargo build --features logging,webpki-roots --no-default-features - name: Run tests - run: cargo test + run: cargo test -- --test-threads 1 clippy: name: run clippy lints From 00c777812569f2fc0d1e285289106ebb1b3da5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Kafka?= <6414091+MatejKafka@users.noreply.github.com> Date: Sun, 5 Jan 2025 00:17:44 +0100 Subject: [PATCH 312/368] Resolve paths in config [directories] relative to the config directory (#395) --- src/config.rs | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/src/config.rs b/src/config.rs index 454fbf5..254b56d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -295,7 +295,7 @@ impl Config { /// /// For this, some values need to be converted to other types and some /// defaults need to be set (sometimes based on env variables). - fn from_raw(raw_config: RawConfig) -> Result { + fn from_raw(raw_config: RawConfig, relative_path_root: &Path) -> Result { let style = raw_config.style.into(); let display = raw_config.display.into(); let updates = raw_config.updates.into(); @@ -316,7 +316,9 @@ impl Config { } else if let Some(config_value) = raw_config.directories.cache_dir { // If the user explicitly configured a cache directory, use that. PathWithSource { - path: config_value, + // Resolve possible relative path. It would be nicer to clean up the path, but Rust stdlib + // does not give any method for that that does not need the paths to exist. + path: relative_path_root.join(config_value), source: PathSource::ConfigFile, } } else if let Ok(default_dir) = get_app_root(AppDataType::UserCache, &crate::APP_INFO) { @@ -333,7 +335,8 @@ impl Config { .directories .custom_pages_dir .map(|path| PathWithSource { - path, + // Resolve possible relative path. + path: relative_path_root.join(path), source: PathSource::ConfigFile, }) .or_else(|| { @@ -382,8 +385,12 @@ impl Config { RawConfig::new() }; - // Convert to config - let mut config = Self::from_raw(raw_config).context("Could not process raw config")?; + // Safe to unwrap, it's a file path, so it should have a directory component + let config_file_dir = config_file_path.parent().unwrap(); + + // Convert to config, resolve relative paths from the config file dir + let mut config = + Self::from_raw(raw_config, config_file_dir).context("Could not process raw config")?; // Potentially override styles if !enable_styles { @@ -474,3 +481,21 @@ fn test_serialize_deserialize() { let deserialized: RawConfig = toml::from_str(&serialized).unwrap(); assert_eq!(raw_config, deserialized); } + +#[test] +fn test_relative_path_resolution() { + let mut raw_config = RawConfig::new(); + raw_config.directories.cache_dir = Some("../cache".into()); + raw_config.directories.custom_pages_dir = Some("../custom_pages".into()); + + let config = Config::from_raw(raw_config, Path::new("/path/to/config")).unwrap(); + + assert_eq!( + config.directories.cache_dir.path(), + Path::new("/path/to/config/../cache") + ); + assert_eq!( + config.directories.custom_pages_dir.unwrap().path(), + Path::new("/path/to/config/../custom_pages") + ); +} From b9f116d629c2b9916991f5cd41b74cfac835b0fa Mon Sep 17 00:00:00 2001 From: Christoph Loy Date: Sun, 12 Jan 2025 11:50:32 +0100 Subject: [PATCH 313/368] Add `common` platform to CLI (#401) --- docs/src/usage.txt | 2 +- src/cache.rs | 13 ++++++------- src/main.rs | 24 +++++++++++++++++------- src/types.rs | 4 ++++ tests/lib.rs | 16 ++++++++++++++++ 5 files changed, 44 insertions(+), 15 deletions(-) diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 5129fbe..b6af6c3 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -11,7 +11,7 @@ Options: -f, --render Render a specific markdown file -p, --platform Override the operating system, can be specified multiple times in order of preference [possible values: linux, macos, sunos, windows, android, - freebsd, netbsd, openbsd] + freebsd, netbsd, openbsd, common] -L, --language Override the language -u, --update Update the local cache --no-auto-update If auto update is configured, disable it for this run diff --git a/src/cache.rs b/src/cache.rs index a4496ad..d46d29b 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -221,6 +221,7 @@ impl Cache { PlatformType::FreeBsd => "freebsd", PlatformType::NetBsd => "netbsd", PlatformType::OpenBsd => "openbsd", + PlatformType::Common => "common", } } @@ -292,9 +293,7 @@ impl Cache { } } - // Did not find platform specific results, fall back to "common" - Self::find_page_for_platform(&page_filename, &pages_dir, "common", &lang_dirs) - .map(|page| PageLookupResult::with_page(page).with_optional_patch(patch_path)) + None } /// Return the available pages. @@ -311,14 +310,14 @@ impl Cache { .collect(); // Closure that allows the WalkDir instance to traverse platform - // specific and common page directories, but not others. + // relevant page directories, but not others. let should_walk = |entry: &DirEntry| -> bool { let file_type = entry.file_type(); let Some(file_name) = entry.file_name().to_str() else { return false; }; if file_type.is_dir() { - return file_name == "common" || platform_dirs.contains(&file_name); + return platform_dirs.contains(&file_name); } else if file_type.is_file() { return true; } @@ -342,7 +341,7 @@ impl Cache { .map(str::to_string) }; - // Recursively walk through common and (if applicable) platform specific directory + // Recursively walk through platform specific directory let mut pages = WalkDir::new(platforms_dir) .min_depth(1) // Skip root directory .into_iter() @@ -365,7 +364,7 @@ impl Cache { .path() .file_name() .and_then(OsStr::to_str) - .map_or(false, |file_name| file_name.ends_with(".page.md")) + .is_some_and(|file_name| file_name.ends_with(".page.md")) }; let custom_pages = WalkDir::new(custom_pages_dir) diff --git a/src/main.rs b/src/main.rs index 5e6e739..8540705 100644 --- a/src/main.rs +++ b/src/main.rs @@ -282,11 +282,7 @@ fn main() { create_config_and_exit(enable_styles); } - let fallback_platforms: &[PlatformType] = &[PlatformType::current()]; - let platforms = args - .platforms - .as_ref() - .map_or(fallback_platforms, Vec::as_slice); + let platforms = compute_platforms(args.platforms.as_ref()); // If a local file was passed in, render it and exit if let Some(file) = args.render { @@ -332,7 +328,7 @@ fn main() { .map(PathWithSource::path); println!( "{}", - cache.list_pages(custom_pages_dir, platforms).join("\n") + cache.list_pages(custom_pages_dir, &platforms).join("\n") ); process::exit(0); } @@ -358,7 +354,7 @@ fn main() { .custom_pages_dir .as_ref() .map(PathWithSource::path), - platforms, + &platforms, ) { if let Err(ref e) = print_page(&lookup_result, args.raw, enable_styles, args.pager, &config) @@ -384,6 +380,20 @@ fn main() { } } +/// Returns the passed or default platform types and appends `PlatformType::Common` as fallback. +fn compute_platforms(platforms: Option<&Vec>) -> Vec { + match platforms { + Some(p) => { + let mut result = p.clone(); + if !result.contains(&PlatformType::Common) { + result.push(PlatformType::Common); + } + result + } + None => vec![PlatformType::current(), PlatformType::Common], + } +} + #[cfg(test)] mod test { use crate::get_languages; diff --git a/src/types.rs b/src/types.rs index 8a111a6..416d267 100644 --- a/src/types.rs +++ b/src/types.rs @@ -16,6 +16,7 @@ pub enum PlatformType { FreeBsd, NetBsd, OpenBsd, + Common, } impl fmt::Display for PlatformType { @@ -29,6 +30,7 @@ impl fmt::Display for PlatformType { Self::FreeBsd => write!(f, "FreeBSD"), Self::NetBsd => write!(f, "NetBSD"), Self::OpenBsd => write!(f, "OpenBSD"), + Self::Common => write!(f, "Common"), } } } @@ -44,6 +46,7 @@ impl clap::ValueEnum for PlatformType { Self::FreeBsd, Self::NetBsd, Self::OpenBsd, + Self::Common, ] } @@ -57,6 +60,7 @@ impl clap::ValueEnum for PlatformType { Self::FreeBsd => Some(clap::builder::PossibleValue::new("freebsd")), Self::NetBsd => Some(clap::builder::PossibleValue::new("netbsd")), Self::OpenBsd => Some(clap::builder::PossibleValue::new("openbsd")), + Self::Common => Some(clap::builder::PossibleValue::new("common")), } } } diff --git a/tests/lib.rs b/tests/lib.rs index a397285..feb82a0 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -652,6 +652,22 @@ fn test_multiple_platform_command_search_not_found() { .stderr(contains("Page `windows-only` not found in cache.")); } +#[test] +fn test_common_platform_is_used_as_fallback() { + let testenv = TestEnv::new(); + testenv.add_entry("in-common", "this command comes from common"); + + // No platform specified + testenv.command().args(["in-common"]).assert().success(); + + // Platform specified + testenv + .command() + .args(["--platform", "linux", "in-common"]) + .assert() + .success(); +} + #[test] fn test_list_flag_rendering() { let testenv = TestEnv::new().write_custom_pages_config(); From 09d44110f8be8fa175172e564d2a7145f59ef3de Mon Sep 17 00:00:00 2001 From: Christoph Loy Date: Sun, 12 Jan 2025 12:04:22 +0100 Subject: [PATCH 314/368] Add tests for osx/macos alias (#407) Co-authored-by: Niklas Mohrin --- tests/lib.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/lib.rs b/tests/lib.rs index feb82a0..63edca6 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -652,6 +652,34 @@ fn test_multiple_platform_command_search_not_found() { .stderr(contains("Page `windows-only` not found in cache.")); } +#[test] +fn test_macos_is_alias_for_osx() { + let testenv = TestEnv::new(); + testenv.add_os_entry("osx", "maconly", "this command only exists on mac"); + + testenv + .command() + .args(["--platform", "macos", "maconly"]) + .assert() + .success(); + testenv + .command() + .args(["--platform", "osx", "maconly"]) + .assert() + .success(); + + testenv + .command() + .args(["--platform", "macos", "--list"]) + .assert() + .stdout("maconly\n"); + testenv + .command() + .args(["--platform", "osx", "--list"]) + .assert() + .stdout("maconly\n"); +} + #[test] fn test_common_platform_is_used_as_fallback() { let testenv = TestEnv::new(); From 120e2a92c20c4a804f6e8b356f6f74b914c80efe Mon Sep 17 00:00:00 2001 From: Predrag Minic Date: Sun, 12 Jan 2025 03:24:02 -0800 Subject: [PATCH 315/368] Add configuration option for `archive_source` (#337) This allows for specifying a custom archive URL as an alternative approach to Custom Pages. Co-authored-by: Niklas Mohrin --- docs/src/config_updates.md | 8 ++++++++ src/cache.rs | 6 ++++-- src/config.rs | 11 ++++++++++- src/main.rs | 8 ++++---- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/docs/src/config_updates.md b/docs/src/config_updates.md index f010cc6..2678d4c 100644 --- a/docs/src/config_updates.md +++ b/docs/src/config_updates.md @@ -24,3 +24,11 @@ is set to `false`. auto_update = true auto_update_interval_hours = 24 +### archive_source + +URL for the location of the tldr pages archive. By default the pages are +fetched from the latest `tldr-pages/tldr` GitHub release. + + [updates] + archive_source = https://my-company.example.com/tldr/ + diff --git a/src/cache.rs b/src/cache.rs index d46d29b..9d27011 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -163,11 +163,13 @@ impl Cache { } /// Update the pages cache from the specified URL. - pub fn update(&self, archive_url: &str) -> Result<()> { + pub fn update(&self, archive_source: &str) -> Result<()> { self.ensure_cache_dir_exists()?; + let archive_url = format!("{}/tldr.zip", archive_source); + // First, download the compressed data - let bytes: Vec = Self::download(archive_url)?; + let bytes: Vec = Self::download(&archive_url)?; // Decompress the response body into an `Archive` let mut archive = ZipArchive::new(Cursor::new(bytes)) diff --git a/src/config.rs b/src/config.rs index 254b56d..de86817 100644 --- a/src/config.rs +++ b/src/config.rs @@ -166,12 +166,18 @@ const fn default_auto_update_interval_hours() -> u64 { DEFAULT_UPDATE_INTERVAL_HOURS } +fn default_archive_source() -> String { + "https://github.com/tldr-pages/tldr/releases/latest/download/".to_owned() +} + #[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] struct RawUpdatesConfig { #[serde(default)] pub auto_update: bool, #[serde(default = "default_auto_update_interval_hours")] pub auto_update_interval_hours: u64, + #[serde(default = "default_archive_source")] + pub archive_source: String, } impl Default for RawUpdatesConfig { @@ -179,6 +185,7 @@ impl Default for RawUpdatesConfig { Self { auto_update: false, auto_update_interval_hours: DEFAULT_UPDATE_INTERVAL_HOURS, + archive_source: default_archive_source(), } } } @@ -190,6 +197,7 @@ impl From for UpdatesConfig { auto_update_interval: Duration::from_secs( raw_updates_config.auto_update_interval_hours * 3600, ), + archive_source: raw_updates_config.archive_source, } } } @@ -252,10 +260,11 @@ pub struct DisplayConfig { pub use_pager: bool, } -#[derive(Copy, Clone, Debug, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct UpdatesConfig { pub auto_update: bool, pub auto_update_interval: Duration, + pub archive_source: String, } #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/src/main.rs b/src/main.rs index 8540705..32b693b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,7 +64,6 @@ const APP_INFO: AppInfo = AppInfo { name: NAME, author: NAME, }; -const ARCHIVE_URL: &str = "https://tldr.sh/assets/tldr.zip"; /// The cache should be updated if it was explicitly requested, /// or if an automatic update is due and allowed. @@ -136,8 +135,8 @@ fn clear_cache(cache: &Cache, quietly: bool, enable_styles: bool) { } /// Update the cache -fn update_cache(cache: &Cache, quietly: bool, enable_styles: bool) { - cache.update(ARCHIVE_URL).unwrap_or_else(|e| { +fn update_cache(cache: &Cache, archive_source: &str, quietly: bool, enable_styles: bool) { + cache.update(archive_source).unwrap_or_else(|e| { print_error(enable_styles, &e.context("Could not update cache")); process::exit(1); }); @@ -305,7 +304,8 @@ fn main() { // Cache update, pass through let cache_updated = if should_update_cache(&cache, &args, &config) { - update_cache(&cache, args.quiet, enable_styles); + let archive_source = config.updates.archive_source.as_str(); + update_cache(&cache, archive_source, args.quiet, enable_styles); true } else { false From 09ef7f534ee0d4077e8ae04f2dffcb0cc5b27622 Mon Sep 17 00:00:00 2001 From: Erick Guan <297343+erickguan@users.noreply.github.com> Date: Wed, 26 Feb 2025 00:27:44 +0100 Subject: [PATCH 316/368] Allow configuring TLS backend (#386) --- .github/workflows/ci.yml | 7 +++- Cargo.lock | 17 +++++--- Cargo.toml | 24 +++++------ docs/src/config_updates.md | 18 +++++++++ docs/src/installing.md | 2 +- src/cache.rs | 60 +++++++++++++++++++++++----- src/config.rs | 81 +++++++++++++++++++++++++++++++++++--- src/main.rs | 23 ++++++----- tests/lib.rs | 43 +++++++++++++++++++- 9 files changed, 228 insertions(+), 47 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dee3fd8..03ee177 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,11 @@ jobs: toolchain: ${{ matrix.toolchain }} - name: Build with default features run: cargo build - - name: Build with logging and webpki roots - run: cargo build --features logging,webpki-roots --no-default-features + - name: Build with logging and Rustls with webpki roots + run: cargo build --features logging,rustls-with-webpki-roots --no-default-features + - name: Build with native TLS backend + # expects runners have the proper Native SSL library + run: cargo build --features native-tls --no-default-features - name: Run tests run: cargo test -- --test-threads 1 diff --git a/Cargo.lock b/Cargo.lock index 008695c..6fcfe15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -201,6 +201,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "clap" version = "4.5.19" @@ -1153,15 +1159,16 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" dependencies = [ + "cfg_aliases", "libc", "once_cell", "socket2", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -1243,9 +1250,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64", "bytes", diff --git a/Cargo.toml b/Cargo.toml index bd0d07a..010fa08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ app_dirs = { version = "2", package = "app_dirs2" } clap = { version = "4", features = ["std", "derive", "help", "usage", "cargo", "error-context", "color", "wrap_help"], default-features = false } env_logger = { version = "0.11", optional = true } log = "0.4" -reqwest = { version = "0.12.5", features = ["blocking"], default-features = false } +reqwest = { version = "0.12.9", features = ["blocking"], default-features = false } serde = "1.0.21" serde_derive = "1.0.21" toml = "0.8.19" @@ -44,21 +44,23 @@ tempfile = "3.1.0" filetime = "0.2.10" [features] -default = ["native-roots"] +default = ["native-tls", "rustls-with-webpki-roots", "rustls-with-native-roots"] logging = ["env_logger"] -# Reqwest (the HTTP client library) can handle TLS connections in three +# Reqwest (the HTTP client library) can handle TLS connections in four # different modes: # -# - Rustls with native roots -# - Rustls with WebPK roots -# - Native TLS (SChannel on Windows, Secure Transport on macOS and OpenSSL otherwise) +# - Rustls with: +# - native roots +# - WebPK roots +# - Native TLS (SChannel on Windows, Secure Transport on macOS and OpenSSL otherwise) with: +# - native roots +# - WebPK roots (not implemented in tealdeer) # -# Exactly one of the three variants must be selected. By default, Rustls with -# native roots is enabled. -native-roots = ["reqwest/rustls-tls-native-roots"] -webpki-roots = ["reqwest/rustls-tls-webpki-roots"] -native-tls = ["reqwest/native-tls"] +# At least one of variants must be selected. By default, uses native TLS and native roots. +native-tls = ["reqwest/rustls-tls-native-roots-no-provider", "reqwest/rustls-tls-webpki-roots-no-provider", "reqwest/native-tls"] +rustls-with-webpki-roots = ["reqwest/rustls-tls-native-roots-no-provider", "reqwest/rustls-tls-webpki-roots"] +rustls-with-native-roots = ["reqwest/rustls-tls-webpki-roots-no-provider", "reqwest/rustls-tls-native-roots"] ignore-online-tests = [] diff --git a/docs/src/config_updates.md b/docs/src/config_updates.md index 2678d4c..eaac735 100644 --- a/docs/src/config_updates.md +++ b/docs/src/config_updates.md @@ -32,3 +32,21 @@ fetched from the latest `tldr-pages/tldr` GitHub release. [updates] archive_source = https://my-company.example.com/tldr/ +### `tls_backend` + +Specifies which TLS backend to use. Try changing this setting if you encounter certificate errors. + +Available options: +- `rustls-with-native-roots` - [Rustls][rustls] (a TLS library in Rust) with native roots +- `rustls-with-webpki-roots` - Rustls with [WebPKI][rustls-webpki] roots +- `native-tls` - Native TLS + - SChannel on Windows + - Secure Transport on macOS + - OpenSSL on other platforms + + [updates] + tls_backend = "native-tls" + + +[rustls]: https://github.com/rustls/rustls +[rustls-webpki]: https://github.com/rustls/webpki diff --git a/docs/src/installing.md b/docs/src/installing.md index 71c8398..39de050 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -48,7 +48,7 @@ Release build: Release build with bundled CA roots: - $ cargo build --release --no-default-features --features webpki-roots + $ cargo build --release --no-default-features --features rustls-with-webpki-roots Debug build with logging support: diff --git a/src/cache.rs b/src/cache.rs index 9d27011..a72d0e0 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -13,7 +13,7 @@ use reqwest::{blocking::Client, Proxy}; use walkdir::{DirEntry, WalkDir}; use zip::ZipArchive; -use crate::{types::PlatformType, utils::print_warning}; +use crate::{config::TlsBackend, types::PlatformType, utils::print_warning}; pub static TLDR_PAGES_DIR: &str = "tldr-pages"; static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; @@ -22,6 +22,7 @@ static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; pub struct Cache { cache_dir: PathBuf, enable_styles: bool, + tls_backend: TlsBackend, } #[derive(Debug)] @@ -86,13 +87,14 @@ pub enum CacheFreshness { } impl Cache { - pub fn new

(cache_dir: P, enable_styles: bool) -> Self + pub fn new

(cache_dir: P, enable_styles: bool, tls_backend: TlsBackend) -> Self where P: Into, { Self { cache_dir: cache_dir.into(), enable_styles, + tls_backend, } } @@ -135,9 +137,28 @@ impl Cache { self.cache_dir.join(TLDR_PAGES_DIR) } - /// Download the archive from the specified URL. - fn download(archive_url: &str) -> Result> { + fn build_client(tls_backend: TlsBackend) -> Result { let mut builder = Client::builder(); + builder = match tls_backend { + #[cfg(feature = "native-tls")] + TlsBackend::NativeTls => builder + .use_native_tls() + .tls_built_in_root_certs(true) + .tls_built_in_webpki_certs(false) + .tls_built_in_native_certs(false), + #[cfg(feature = "rustls-with-webpki-roots")] + TlsBackend::RustlsWithWebpkiRoots => builder + .use_rustls_tls() + .tls_built_in_root_certs(false) + .tls_built_in_webpki_certs(true) + .tls_built_in_native_certs(false), + #[cfg(feature = "rustls-with-native-roots")] + TlsBackend::RustlsWithNativeRoots => builder + .use_rustls_tls() + .tls_built_in_root_certs(false) + .tls_built_in_webpki_certs(false) + .tls_built_in_native_certs(true), + }; if let Ok(ref host) = env::var("HTTP_PROXY") { if let Ok(proxy) = Proxy::http(host) { builder = builder.proxy(proxy); @@ -148,9 +169,11 @@ impl Cache { builder = builder.proxy(proxy); } } - let client = builder - .build() - .context("Could not instantiate HTTP client")?; + builder.build().context("Could not instantiate HTTP client") + } + + /// Download the archive from the specified URL. + fn download(client: &Client, archive_url: &str) -> Result> { let mut resp = client .get(archive_url) .send()? @@ -166,10 +189,11 @@ impl Cache { pub fn update(&self, archive_source: &str) -> Result<()> { self.ensure_cache_dir_exists()?; - let archive_url = format!("{}/tldr.zip", archive_source); + let archive_url = format!("{archive_source}/tldr.zip"); + let client = Self::build_client(self.tls_backend)?; // First, download the compressed data - let bytes: Vec = Self::download(&archive_url)?; + let bytes: Vec = Self::download(&client, &archive_url)?; // Decompress the response body into an `Archive` let mut archive = ZipArchive::new(Cursor::new(bytes)) @@ -505,4 +529,22 @@ mod tests { assert_eq!(&buf, b"Hello\n"); } + + #[test] + #[cfg(feature = "native-tls")] + fn test_create_https_client_with_native_tls() { + Cache::build_client(TlsBackend::NativeTls).expect("fails to build a client."); + } + + #[test] + #[cfg(feature = "rustls-with-webpki-roots")] + fn test_create_https_client_with_rustls() { + Cache::build_client(TlsBackend::RustlsWithWebpkiRoots).expect("fails to build a client."); + } + + #[test] + #[cfg(feature = "rustls-with-native-roots")] + fn test_create_https_client_with_rustls_with_native_roots() { + Cache::build_client(TlsBackend::RustlsWithNativeRoots).expect("fails to build a client."); + } } diff --git a/src/config.rs b/src/config.rs index de86817..3d82eea 100644 --- a/src/config.rs +++ b/src/config.rs @@ -5,9 +5,10 @@ use std::{ time::Duration, }; -use anyhow::{bail, ensure, Context, Result}; +use anyhow::{anyhow, bail, ensure, Context, Result}; use app_dirs::{get_app_root, AppDataType}; use log::debug; +use serde::Serialize as _; use serde_derive::{Deserialize, Serialize}; use yansi::{Color, Style}; @@ -16,6 +17,14 @@ use crate::types::PathSource; pub const CONFIG_FILE_NAME: &str = "config.toml"; pub const MAX_CACHE_AGE: Duration = Duration::from_secs(2_592_000); // 30 days const DEFAULT_UPDATE_INTERVAL_HOURS: u64 = MAX_CACHE_AGE.as_secs() / 3600; // 30 days +const SUPPORTED_TLS_BACKENDS: &[RawTlsBackend] = &[ + #[cfg(feature = "native-tls")] + RawTlsBackend::NativeTls, + #[cfg(feature = "rustls-with-webpki-roots")] + RawTlsBackend::RustlsWithWebpkiRoots, + #[cfg(feature = "rustls-with-native-roots")] + RawTlsBackend::RustlsWithNativeRoots, +]; fn default_underline() -> bool { false @@ -178,6 +187,8 @@ struct RawUpdatesConfig { pub auto_update_interval_hours: u64, #[serde(default = "default_archive_source")] pub archive_source: String, + #[serde(default)] + pub tls_backend: RawTlsBackend, } impl Default for RawUpdatesConfig { @@ -186,19 +197,39 @@ impl Default for RawUpdatesConfig { auto_update: false, auto_update_interval_hours: DEFAULT_UPDATE_INTERVAL_HOURS, archive_source: default_archive_source(), + tls_backend: RawTlsBackend::default(), } } } -impl From for UpdatesConfig { - fn from(raw_updates_config: RawUpdatesConfig) -> Self { - Self { +impl TryFrom for UpdatesConfig { + type Error = anyhow::Error; + + fn try_from(raw_updates_config: RawUpdatesConfig) -> Result { + let tls_backend = match raw_updates_config.tls_backend { + #[cfg(feature = "native-tls")] + RawTlsBackend::NativeTls => TlsBackend::NativeTls, + #[cfg(feature = "rustls-with-webpki-roots")] + RawTlsBackend::RustlsWithWebpkiRoots => TlsBackend::RustlsWithWebpkiRoots, + #[cfg(feature = "rustls-with-native-roots")] + RawTlsBackend::RustlsWithNativeRoots => TlsBackend::RustlsWithNativeRoots, + // when compiling without all TLS backend features, we want to handle config error. + #[allow(unreachable_patterns)] + _ => return Err(anyhow!( + "Unsupported TLS backend: {}. This tealdeer build has support for the following options: {}", + raw_updates_config.tls_backend, + SUPPORTED_TLS_BACKENDS.iter().map(std::string::ToString::to_string).collect::>().join(", ") + )) + }; + + Ok(Self { auto_update: raw_updates_config.auto_update, auto_update_interval: Duration::from_secs( raw_updates_config.auto_update_interval_hours * 3600, ), archive_source: raw_updates_config.archive_source, - } + tls_backend, + }) } } @@ -265,6 +296,7 @@ pub struct UpdatesConfig { pub auto_update: bool, pub auto_update_interval: Duration, pub archive_source: String, + pub tls_backend: TlsBackend, } #[derive(Clone, Debug, PartialEq, Eq)] @@ -291,6 +323,43 @@ pub struct DirectoriesConfig { pub custom_pages_dir: Option, } +#[derive(Copy, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] +#[serde(rename_all = "kebab-case")] +pub enum RawTlsBackend { + /// Native TLS (`SChannel` on Windows, Secure Transport on macOS and OpenSSL otherwise) + NativeTls, + /// Rustls with `WebPKI` roots. + RustlsWithWebpkiRoots, + /// Rustls with native roots. + RustlsWithNativeRoots, +} + +impl Default for RawTlsBackend { + fn default() -> Self { + *SUPPORTED_TLS_BACKENDS.first().unwrap() + } +} + +impl std::fmt::Display for RawTlsBackend { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + self.serialize(f) + } +} + +/// Allows choosing a `reqwest`'s TLS backend. Available TLS backends: +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +pub enum TlsBackend { + /// Native TLS (`SChannel` on Windows, Secure Transport on macOS and OpenSSL otherwise) + #[cfg(feature = "native-tls")] + NativeTls, + /// Rustls with `WebPKI` roots. + #[cfg(feature = "rustls-with-webpki-roots")] + RustlsWithWebpkiRoots, + /// Rustls with native roots. + #[cfg(feature = "rustls-with-native-roots")] + RustlsWithNativeRoots, +} + #[derive(Clone, Debug, PartialEq, Eq)] pub struct Config { pub style: StyleConfig, @@ -307,7 +376,7 @@ impl Config { fn from_raw(raw_config: RawConfig, relative_path_root: &Path) -> Result { let style = raw_config.style.into(); let display = raw_config.display.into(); - let updates = raw_config.updates.into(); + let updates = raw_config.updates.try_into()?; // Determine directories config. For this, we need to take some // additional factory into account, like env variables, or the diff --git a/src/main.rs b/src/main.rs index 32b693b..a16f386 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,18 +16,13 @@ #![allow(clippy::struct_excessive_bools)] #![allow(clippy::too_many_lines)] -#[cfg(any( - all(feature = "native-roots", feature = "webpki-roots"), - all(feature = "native-roots", feature = "native-tls"), - all(feature = "webpki-roots", feature = "native-tls"), - not(any( - feature = "native-roots", - feature = "webpki-roots", - feature = "native-tls" - )), -))] +#[cfg(not(any( + feature = "native-tls", + feature = "rustls-with-webpki-roots", + feature = "rustls-with-native-roots", +)))] compile_error!( - "exactly one of the features \"native-roots\", \"webpki-roots\" or \"native-tls\" must be enabled" + "at least one of the features \"native-tls\", \"rustls-with-webpki-roots\" or \"rustls-with-native-roots\" must be enabled" ); use std::{ @@ -295,7 +290,11 @@ fn main() { } // Instantiate cache. This will not yet create the cache directory! - let cache = Cache::new(&config.directories.cache_dir.path, enable_styles); + let cache = Cache::new( + &config.directories.cache_dir.path, + enable_styles, + config.updates.tls_backend, + ); // Clear cache, pass through if args.clear_cache { diff --git a/tests/lib.rs b/tests/lib.rs index 63edca6..606424e 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -220,7 +220,31 @@ fn test_update_cache_default_features() { fn test_update_cache_rustls_webpki() { let testenv = TestEnv::new() .no_default_features() - .with_feature("webpki-roots"); + .with_feature("rustls-with-webpki-roots"); + + testenv + .command() + .args(["sl"]) + .assert() + .failure() + .stderr(contains("Page cache not found. Please run `tldr --update`")); + + testenv + .command() + .args(["--update"]) + .assert() + .success() + .stderr(contains("Successfully updated cache.")); + + testenv.command().args(["sl"]).assert().success(); +} + +#[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] +#[test] +fn test_update_cache_native_tls() { + let testenv = TestEnv::new() + .no_default_features() + .with_feature("rustls-with-native-roots"); testenv .command() @@ -258,6 +282,23 @@ fn test_quiet_cache() { .stdout(is_empty()); } +#[test] +fn test_warn_invalid_tls_backend() { + let testenv = TestEnv::new() + .no_default_features() + .with_feature("rustls-with-webpki-roots") + .remove_initial_config(); + + testenv.append_to_config("updates.tls_backend = 'invalid-tls-backend'\n"); + + testenv + .command() + .args(["sl"]) + .assert() + .failure() + .stderr(contains("unknown variant `invalid-tls-backend`, expected one of `native-tls`, `rustls-with-webpki-roots`, `rustls-with-native-roots`")); +} + #[test] fn test_quiet_failures() { let testenv = TestEnv::new().install_default_cache(); From 55f401df30849f88183cb9379999e56e05f3eeda Mon Sep 17 00:00:00 2001 From: lyj Date: Thu, 27 Feb 2025 05:03:18 +0800 Subject: [PATCH 317/368] Add args: `--edit-page` and `--edit-patch` (#388) Fix https://github.com/tealdeer-rs/tealdeer/issues/383 Co-authored-by: Niklas Mohrin --- docs/src/usage.txt | 2 ++ src/cli.rs | 8 ++++++ src/main.rs | 68 ++++++++++++++++++++++++++++++++++++++-------- tests/lib.rs | 64 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 130 insertions(+), 12 deletions(-) diff --git a/docs/src/usage.txt b/docs/src/usage.txt index b6af6c3..846ff8c 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -8,6 +8,8 @@ Arguments: Options: -l, --list List all commands in the cache + --edit-page Edit custom page with `EDITOR` + --edit-patch Edit custom patch with `EDITOR` -f, --render Render a specific markdown file -p, --platform Override the operating system, can be specified multiple times in order of preference [possible values: linux, macos, sunos, windows, android, diff --git a/src/cli.rs b/src/cli.rs index e671507..0ba9de9 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -32,6 +32,14 @@ pub(crate) struct Cli { #[arg(short = 'l', long = "list")] pub list: bool, + /// Edit custom page with `EDITOR` + #[arg(long, requires = "command")] + pub edit_page: bool, + + /// Edit custom patch with `EDITOR` + #[arg(long, requires = "command", conflicts_with = "edit_page")] + pub edit_patch: bool, + /// Render a specific markdown file #[arg( short = 'f', diff --git a/src/main.rs b/src/main.rs index a16f386..74ab3d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,10 +27,15 @@ compile_error!( use std::{ env, + fs::create_dir_all, io::{self, IsTerminal}, + path::Path, process, + process::Command, }; +use anyhow::anyhow; +use anyhow::Context; use app_dirs::AppInfo; use clap::Parser; @@ -235,6 +240,27 @@ fn get_languages_from_env() -> Vec { ) } +fn spawn_editor(custom_pages_dir: &Path, file_name: &str) -> anyhow::Result<()> { + create_dir_all(custom_pages_dir).context("Failed to create custom pages directory")?; + + let custom_page_path = custom_pages_dir.join(file_name); + let Some(custom_page_path) = custom_page_path.to_str() else { + return Err(anyhow!("`custom_page_path.to_str()` failed")); + }; + let Ok(editor) = env::var("EDITOR") else { + return Err(anyhow!( + "To edit a custom page, please set the `EDITOR` environment variable." + )); + }; + println!("Editing {custom_page_path:?}"); + + let status = Command::new(&editor).arg(custom_page_path).status()?; + if !status.success() { + return Err(anyhow!("{editor} exit with code {:?}", status.code())); + } + Ok(()) +} + fn main() { // Initialize logger init_log(); @@ -266,6 +292,34 @@ fn main() { } }; + let custom_pages_dir = config + .directories + .custom_pages_dir + .as_ref() + .map(PathWithSource::path); + + // Note: According to the TLDR client spec, page names must be transparently + // lowercased before lookup: + // https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md#page-names + let command = args.command.join("-").to_lowercase(); + + if args.edit_patch || args.edit_page { + let file_name = if args.edit_patch { + format!("{command}.patch.md") + } else { + format!("{command}.page.md") + }; + + custom_pages_dir + .context("To edit custom pages/patches, please specify a custom pages directory.") + .and_then(|custom_pages_dir| spawn_editor(custom_pages_dir, &file_name)) + .unwrap_or_else(|err| { + print_error(enable_styles, &err); + process::exit(1); + }); + return; + } + // Show various paths if args.show_paths { show_paths(&config); @@ -312,7 +366,7 @@ fn main() { // Check cache presence and freshness if !cache_updated - && (args.list || !args.command.is_empty()) + && (args.list || !command.is_empty()) && check_cache(&cache, &args, enable_styles) == CheckCacheResult::CacheMissing { process::exit(1); @@ -320,11 +374,6 @@ fn main() { // List cached commands and exit if args.list { - let custom_pages_dir = config - .directories - .custom_pages_dir - .as_ref() - .map(PathWithSource::path); println!( "{}", cache.list_pages(custom_pages_dir, &platforms).join("\n") @@ -333,12 +382,7 @@ fn main() { } // Show command from cache - if !args.command.is_empty() { - // Note: According to the TLDR client spec, page names must be transparently - // lowercased before lookup: - // https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md#page-names - let command = args.command.join("-").to_lowercase(); - + if !command.is_empty() { // Collect languages let languages = args .language diff --git a/tests/lib.rs b/tests/lib.rs index 606424e..d229286 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -1031,3 +1031,67 @@ fn test_raw_render_file() { .success() .stdout(diff(include_str!("cache/pages/common/inkscape-v1.md"))); } + +fn touch_custom_page(testenv: &TestEnv) { + let args = vec!["--edit-page", "foo"]; + + testenv + .command() + .args(&args) + .env("EDITOR", "touch") + .assert() + .success(); + assert!(testenv.custom_pages_dir.path().join("foo.page.md").exists()); +} + +fn touch_custom_patch(testenv: &TestEnv) { + let args = vec!["--edit-patch", "foo"]; + + testenv + .command() + .args(&args) + .env("EDITOR", "touch") + .assert() + .success(); + assert!(testenv + .custom_pages_dir + .path() + .join("foo.patch.md") + .exists()); +} + +#[test] +fn test_edit_page() { + let testenv = TestEnv::new().write_custom_pages_config(); + touch_custom_page(&testenv); +} + +#[test] +fn test_edit_patch() { + let testenv = TestEnv::new().write_custom_pages_config(); + touch_custom_patch(&testenv); +} + +#[test] +fn test_recreate_dir() { + let testenv = TestEnv::new().write_custom_pages_config(); + touch_custom_patch(&testenv); + touch_custom_page(&testenv); +} + +#[test] +fn test_custom_pages_dir_is_not_dir() { + let testenv = TestEnv::new().write_custom_pages_config(); + let _ = std::fs::remove_dir_all(testenv.custom_pages_dir.path()); + let _ = File::create(testenv.custom_pages_dir.path()).unwrap(); + assert!(testenv.custom_pages_dir.path().is_file()); + + let args = vec!["--edit-patch", "foo"]; + + testenv + .command() + .args(&args) + .env("EDITOR", "touch") + .assert() + .failure(); +} From 009af7063f2c8fc2b72fba02cbca5cd2bf12ad37 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Wed, 26 Feb 2025 23:04:41 +0100 Subject: [PATCH 318/368] Move most of `main` to `try_main` (#400) Currently, `main` uses `print_error` and `process::exit` in several places. These could be unified by propagating errors via `Result`s. There is one place left that manually calls `print_error`, because the error should be followed by help instructions printed without any highlighting. --- src/main.rs | 131 +++++++++++++++++++++------------------------------- 1 file changed, 52 insertions(+), 79 deletions(-) diff --git a/src/main.rs b/src/main.rs index 74ab3d3..cfd00db 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,12 +30,10 @@ use std::{ fs::create_dir_all, io::{self, IsTerminal}, path::Path, - process, - process::Command, + process::{Command, ExitCode}, }; -use anyhow::anyhow; -use anyhow::Context; +use anyhow::{anyhow, Context, Result}; use app_dirs::AppInfo; use clap::Parser; @@ -119,11 +117,8 @@ fn check_cache(cache: &Cache, args: &Cli, enable_styles: bool) -> CheckCacheResu } /// Clear the cache -fn clear_cache(cache: &Cache, quietly: bool, enable_styles: bool) { - let cache_dir_found = cache.clear().unwrap_or_else(|e| { - print_error(enable_styles, &e.context("Could not clear cache")); - process::exit(1); - }); +fn clear_cache(cache: &Cache, quietly: bool) -> Result<()> { + let cache_dir_found = cache.clear().context("Could not clear cache")?; if !quietly { let cache_dir = cache.cache_dir().display(); if cache_dir_found { @@ -132,17 +127,18 @@ fn clear_cache(cache: &Cache, quietly: bool, enable_styles: bool) { eprintln!("Cache directory not found at `{cache_dir}`, nothing to do."); } } + Ok(()) } /// Update the cache -fn update_cache(cache: &Cache, archive_source: &str, quietly: bool, enable_styles: bool) { - cache.update(archive_source).unwrap_or_else(|e| { - print_error(enable_styles, &e.context("Could not update cache")); - process::exit(1); - }); +fn update_cache(cache: &Cache, archive_source: &str, quietly: bool) -> Result<()> { + cache + .update(archive_source) + .context("Could not update cache")?; if !quietly { eprintln!("Successfully updated cache."); } + Ok(()) } /// Show file paths @@ -179,21 +175,13 @@ fn show_paths(config: &Config) { println!("Custom pages dir: {custom_pages_dir}"); } -/// Create seed config file and exit -fn create_config_and_exit(enable_styles: bool) { - match make_default_config() { - Ok(config_file_path) => { - eprintln!( - "Successfully created seed config file here: {}", - config_file_path.to_str().unwrap() - ); - process::exit(0); - } - Err(e) => { - print_error(enable_styles, &e.context("Could not create seed config")); - process::exit(1); - } - } +fn create_config() -> Result<()> { + let config_file_path = make_default_config().context("Could not create seed config")?; + eprintln!( + "Successfully created seed config file here: {}", + config_file_path.to_str().unwrap() + ); + Ok(()) } #[cfg(feature = "logging")] @@ -240,7 +228,7 @@ fn get_languages_from_env() -> Vec { ) } -fn spawn_editor(custom_pages_dir: &Path, file_name: &str) -> anyhow::Result<()> { +fn spawn_editor(custom_pages_dir: &Path, file_name: &str) -> Result<()> { create_dir_all(custom_pages_dir).context("Failed to create custom pages directory")?; let custom_page_path = custom_pages_dir.join(file_name); @@ -261,7 +249,7 @@ fn spawn_editor(custom_pages_dir: &Path, file_name: &str) -> anyhow::Result<()> Ok(()) } -fn main() { +fn main() -> ExitCode { // Initialize logger init_log(); @@ -283,14 +271,15 @@ fn main() { ColorOptions::Never => false, }; + try_main(args, enable_styles).unwrap_or_else(|error| { + print_error(enable_styles, &error); + ExitCode::FAILURE + }) +} + +fn try_main(args: Cli, enable_styles: bool) -> Result { // Look up config file, if none is found fall back to default config. - let config = match Config::load(enable_styles) { - Ok(config) => config, - Err(e) => { - print_error(enable_styles, &e.context("Could not load config")); - process::exit(1); - } - }; + let config = Config::load(enable_styles).context("Could not load config")?; let custom_pages_dir = config .directories @@ -312,12 +301,9 @@ fn main() { custom_pages_dir .context("To edit custom pages/patches, please specify a custom pages directory.") - .and_then(|custom_pages_dir| spawn_editor(custom_pages_dir, &file_name)) - .unwrap_or_else(|err| { - print_error(enable_styles, &err); - process::exit(1); - }); - return; + .and_then(|custom_pages_dir| spawn_editor(custom_pages_dir, &file_name))?; + + return Ok(ExitCode::SUCCESS); } // Show various paths @@ -327,7 +313,8 @@ fn main() { // Create a basic config and exit if args.seed_config { - create_config_and_exit(enable_styles); + create_config()?; + return Ok(ExitCode::SUCCESS); } let platforms = compute_platforms(args.platforms.as_ref()); @@ -335,12 +322,8 @@ fn main() { // If a local file was passed in, render it and exit if let Some(file) = args.render { let path = PageLookupResult::with_page(file); - if let Err(ref e) = print_page(&path, args.raw, enable_styles, args.pager, &config) { - print_error(enable_styles, e); - process::exit(1); - } else { - process::exit(0); - }; + print_page(&path, args.raw, enable_styles, args.pager, &config)?; + return Ok(ExitCode::SUCCESS); } // Instantiate cache. This will not yet create the cache directory! @@ -352,25 +335,17 @@ fn main() { // Clear cache, pass through if args.clear_cache { - clear_cache(&cache, args.quiet, enable_styles); + clear_cache(&cache, args.quiet)?; } - // Cache update, pass through - let cache_updated = if should_update_cache(&cache, &args, &config) { - let archive_source = config.updates.archive_source.as_str(); - update_cache(&cache, archive_source, args.quiet, enable_styles); - true - } else { - false - }; - - // Check cache presence and freshness - if !cache_updated - && (args.list || !command.is_empty()) + if should_update_cache(&cache, &args, &config) { + update_cache(&cache, &config.updates.archive_source, args.quiet)?; + } else if (args.list || !args.command.is_empty()) && check_cache(&cache, &args, enable_styles) == CheckCacheResult::CacheMissing { - process::exit(1); - } + // Cache is needed, but missing + return Ok(ExitCode::FAILURE); + }; // List cached commands and exit if args.list { @@ -378,7 +353,8 @@ fn main() { "{}", cache.list_pages(custom_pages_dir, &platforms).join("\n") ); - process::exit(0); + + return Ok(ExitCode::SUCCESS); } // Show command from cache @@ -389,7 +365,7 @@ fn main() { .map_or_else(get_languages_from_env, |lang| vec![lang]); // Search for command in cache - if let Some(lookup_result) = cache.find_page( + let Some(lookup_result) = cache.find_page( &command, &languages, config @@ -398,15 +374,7 @@ fn main() { .as_ref() .map(PathWithSource::path), &platforms, - ) { - if let Err(ref e) = - print_page(&lookup_result, args.raw, enable_styles, args.pager, &config) - { - print_error(enable_styles, e); - process::exit(1); - } - process::exit(0); - } else { + ) else { if !args.quiet { print_warning( enable_styles, @@ -418,9 +386,14 @@ fn main() { ), ); } - process::exit(1); - } + + return Ok(ExitCode::FAILURE); + }; + + print_page(&lookup_result, args.raw, enable_styles, args.pager, &config)?; } + + Ok(ExitCode::SUCCESS) } /// Returns the passed or default platform types and appends `PlatformType::Common` as fallback. From c6de583c46c8cbd10fab570785ea1c05773876fe Mon Sep 17 00:00:00 2001 From: Nachiket Kanore <44920607+nachiketkanore@users.noreply.github.com> Date: Sun, 2 Mar 2025 16:33:09 +0530 Subject: [PATCH 319/368] Only create a single temporary directory in integration tests (#411) --- tests/lib.rs | 115 ++++++++++++++++++++++----------------------------- 1 file changed, 50 insertions(+), 65 deletions(-) diff --git a/tests/lib.rs b/tests/lib.rs index d229286..420eb08 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -18,52 +18,60 @@ use tempfile::{Builder as TempfileBuilder, TempDir}; pub static TLDR_PAGES_DIR: &str = "tldr-pages"; struct TestEnv { - pub cache_dir: TempDir, - pub custom_pages_dir: TempDir, - pub config_dir: TempDir, + _test_dir: TempDir, pub default_features: bool, pub features: Vec, } impl TestEnv { fn new() -> Self { + let test_dir: TempDir = TempfileBuilder::new() + .prefix(".tldr.test") + .tempdir() + .unwrap(); + let this = TestEnv { - cache_dir: TempfileBuilder::new() - .prefix(".tldr.test.cache") - .tempdir() - .unwrap(), - config_dir: TempfileBuilder::new() - .prefix(".tldr.test.conf") - .tempdir() - .unwrap(), - custom_pages_dir: TempfileBuilder::new() - .prefix(".tldr.test.custom-pages") - .tempdir() - .unwrap(), + _test_dir: test_dir, default_features: true, features: vec![], }; + create_dir_all(&this.cache_dir()).unwrap(); + create_dir_all(&this.config_dir()).unwrap(); + create_dir_all(&this.custom_pages_dir()).unwrap(); + this.append_to_config(format!( "directories.cache_dir = '{}'\n", - this.cache_dir.path().to_str().unwrap(), + this.cache_dir().to_str().unwrap(), )); this } + fn cache_dir(&self) -> PathBuf { + self._test_dir.path().join(".cache") + } + + fn config_dir(&self) -> PathBuf { + self._test_dir.path().join(".config") + } + + fn custom_pages_dir(&self) -> PathBuf { + self._test_dir.path().join(".custom_pages") + } + fn append_to_config(&self, content: impl AsRef) { File::options() .create(true) .append(true) - .open(self.config_dir.path().join("config.toml")) + .open(self.config_dir().join("config.toml")) .expect("Failed to open config file") .write_all(content.as_ref().as_bytes()) .expect("Failed to append to config file."); } fn remove_initial_config(self) -> Self { - let _ = fs::remove_file(self.config_dir.path().join("config.toml")); + let _ = fs::remove_file(self.config_dir().join("config.toml")); self } @@ -74,12 +82,7 @@ impl TestEnv { /// Add entry for that environment to an OS-specific subfolder. fn add_os_entry(&self, os: &str, name: &str, contents: &str) { - let dir = self - .cache_dir - .path() - .join(TLDR_PAGES_DIR) - .join("pages") - .join(os); + let dir = self.cache_dir().join(TLDR_PAGES_DIR).join("pages").join(os); create_dir_all(&dir).unwrap(); fs::write(dir.join(format!("{name}.md")), contents.as_bytes()).unwrap(); @@ -87,14 +90,14 @@ impl TestEnv { /// Add custom patch entry to the custom_pages_dir fn add_page_entry(&self, name: &str, contents: &str) { - let dir = self.custom_pages_dir.path(); + let dir = &self.custom_pages_dir(); create_dir_all(dir).unwrap(); fs::write(dir.join(format!("{name}.page.md")), contents.as_bytes()).unwrap(); } /// Add custom patch entry to the custom_pages_dir fn add_patch_entry(&self, name: &str, contents: &str) { - let dir = self.custom_pages_dir.path(); + let dir = &self.custom_pages_dir(); create_dir_all(dir).unwrap(); fs::write(dir.join(format!("{name}.patch.md")), contents.as_bytes()).unwrap(); } @@ -126,17 +129,14 @@ impl TestEnv { } let run = build.run().expect("Failed to build tealdeer for testing"); let mut cmd = run.command(); - cmd.env( - "TEALDEER_CONFIG_DIR", - self.config_dir.path().to_str().unwrap(), - ); + cmd.env("TEALDEER_CONFIG_DIR", self.config_dir().to_str().unwrap()); cmd } fn install_default_cache(self) -> Self { copy_recursively( &PathBuf::from_iter([env!("CARGO_MANIFEST_DIR"), "tests", "cache"]), - &self.cache_dir.path().join(TLDR_PAGES_DIR), + &self.cache_dir().join(TLDR_PAGES_DIR), ) .expect("Failed to copy the cache to the test environment"); @@ -146,7 +146,7 @@ impl TestEnv { fn install_default_custom_pages(self) -> Self { copy_recursively( &PathBuf::from_iter([env!("CARGO_MANIFEST_DIR"), "tests", "custom-pages"]), - self.custom_pages_dir.path(), + self.custom_pages_dir().as_path(), ) .expect("Failed to copy the custom pages to the test environment"); @@ -156,7 +156,7 @@ impl TestEnv { fn write_custom_pages_config(self) -> Self { self.append_to_config(format!( "directories.custom_pages_dir = '{}'\n", - self.custom_pages_dir.path().to_str().unwrap() + self.custom_pages_dir().to_str().unwrap() )); self @@ -316,7 +316,7 @@ fn test_quiet_old_cache() { let testenv = TestEnv::new().install_default_cache(); filetime::set_file_mtime( - testenv.cache_dir.path().join(TLDR_PAGES_DIR), + testenv.cache_dir().join(TLDR_PAGES_DIR), filetime::FileTime::from_unix_time(1, 0), ) .unwrap(); @@ -340,7 +340,7 @@ fn test_quiet_old_cache() { #[test] fn test_create_cache_directory_path() { let testenv = TestEnv::new().remove_initial_config(); - let cache_dir = testenv.cache_dir.path(); + let cache_dir = &testenv.cache_dir(); let internal_cache_dir = cache_dir.join("internal"); testenv.append_to_config(format!( "directories.cache_dir = '{}'\n", @@ -368,7 +368,7 @@ fn test_create_cache_directory_path() { #[test] fn test_cache_location_not_a_directory() { let testenv = TestEnv::new().remove_initial_config(); - let cache_dir = testenv.cache_dir.path(); + let cache_dir = &testenv.cache_dir(); let internal_file = cache_dir.join("internal"); File::create(&internal_file).unwrap(); @@ -391,7 +391,7 @@ fn test_cache_location_not_a_directory() { #[test] fn test_cache_location_source() { let testenv = TestEnv::new().remove_initial_config(); - let default_cache_dir = testenv.cache_dir.path(); + let default_cache_dir = &testenv.cache_dir(); let tmp_cache_dir = TempfileBuilder::new() .prefix(".tldr.test.cache_dir") .tempdir() @@ -447,7 +447,7 @@ fn test_setup_seed_config() { .success() .stderr(contains("Successfully created seed config file here")); - assert!(testenv.config_dir.path().join("config.toml").is_file()); + assert!(testenv.config_dir().join("config.toml").is_file()); } #[test] @@ -462,29 +462,19 @@ fn test_show_paths() { .success() .stdout(contains(format!( "Config dir: {}", - testenv.config_dir.path().to_str().unwrap(), + testenv.config_dir().to_str().unwrap(), ))) .stdout(contains(format!( "Config path: {}", - testenv - .config_dir - .path() - .join("config.toml") - .to_str() - .unwrap(), + testenv.config_dir().join("config.toml").to_str().unwrap(), ))) .stdout(contains(format!( "Cache dir: {}", - testenv.cache_dir.path().to_str().unwrap(), + testenv.cache_dir().to_str().unwrap(), ))) .stdout(contains(format!( "Pages dir: {}", - testenv - .cache_dir - .path() - .join(TLDR_PAGES_DIR) - .to_str() - .unwrap(), + testenv.cache_dir().join(TLDR_PAGES_DIR).to_str().unwrap(), ))); let testenv = testenv.write_custom_pages_config(); @@ -497,7 +487,7 @@ fn test_show_paths() { .success() .stdout(contains(format!( "Custom pages dir: {}", - testenv.custom_pages_dir.path().to_str().unwrap(), + testenv.custom_pages_dir().to_str().unwrap(), ))); } @@ -853,7 +843,7 @@ fn test_autoupdate_cache() { .failure() .stderr(contains("Page cache not found. Please run `tldr --update`")); - let cache_file_path = testenv.cache_dir.path().join(TLDR_PAGES_DIR); + let cache_file_path = testenv.cache_dir().join(TLDR_PAGES_DIR); testenv .append_to_config("updates.auto_update = true\nupdates.auto_update_interval_hours = 24\n"); @@ -1006,8 +996,7 @@ fn test_raw_render_file() { let testenv = TestEnv::new().install_default_cache(); let path = testenv - .cache_dir - .path() + .cache_dir() .join(TLDR_PAGES_DIR) .join("pages/common/inkscape-v1.md"); let mut args = vec!["--color", "never", "-f", &path.to_str().unwrap()]; @@ -1041,7 +1030,7 @@ fn touch_custom_page(testenv: &TestEnv) { .env("EDITOR", "touch") .assert() .success(); - assert!(testenv.custom_pages_dir.path().join("foo.page.md").exists()); + assert!(testenv.custom_pages_dir().join("foo.page.md").exists()); } fn touch_custom_patch(testenv: &TestEnv) { @@ -1053,11 +1042,7 @@ fn touch_custom_patch(testenv: &TestEnv) { .env("EDITOR", "touch") .assert() .success(); - assert!(testenv - .custom_pages_dir - .path() - .join("foo.patch.md") - .exists()); + assert!(testenv.custom_pages_dir().join("foo.patch.md").exists()); } #[test] @@ -1082,9 +1067,9 @@ fn test_recreate_dir() { #[test] fn test_custom_pages_dir_is_not_dir() { let testenv = TestEnv::new().write_custom_pages_config(); - let _ = std::fs::remove_dir_all(testenv.custom_pages_dir.path()); - let _ = File::create(testenv.custom_pages_dir.path()).unwrap(); - assert!(testenv.custom_pages_dir.path().is_file()); + let _ = std::fs::remove_dir_all(testenv.custom_pages_dir()); + let _ = File::create(testenv.custom_pages_dir()).unwrap(); + assert!(testenv.custom_pages_dir().is_file()); let args = vec!["--edit-patch", "foo"]; From 3d8d488f66f23e202d8afc67181f237cabaaf50f Mon Sep 17 00:00:00 2001 From: Erick Guan <297343+erickguan@users.noreply.github.com> Date: Sun, 9 Mar 2025 22:06:47 +0100 Subject: [PATCH 320/368] Replace reqwest with ureq (#417) ureq is a blocking HTTP client. ureq is simpler than reqwest. This brings: - smaller binary size - cleaner configuration interfaces --- Cargo.lock | 1093 +++++++------------------------------------------- Cargo.toml | 20 +- src/cache.rs | 88 ++-- 3 files changed, 186 insertions(+), 1015 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6fcfe15..317311a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "addr2line" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.0" @@ -87,7 +78,7 @@ version = "2.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7e7b35733e3a8c1ccb90385088dd5b6eaa61325cb4d1ad56e683b5224ff352e" dependencies = [ - "jni", + "jni 0.21.1", "ndk-context", "winapi", "xdg", @@ -124,27 +115,18 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - [[package]] name = "base64" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "bitflags" version = "2.6.0" @@ -168,12 +150,6 @@ version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - [[package]] name = "bytes" version = "1.7.2" @@ -201,12 +177,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - [[package]] name = "clap" version = "4.5.19" @@ -294,6 +264,16 @@ version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "pem-rfc7468", + "zeroize", +] + [[package]] name = "derive_arbitrary" version = "1.3.2" @@ -458,65 +438,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - [[package]] name = "getrandom" version = "0.2.15" @@ -528,12 +449,6 @@ dependencies = [ "wasi", ] -[[package]] -name = "gimli" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" - [[package]] name = "hashbrown" version = "0.15.2" @@ -546,12 +461,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "http" version = "1.1.0" @@ -563,29 +472,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", -] - [[package]] name = "httparse" version = "1.9.5" @@ -598,218 +484,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "hyper" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" -dependencies = [ - "futures-util", - "http", - "hyper", - "hyper-util", - "rustls", - "rustls-native-certs", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tower-service", - "webpki-roots", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", -] - -[[package]] -name = "icu_collections" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - -[[package]] -name = "icu_normalizer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" - -[[package]] -name = "icu_properties" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" - -[[package]] -name = "icu_provider" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "idna" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - [[package]] name = "indexmap" version = "2.6.0" @@ -820,12 +494,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "ipnet" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" - [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -838,6 +506,20 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jni" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +dependencies = [ + "cesu8", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", +] + [[package]] name = "jni" version = "0.21.1" @@ -860,15 +542,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" -[[package]] -name = "js-sys" -version = "0.3.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" -dependencies = [ - "wasm-bindgen", -] - [[package]] name = "libc" version = "0.2.169" @@ -892,12 +565,6 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" -[[package]] -name = "litemap" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" - [[package]] name = "lockfree-object-pool" version = "0.1.6" @@ -906,9 +573,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.22" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" [[package]] name = "memchr" @@ -916,12 +583,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -931,23 +592,11 @@ dependencies = [ "adler2", ] -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi", - "libc", - "wasi", - "windows-sys 0.52.0", -] - [[package]] name = "native-tls" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c" dependencies = [ "libc", "log", @@ -972,6 +621,25 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -981,15 +649,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "object" -version = "0.36.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" -dependencies = [ - "memchr", -] - [[package]] name = "once_cell" version = "1.20.2" @@ -998,9 +657,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ "bitflags", "cfg-if", @@ -1024,15 +683,15 @@ dependencies = [ [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" dependencies = [ "cc", "libc", @@ -1050,39 +709,27 @@ dependencies = [ "libc", ] +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[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.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - [[package]] name = "predicates" version = "3.1.2" @@ -1122,55 +769,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "quinn" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" -dependencies = [ - "bytes", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "socket2", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "quinn-proto" -version = "0.11.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" -dependencies = [ - "bytes", - "rand", - "ring", - "rustc-hash", - "rustls", - "slab", - "thiserror", - "tinyvec", - "tracing", -] - -[[package]] -name = "quinn-udp" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" -dependencies = [ - "cfg_aliases", - "libc", - "once_cell", - "socket2", - "tracing", - "windows-sys 0.52.0", -] - [[package]] name = "quote" version = "1.0.37" @@ -1180,36 +778,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - [[package]] name = "redox_syscall" version = "0.5.7" @@ -1248,53 +816,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -[[package]] -name = "reqwest" -version = "0.12.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" -dependencies = [ - "base64", - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-tls", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-native-certs", - "rustls-pemfile", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-native-tls", - "tokio-rustls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "windows-registry", -] - [[package]] name = "ring" version = "0.17.8" @@ -1310,18 +831,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" - [[package]] name = "rustix" version = "0.38.37" @@ -1337,10 +846,11 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.20" +version = "0.23.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" dependencies = [ + "log", "once_cell", "ring", "rustls-pki-types", @@ -1351,9 +861,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -1373,9 +883,36 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" + +[[package]] +name = "rustls-platform-verifier" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afbb878bdfdf63a336a5e63561b1835e7a8c91524f51621db870169eac84b490" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni 0.19.0", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-roots", + "winapi", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" @@ -1405,9 +942,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.24" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -1422,14 +959,15 @@ dependencies = [ "core-foundation", "core-foundation-sys", "libc", + "num-bigint", "security-framework-sys", ] [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -1476,18 +1014,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - [[package]] name = "shlex" version = "1.3.0" @@ -1500,43 +1026,12 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "subtle" version = "2.6.1" @@ -1554,26 +1049,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" -dependencies = [ - "futures-core", -] - -[[package]] -name = "synstructure" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "tealdeer" version = "1.7.1" @@ -1588,11 +1063,11 @@ dependencies = [ "log", "pager", "predicates", - "reqwest", "serde", "serde_derive", "tempfile", "toml", + "ureq", "walkdir", "yansi", "zip", @@ -1647,67 +1122,6 @@ dependencies = [ "syn", ] -[[package]] -name = "tinystr" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tinyvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "pin-project-lite", - "socket2", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" -dependencies = [ - "rustls", - "rustls-pki-types", - "tokio", -] - [[package]] name = "toml" version = "0.8.19" @@ -1742,37 +1156,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - [[package]] name = "unicode-ident" version = "1.0.13" @@ -1786,27 +1169,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] -name = "url" -version = "2.5.4" +name = "ureq" +version = "3.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "06f78313c985f2fba11100dd06d60dd402d0cabb458af4d94791b8e09c025323" dependencies = [ - "form_urlencoded", - "idna", + "base64", + "der", + "flate2", + "log", + "native-tls", "percent-encoding", + "rustls", + "rustls-pemfile", + "rustls-pki-types", + "rustls-platform-verifier", + "ureq-proto", + "utf-8", + "webpki-root-certs", + "webpki-roots", ] [[package]] -name = "utf16_iter" -version = "1.0.5" +name = "ureq-proto" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" +checksum = "64adb55464bad1ab1aa9229133d0d59d2f679180f4d15f0d9debe616f541f25e" +dependencies = [ + "base64", + "http", + "httparse", + "log", +] [[package]] -name = "utf8_iter" -version = "1.0.4" +name = "utf-8" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8parse" @@ -1839,15 +1239,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -1855,87 +1246,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wasm-bindgen" -version = "0.2.93" +name = "webpki-root-certs" +version = "0.26.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "09aed61f5e8d2c18344b3faa33a4c837855fe56642757754775548fee21386c4" dependencies = [ - "cfg-if", - "once_cell", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" - -[[package]] -name = "web-sys" -version = "0.3.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" -dependencies = [ - "js-sys", - "wasm-bindgen", + "rustls-pki-types", ] [[package]] name = "webpki-roots" -version = "0.26.6" +version = "0.26.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" dependencies = [ "rustls-pki-types", ] @@ -1971,36 +1294,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-registry" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" -dependencies = [ - "windows-result", - "windows-strings", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result", - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -2158,18 +1451,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - -[[package]] -name = "writeable" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" - [[package]] name = "xdg" version = "2.5.2" @@ -2182,100 +1463,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" -[[package]] -name = "yoke" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zerofrom" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -[[package]] -name = "zerovec" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "zip" version = "2.2.0" diff --git a/Cargo.toml b/Cargo.toml index 010fa08..4787d64 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,9 +25,9 @@ app_dirs = { version = "2", package = "app_dirs2" } clap = { version = "4", features = ["std", "derive", "help", "usage", "cargo", "error-context", "color", "wrap_help"], default-features = false } env_logger = { version = "0.11", optional = true } log = "0.4" -reqwest = { version = "0.12.9", features = ["blocking"], default-features = false } serde = "1.0.21" serde_derive = "1.0.21" +ureq = { version = "3.0.8", default-features = false, features = ["gzip"] } toml = "0.8.19" walkdir = "2.0.1" yansi = "1" @@ -47,20 +47,10 @@ filetime = "0.2.10" default = ["native-tls", "rustls-with-webpki-roots", "rustls-with-native-roots"] logging = ["env_logger"] -# Reqwest (the HTTP client library) can handle TLS connections in four -# different modes: -# -# - Rustls with: -# - native roots -# - WebPK roots -# - Native TLS (SChannel on Windows, Secure Transport on macOS and OpenSSL otherwise) with: -# - native roots -# - WebPK roots (not implemented in tealdeer) -# -# At least one of variants must be selected. By default, uses native TLS and native roots. -native-tls = ["reqwest/rustls-tls-native-roots-no-provider", "reqwest/rustls-tls-webpki-roots-no-provider", "reqwest/native-tls"] -rustls-with-webpki-roots = ["reqwest/rustls-tls-native-roots-no-provider", "reqwest/rustls-tls-webpki-roots"] -rustls-with-native-roots = ["reqwest/rustls-tls-webpki-roots-no-provider", "reqwest/rustls-tls-native-roots"] +# At least one of variants for `ureq` HTTP client must be selected. +native-tls = ["ureq/native-tls", "ureq/platform-verifier"] +rustls-with-webpki-roots = ["ureq/rustls"] # ureq uses WebPKI roots by default +rustls-with-native-roots = ["ureq/rustls", "ureq/platform-verifier"] ignore-online-tests = [] diff --git a/src/cache.rs b/src/cache.rs index a72d0e0..76f0abe 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -1,5 +1,4 @@ use std::{ - env, ffi::OsStr, fs::{self, File}, io::{BufReader, Cursor, Read}, @@ -9,7 +8,8 @@ use std::{ use anyhow::{ensure, Context, Result}; use log::debug; -use reqwest::{blocking::Client, Proxy}; +use ureq::tls::{RootCerts, TlsConfig, TlsProvider}; +use ureq::Agent; use walkdir::{DirEntry, WalkDir}; use zip::ZipArchive; @@ -137,54 +137,6 @@ impl Cache { self.cache_dir.join(TLDR_PAGES_DIR) } - fn build_client(tls_backend: TlsBackend) -> Result { - let mut builder = Client::builder(); - builder = match tls_backend { - #[cfg(feature = "native-tls")] - TlsBackend::NativeTls => builder - .use_native_tls() - .tls_built_in_root_certs(true) - .tls_built_in_webpki_certs(false) - .tls_built_in_native_certs(false), - #[cfg(feature = "rustls-with-webpki-roots")] - TlsBackend::RustlsWithWebpkiRoots => builder - .use_rustls_tls() - .tls_built_in_root_certs(false) - .tls_built_in_webpki_certs(true) - .tls_built_in_native_certs(false), - #[cfg(feature = "rustls-with-native-roots")] - TlsBackend::RustlsWithNativeRoots => builder - .use_rustls_tls() - .tls_built_in_root_certs(false) - .tls_built_in_webpki_certs(false) - .tls_built_in_native_certs(true), - }; - if let Ok(ref host) = env::var("HTTP_PROXY") { - if let Ok(proxy) = Proxy::http(host) { - builder = builder.proxy(proxy); - } - } - if let Ok(ref host) = env::var("HTTPS_PROXY") { - if let Ok(proxy) = Proxy::https(host) { - builder = builder.proxy(proxy); - } - } - builder.build().context("Could not instantiate HTTP client") - } - - /// Download the archive from the specified URL. - fn download(client: &Client, archive_url: &str) -> Result> { - let mut resp = client - .get(archive_url) - .send()? - .error_for_status() - .with_context(|| format!("Could not download tldr pages from {archive_url}"))?; - let mut buf: Vec = vec![]; - let bytes_downloaded = resp.copy_to(&mut buf)?; - debug!("{} bytes downloaded", bytes_downloaded); - Ok(buf) - } - /// Update the pages cache from the specified URL. pub fn update(&self, archive_source: &str) -> Result<()> { self.ensure_cache_dir_exists()?; @@ -475,6 +427,42 @@ impl Cache { } } +impl Cache { + fn build_client(tls_backend: TlsBackend) -> Result { + let tls_builder = match tls_backend { + #[cfg(feature = "native-tls")] + TlsBackend::NativeTls => TlsConfig::builder() + .provider(TlsProvider::NativeTls) + .root_certs(RootCerts::PlatformVerifier), + #[cfg(feature = "rustls-with-webpki-roots")] + TlsBackend::RustlsWithWebpkiRoots => TlsConfig::builder() + .provider(TlsProvider::Rustls) + .root_certs(RootCerts::WebPki), + #[cfg(feature = "rustls-with-native-roots")] + TlsBackend::RustlsWithNativeRoots => TlsConfig::builder() + .provider(TlsProvider::Rustls) + .root_certs(RootCerts::PlatformVerifier), + }; + let config = Agent::config_builder() + .tls_config(tls_builder.build()) + .build(); + + Ok(config.into()) + } + + /// Download the archive from the specified URL. + fn download(client: &Agent, archive_url: &str) -> Result> { + let response = client + .get(archive_url) + .call() + .with_context(|| format!("Could not download tldr pages from {archive_url}"))?; + let mut buf: Vec = Vec::new(); + response.into_body().into_reader().read_to_end(&mut buf)?; + debug!("{} bytes downloaded", buf.len()); + Ok(buf) + } +} + /// Unit Tests for cache module #[cfg(test)] mod tests { From 9f43adb7f9aaacdff217bca68631e75a8dcd4831 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Tue, 18 Mar 2025 22:58:26 +0100 Subject: [PATCH 321/368] Require `zip >= 2.3.0` --- Cargo.lock | 54 +++++++++++++++++++++++++++++++++++++----------------- Cargo.toml | 2 +- 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ddb75c7..582b25d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -95,9 +95,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" dependencies = [ "derive_arbitrary", ] @@ -284,15 +284,15 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "derive_arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", @@ -714,7 +714,7 @@ dependencies = [ "combine", "jni-sys", "log", - "thiserror", + "thiserror 1.0.64", "walkdir", "windows-sys 0.45.0", ] @@ -983,9 +983,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] @@ -1003,7 +1003,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror", + "thiserror 1.0.64", "tokio", "tracing", ] @@ -1020,7 +1020,7 @@ dependencies = [ "rustc-hash", "rustls", "slab", - "thiserror", + "thiserror 1.0.64", "tinyvec", "tracing", ] @@ -1406,9 +1406,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.79" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -1483,7 +1483,16 @@ version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.64", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", ] [[package]] @@ -1497,6 +1506,17 @@ dependencies = [ "syn", ] +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -2042,9 +2062,9 @@ checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zip" -version = "2.2.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" +checksum = "938cc23ac49778ac8340e366ddc422b2227ea176edb447e23fc0627608dddadd" dependencies = [ "arbitrary", "crc32fast", @@ -2053,7 +2073,7 @@ dependencies = [ "flate2", "indexmap", "memchr", - "thiserror", + "thiserror 2.0.12", "zopfli", ] diff --git a/Cargo.toml b/Cargo.toml index aa1f423..e584a29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ serde_derive = "1.0.21" toml = "0.8.19" walkdir = "2.0.1" yansi = "1" -zip = { version = "2.1.6", default-features = false, features = ["deflate"] } +zip = { version = "2.3.0", default-features = false, features = ["deflate"] } [target.'cfg(not(windows))'.dependencies] pager = "0.16" From 81a0662dbcd5275937a1e8e2d8880bbede8b8133 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Tue, 18 Mar 2025 23:02:56 +0100 Subject: [PATCH 322/368] Run CI on backport branches and on dispatch --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9274a0f..f2b9f6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,11 @@ on: push: branches: - main + - "v*.x" pull_request: schedule: - cron: '30 3 * * 2' + workflow_dispatch: jobs: test: From 8f433e7774f9b212ed77a0b3aee1495759f2a91b Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Tue, 18 Mar 2025 23:38:12 +0100 Subject: [PATCH 323/368] Release v1.7.2 --- CHANGELOG.md | 16 ++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- docs/src/usage.txt | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04fdd4d..2c8af3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,21 @@ Possible log types: - `[docs]` for documentation changes. - `[chore]` for maintenance work. +### [v1.7.2][v1.7.2] (2025-03-18) + +This patch release updates the `zip` dependency to mitigate a potential security +vulnerability. A successful attack against tealdeer users would require +manipulation of the tldr pages archive downloaded during an update. As the +archive is downloaded from a trusted source (the tldr-pages organization), it +seems very unlikely that running a version of tealdeer prior to 1.7.2 poses a +security risk. Nevertheless, it cannot hurt to rule out any chance of an attack +by updating tealdeer to version 1.7.2. + +For more details, please see https://github.com/advisories/GHSA-94vh-gphv-8pm8. + +- [security] Require `zip >= 2.3.0` +- [chore] Run CI on backport branches and on dispatch + ### [v1.7.1][v1.7.1] (2024-11-14) This patch release updates the `yansi` dependency to version 1, so that the @@ -457,6 +472,7 @@ Thanks! [v1.6.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.6.0...v1.6.1 [v1.7.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.6.1...v1.7.0 [v1.7.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.0...v1.7.1 +[v1.7.2]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.1...v1.7.2 [i34]: https://github.com/tealdeer-rs/tealdeer/issues/34 [i43]: https://github.com/tealdeer-rs/tealdeer/issues/43 diff --git a/Cargo.lock b/Cargo.lock index 582b25d..2652093 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1426,7 +1426,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.7.1" +version = "1.7.2" dependencies = [ "anyhow", "app_dirs2", diff --git a/Cargo.toml b/Cargo.toml index e584a29..59a7d72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ name = "tealdeer" readme = "README.md" repository = "https://github.com/tealdeer-rs/tealdeer/" documentation = "https://tealdeer-rs.github.io/tealdeer/" -version = "1.7.1" +version = "1.7.2" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"] rust-version = "1.75" edition = "2021" diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 5129fbe..a326eac 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -1,4 +1,4 @@ -tealdeer 1.7.1: A fast TLDR client +tealdeer 1.7.2: A fast TLDR client Danilo Bargen , Niklas Mohrin Usage: tldr [OPTIONS] [COMMAND]... From 9bb95ad11dcc8ce8bf1e79bd1b1c95a84d148c64 Mon Sep 17 00:00:00 2001 From: MHS-0 Date: Sat, 31 May 2025 23:13:39 +0330 Subject: [PATCH 324/368] Add an option to specify a custom config file to be used (#422) Co-authored-by: Niklas Mohrin --- docs/src/usage.txt | 1 + src/cache.rs | 4 +- src/cli.rs | 4 ++ src/config.rs | 146 +++++++++++++++++++++++++++------------------ src/main.rs | 30 ++++++---- src/output.rs | 2 +- src/types.rs | 3 + tests/lib.rs | 118 +++++++++++++++++++++++++++++++++++- 8 files changed, 236 insertions(+), 72 deletions(-) diff --git a/docs/src/usage.txt b/docs/src/usage.txt index a4a5fcb..33e6020 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -18,6 +18,7 @@ Options: -u, --update Update the local cache --no-auto-update If auto update is configured, disable it for this run -c, --clear-cache Clear the local cache + --config-path Override config file location --pager Use a pager to page output -r, --raw Display the raw markdown instead of rendering it -q, --quiet Suppress informational messages diff --git a/src/cache.rs b/src/cache.rs index 76f0abe..c1308f2 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -174,8 +174,8 @@ impl Cache { if let Ok(mtime) = metadata.modified() { let now = SystemTime::now(); return now.duration_since(mtime).ok(); - }; - }; + } + } None } diff --git a/src/cli.rs b/src/cli.rs index 0ba9de9..55fe74f 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -74,6 +74,10 @@ pub(crate) struct Cli { #[arg(short = 'c', long = "clear-cache")] pub clear_cache: bool, + /// Override config file location + #[arg(long = "config-path", value_name = "FILE")] + pub config_path: Option, + /// Use a pager to page output #[arg(long = "pager", requires = "command_or_file")] pub pager: bool, diff --git a/src/config.rs b/src/config.rs index 3d82eea..be41dd2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,13 +1,13 @@ use std::{ - env, fmt, fs, - io::{Read, Write}, + env, fmt, + fs::{self, File}, + io::{ErrorKind, Read, Write}, path::{Path, PathBuf}, time::Duration, }; use anyhow::{anyhow, bail, ensure, Context, Result}; use app_dirs::{get_app_root, AppDataType}; -use log::debug; use serde::Serialize as _; use serde_derive::{Deserialize, Serialize}; use yansi::{Color, Style}; @@ -254,6 +254,14 @@ impl RawConfig { fn new() -> Self { Self::default() } + + fn load(mut config: impl Read) -> Result { + let mut content = String::new(); + config + .read_to_string(&mut content) + .context("Failed to read from config file")?; + toml::from_str(&content).context("Failed to parse TOML config file") + } } impl Default for RawConfig { @@ -276,7 +284,7 @@ impl Default for RawConfig { } } -#[derive(Copy, Clone, Debug, PartialEq, Eq)] +#[derive(Copy, Clone, Default, Debug, PartialEq, Eq)] pub struct StyleConfig { pub description: Style, pub command_name: Style, @@ -366,6 +374,7 @@ pub struct Config { pub display: DisplayConfig, pub updates: UpdatesConfig, pub directories: DirectoriesConfig, + pub file_path: PathWithSource, } impl Config { @@ -373,10 +382,14 @@ impl Config { /// /// For this, some values need to be converted to other types and some /// defaults need to be set (sometimes based on env variables). - fn from_raw(raw_config: RawConfig, relative_path_root: &Path) -> Result { + fn from_raw(raw_config: RawConfig, config_file_path: PathWithSource) -> Result { let style = raw_config.style.into(); let display = raw_config.display.into(); let updates = raw_config.updates.try_into()?; + let relative_path_root = config_file_path + .path() + .parent() + .context("Failed to get config directory")?; // Determine directories config. For this, we need to take some // additional factory into account, like env variables, or the @@ -438,48 +451,48 @@ impl Config { display, updates, directories, + file_path: config_file_path, }) } - pub fn load(enable_styles: bool) -> Result { - debug!("Loading config"); + /// Load and read the config file from the given path into + /// a [Config] and return it. + /// + /// path: The path to the config file. + pub fn load(path: &Path) -> Result { + let raw_config = RawConfig::load(File::open(path)?)?; + let config = Self::from_raw( + raw_config, + PathWithSource { + path: path.into(), + source: PathSource::Cli, + }, + ) + .context("Could not process raw config")?; + + Ok(config) + } + + /// Load and read the config file from the default path into + /// a [Config] and return it. + pub fn load_default_path() -> Result { // Determine path - let (config_file_path, _) = get_config_path().context("Could not determine config path")?; + let config_file_path = + get_default_config_path().context("Could not determine config path")?; - // Load raw config - let raw_config: RawConfig = if config_file_path.exists() && config_file_path.is_file() { - let mut config_file = fs::File::open(&config_file_path).with_context(|| { - format!("Failed to open config file path at {:?}", &config_file_path) - })?; - let mut contents = String::new(); - config_file.read_to_string(&mut contents).with_context(|| { - format!("Failed to read from config file at {:?}", &config_file_path) - })?; - toml::from_str(&contents).with_context(|| { - format!("Failed to parse TOML config file at {config_file_path:?}") - })? - } else { - RawConfig::new() + let raw_config = match File::open(config_file_path.path()) { + Ok(file) => RawConfig::load(file)?, + Err(e) if e.kind() == ErrorKind::NotFound => RawConfig::default(), + Err(e) => { + return Err(e).context(format!( + "Failed to open config file at {}", + config_file_path.path().display() + )); + } }; - - // Safe to unwrap, it's a file path, so it should have a directory component - let config_file_dir = config_file_path.parent().unwrap(); - - // Convert to config, resolve relative paths from the config file dir - let mut config = - Self::from_raw(raw_config, config_file_dir).context("Could not process raw config")?; - - // Potentially override styles - if !enable_styles { - config.style = StyleConfig { - command_name: Style::default(), - description: Style::default(), - example_text: Style::default(), - example_code: Style::default(), - example_variable: Style::default(), - }; - } + let config = + Self::from_raw(raw_config, config_file_path).context("Could not process raw config")?; Ok(config) } @@ -497,7 +510,7 @@ pub fn get_config_dir() -> Result<(PathBuf, PathSource)> { // $TEALDEER_CONFIG_DIR env variable. if let Ok(value) = env::var("TEALDEER_CONFIG_DIR") { return Ok((PathBuf::from(value), PathSource::EnvVar)); - }; + } // Otherwise, fall back to the user config directory. let dirs = get_app_root(AppDataType::UserConfig, &crate::APP_INFO) @@ -509,29 +522,39 @@ pub fn get_config_dir() -> Result<(PathBuf, PathSource)> { /// /// Note that this function does not verify whether the file at that location /// exists, or is a file. -pub fn get_config_path() -> Result<(PathBuf, PathSource)> { +pub fn get_default_config_path() -> Result { let (config_dir, source) = get_config_dir()?; let config_file_path = config_dir.join(CONFIG_FILE_NAME); - Ok((config_file_path, source)) + Ok(PathWithSource { + path: config_file_path, + source, + }) } /// Create default config file. -pub fn make_default_config() -> Result { - let (config_dir, _) = get_config_dir()?; - - // Ensure that config directory exists - if config_dir.exists() { - ensure!( - config_dir.is_dir(), - "Config directory could not be created: {} already exists but is not a directory", - config_dir.to_string_lossy(), - ); +/// path: Can be specified to create the config in that path instead of +/// the default path. +pub fn make_default_config(path: Option<&Path>) -> Result { + let config_file_path = if let Some(p) = path { + p.into() } else { - fs::create_dir_all(&config_dir).context("Could not create config directory")?; - } + let (config_dir, _) = get_config_dir()?; + + // Ensure that config directory exists + if config_dir.exists() { + ensure!( + config_dir.is_dir(), + "Config directory could not be created: {} already exists but is not a directory", + config_dir.to_string_lossy(), + ); + } else { + fs::create_dir_all(&config_dir).context("Could not create config directory")?; + } + + config_dir.join(CONFIG_FILE_NAME) + }; // Ensure that a config file doesn't get overwritten - let config_file_path = config_dir.join(CONFIG_FILE_NAME); ensure!( !config_file_path.is_file(), "A configuration file already exists at {}, no action was taken.", @@ -544,7 +567,7 @@ pub fn make_default_config() -> Result { // Write default config let mut config_file = - fs::File::create(&config_file_path).context("Could not create config file")?; + File::create(&config_file_path).context("Could not create config file")?; let _wc = config_file .write(serialized_config.as_bytes()) .context("Could not write to config file")?; @@ -566,7 +589,14 @@ fn test_relative_path_resolution() { raw_config.directories.cache_dir = Some("../cache".into()); raw_config.directories.custom_pages_dir = Some("../custom_pages".into()); - let config = Config::from_raw(raw_config, Path::new("/path/to/config")).unwrap(); + let config = Config::from_raw( + raw_config, + PathWithSource { + path: PathBuf::from("/path/to/config/config.toml"), + source: PathSource::OsConvention, + }, + ) + .unwrap(); assert_eq!( config.directories.cache_dir.path(), diff --git a/src/main.rs b/src/main.rs index cfd00db..99403b9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,6 +36,8 @@ use std::{ use anyhow::{anyhow, Context, Result}; use app_dirs::AppInfo; use clap::Parser; +use config::StyleConfig; +use log::debug; mod cache; mod cli; @@ -50,7 +52,7 @@ mod utils; use crate::{ cache::{Cache, CacheFreshness, PageLookupResult, TLDR_PAGES_DIR}, cli::Cli, - config::{get_config_dir, get_config_path, make_default_config, Config, PathWithSource}, + config::{get_config_dir, make_default_config, Config, PathWithSource}, extensions::Dedup, output::print_page, types::{ColorOptions, PlatformType}, @@ -153,10 +155,7 @@ fn show_paths(config: &Config) { } }, ); - let config_path = get_config_path().map_or_else( - |e| format!("[Error: {e}]"), - |(path, _)| path.display().to_string(), - ); + let config_path = config.file_path.to_string(); let cache_dir = config.directories.cache_dir.to_string(); let pages_dir = { let mut path = config.directories.cache_dir.path.clone(); @@ -175,8 +174,8 @@ fn show_paths(config: &Config) { println!("Custom pages dir: {custom_pages_dir}"); } -fn create_config() -> Result<()> { - let config_file_path = make_default_config().context("Could not create seed config")?; +fn create_config(path: Option<&Path>) -> Result<()> { + let config_file_path = make_default_config(path).context("Could not create seed config")?; eprintln!( "Successfully created seed config file here: {}", config_file_path.to_str().unwrap() @@ -279,7 +278,18 @@ fn main() -> ExitCode { fn try_main(args: Cli, enable_styles: bool) -> Result { // Look up config file, if none is found fall back to default config. - let config = Config::load(enable_styles).context("Could not load config")?; + debug!("Loading config"); + let mut config = match &args.config_path { + Some(path) if !args.seed_config => { + Config::load(path).context("Could not load config from given path")? + } + _ => Config::load_default_path().context("Could not load config from default path")?, + }; + + // Override styles if needed + if !enable_styles { + config.style = StyleConfig::default(); + } let custom_pages_dir = config .directories @@ -313,7 +323,7 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { // Create a basic config and exit if args.seed_config { - create_config()?; + create_config(args.config_path.as_deref())?; return Ok(ExitCode::SUCCESS); } @@ -345,7 +355,7 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { { // Cache is needed, but missing return Ok(ExitCode::FAILURE); - }; + } // List cached commands and exit if args.list { diff --git a/src/output.rs b/src/output.rs index abef1db..046abe8 100644 --- a/src/output.rs +++ b/src/output.rs @@ -71,7 +71,7 @@ pub fn print_page( !config.display.compact, ) .context("Could not write to stdout")?; - }; + } // We're done outputting data, flush stdout now! handle.flush().context("Could not flush stdout")?; diff --git a/src/types.rs b/src/types.rs index 416d267..69c7599 100644 --- a/src/types.rs +++ b/src/types.rs @@ -205,6 +205,8 @@ pub enum PathSource { EnvVar, /// Config file ConfigFile, + /// CLI argument override + Cli, } impl fmt::Display for PathSource { @@ -216,6 +218,7 @@ impl fmt::Display for PathSource { Self::OsConvention => "OS convention", Self::EnvVar => "env variable", Self::ConfigFile => "config file", + Self::Cli => "command line argument", } ) } diff --git a/tests/lib.rs b/tests/lib.rs index 420eb08..172c1c5 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -70,6 +70,24 @@ impl TestEnv { .expect("Failed to append to config file."); } + fn create_secondary_config(self) -> Self { + self.append_to_secondary_config(format!( + "directories.cache_dir = '{}'\n", + self.cache_dir().to_str().unwrap(), + )); + self + } + + fn append_to_secondary_config(&self, content: impl AsRef) { + File::options() + .create(true) + .append(true) + .open(self.config_dir().join("config-secondary.toml")) + .expect("Failed to open config file") + .write_all(content.as_ref().as_bytes()) + .expect("Failed to append to config file."); + } + fn remove_initial_config(self) -> Self { let _ = fs::remove_file(self.config_dir().join("config.toml")); self @@ -183,6 +201,61 @@ fn test_cannot_build_without_tls_feature() { let _ = TestEnv::new().no_default_features().command(); } +#[test] +fn test_load_the_correct_config() { + let testenv = TestEnv::new() + .install_default_cache() + .create_secondary_config(); + testenv.append_to_secondary_config(include_str!("style-config.toml")); + + let expected_default = include_str!("rendered/inkscape-default.expected"); + let expected_with_config = include_str!("rendered/inkscape-with-config.expected"); + + testenv + .command() + .args(["--color", "always", "inkscape-v2"]) + .assert() + .success() + .stdout(diff(expected_default)); + + testenv + .command() + .args([ + "--color", + "always", + "--config-path", + testenv + .config_dir() + .join("config-secondary.toml") + .to_str() + .unwrap(), + "inkscape-v2", + ]) + .assert() + .success() + .stdout(diff(expected_with_config)); +} + +#[test] +fn test_fail_on_custom_config_path_is_directory() { + let testenv = TestEnv::new(); + let error = if cfg!(windows) { + "Access is denied" + } else { + "Is a directory" + }; + testenv + .command() + .args([ + "--config-path", + testenv.config_dir().to_str().unwrap(), + "sl", + ]) + .assert() + .failure() + .stderr(contains(error)); +} + #[test] fn test_missing_cache() { TestEnv::new() @@ -438,8 +511,9 @@ fn test_setup_seed_config() { .failure() .stderr(contains("A configuration file already exists")); - let testenv = testenv.remove_initial_config(); + assert!(testenv.config_dir().join("config.toml").is_file()); + let testenv = testenv.remove_initial_config(); testenv .command() .args(["--seed-config"]) @@ -448,6 +522,48 @@ fn test_setup_seed_config() { .stderr(contains("Successfully created seed config file here")); assert!(testenv.config_dir().join("config.toml").is_file()); + + // Create parent directories as needed for the default config path. + fs::remove_dir_all(testenv.config_dir()).unwrap(); + testenv + .command() + .args(["--seed-config"]) + .assert() + .success() + .stderr(contains("Successfully created seed config file here")); + + assert!(testenv.config_dir().join("config.toml").is_file()); + + // Write the default config to --config-path if specified by the user + // at the same time. + let custom_config_path = testenv.config_dir().join("config_custom.toml"); + testenv + .command() + .args([ + "--seed-config", + "--config-path", + custom_config_path.to_str().unwrap(), + ]) + .assert() + .success() + .stderr(contains("Successfully created seed config file here")); + + assert!(custom_config_path.is_file()); + + // DON'T create parent directories for a custom config path. + fs::remove_dir_all(testenv.config_dir()).unwrap(); + testenv + .command() + .args([ + "--seed-config", + "--config-path", + custom_config_path.to_str().unwrap(), + ]) + .assert() + .failure() + .stderr(contains("Could not create config file")); + + assert!(!custom_config_path.is_file()); } #[test] From bc820c5f10b1ae54d0c3012575df55d13accfde1 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 6 Jun 2025 22:52:44 +0200 Subject: [PATCH 325/368] Upload binaries from build step as artifact (#423) --- .github/workflows/ci.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c1cdf3..3553418 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,19 +16,33 @@ jobs: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] toolchain: [stable, 1.75.0] + include: + - platform: windows-latest + exe_suffix: .exe runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} + - run: mkdir artifacts - name: Build with default features - run: cargo build + run: | + cargo build + cp target/debug/tldr${{ matrix.exe_suffix}} artifacts/tldr-default${{ matrix.exe_suffix}} - name: Build with logging and Rustls with webpki roots - run: cargo build --features logging,rustls-with-webpki-roots --no-default-features + run: | + cargo build --features logging,rustls-with-webpki-roots --no-default-features + cp target/debug/tldr${{ matrix.exe_suffix}} artifacts/tldr-logging-rustls-webpki${{ matrix.exe_suffix}} - name: Build with native TLS backend - # expects runners have the proper Native SSL library - run: cargo build --features native-tls --no-default-features + run: | + # expects runners have the proper Native SSL library + cargo build --features native-tls --no-default-features + cp target/debug/tldr${{ matrix.exe_suffix}} artifacts/tldr-native-tls${{ matrix.exe_suffix}} + - uses: actions/upload-artifact@v4 + with: + name: tldr-debug-build-${{ matrix.platform }}-rust-${{ matrix.toolchain }} + path: artifacts/ - name: Run tests run: cargo test -- --test-threads 1 From 43ab2cb920f500795fcf9a353a9695eb2d896664 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 6 Jun 2025 23:13:47 +0200 Subject: [PATCH 326/368] Bump MSRV to 1.80 (#426) --- .github/workflows/ci.yml | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3553418..3a99b2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - toolchain: [stable, 1.75.0] + toolchain: [stable, 1.80.1] include: - platform: windows-latest exe_suffix: .exe diff --git a/Cargo.toml b/Cargo.toml index bbd31c7..628c9bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/tealdeer-rs/tealdeer/" documentation = "https://tealdeer-rs.github.io/tealdeer/" version = "1.7.2" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"] -rust-version = "1.75" +rust-version = "1.80" edition = "2021" [[bin]] From d1be7d6bb92bed580257edcf82d665fb86ff2788 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 6 Jun 2025 23:25:30 +0200 Subject: [PATCH 327/368] Introduce Language struct (#425) * Remove unneeded Clone bound on Dedup * Introduce Language struct to represent language strings * Move language directory name logic into own method on Language type --- src/cache.rs | 26 ++++++++++-------- src/extensions.rs | 4 +-- src/main.rs | 70 ++++++++++++++++++++++++++++++++--------------- 3 files changed, 65 insertions(+), 35 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index c1308f2..fdd77da 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -18,6 +18,19 @@ use crate::{config::TlsBackend, types::PlatformType, utils::print_warning}; pub static TLDR_PAGES_DIR: &str = "tldr-pages"; static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; +#[derive(Debug, PartialEq, Eq, Hash)] +pub struct Language<'a>(pub &'a str); + +impl Language<'_> { + fn directory_name(&self) -> String { + if *self == Language("en") { + String::from("pages") + } else { + format!("pages.{}", self.0) + } + } +} + #[derive(Debug)] pub struct Cache { cache_dir: PathBuf, @@ -227,7 +240,7 @@ impl Cache { pub fn find_page( &self, name: &str, - languages: &[String], + languages: &[Language<'_>], custom_pages_dir: Option<&Path>, platforms: &[PlatformType], ) -> Option { @@ -237,16 +250,7 @@ impl Cache { // Determine directory paths let pages_dir = self.pages_dir(); - let lang_dirs: Vec = languages - .iter() - .map(|lang| { - if lang == "en" { - String::from("pages") - } else { - format!("pages.{lang}") - } - }) - .collect(); + let lang_dirs: Vec = languages.iter().map(Language::directory_name).collect(); // Look up custom page (.page.md). If it exists, return it directly if let Some(config_dir) = custom_pages_dir { diff --git a/src/extensions.rs b/src/extensions.rs index 3aebfa2..e74e9f3 100644 --- a/src/extensions.rs +++ b/src/extensions.rs @@ -1,14 +1,14 @@ use std::mem; /// An extension trait to clear duplicates from a collection. -pub(crate) trait Dedup { +pub(crate) trait Dedup { fn clear_duplicates(&mut self); } /// Clear duplicates from a collection, keep the first one seen. /// /// For small vectors, this will be faster than a `HashSet`. -impl Dedup for Vec { +impl Dedup for Vec { fn clear_duplicates(&mut self) { let orig = mem::replace(self, Vec::with_capacity(self.len())); for item in orig { diff --git a/src/main.rs b/src/main.rs index 99403b9..2113de0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,10 +31,12 @@ use std::{ io::{self, IsTerminal}, path::Path, process::{Command, ExitCode}, + sync::LazyLock, }; use anyhow::{anyhow, Context, Result}; use app_dirs::AppInfo; +use cache::Language; use clap::Parser; use config::StyleConfig; use log::debug; @@ -191,14 +193,16 @@ fn init_log() { #[cfg(not(feature = "logging"))] fn init_log() {} -fn get_languages(env_lang: Option<&str>, env_language: Option<&str>) -> Vec { +fn get_languages<'a>( + env_lang: Option<&'a str>, + env_language: Option<&'a str>, +) -> Vec> { // Language list according to // https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md#language - if env_lang.is_none() { - return vec!["en".to_string()]; - } - let env_lang = env_lang.unwrap(); + let Some(env_lang) = env_lang else { + return vec![Language("en")]; + }; // Create an iterator that contains $LANGUAGE (':' separated list) followed by $LANG (single language) let locales = env_language.unwrap_or("").split(':').chain([env_lang]); @@ -207,23 +211,25 @@ fn get_languages(env_lang: Option<&str>, env_language: Option<&str>) -> Vec= 5 && locale.chars().nth(2) == Some('_') { - lang_list.push(&locale[..5]); + lang_list.push(Language(&locale[..5])); } // Language code only (e.g. `en`) if locale.len() >= 2 && locale != "POSIX" { - lang_list.push(&locale[..2]); + lang_list.push(Language(&locale[..2])); } } - lang_list.push("en"); + lang_list.push(Language("en")); lang_list.clear_duplicates(); - lang_list.into_iter().map(str::to_string).collect() + lang_list } -fn get_languages_from_env() -> Vec { +fn get_languages_from_env<'a>() -> Vec> { + static LANG: LazyLock> = LazyLock::new(|| std::env::var("LANG").ok()); + static LANGUAGE: LazyLock> = LazyLock::new(|| std::env::var("LANGUAGE").ok()); get_languages( - std::env::var("LANG").ok().as_deref(), - std::env::var("LANGUAGE").ok().as_deref(), + LANG.as_ref().map(String::as_str), + LANGUAGE.as_ref().map(String::as_str), ) } @@ -372,7 +378,8 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { // Collect languages let languages = args .language - .map_or_else(get_languages_from_env, |lang| vec![lang]); + .as_deref() + .map_or_else(get_languages_from_env, |lang| vec![Language(lang)]); // Search for command in cache let Some(lookup_result) = cache.find_page( @@ -422,7 +429,7 @@ fn compute_platforms(platforms: Option<&Vec>) -> Vec #[cfg(test)] mod test { - use crate::get_languages; + use super::*; mod language { use super::*; @@ -430,41 +437,60 @@ mod test { #[test] fn missing_lang_env() { let lang_list = get_languages(None, Some("de:fr")); - assert_eq!(lang_list, ["en"]); + assert_eq!(lang_list, [Language("en")]); let lang_list = get_languages(None, None); - assert_eq!(lang_list, ["en"]); + assert_eq!(lang_list, [Language("en")]); } #[test] fn missing_language_env() { let lang_list = get_languages(Some("de"), None); - assert_eq!(lang_list, ["de", "en"]); + assert_eq!(lang_list, [Language("de"), Language("en")]); } #[test] fn preference_order() { let lang_list = get_languages(Some("de"), Some("fr:cn")); - assert_eq!(lang_list, ["fr", "cn", "de", "en"]); + assert_eq!( + lang_list, + [ + Language("fr"), + Language("cn"), + Language("de"), + Language("en") + ] + ); } #[test] fn country_code_expansion() { let lang_list = get_languages(Some("pt_BR"), None); - assert_eq!(lang_list, ["pt_BR", "pt", "en"]); + assert_eq!( + lang_list, + [Language("pt_BR"), Language("pt"), Language("en")] + ); } #[test] fn ignore_posix_and_c() { let lang_list = get_languages(Some("POSIX"), None); - assert_eq!(lang_list, ["en"]); + assert_eq!(lang_list, [Language("en")]); let lang_list = get_languages(Some("C"), None); - assert_eq!(lang_list, ["en"]); + assert_eq!(lang_list, [Language("en")]); } #[test] fn no_duplicates() { let lang_list = get_languages(Some("de"), Some("fr:de:cn:de")); - assert_eq!(lang_list, ["fr", "de", "cn", "en"]); + assert_eq!( + lang_list, + [ + Language("fr"), + Language("de"), + Language("cn"), + Language("en") + ] + ); } } } From 1e87db7ab74e7d271849b9bc724e3c5ddd096cb3 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 1 Aug 2025 16:03:01 +0200 Subject: [PATCH 328/368] Cache rewrite (#416) --- Cargo.lock | 1 - Cargo.toml | 1 - src/cache.rs | 636 +++++++----------- src/main.rs | 220 +++--- .../common/git-checkout.md | 0 .../{pages => pages.en}/common/inkscape-v1.md | 0 .../{pages => pages.en}/common/inkscape-v2.md | 0 .../cache/{pages => pages.en}/common/which.md | 0 tests/lib.rs | 111 ++- 9 files changed, 462 insertions(+), 507 deletions(-) rename tests/cache/{pages => pages.en}/common/git-checkout.md (100%) rename tests/cache/{pages => pages.en}/common/inkscape-v1.md (100%) rename tests/cache/{pages => pages.en}/common/inkscape-v2.md (100%) rename tests/cache/{pages => pages.en}/common/which.md (100%) diff --git a/Cargo.lock b/Cargo.lock index e8db079..4da46ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1068,7 +1068,6 @@ dependencies = [ "tempfile", "toml", "ureq", - "walkdir", "yansi", "zip", ] diff --git a/Cargo.toml b/Cargo.toml index 628c9bb..6594b14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,6 @@ serde = "1.0.21" serde_derive = "1.0.21" ureq = { version = "3.0.8", default-features = false, features = ["gzip"] } toml = "0.8.19" -walkdir = "2.0.1" yansi = "1" zip = { version = "2.3.0", default-features = false, features = ["deflate"] } diff --git a/src/cache.rs b/src/cache.rs index fdd77da..c18f03f 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -1,41 +1,38 @@ use std::{ - ffi::OsStr, fs::{self, File}, - io::{BufReader, Cursor, Read}, + io::{BufReader, Cursor, ErrorKind, Read}, path::{Path, PathBuf}, time::{Duration, SystemTime}, }; -use anyhow::{ensure, Context, Result}; +use anyhow::{anyhow, bail, ensure, Context, Result}; use log::debug; -use ureq::tls::{RootCerts, TlsConfig, TlsProvider}; -use ureq::Agent; -use walkdir::{DirEntry, WalkDir}; +use ureq::{ + http::StatusCode, + tls::{RootCerts, TlsConfig, TlsProvider}, + Agent, +}; use zip::ZipArchive; -use crate::{config::TlsBackend, types::PlatformType, utils::print_warning}; +use crate::{config::TlsBackend, types::PlatformType}; pub static TLDR_PAGES_DIR: &str = "tldr-pages"; -static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; +pub static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; #[derive(Debug, PartialEq, Eq, Hash)] pub struct Language<'a>(pub &'a str); -impl Language<'_> { - fn directory_name(&self) -> String { - if *self == Language("en") { - String::from("pages") - } else { - format!("pages.{}", self.0) - } - } +#[derive(Clone)] +pub struct CacheConfig<'a> { + pub pages_directory: &'a Path, + pub custom_pages_directory: Option<&'a Path>, + pub platforms: &'a [PlatformType], + pub languages: &'a [Language<'a>], } -#[derive(Debug)] -pub struct Cache { - cache_dir: PathBuf, - enable_styles: bool, - tls_backend: TlsBackend, +/// The directory backing this cache is checked to be populated at construction. +pub struct Cache<'a> { + config: CacheConfig<'a>, } #[derive(Debug)] @@ -44,6 +41,218 @@ pub struct PageLookupResult { pub patch_path: Option, } +impl<'a> Cache<'a> { + /// Try opening a cache at the location given by `config.pages_directory`. If no directory + /// exists at this location, `Ok(None)` is returned. + pub fn open(config: CacheConfig<'a>) -> Result> { + match config.pages_directory.metadata() { + Ok(md) => { + ensure!( + md.is_dir(), + "Cache directory `{}` exists, but is not a directory.", + config.pages_directory.display(), + ); + Ok(Some(Cache { config })) + } + Err(err) if err.kind() == ErrorKind::NotFound => Ok(None), + Err(err) => Err(anyhow!(err).context(format!( + "Error getting metdata of cache directory {}", + config.pages_directory.display() + ))), + } + } + + /// Open an existing cache at `config.pages_directory` or create one if no cache resides at + /// this location. In case of success, the return value is a tuple with the `Cache` and a + /// boolean indicating whether the cache was newly created. + pub fn open_or_create(config: CacheConfig<'a>) -> Result<(Self, bool)> { + if let Some(cache) = Self::open(config.clone())? { + return Ok((cache, false)); + } + + fs::create_dir_all(config.pages_directory).with_context(|| { + format!( + "Cache directory `{}` cannot be created", + config.pages_directory.display(), + ) + })?; + eprintln!( + "Successfully created cache directory `{}`.", + config.pages_directory.display(), + ); + + Ok((Cache { config }, true)) + } + + pub fn age(&self) -> Result { + let mtime = self.config.pages_directory.metadata()?.modified()?; + SystemTime::now() + .duration_since(mtime) + .context("Error comparing cache mtime with current time") + } + + pub fn find_page(&self, command: &str) -> Option { + let page_filename = format!("{command}.md"); + let patch_filename = format!("{command}.patch.md"); + let custom_filename = format!("{command}.page.md"); + + if let Some(custom_pages_dir) = self.config.custom_pages_directory { + let custom_page = custom_pages_dir.join(custom_filename); + if custom_page.is_file() { + return Some(PageLookupResult::with_page(custom_page)); + } + } + + let patch_path = self + .config + .custom_pages_directory + .map(|dir| dir.join(&patch_filename)) + .filter(|path| path.is_file()); + + for &platform in self.config.platforms { + for language in self.config.languages { + let mut search_path = self.config.pages_directory.to_path_buf(); + search_path.push(language.directory_name()); + search_path.push(platform.directory_name()); + search_path.push(&page_filename); + + if search_path.is_file() { + return Some( + PageLookupResult::with_page(search_path).with_optional_patch(patch_path), + ); + } + } + } + + None + } + + pub fn list_pages(&self) -> Result> { + let mut pages = Vec::new(); + + let mut append_all = |directory: &Path, suffix: &str| -> Result<()> { + let Ok(file_iter) = fs::read_dir(directory) else { + return Ok(()); + }; + + for entry in file_iter { + let entry = entry?; + if entry.file_type()?.is_file() { + let mut page_path = entry + .file_name() + .into_string() + .map_err(|_| anyhow!("Found invalid filename: {:?}", entry.path()))?; + + if page_path.ends_with(suffix) { + page_path.truncate(page_path.len() - suffix.len()); + pages.push(page_path); + } else { + debug!( + "Skipping page entry not ending in \".md\": {:?}", + entry.path(), + ); + } + } + } + + Ok(()) + }; + + let mut search_path = self.config.pages_directory.to_path_buf(); + for language in self.config.languages { + search_path.push(language.directory_name()); + for platform in self.config.platforms { + search_path.push(platform.directory_name()); + append_all(&search_path, ".md")?; + search_path.pop(); + } + search_path.pop(); + } + + if let Some(custom_pages_dir) = self.config.custom_pages_directory { + append_all(custom_pages_dir, ".page.md")?; + } + + pages.sort_unstable(); + pages.dedup(); + Ok(pages) + } + + pub fn old_custom_pages_exist(&self) -> Result { + let Some(directory) = self.config.custom_pages_directory else { + return Ok(false); + }; + let Ok(file_iter) = fs::read_dir(directory) else { + return Ok(false); + }; + + for entry in file_iter { + if let Some(extension) = entry?.path().extension() { + if extension == "page" || extension == "patch" { + return Ok(true); + } + } + } + + Ok(false) + } + + pub fn clear(self) -> Result<()> { + fs::remove_dir_all(self.config.pages_directory).with_context(|| { + format!( + "Could not remove pages directory at {}", + self.config.pages_directory.display(), + ) + }) + } + + pub fn update(&mut self, archive_url: &str, tls_backend: TlsBackend) -> Result<()> { + let client = Self::build_client(tls_backend); + + // Download everything before deleting anything + let archives = self + .config + .languages + .iter() + .map(|lang| { + Ok(( + lang, + Self::download( + &client, + &format!("{archive_url}/tldr-{}.zip", lang.directory_name()), + )? + .map(|bytes| ZipArchive::new(Cursor::new(bytes))) + .transpose()?, + )) + }) + .collect::>>()?; + + // Clear cache directory + // Note: This is not the best solution. Ideally we would download the + // archive to a temporary directory and then swap the two directories. + // But renaming a directory doesn't work across filesystems and Rust + // does not yet offer a recursive directory copying function. So for + // now, we'll use this approach. + fs::remove_dir_all(self.config.pages_directory)?; + fs::create_dir(self.config.pages_directory)?; + + for (lang, archive) in archives { + if let Some(mut archive) = archive { + debug!("Extracting archive for {lang:?}"); + archive.extract(self.config.pages_directory.join(lang.directory_name()))?; + } else { + debug!("No archive found for {lang:?}"); + } + } + + Ok(()) + } + + pub fn config(&self) -> &CacheConfig<'a> { + &self.config + } +} + impl PageLookupResult { pub fn with_page(page_path: PathBuf) -> Self { Self { @@ -90,120 +299,15 @@ impl PageLookupResult { } } -pub enum CacheFreshness { - /// The cache is still fresh (less than `MAX_CACHE_AGE` old) - Fresh, - /// The cache is stale and should be updated - Stale(Duration), - /// The cache is missing - Missing, +impl Language<'_> { + fn directory_name(&self) -> String { + format!("pages.{}", self.0) + } } -impl Cache { - pub fn new

(cache_dir: P, enable_styles: bool, tls_backend: TlsBackend) -> Self - where - P: Into, - { - Self { - cache_dir: cache_dir.into(), - enable_styles, - tls_backend, - } - } - - pub fn cache_dir(&self) -> &Path { - &self.cache_dir - } - - /// Make sure that the cache directory exists and is a directory. - /// If necessary, create the directory. - fn ensure_cache_dir_exists(&self) -> Result<()> { - // Check whether `cache_dir` exists and is a directory - let (cache_dir_exists, cache_dir_is_dir) = self - .cache_dir - .metadata() - .map_or((false, false), |md| (true, md.is_dir())); - ensure!( - !cache_dir_exists || cache_dir_is_dir, - "Cache directory path `{}` is not a directory", - self.cache_dir.display(), - ); - - if !cache_dir_exists { - // If missing, try to create the complete directory path - fs::create_dir_all(&self.cache_dir).with_context(|| { - format!( - "Cache directory path `{}` cannot be created", - self.cache_dir.display(), - ) - })?; - eprintln!( - "Successfully created cache directory path `{}`.", - self.cache_dir.display(), - ); - } - - Ok(()) - } - - fn pages_dir(&self) -> PathBuf { - self.cache_dir.join(TLDR_PAGES_DIR) - } - - /// Update the pages cache from the specified URL. - pub fn update(&self, archive_source: &str) -> Result<()> { - self.ensure_cache_dir_exists()?; - - let archive_url = format!("{archive_source}/tldr.zip"); - - let client = Self::build_client(self.tls_backend)?; - // First, download the compressed data - let bytes: Vec = Self::download(&client, &archive_url)?; - - // Decompress the response body into an `Archive` - let mut archive = ZipArchive::new(Cursor::new(bytes)) - .context("Could not decompress downloaded ZIP archive")?; - - // Clear cache directory - // Note: This is not the best solution. Ideally we would download the - // archive to a temporary directory and then swap the two directories. - // But renaming a directory doesn't work across filesystems and Rust - // does not yet offer a recursive directory copying function. So for - // now, we'll use this approach. - self.clear() - .context("Could not clear the cache directory")?; - - // Extract archive into pages dir - archive - .extract(self.pages_dir()) - .context("Could not unpack compressed data")?; - - Ok(()) - } - - /// Return the duration since the cache directory was last modified. - pub fn last_update(&self) -> Option { - if let Ok(metadata) = fs::metadata(self.pages_dir()) { - if let Ok(mtime) = metadata.modified() { - let now = SystemTime::now(); - return now.duration_since(mtime).ok(); - } - } - None - } - - /// Return the freshness of the cache (fresh, stale or missing). - pub fn freshness(&self) -> CacheFreshness { - match self.last_update() { - Some(ago) if ago > crate::config::MAX_CACHE_AGE => CacheFreshness::Stale(ago), - Some(_) => CacheFreshness::Fresh, - None => CacheFreshness::Missing, - } - } - - /// Return the platform directory. - fn get_platform_dir(platform: PlatformType) -> &'static str { - match platform { +impl PlatformType { + fn directory_name(self) -> &'static str { + match self { PlatformType::Linux => "linux", PlatformType::OsX => "osx", PlatformType::SunOs => "sunos", @@ -215,224 +319,10 @@ impl Cache { PlatformType::Common => "common", } } - - /// Check for pages for a given platform in one of the given languages. - fn find_page_for_platform( - page_name: &str, - pages_dir: &Path, - platform: &str, - language_dirs: &[String], - ) -> Option { - language_dirs - .iter() - .map(|lang_dir| pages_dir.join(lang_dir).join(platform).join(page_name)) - .find(|path| path.exists() && path.is_file()) - } - - /// Look up custom patch (.patch.md). If it exists, store it in a variable. - fn find_patch(patch_name: &str, custom_pages_dir: Option<&Path>) -> Option { - custom_pages_dir - .map(|custom_dir| custom_dir.join(patch_name)) - .filter(|path| path.exists() && path.is_file()) - } - - /// Search for a page and return the path to it. - pub fn find_page( - &self, - name: &str, - languages: &[Language<'_>], - custom_pages_dir: Option<&Path>, - platforms: &[PlatformType], - ) -> Option { - let page_filename = format!("{name}.md"); - let patch_filename = format!("{name}.patch.md"); - let custom_filename = format!("{name}.page.md"); - - // Determine directory paths - let pages_dir = self.pages_dir(); - let lang_dirs: Vec = languages.iter().map(Language::directory_name).collect(); - - // Look up custom page (.page.md). If it exists, return it directly - if let Some(config_dir) = custom_pages_dir { - // TODO: Remove this check 1 year after version 1.7.0 was released - self.check_for_old_custom_pages(config_dir); - - let custom_page = config_dir.join(custom_filename); - if custom_page.exists() && custom_page.is_file() { - return Some(PageLookupResult::with_page(custom_page)); - } - } - - let patch_path = Self::find_patch(&patch_filename, custom_pages_dir); - - // Try to find a platform specific path next, in the order supplied by the user, and append custom patch to it. - for &platform in platforms { - let platform_dir = Cache::get_platform_dir(platform); - if let Some(page) = - Self::find_page_for_platform(&page_filename, &pages_dir, platform_dir, &lang_dirs) - { - return Some(PageLookupResult::with_page(page).with_optional_patch(patch_path)); - } - } - - None - } - - /// Return the available pages. - pub fn list_pages( - &self, - custom_pages_dir: Option<&Path>, - platforms: &[PlatformType], - ) -> Vec { - // Determine platforms directory and platform - let platforms_dir = self.pages_dir().join("pages"); - let platform_dirs: Vec<&'static str> = platforms - .iter() - .map(|&p| Self::get_platform_dir(p)) - .collect(); - - // Closure that allows the WalkDir instance to traverse platform - // relevant page directories, but not others. - let should_walk = |entry: &DirEntry| -> bool { - let file_type = entry.file_type(); - let Some(file_name) = entry.file_name().to_str() else { - return false; - }; - if file_type.is_dir() { - return platform_dirs.contains(&file_name); - } else if file_type.is_file() { - return true; - } - false - }; - - let to_stem = |entry: DirEntry| -> Option { - entry - .path() - .file_stem() - .and_then(OsStr::to_str) - .map(str::to_string) - }; - - let to_stem_custom = |entry: DirEntry| -> Option { - entry - .path() - .file_name() - .and_then(OsStr::to_str) - .and_then(|s| s.strip_suffix(".page.md")) - .map(str::to_string) - }; - - // Recursively walk through platform specific directory - let mut pages = WalkDir::new(platforms_dir) - .min_depth(1) // Skip root directory - .into_iter() - .filter_entry(should_walk) // Filter out pages for other architectures - .filter_map(Result::ok) // Convert results to options, filter out errors - .filter_map(|e| { - let extension = e.path().extension().unwrap_or_default(); - if e.file_type().is_file() && extension == "md" { - to_stem(e) - } else { - None - } - }) - .collect::>(); - - if let Some(custom_pages_dir) = custom_pages_dir { - let is_page = |entry: &DirEntry| -> bool { - entry.file_type().is_file() - && entry - .path() - .file_name() - .and_then(OsStr::to_str) - .is_some_and(|file_name| file_name.ends_with(".page.md")) - }; - - let custom_pages = WalkDir::new(custom_pages_dir) - .min_depth(1) - .max_depth(1) - .into_iter() - .filter_entry(is_page) - .filter_map(Result::ok) - .filter_map(to_stem_custom); - - pages.extend(custom_pages); - } - - pages.sort(); - pages.dedup(); - pages - } - - /// Delete the cache directory - /// - /// Returns true if the cache was deleted and false if the cache dir did - /// not exist. - pub fn clear(&self) -> Result { - if !self.cache_dir.exists() { - return Ok(false); - } - ensure!( - self.cache_dir.is_dir(), - "Cache path ({}) is not a directory.", - self.cache_dir.display(), - ); - - // Delete old tldr-pages cache location as well if present - // TODO: To be removed in the future - for pages_dir_name in [TLDR_PAGES_DIR, TLDR_OLD_PAGES_DIR] { - let pages_dir = self.cache_dir.join(pages_dir_name); - - if pages_dir.exists() { - fs::remove_dir_all(&pages_dir).with_context(|| { - format!( - "Could not remove the cache directory at {}", - pages_dir.display() - ) - })?; - } - } - - Ok(true) - } - - /// Check for old custom pages (without .md suffix) and print a warning. - fn check_for_old_custom_pages(&self, custom_pages_dir: &Path) { - let old_custom_pages_exist = WalkDir::new(custom_pages_dir) - .min_depth(1) - .max_depth(1) - .into_iter() - .filter_entry(|entry| entry.file_type().is_file()) - .any(|entry| { - if let Ok(entry) = entry { - let extension = entry.path().extension(); - if let Some(extension) = extension { - extension == "page" || extension == "patch" - } else { - false - } - } else { - false - } - }); - if old_custom_pages_exist { - print_warning( - self.enable_styles, - &format!( - "Custom pages using the old naming convention were found in {}.\n\ - Please rename them to follow the new convention:\n\ - - `.page` → `.page.md`\n\ - - `.patch` → `.patch.md`", - custom_pages_dir.display() - ), - ); - } - } } -impl Cache { - fn build_client(tls_backend: TlsBackend) -> Result { +impl Cache<'_> { + fn build_client(tls_backend: TlsBackend) -> Agent { let tls_builder = match tls_backend { #[cfg(feature = "native-tls")] TlsBackend::NativeTls => TlsConfig::builder() @@ -448,22 +338,32 @@ impl Cache { .root_certs(RootCerts::PlatformVerifier), }; let config = Agent::config_builder() + .http_status_as_error(false) // because we want to handle them .tls_config(tls_builder.build()) .build(); - Ok(config.into()) + config.into() } /// Download the archive from the specified URL. - fn download(client: &Agent, archive_url: &str) -> Result> { - let response = client - .get(archive_url) - .call() - .with_context(|| format!("Could not download tldr pages from {archive_url}"))?; - let mut buf: Vec = Vec::new(); - response.into_body().into_reader().read_to_end(&mut buf)?; - debug!("{} bytes downloaded", buf.len()); - Ok(buf) + fn download(client: &Agent, archive_url: &str) -> Result>> { + debug!("Downloading archive from {archive_url}"); + let response = client.get(archive_url).call(); + match response { + Ok(response) if response.status().is_success() => { + let mut buf: Vec = Vec::new(); + response.into_body().into_reader().read_to_end(&mut buf)?; + debug!("{} bytes downloaded", buf.len()); + Ok(Some(buf)) + } + Ok(response) if response.status() == StatusCode::NOT_FOUND => Ok(None), + _ => { + bail!( + "Could not download tldr pages from {archive_url}: {:?}", + response, + ) + } + } } } @@ -521,22 +421,4 @@ mod tests { assert_eq!(&buf, b"Hello\n"); } - - #[test] - #[cfg(feature = "native-tls")] - fn test_create_https_client_with_native_tls() { - Cache::build_client(TlsBackend::NativeTls).expect("fails to build a client."); - } - - #[test] - #[cfg(feature = "rustls-with-webpki-roots")] - fn test_create_https_client_with_rustls() { - Cache::build_client(TlsBackend::RustlsWithWebpkiRoots).expect("fails to build a client."); - } - - #[test] - #[cfg(feature = "rustls-with-native-roots")] - fn test_create_https_client_with_rustls_with_native_roots() { - Cache::build_client(TlsBackend::RustlsWithNativeRoots).expect("fails to build a client."); - } } diff --git a/src/main.rs b/src/main.rs index 2113de0..3797f0b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,9 +36,9 @@ use std::{ use anyhow::{anyhow, Context, Result}; use app_dirs::AppInfo; -use cache::Language; +use cache::{CacheConfig, Language, TLDR_OLD_PAGES_DIR}; use clap::Parser; -use config::StyleConfig; +use config::{StyleConfig, TlsBackend}; use log::debug; mod cache; @@ -52,7 +52,7 @@ mod types; mod utils; use crate::{ - cache::{Cache, CacheFreshness, PageLookupResult, TLDR_PAGES_DIR}, + cache::{Cache, PageLookupResult, TLDR_PAGES_DIR}, cli::Cli, config::{get_config_dir, make_default_config, Config, PathWithSource}, extensions::Dedup, @@ -67,77 +67,25 @@ const APP_INFO: AppInfo = AppInfo { author: NAME, }; -/// The cache should be updated if it was explicitly requested, -/// or if an automatic update is due and allowed. -fn should_update_cache(cache: &Cache, args: &Cli, config: &Config) -> bool { - args.update - || (!args.no_auto_update - && config.updates.auto_update - && cache - .last_update() - .map_or(true, |ago| ago >= config.updates.auto_update_interval)) -} - -#[derive(PartialEq)] -enum CheckCacheResult { - CacheFound, - CacheMissing, -} - -/// Check the cache for freshness. If it's stale or missing, show a warning. -fn check_cache(cache: &Cache, args: &Cli, enable_styles: bool) -> CheckCacheResult { - match cache.freshness() { - CacheFreshness::Fresh => CheckCacheResult::CacheFound, - CacheFreshness::Stale(_) if args.quiet => CheckCacheResult::CacheFound, - CacheFreshness::Stale(age) => { - print_warning( - enable_styles, - &format!( - "The cache hasn't been updated for {} days.\n\ - You should probably run `tldr --update` soon.", - age.as_secs() / 24 / 3600 - ), - ); - CheckCacheResult::CacheFound - } - CacheFreshness::Missing => { - print_error( - enable_styles, - &anyhow::anyhow!( - "Page cache not found. Please run `tldr --update` to download the cache." - ), - ); - println!("\nNote: You can optionally enable automatic cache updates by adding the"); - println!("following config to your config file:\n"); - println!(" [updates]"); - println!(" auto_update = true\n"); - println!("The path to your config file can be looked up with `tldr --show-paths`."); - println!("To create an initial config file, use `tldr --seed-config`.\n"); - println!("You can find more tips and tricks in our docs:\n"); - println!(" https://tealdeer-rs.github.io/tealdeer/config_updates.html"); - CheckCacheResult::CacheMissing - } - } -} - /// Clear the cache -fn clear_cache(cache: &Cache, quietly: bool) -> Result<()> { - let cache_dir_found = cache.clear().context("Could not clear cache")?; +fn clear_cache(cache: Cache, quietly: bool) -> Result<()> { + let cache_dir = cache.config().pages_directory.display(); + cache.clear().context("Could not clear cache")?; if !quietly { - let cache_dir = cache.cache_dir().display(); - if cache_dir_found { - eprintln!("Successfully cleared cache at `{cache_dir}`."); - } else { - eprintln!("Cache directory not found at `{cache_dir}`, nothing to do."); - } + eprintln!("Successfully cleared cache at `{cache_dir}`."); } Ok(()) } /// Update the cache -fn update_cache(cache: &Cache, archive_source: &str, quietly: bool) -> Result<()> { +fn update_cache( + cache: &mut Cache, + archive_source: &str, + tls_backend: TlsBackend, + quietly: bool, +) -> Result<()> { cache - .update(archive_source) + .update(archive_source, tls_backend) .context("Could not update cache")?; if !quietly { eprintln!("Successfully updated cache."); @@ -333,8 +281,6 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { return Ok(ExitCode::SUCCESS); } - let platforms = compute_platforms(args.platforms.as_ref()); - // If a local file was passed in, render it and exit if let Some(file) = args.render { let path = PageLookupResult::with_page(file); @@ -342,56 +288,120 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { return Ok(ExitCode::SUCCESS); } - // Instantiate cache. This will not yet create the cache directory! - let cache = Cache::new( - &config.directories.cache_dir.path, - enable_styles, - config.updates.tls_backend, - ); + let platforms = compute_platforms(args.platforms.as_ref()); + let languages = args + .language + .as_deref() + .map_or_else(get_languages_from_env, |lang| vec![Language(lang)]); + + let cache_config = CacheConfig { + pages_directory: &config.directories.cache_dir.path().join(TLDR_PAGES_DIR), + custom_pages_directory: config + .directories + .custom_pages_dir + .as_ref() + .map(PathWithSource::path), + platforms: &platforms, + languages: &languages, + }; + + // TODO: remove in tealdeer 1.9 + let old_config = CacheConfig { + pages_directory: &config.directories.cache_dir.path().join(TLDR_OLD_PAGES_DIR), + ..cache_config + }; + if let Ok(Some(old_cache)) = Cache::open(old_config) { + old_cache.clear()?; + eprintln!("Cleared pages from old cache location."); + } - // Clear cache, pass through if args.clear_cache { - clear_cache(&cache, args.quiet)?; + if let Some(cache) = Cache::open(cache_config)? { + clear_cache(cache, args.quiet)?; + } + return Ok(ExitCode::SUCCESS); } - if should_update_cache(&cache, &args, &config) { - update_cache(&cache, &config.updates.archive_source, args.quiet)?; - } else if (args.list || !args.command.is_empty()) - && check_cache(&cache, &args, enable_styles) == CheckCacheResult::CacheMissing - { - // Cache is needed, but missing - return Ok(ExitCode::FAILURE); - } + let cache = if args.update || config.updates.auto_update && !args.no_auto_update { + let (mut cache, was_created) = Cache::open_or_create(cache_config)?; + if was_created || args.update || cache.age()? >= config.updates.auto_update_interval { + update_cache( + &mut cache, + &config.updates.archive_source, + config.updates.tls_backend, + args.quiet, + )?; + } + + cache + } else if args.list || !command.is_empty() { + // Cache is needed for these commands to work + let Some(cache) = Cache::open(cache_config)? else { + print_error( + enable_styles, + &anyhow::anyhow!( + "Page cache not found. Please run `tldr --update` to download the cache." + ), + ); + println!("\nNote: You can optionally enable automatic cache updates by adding the"); + println!("following config to your config file:\n"); + println!(" [updates]"); + println!(" auto_update = true\n"); + println!("The path to your config file can be looked up with `tldr --show-paths`."); + println!("To create an initial config file, use `tldr --seed-config`.\n"); + println!("You can find more tips and tricks in our docs:\n"); + println!(" https://tealdeer-rs.github.io/tealdeer/config_updates.html"); + + return Ok(ExitCode::FAILURE); + }; + + let age = cache.age()?; + if age > config::MAX_CACHE_AGE && !args.quiet { + print_warning( + enable_styles, + &format!( + "The cache hasn't been updated for {} days.\n\ + You should probably run `tldr --update` soon.", + age.as_secs() / 24 / 3600 + ), + ); + } + + cache + } else { + // There is nothing left to do + return Ok(ExitCode::SUCCESS); + }; - // List cached commands and exit if args.list { - println!( - "{}", - cache.list_pages(custom_pages_dir, &platforms).join("\n") - ); + for page in cache.list_pages()? { + println!("{page}"); + } return Ok(ExitCode::SUCCESS); } // Show command from cache if !command.is_empty() { - // Collect languages - let languages = args - .language - .as_deref() - .map_or_else(get_languages_from_env, |lang| vec![Language(lang)]); + // TODO: Remove this check 1 year after version 1.7.0 was released + if cache.old_custom_pages_exist()? { + print_warning( + enable_styles, + &format!( + "Custom pages using the old naming convention were found in {}.\n\ + Please rename them to follow the new convention:\n\ + - `.page` → `.page.md`\n\ + - `.patch` → `.patch.md`", + cache + .config() + .custom_pages_directory + .expect("Old custom pages can only exist in custom pages directory") + .display(), + ), + ); + } - // Search for command in cache - let Some(lookup_result) = cache.find_page( - &command, - &languages, - config - .directories - .custom_pages_dir - .as_ref() - .map(PathWithSource::path), - &platforms, - ) else { + let Some(lookup_result) = cache.find_page(&command) else { if !args.quiet { print_warning( enable_styles, diff --git a/tests/cache/pages/common/git-checkout.md b/tests/cache/pages.en/common/git-checkout.md similarity index 100% rename from tests/cache/pages/common/git-checkout.md rename to tests/cache/pages.en/common/git-checkout.md diff --git a/tests/cache/pages/common/inkscape-v1.md b/tests/cache/pages.en/common/inkscape-v1.md similarity index 100% rename from tests/cache/pages/common/inkscape-v1.md rename to tests/cache/pages.en/common/inkscape-v1.md diff --git a/tests/cache/pages/common/inkscape-v2.md b/tests/cache/pages.en/common/inkscape-v2.md similarity index 100% rename from tests/cache/pages/common/inkscape-v2.md rename to tests/cache/pages.en/common/inkscape-v2.md diff --git a/tests/cache/pages/common/which.md b/tests/cache/pages.en/common/which.md similarity index 100% rename from tests/cache/pages/common/which.md rename to tests/cache/pages.en/common/which.md diff --git a/tests/lib.rs b/tests/lib.rs index 172c1c5..2a1665c 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -16,6 +16,7 @@ use predicates::{ use tempfile::{Builder as TempfileBuilder, TempDir}; pub static TLDR_PAGES_DIR: &str = "tldr-pages"; +pub static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; struct TestEnv { _test_dir: TempDir, @@ -36,9 +37,9 @@ impl TestEnv { features: vec![], }; - create_dir_all(&this.cache_dir()).unwrap(); - create_dir_all(&this.config_dir()).unwrap(); - create_dir_all(&this.custom_pages_dir()).unwrap(); + create_dir_all(this.cache_dir()).unwrap(); + create_dir_all(this.config_dir()).unwrap(); + create_dir_all(this.custom_pages_dir()).unwrap(); this.append_to_config(format!( "directories.cache_dir = '{}'\n", @@ -100,7 +101,11 @@ impl TestEnv { /// Add entry for that environment to an OS-specific subfolder. fn add_os_entry(&self, os: &str, name: &str, contents: &str) { - let dir = self.cache_dir().join(TLDR_PAGES_DIR).join("pages").join(os); + let dir = self + .cache_dir() + .join(TLDR_PAGES_DIR) + .join("pages.en") + .join(os); create_dir_all(&dir).unwrap(); fs::write(dir.join(format!("{name}.md")), contents.as_bytes()).unwrap(); @@ -355,6 +360,45 @@ fn test_quiet_cache() { .stdout(is_empty()); } +#[test] +fn test_clear_only_pages_directory() { + let testenv = TestEnv::new().install_default_cache(); + testenv + .command() + .args(["--clear-cache"]) + .assert() + .success() + .stderr(contains(format!( + "Successfully cleared cache at `{}`.", + testenv.cache_dir().join(TLDR_PAGES_DIR).to_str().unwrap(), + ))); + + assert!(testenv.cache_dir().is_dir()); + assert!(!testenv.cache_dir().join(TLDR_PAGES_DIR).exists()); +} + +#[test] +fn test_always_delete_old_pages_directory() { + let testenv = TestEnv::new().install_default_cache(); + fs::rename( + testenv.cache_dir().join(TLDR_PAGES_DIR), + testenv.cache_dir().join(TLDR_OLD_PAGES_DIR), + ) + .unwrap(); + + testenv + .command() + .arg("--list") + .assert() + .failure() + .stderr(contains("Cleared pages from old cache location.")) + .stderr(contains("Page cache not found.")); + + assert!(testenv.cache_dir().is_dir()); + assert!(!testenv.cache_dir().join(TLDR_PAGES_DIR).exists()); + assert!(!testenv.cache_dir().join(TLDR_OLD_PAGES_DIR).exists()); +} + #[test] fn test_warn_invalid_tls_backend() { let testenv = TestEnv::new() @@ -429,38 +473,59 @@ fn test_create_cache_directory_path() { .assert() .success() .stderr(contains(format!( - "Successfully created cache directory path `{}`.", - internal_cache_dir.to_str().unwrap() + "Successfully created cache directory `{}`.", + internal_cache_dir.join(TLDR_PAGES_DIR).to_str().unwrap() ))) .stderr(contains("Successfully updated cache.")); assert!(internal_cache_dir.is_dir()); } -#[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] #[test] fn test_cache_location_not_a_directory() { - let testenv = TestEnv::new().remove_initial_config(); + let testenv = TestEnv::new(); let cache_dir = &testenv.cache_dir(); - let internal_file = cache_dir.join("internal"); - File::create(&internal_file).unwrap(); - - testenv.append_to_config(format!( - "directories.cache_dir = '{}'\n", - internal_file.to_str().unwrap() - )); + File::create(cache_dir.join(TLDR_PAGES_DIR)).unwrap(); testenv .command() - .arg("--update") + .arg("--list") .assert() .failure() .stderr(contains(format!( - "Cache directory path `{}` is not a directory", - internal_file.display(), + "Cache directory `{}` exists, but is not a directory.", + cache_dir.join(TLDR_PAGES_DIR).display(), ))); } +#[cfg(unix)] +#[test] +fn test_cache_location_permission_denied() { + use std::os::unix::fs::PermissionsExt; + + let testenv = TestEnv::new().install_default_cache(); + + testenv + .command() + .arg("--list") + .assert() + .success() + .stderr(contains("Permission denied").not()); + + // Make cache directory unreadable + let cache_dir = testenv.cache_dir(); + let mut permissions = cache_dir.metadata().unwrap().permissions(); + permissions.set_mode(0); + fs::set_permissions(cache_dir, permissions).unwrap(); + + testenv + .command() + .arg("--list") + .assert() + .failure() + .stderr(contains("Permission denied")); +} + #[test] fn test_cache_location_source() { let testenv = TestEnv::new().remove_initial_config(); @@ -624,7 +689,7 @@ fn test_os_specific_page() { fn test_markdown_rendering() { let testenv = TestEnv::new().install_default_cache(); - let expected = include_str!("cache/pages/common/which.md"); + let expected = include_str!("cache/pages.en/common/which.md"); testenv .command() .args(["--raw", "which"]) @@ -1008,7 +1073,7 @@ fn test_custom_page_overwrites() { // Add .page.md file to custom_pages_dir testenv.add_page_entry( "inkscape-v2", - include_str!("cache/pages/common/inkscape-v2.md"), + include_str!("cache/pages.en/common/inkscape-v2.md"), ); // Load expected output @@ -1051,7 +1116,7 @@ fn test_custom_patch_does_not_append_to_custom() { // In addition to the page in the cache, add the same page as a custom page. testenv.add_page_entry( "inkscape-v2", - include_str!("cache/pages/common/inkscape-v2.md"), + include_str!("cache/pages.en/common/inkscape-v2.md"), ); // Load expected output @@ -1114,7 +1179,7 @@ fn test_raw_render_file() { let path = testenv .cache_dir() .join(TLDR_PAGES_DIR) - .join("pages/common/inkscape-v1.md"); + .join("pages.en/common/inkscape-v1.md"); let mut args = vec!["--color", "never", "-f", &path.to_str().unwrap()]; // Default render @@ -1134,7 +1199,7 @@ fn test_raw_render_file() { .args(&args) .assert() .success() - .stdout(diff(include_str!("cache/pages/common/inkscape-v1.md"))); + .stdout(diff(include_str!("cache/pages.en/common/inkscape-v1.md"))); } fn touch_custom_page(testenv: &TestEnv) { From 630b7f442376232012b01f4fde5fcae6fc236aa2 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Tue, 5 Aug 2025 23:46:49 +0200 Subject: [PATCH 329/368] Allow references in `Config` (#429) For #251, I want to use the `Language<'_>` type inside `Config`. The languages will either refer to values read from the config file, or to static strings from `get_languages_from_env`, so just using `Language<'static>` is not an option. Instead, some input for the `Config` needs to be persisted in the main function for the duration of the program so that the config can reference it. At first I was hoping that this input would be the `contents` string from `RawConfig::load`, but as it turns out you cannot (in general) deserialize strings from toml without having to alter them, for example when they contain escapes like `\n`. Thus, the toml parser seemingly doesn't even try and just throws an error when deserializing into a borrowed string (even if it could in theory just return the correct substring from the input). Given that `RawConfig` should stay static then, the raw config itself is the next best thing to keep alive and have the config reference into. While this change might seem a bit drastic for little benefit, I am actually pretty happy with it because I want to unify the configuration anyways at some point so that the CLI arguments, environment variables, and the config file are merged at the beginning of the program and then only a single config is used for the everything (no more `enable_styles` everywhere!). At this time, the `Config` would have references into `Cli` anyways, and having the `ConfigLoader` as an entity for this merging also seems natural. --- src/config.rs | 146 ++++++++++++++++++++++++++------------------------ src/main.rs | 13 +++-- 2 files changed, 83 insertions(+), 76 deletions(-) diff --git a/src/config.rs b/src/config.rs index be41dd2..2d4d3a8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,7 +1,7 @@ use std::{ env, fmt, fs::{self, File}, - io::{ErrorKind, Read, Write}, + io::{ErrorKind, Write}, path::{Path, PathBuf}, time::Duration, }; @@ -138,8 +138,8 @@ struct RawStyleConfig { pub example_variable: RawStyle, } -impl From for StyleConfig { - fn from(raw_style_config: RawStyleConfig) -> Self { +impl From<&RawStyleConfig> for StyleConfig { + fn from(raw_style_config: &RawStyleConfig) -> Self { Self { command_name: raw_style_config.command_name.into(), description: raw_style_config.description.into(), @@ -158,8 +158,8 @@ struct RawDisplayConfig { pub use_pager: bool, } -impl From for DisplayConfig { - fn from(raw_display_config: RawDisplayConfig) -> Self { +impl From<&RawDisplayConfig> for DisplayConfig { + fn from(raw_display_config: &RawDisplayConfig) -> Self { Self { compact: raw_display_config.compact, use_pager: raw_display_config.use_pager, @@ -202,10 +202,10 @@ impl Default for RawUpdatesConfig { } } -impl TryFrom for UpdatesConfig { +impl<'a> TryFrom<&'a RawUpdatesConfig> for UpdatesConfig<'a> { type Error = anyhow::Error; - fn try_from(raw_updates_config: RawUpdatesConfig) -> Result { + fn try_from(raw_updates_config: &'a RawUpdatesConfig) -> Result { let tls_backend = match raw_updates_config.tls_backend { #[cfg(feature = "native-tls")] RawTlsBackend::NativeTls => TlsBackend::NativeTls, @@ -227,7 +227,7 @@ impl TryFrom for UpdatesConfig { auto_update_interval: Duration::from_secs( raw_updates_config.auto_update_interval_hours * 3600, ), - archive_source: raw_updates_config.archive_source, + archive_source: &raw_updates_config.archive_source, tls_backend, }) } @@ -250,20 +250,6 @@ struct RawConfig { directories: RawDirectoriesConfig, } -impl RawConfig { - fn new() -> Self { - Self::default() - } - - fn load(mut config: impl Read) -> Result { - let mut content = String::new(); - config - .read_to_string(&mut content) - .context("Failed to read from config file")?; - toml::from_str(&content).context("Failed to parse TOML config file") - } -} - impl Default for RawConfig { fn default() -> Self { let mut raw_config = RawConfig { @@ -300,10 +286,10 @@ pub struct DisplayConfig { } #[derive(Clone, Debug, PartialEq, Eq)] -pub struct UpdatesConfig { +pub struct UpdatesConfig<'a> { pub auto_update: bool, pub auto_update_interval: Duration, - pub archive_source: String, + pub archive_source: &'a str, pub tls_backend: TlsBackend, } @@ -369,23 +355,23 @@ pub enum TlsBackend { } #[derive(Clone, Debug, PartialEq, Eq)] -pub struct Config { +pub struct Config<'a> { pub style: StyleConfig, pub display: DisplayConfig, - pub updates: UpdatesConfig, + pub updates: UpdatesConfig<'a>, pub directories: DirectoriesConfig, pub file_path: PathWithSource, } -impl Config { +impl<'a> Config<'a> { /// Convert a `RawConfig` to a high-level `Config`. /// /// For this, some values need to be converted to other types and some /// defaults need to be set (sometimes based on env variables). - fn from_raw(raw_config: RawConfig, config_file_path: PathWithSource) -> Result { - let style = raw_config.style.into(); - let display = raw_config.display.into(); - let updates = raw_config.updates.try_into()?; + fn from_raw(raw_config: &'a RawConfig, config_file_path: PathWithSource) -> Result { + let style = (&raw_config.style).into(); + let display = (&raw_config.display).into(); + let updates = (&raw_config.updates).try_into()?; let relative_path_root = config_file_path .path() .parent() @@ -404,7 +390,7 @@ impl Config { path: PathBuf::from(env_var), source: PathSource::EnvVar, } - } else if let Some(config_value) = raw_config.directories.cache_dir { + } else if let Some(config_value) = &raw_config.directories.cache_dir { // If the user explicitly configured a cache directory, use that. PathWithSource { // Resolve possible relative path. It would be nicer to clean up the path, but Rust stdlib @@ -425,6 +411,7 @@ impl Config { let custom_pages_dir = raw_config .directories .custom_pages_dir + .as_ref() .map(|path| PathWithSource { // Resolve possible relative path. path: relative_path_root.join(path), @@ -454,47 +441,64 @@ impl Config { file_path: config_file_path, }) } +} - /// Load and read the config file from the given path into - /// a [Config] and return it. - /// - /// path: The path to the config file. - pub fn load(path: &Path) -> Result { - let raw_config = RawConfig::load(File::open(path)?)?; +/// The [`ConfigLoader`] is used to load a [`Config`] from a file. +/// +/// Since the rich [`Config`] keeps references to [`RawConfig`], the raw config needs to be kept alive outside of the +/// [`Config`]. The [`ConfigLoader`] thus offers the following flow: +/// 1. Read a raw config using [`ConfigLoader::read`] or [`ConfigLoader::read_default_path`]. +/// 2. Validate the contents to a [`Config`] that borrows the [`ConfigLoader`]. +pub struct ConfigLoader { + raw: RawConfig, + path: PathWithSource, +} - let config = Self::from_raw( - raw_config, - PathWithSource { - path: path.into(), - source: PathSource::Cli, - }, - ) - .context("Could not process raw config")?; - - Ok(config) +impl ConfigLoader { + fn read_internal(path: PathWithSource, allow_not_found: bool) -> Result { + match fs::read_to_string(&path.path) { + Ok(content) => Ok(Self { + raw: toml::from_str(&content).with_context(|| { + format!( + "Could not parse config file contents as toml from {}.", + path.path.display() + ) + })?, + path, + }), + Err(e) if allow_not_found && e.kind() == ErrorKind::NotFound => Ok(Self { + raw: RawConfig::default(), + path, + }), + Err(e) => Err(e).context(format!( + "Could not read config file contents from {}.", + path.path().display() + )), + } } - /// Load and read the config file from the default path into - /// a [Config] and return it. - pub fn load_default_path() -> Result { - // Determine path - let config_file_path = - get_default_config_path().context("Could not determine config path")?; + /// Create a loader that uses the config at `path`. + pub fn read(path: PathBuf) -> Result { + Self::read_internal( + PathWithSource { + path, + source: PathSource::Cli, + }, + false, + ) + } - let raw_config = match File::open(config_file_path.path()) { - Ok(file) => RawConfig::load(file)?, - Err(e) if e.kind() == ErrorKind::NotFound => RawConfig::default(), - Err(e) => { - return Err(e).context(format!( - "Failed to open config file at {}", - config_file_path.path().display() - )); - } - }; - let config = - Self::from_raw(raw_config, config_file_path).context("Could not process raw config")?; + /// Create a loader that uses the default config file location. If no file is present at the default location, the + /// default configuration is used. + pub fn read_default_path() -> Result { + let path = get_default_config_path().context("Could not determine default config path.")?; + Self::read_internal(path, true) + } - Ok(config) + /// Parse the read [`RawConfig`] into a [`Config`]. + pub fn load(&self) -> Result> { + Config::from_raw(&self.raw, self.path.clone()) + .context("Could not process raw config into rich config") } } @@ -563,7 +567,7 @@ pub fn make_default_config(path: Option<&Path>) -> Result { // Create default config let serialized_config = - toml::to_string(&RawConfig::new()).context("Failed to serialize default config")?; + toml::to_string(&RawConfig::default()).context("Failed to serialize default config")?; // Write default config let mut config_file = @@ -577,7 +581,7 @@ pub fn make_default_config(path: Option<&Path>) -> Result { #[test] fn test_serialize_deserialize() { - let raw_config = RawConfig::new(); + let raw_config = RawConfig::default(); let serialized = toml::to_string(&raw_config).unwrap(); let deserialized: RawConfig = toml::from_str(&serialized).unwrap(); assert_eq!(raw_config, deserialized); @@ -585,12 +589,12 @@ fn test_serialize_deserialize() { #[test] fn test_relative_path_resolution() { - let mut raw_config = RawConfig::new(); + let mut raw_config = RawConfig::default(); raw_config.directories.cache_dir = Some("../cache".into()); raw_config.directories.custom_pages_dir = Some("../custom_pages".into()); let config = Config::from_raw( - raw_config, + &raw_config, PathWithSource { path: PathBuf::from("/path/to/config/config.toml"), source: PathSource::OsConvention, diff --git a/src/main.rs b/src/main.rs index 3797f0b..6920c63 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,7 +38,7 @@ use anyhow::{anyhow, Context, Result}; use app_dirs::AppInfo; use cache::{CacheConfig, Language, TLDR_OLD_PAGES_DIR}; use clap::Parser; -use config::{StyleConfig, TlsBackend}; +use config::{ConfigLoader, StyleConfig, TlsBackend}; use log::debug; mod cache; @@ -233,12 +233,15 @@ fn main() -> ExitCode { fn try_main(args: Cli, enable_styles: bool) -> Result { // Look up config file, if none is found fall back to default config. debug!("Loading config"); - let mut config = match &args.config_path { + let config_loader = match &args.config_path { Some(path) if !args.seed_config => { - Config::load(path).context("Could not load config from given path")? + ConfigLoader::read(path.clone()).context("Could not read config from given path")? + } + _ => { + ConfigLoader::read_default_path().context("Could not read config from default path")? } - _ => Config::load_default_path().context("Could not load config from default path")?, }; + let mut config = config_loader.load()?; // Override styles if needed if !enable_styles { @@ -327,7 +330,7 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { if was_created || args.update || cache.age()? >= config.updates.auto_update_interval { update_cache( &mut cache, - &config.updates.archive_source, + config.updates.archive_source, config.updates.tls_backend, args.quiet, )?; From 4377366c97770fe12efcb2370fd8a56f3e872317 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Sep 2025 16:52:36 +0200 Subject: [PATCH 330/368] Bump actions/checkout from 4 to 5 (#434) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/gh-pages.yml | 2 +- .github/workflows/release.yml | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a99b2f..f20709e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: exe_suffix: .exe runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} @@ -50,7 +50,7 @@ jobs: name: run clippy lints runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -62,7 +62,7 @@ jobs: name: run rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -74,7 +74,7 @@ jobs: name: build docs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup mdBook uses: peaceiris/actions-mdbook@v2 with: diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 26fff6e..8746d42 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -8,7 +8,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup mdBook uses: peaceiris/actions-mdbook@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5ccdf9..9371ef5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ jobs: create-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Create release for tag if: startsWith(github.ref, 'refs/tags/') run: | @@ -24,7 +24,7 @@ jobs: matrix: target: ["bash", "fish", "zsh"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Upload completion if: startsWith(github.ref, 'refs/tags/') run: | @@ -40,7 +40,7 @@ jobs: matrix: target: ["MIT", "APACHE"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Upload license if: startsWith(github.ref, 'refs/tags/') run: | @@ -66,7 +66,7 @@ jobs: - arch: "arm" libc: "musleabihf" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Pull Docker image run: docker pull messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} - name: Build in Docker @@ -86,7 +86,7 @@ jobs: - arch: "x86_64" - arch: "aarch64" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup toolchain uses: dtolnay/rust-toolchain@master with: @@ -102,7 +102,7 @@ jobs: build-windows: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup toolchain uses: dtolnay/rust-toolchain@master with: @@ -134,7 +134,7 @@ jobs: - macos-aarch64 - windows-x86_64-msvc steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/download-artifact@v4 - name: Upload binary if: startsWith(github.ref, 'refs/tags/') From 5cfb817e999f16681769041379bbdc0bd8ea6251 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Sep 2025 17:17:51 +0200 Subject: [PATCH 331/368] Bump actions/download-artifact from 4 to 5 (#433) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Niklas Mohrin --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9371ef5..b144b0f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -135,7 +135,7 @@ jobs: - windows-x86_64-msvc steps: - uses: actions/checkout@v5 - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v5 - name: Upload binary if: startsWith(github.ref, 'refs/tags/') run: | From 94f9030d36f5c41feae1f1d5ee8cfd1a5243eddf Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sat, 2 Aug 2025 23:29:18 +0200 Subject: [PATCH 332/368] Move Language related functionality into config module --- src/cache.rs | 8 ++-- src/config.rs | 114 +++++++++++++++++++++++++++++++++++++++++++++++++- src/main.rs | 114 +------------------------------------------------- 3 files changed, 119 insertions(+), 117 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index c18f03f..315f6f0 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -14,14 +14,14 @@ use ureq::{ }; use zip::ZipArchive; -use crate::{config::TlsBackend, types::PlatformType}; +use crate::{ + config::{Language, TlsBackend}, + types::PlatformType, +}; pub static TLDR_PAGES_DIR: &str = "tldr-pages"; pub static TLDR_OLD_PAGES_DIR: &str = "tldr-master"; -#[derive(Debug, PartialEq, Eq, Hash)] -pub struct Language<'a>(pub &'a str); - #[derive(Clone)] pub struct CacheConfig<'a> { pub pages_directory: &'a Path, diff --git a/src/config.rs b/src/config.rs index 2d4d3a8..f9ea88e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -3,6 +3,7 @@ use std::{ fs::{self, File}, io::{ErrorKind, Write}, path::{Path, PathBuf}, + sync::LazyLock, time::Duration, }; @@ -12,7 +13,7 @@ use serde::Serialize as _; use serde_derive::{Deserialize, Serialize}; use yansi::{Color, Style}; -use crate::types::PathSource; +use crate::{extensions::Dedup as _, types::PathSource}; pub const CONFIG_FILE_NAME: &str = "config.toml"; pub const MAX_CACHE_AGE: Duration = Duration::from_secs(2_592_000); // 30 days @@ -317,6 +318,49 @@ pub struct DirectoriesConfig { pub custom_pages_dir: Option, } +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct Language<'a>(pub &'a str); + +fn get_languages<'a>( + env_lang: Option<&'a str>, + env_language: Option<&'a str>, +) -> Vec> { + // Language list according to + // https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md#language + + let Some(env_lang) = env_lang else { + return vec![Language("en")]; + }; + + // Create an iterator that contains $LANGUAGE (':' separated list) followed by $LANG (single language) + let locales = env_language.unwrap_or("").split(':').chain([env_lang]); + + let mut lang_list = Vec::new(); + for locale in locales { + // Language plus country code (e.g. `en_US`) + if locale.len() >= 5 && locale.chars().nth(2) == Some('_') { + lang_list.push(Language(&locale[..5])); + } + // Language code only (e.g. `en`) + if locale.len() >= 2 && locale != "POSIX" { + lang_list.push(Language(&locale[..2])); + } + } + + lang_list.push(Language("en")); + lang_list.clear_duplicates(); + lang_list +} + +pub fn get_languages_from_env<'a>() -> Vec> { + static LANG: LazyLock> = LazyLock::new(|| std::env::var("LANG").ok()); + static LANGUAGE: LazyLock> = LazyLock::new(|| std::env::var("LANGUAGE").ok()); + get_languages( + LANG.as_ref().map(String::as_str), + LANGUAGE.as_ref().map(String::as_str), + ) +} + #[derive(Copy, Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] #[serde(rename_all = "kebab-case")] pub enum RawTlsBackend { @@ -611,3 +655,71 @@ fn test_relative_path_resolution() { Path::new("/path/to/config/../custom_pages") ); } + +#[cfg(test)] +mod test { + use super::*; + + mod language { + use super::*; + + #[test] + fn missing_lang_env() { + let lang_list = get_languages(None, Some("de:fr")); + assert_eq!(lang_list, [Language("en")]); + let lang_list = get_languages(None, None); + assert_eq!(lang_list, [Language("en")]); + } + + #[test] + fn missing_language_env() { + let lang_list = get_languages(Some("de"), None); + assert_eq!(lang_list, [Language("de"), Language("en")]); + } + + #[test] + fn preference_order() { + let lang_list = get_languages(Some("de"), Some("fr:cn")); + assert_eq!( + lang_list, + [ + Language("fr"), + Language("cn"), + Language("de"), + Language("en") + ] + ); + } + + #[test] + fn country_code_expansion() { + let lang_list = get_languages(Some("pt_BR"), None); + assert_eq!( + lang_list, + [Language("pt_BR"), Language("pt"), Language("en")] + ); + } + + #[test] + fn ignore_posix_and_c() { + let lang_list = get_languages(Some("POSIX"), None); + assert_eq!(lang_list, [Language("en")]); + let lang_list = get_languages(Some("C"), None); + assert_eq!(lang_list, [Language("en")]); + } + + #[test] + fn no_duplicates() { + let lang_list = get_languages(Some("de"), Some("fr:de:cn:de")); + assert_eq!( + lang_list, + [ + Language("fr"), + Language("de"), + Language("cn"), + Language("en") + ] + ); + } + } +} diff --git a/src/main.rs b/src/main.rs index 6920c63..5ae0a59 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,14 +31,13 @@ use std::{ io::{self, IsTerminal}, path::Path, process::{Command, ExitCode}, - sync::LazyLock, }; use anyhow::{anyhow, Context, Result}; use app_dirs::AppInfo; -use cache::{CacheConfig, Language, TLDR_OLD_PAGES_DIR}; +use cache::{CacheConfig, TLDR_OLD_PAGES_DIR}; use clap::Parser; -use config::{ConfigLoader, StyleConfig, TlsBackend}; +use config::{get_languages_from_env, ConfigLoader, Language, StyleConfig, TlsBackend}; use log::debug; mod cache; @@ -55,7 +54,6 @@ use crate::{ cache::{Cache, PageLookupResult, TLDR_PAGES_DIR}, cli::Cli, config::{get_config_dir, make_default_config, Config, PathWithSource}, - extensions::Dedup, output::print_page, types::{ColorOptions, PlatformType}, utils::{print_error, print_warning}, @@ -141,46 +139,6 @@ fn init_log() { #[cfg(not(feature = "logging"))] fn init_log() {} -fn get_languages<'a>( - env_lang: Option<&'a str>, - env_language: Option<&'a str>, -) -> Vec> { - // Language list according to - // https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md#language - - let Some(env_lang) = env_lang else { - return vec![Language("en")]; - }; - - // Create an iterator that contains $LANGUAGE (':' separated list) followed by $LANG (single language) - let locales = env_language.unwrap_or("").split(':').chain([env_lang]); - - let mut lang_list = Vec::new(); - for locale in locales { - // Language plus country code (e.g. `en_US`) - if locale.len() >= 5 && locale.chars().nth(2) == Some('_') { - lang_list.push(Language(&locale[..5])); - } - // Language code only (e.g. `en`) - if locale.len() >= 2 && locale != "POSIX" { - lang_list.push(Language(&locale[..2])); - } - } - - lang_list.push(Language("en")); - lang_list.clear_duplicates(); - lang_list -} - -fn get_languages_from_env<'a>() -> Vec> { - static LANG: LazyLock> = LazyLock::new(|| std::env::var("LANG").ok()); - static LANGUAGE: LazyLock> = LazyLock::new(|| std::env::var("LANGUAGE").ok()); - get_languages( - LANG.as_ref().map(String::as_str), - LANGUAGE.as_ref().map(String::as_str), - ) -} - fn spawn_editor(custom_pages_dir: &Path, file_name: &str) -> Result<()> { create_dir_all(custom_pages_dir).context("Failed to create custom pages directory")?; @@ -439,71 +397,3 @@ fn compute_platforms(platforms: Option<&Vec>) -> Vec None => vec![PlatformType::current(), PlatformType::Common], } } - -#[cfg(test)] -mod test { - use super::*; - - mod language { - use super::*; - - #[test] - fn missing_lang_env() { - let lang_list = get_languages(None, Some("de:fr")); - assert_eq!(lang_list, [Language("en")]); - let lang_list = get_languages(None, None); - assert_eq!(lang_list, [Language("en")]); - } - - #[test] - fn missing_language_env() { - let lang_list = get_languages(Some("de"), None); - assert_eq!(lang_list, [Language("de"), Language("en")]); - } - - #[test] - fn preference_order() { - let lang_list = get_languages(Some("de"), Some("fr:cn")); - assert_eq!( - lang_list, - [ - Language("fr"), - Language("cn"), - Language("de"), - Language("en") - ] - ); - } - - #[test] - fn country_code_expansion() { - let lang_list = get_languages(Some("pt_BR"), None); - assert_eq!( - lang_list, - [Language("pt_BR"), Language("pt"), Language("en")] - ); - } - - #[test] - fn ignore_posix_and_c() { - let lang_list = get_languages(Some("POSIX"), None); - assert_eq!(lang_list, [Language("en")]); - let lang_list = get_languages(Some("C"), None); - assert_eq!(lang_list, [Language("en")]); - } - - #[test] - fn no_duplicates() { - let lang_list = get_languages(Some("de"), Some("fr:de:cn:de")); - assert_eq!( - lang_list, - [ - Language("fr"), - Language("de"), - Language("cn"), - Language("en") - ] - ); - } - } -} From 7e014093cf1151fe4a5d808081c8728fe3faa39e Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sat, 2 Aug 2025 23:30:30 +0200 Subject: [PATCH 333/368] Move existing tests from config module into test submodule --- src/config.rs | 66 +++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/config.rs b/src/config.rs index f9ea88e..7ae6299 100644 --- a/src/config.rs +++ b/src/config.rs @@ -623,43 +623,43 @@ pub fn make_default_config(path: Option<&Path>) -> Result { Ok(config_file_path) } -#[test] -fn test_serialize_deserialize() { - let raw_config = RawConfig::default(); - let serialized = toml::to_string(&raw_config).unwrap(); - let deserialized: RawConfig = toml::from_str(&serialized).unwrap(); - assert_eq!(raw_config, deserialized); -} - -#[test] -fn test_relative_path_resolution() { - let mut raw_config = RawConfig::default(); - raw_config.directories.cache_dir = Some("../cache".into()); - raw_config.directories.custom_pages_dir = Some("../custom_pages".into()); - - let config = Config::from_raw( - &raw_config, - PathWithSource { - path: PathBuf::from("/path/to/config/config.toml"), - source: PathSource::OsConvention, - }, - ) - .unwrap(); - - assert_eq!( - config.directories.cache_dir.path(), - Path::new("/path/to/config/../cache") - ); - assert_eq!( - config.directories.custom_pages_dir.unwrap().path(), - Path::new("/path/to/config/../custom_pages") - ); -} - #[cfg(test)] mod test { use super::*; + #[test] + fn serialize_deserialize() { + let raw_config = RawConfig::default(); + let serialized = toml::to_string(&raw_config).unwrap(); + let deserialized: RawConfig = toml::from_str(&serialized).unwrap(); + assert_eq!(raw_config, deserialized); + } + + #[test] + fn relative_path_resolution() { + let mut raw_config = RawConfig::default(); + raw_config.directories.cache_dir = Some("../cache".into()); + raw_config.directories.custom_pages_dir = Some("../custom_pages".into()); + + let config = Config::from_raw( + &raw_config, + PathWithSource { + path: PathBuf::from("/path/to/config/config.toml"), + source: PathSource::OsConvention, + }, + ) + .unwrap(); + + assert_eq!( + config.directories.cache_dir.path(), + Path::new("/path/to/config/../cache") + ); + assert_eq!( + config.directories.custom_pages_dir.unwrap().path(), + Path::new("/path/to/config/../custom_pages") + ); + } + mod language { use super::*; From 3fa96a5bb2c73810909635764084edd46432bb70 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sat, 6 Sep 2025 15:57:17 +0200 Subject: [PATCH 334/368] Add test config::test::language::with_encoding --- src/config.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/config.rs b/src/config.rs index 7ae6299..b4d6910 100644 --- a/src/config.rs +++ b/src/config.rs @@ -700,6 +700,15 @@ mod test { ); } + #[test] + fn with_encoding() { + let lang_list = get_languages(Some("de_DE.UTF-8"), None); + assert_eq!( + lang_list, + [Language("de_DE"), Language("de"), Language("en")] + ); + } + #[test] fn ignore_posix_and_c() { let lang_list = get_languages(Some("POSIX"), None); From a74b7120bd1f6e7a380223ee589649f27195bee1 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sun, 3 Aug 2025 00:45:12 +0200 Subject: [PATCH 335/368] Add search.languages setting --- docs/src/SUMMARY.md | 1 + docs/src/config.md | 2 +- docs/src/config_search.md | 14 ++++++ src/config.rs | 24 ++++++++++ src/main.rs | 12 ++--- tests/lib.rs | 98 +++++++++++++++++++++++++++++++++++++-- 6 files changed, 139 insertions(+), 12 deletions(-) create mode 100644 docs/src/config_search.md diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 2d5c716..4649382 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -8,6 +8,7 @@ - [Configuration](./config.md) - [Section: \[display\]](./config_display.md) - [Section: \[style\]](./config_style.md) + - [Section: \[search\]](./config_search.md) - [Section: \[updates\]](./config_updates.md) - [Section: \[directories\]](./config_directories.md) - [Tips and Tricks](./tips_and_tricks.md) diff --git a/docs/src/config.md b/docs/src/config.md index ece2706..6eeede4 100644 --- a/docs/src/config.md +++ b/docs/src/config.md @@ -22,7 +22,7 @@ On Linux, this will usually be `~/.config/tealdeer/config.toml`. Here's an example configuration file. Note that this example does not contain all possible config options. For details on the things that can be configured, please refer to the subsections of this documentation page -([display](config_display.html), [style](config_style.html), +([display](config_display.html), [style](config_style.html), [search](config_search.html), [updates](config_updates.html) or [directories](config_directories.html)). ```toml diff --git a/docs/src/config_search.md b/docs/src/config_search.md new file mode 100644 index 0000000..2d59d65 --- /dev/null +++ b/docs/src/config_search.md @@ -0,0 +1,14 @@ +# Section: \[search\] + +This config section is used to configure the page search in the cache. +The settings apply to `tldr ` and `tldr --list`. + +## `languages` + +The list of languages that should be considered when searching. +If unspecified, the list of languages will be inferred from the `LANG` and `LANGUAGE` environment variables. +Either way, the language used can be overwritten using the `--language` command line flag. + + [search] + # Show pages in German if available, otherwise show in English + languages = ["de", "en"] diff --git a/src/config.rs b/src/config.rs index b4d6910..69de9b5 100644 --- a/src/config.rs +++ b/src/config.rs @@ -242,6 +242,11 @@ struct RawDirectoriesConfig { pub custom_pages_dir: Option, } +#[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] +struct RawSearchConfig { + pub languages: Option>, +} + #[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(default)] struct RawConfig { @@ -249,6 +254,7 @@ struct RawConfig { display: RawDisplayConfig, updates: RawUpdatesConfig, directories: RawDirectoriesConfig, + search: RawSearchConfig, } impl Default for RawConfig { @@ -258,6 +264,7 @@ impl Default for RawConfig { display: RawDisplayConfig::default(), updates: RawUpdatesConfig::default(), directories: RawDirectoriesConfig::default(), + search: RawSearchConfig::default(), }; // Set default config @@ -318,6 +325,11 @@ pub struct DirectoriesConfig { pub custom_pages_dir: Option, } +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct SearchConfig<'a> { + pub languages: Vec>, +} + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct Language<'a>(pub &'a str); @@ -404,6 +416,7 @@ pub struct Config<'a> { pub display: DisplayConfig, pub updates: UpdatesConfig<'a>, pub directories: DirectoriesConfig, + pub search: SearchConfig<'a>, pub file_path: PathWithSource, } @@ -416,6 +429,16 @@ impl<'a> Config<'a> { let style = (&raw_config.style).into(); let display = (&raw_config.display).into(); let updates = (&raw_config.updates).try_into()?; + let search = SearchConfig { + languages: raw_config + .search + .languages + .as_ref() + .map_or_else(get_languages_from_env, |langs| { + langs.iter().map(|lang| Language(lang)).collect() + }), + }; + let relative_path_root = config_file_path .path() .parent() @@ -482,6 +505,7 @@ impl<'a> Config<'a> { display, updates, directories, + search, file_path: config_file_path, }) } diff --git a/src/main.rs b/src/main.rs index 5ae0a59..5bd0fa0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,7 +37,7 @@ use anyhow::{anyhow, Context, Result}; use app_dirs::AppInfo; use cache::{CacheConfig, TLDR_OLD_PAGES_DIR}; use clap::Parser; -use config::{get_languages_from_env, ConfigLoader, Language, StyleConfig, TlsBackend}; +use config::{ConfigLoader, Language, StyleConfig, TlsBackend}; use log::debug; mod cache; @@ -250,10 +250,10 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { } let platforms = compute_platforms(args.platforms.as_ref()); - let languages = args - .language - .as_deref() - .map_or_else(get_languages_from_env, |lang| vec![Language(lang)]); + let languages = match args.language.as_deref() { + Some(lang) => &[Language(lang)] as &[_], + None => &config.search.languages, + }; let cache_config = CacheConfig { pages_directory: &config.directories.cache_dir.path().join(TLDR_PAGES_DIR), @@ -263,7 +263,7 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { .as_ref() .map(PathWithSource::path), platforms: &platforms, - languages: &languages, + languages, }; // TODO: remove in tealdeer 1.9 diff --git a/tests/lib.rs b/tests/lib.rs index 2a1665c..37f3b30 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -11,6 +11,7 @@ use std::{ use assert_cmd::prelude::*; use predicates::{ boolean::PredicateBooleanExt, + ord::eq, prelude::predicate::str::{contains, diff, is_empty, is_match}, }; use tempfile::{Builder as TempfileBuilder, TempDir}; @@ -41,10 +42,7 @@ impl TestEnv { create_dir_all(this.config_dir()).unwrap(); create_dir_all(this.custom_pages_dir()).unwrap(); - this.append_to_config(format!( - "directories.cache_dir = '{}'\n", - this.cache_dir().to_str().unwrap(), - )); + this.init_config(); this } @@ -70,6 +68,15 @@ impl TestEnv { .write_all(content.as_ref().as_bytes()) .expect("Failed to append to config file."); } + fn delete_config(&self) { + fs::remove_file(self.config_dir().join("config.toml")).unwrap(); + } + fn init_config(&self) { + self.append_to_config(format!( + "directories.cache_dir = '{}'\n", + self.cache_dir().to_str().unwrap(), + )); + } fn create_secondary_config(self) -> Self { self.append_to_secondary_config(format!( @@ -101,10 +108,20 @@ impl TestEnv { /// Add entry for that environment to an OS-specific subfolder. fn add_os_entry(&self, os: &str, name: &str, contents: &str) { + self.add_os_lang_entry(os, "en", name, contents); + } + + /// Add entry for that environment to a language-specific subfolder. + fn add_lang_entry(&self, lang: &str, name: &str, contents: &str) { + self.add_os_lang_entry("common", lang, name, contents); + } + + /// Add entry for that environment to an OS- and language specific subfolder. + fn add_os_lang_entry(&self, os: &str, lang: &str, name: &str, contents: &str) { let dir = self .cache_dir() .join(TLDR_PAGES_DIR) - .join("pages.en") + .join(format!("pages.{lang}")) .join(os); create_dir_all(&dir).unwrap(); @@ -152,6 +169,19 @@ impl TestEnv { } let run = build.run().expect("Failed to build tealdeer for testing"); let mut cmd = run.command(); + + // Avoid inheriting those from the test process. We can't just use .env_clear() because + // this breaks tests on Windows in GitHub Actions. + let relevant_env_variables = [ + "LANG", + "LANGUAGE", + "TEALDEER_CACHE_DIR", + "EDITOR", + "NO_COLOR", + ]; + for variable_name in relevant_env_variables { + cmd.env_remove(variable_name); + } cmd.env("TEALDEER_CONFIG_DIR", self.config_dir().to_str().unwrap()); cmd } @@ -908,6 +938,64 @@ fn test_common_platform_is_used_as_fallback() { .success(); } +#[test] +fn test_search_language_precedence() { + let testenv = TestEnv::new(); + for lang in ["en", "de", "it", "fr", "pl", "nl"] { + testenv.add_lang_entry(lang, lang, ""); + } + + let run = |cases: &[(Vec<(&str, &str)>, Vec<&str>, &str)]| { + for (extra_env, extra_args, expected) in cases { + let mut cmd = testenv.command(); + for (key, value) in extra_env { + cmd.env(key, value); + } + cmd.args(extra_args); + cmd.arg("--list"); + cmd.assert().success().stdout(eq(*expected)); + } + }; + + let env_cases = &[ + (vec![], vec![], "en\n"), + (vec![("LANGUAGE", "de:it")], vec![], "en\n"), + ( + vec![("LANG", "fr"), ("LANGUAGE", "de:it")], + vec![], + "de\nen\nfr\nit\n", + ), + ( + vec![("LANG", "fr"), ("LANGUAGE", "de:it")], + vec!["--language", "pl"], + "pl\n", + ), + ]; + run(env_cases); + + // Environment is only used when config setting is not set + testenv.append_to_config("search.languages = ['nl']\n"); + let config_cases = &[ + (vec![], vec![], "nl\n"), + (vec![("LANGUAGE", "de:it")], vec![], "nl\n"), + (vec![("LANG", "fr"), ("LANGUAGE", "de:it")], vec![], "nl\n"), + ( + vec![("LANG", "fr"), ("LANGUAGE", "de:it")], + vec!["--language", "pl"], + "pl\n", + ), + ]; + run(config_cases); + + // The above update setting does not change anything + testenv.append_to_config("updates.download_languages = ['cz']"); + run(config_cases); + testenv.delete_config(); + testenv.init_config(); + testenv.append_to_config("updates.download_languages = ['cz']"); + run(env_cases); +} + #[test] fn test_list_flag_rendering() { let testenv = TestEnv::new().write_custom_pages_config(); From c741146db592cd7aaccfd8ba3a7f108718a96111 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sun, 3 Aug 2025 01:00:24 +0200 Subject: [PATCH 336/368] Add updates.download_languages setting --- docs/src/config_updates.md | 20 ++++++++++- src/cache.rs | 39 ++++++++++++-------- src/config.rs | 74 +++++++++++++++++++++----------------- src/main.rs | 21 ++++++++--- tests/lib.rs | 24 +++++++++++++ 5 files changed, 125 insertions(+), 53 deletions(-) diff --git a/docs/src/config_updates.md b/docs/src/config_updates.md index eaac735..cc5868e 100644 --- a/docs/src/config_updates.md +++ b/docs/src/config_updates.md @@ -1,5 +1,7 @@ # Section: \[updates\] +This config section contains settings related to updating the tealdeer cache. + ## Automatic updates Tealdeer can refresh the cache automatically when it is outdated. This @@ -24,7 +26,23 @@ is set to `false`. auto_update = true auto_update_interval_hours = 24 -### archive_source +## Download configuration + +### `download_languages` + +The list of languages which should be downloaded when updating. +If unspecified, the languages listed in the `search.languages` setting are used. +Thus, this setting is the most useful to instruct tealdeer to download pages in additional languages that are not searched by default. +Either way, the language used can be overwritten using the `--language` command line flag. + + [search] + languages = ["de", "en"] + + [updates] + # sometimes I like to read the Italian description + download_languages = ["de", "en", "it"] + +### `archive_source` URL for the location of the tldr pages archive. By default the pages are fetched from the latest `tldr-pages/tldr` GitHub release. diff --git a/src/cache.rs b/src/cache.rs index 315f6f0..23fd668 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -6,7 +6,7 @@ use std::{ }; use anyhow::{anyhow, bail, ensure, Context, Result}; -use log::debug; +use log::{debug, info}; use ureq::{ http::StatusCode, tls::{RootCerts, TlsConfig, TlsProvider}, @@ -27,7 +27,8 @@ pub struct CacheConfig<'a> { pub pages_directory: &'a Path, pub custom_pages_directory: Option<&'a Path>, pub platforms: &'a [PlatformType], - pub languages: &'a [Language<'a>], + pub search_languages: &'a [Language<'a>], + pub download_languages: &'a [Language<'a>], } /// The directory backing this cache is checked to be populated at construction. @@ -110,7 +111,7 @@ impl<'a> Cache<'a> { .filter(|path| path.is_file()); for &platform in self.config.platforms { - for language in self.config.languages { + for language in self.config.search_languages { let mut search_path = self.config.pages_directory.to_path_buf(); search_path.push(language.directory_name()); search_path.push(platform.directory_name()); @@ -159,7 +160,7 @@ impl<'a> Cache<'a> { }; let mut search_path = self.config.pages_directory.to_path_buf(); - for language in self.config.languages { + for language in self.config.search_languages { search_path.push(language.directory_name()); for platform in self.config.platforms { search_path.push(platform.directory_name()); @@ -206,15 +207,23 @@ impl<'a> Cache<'a> { }) } - pub fn update(&mut self, archive_url: &str, tls_backend: TlsBackend) -> Result<()> { + /// Download archives for the languages in `self.config().download_languages` and replace the + /// pages directory with the newly downloaded pages. As not all languages might have pages + /// available (for example, `en_US` instead of `en`), an iterator yielding all languages which + /// were successfully downloaded is returned. + pub fn update( + &mut self, + archive_url: &str, + tls_backend: TlsBackend, + ) -> Result>> { let client = Self::build_client(tls_backend); // Download everything before deleting anything - let archives = self + let mut archives = self .config - .languages + .download_languages .iter() - .map(|lang| { + .map(|&lang| { Ok(( lang, Self::download( @@ -236,16 +245,18 @@ impl<'a> Cache<'a> { fs::remove_dir_all(self.config.pages_directory)?; fs::create_dir(self.config.pages_directory)?; - for (lang, archive) in archives { - if let Some(mut archive) = archive { - debug!("Extracting archive for {lang:?}"); + for (lang, archive) in &mut archives { + if let Some(archive) = archive { + info!("Extracting archive for {lang:?}"); archive.extract(self.config.pages_directory.join(lang.directory_name()))?; } else { - debug!("No archive found for {lang:?}"); + info!("No archive found for {lang:?}"); } } - Ok(()) + Ok(archives + .into_iter() + .filter_map(|(lang, archive)| archive.is_some().then_some(lang))) } pub fn config(&self) -> &CacheConfig<'a> { @@ -347,7 +358,7 @@ impl Cache<'_> { /// Download the archive from the specified URL. fn download(client: &Agent, archive_url: &str) -> Result>> { - debug!("Downloading archive from {archive_url}"); + info!("Downloading archive from {archive_url}"); let response = client.get(archive_url).call(); match response { Ok(response) if response.status().is_success() => { diff --git a/src/config.rs b/src/config.rs index 69de9b5..bac3f74 100644 --- a/src/config.rs +++ b/src/config.rs @@ -190,6 +190,8 @@ struct RawUpdatesConfig { pub archive_source: String, #[serde(default)] pub tls_backend: RawTlsBackend, + #[serde(default)] + pub download_languages: Option>, } impl Default for RawUpdatesConfig { @@ -199,41 +201,11 @@ impl Default for RawUpdatesConfig { auto_update_interval_hours: DEFAULT_UPDATE_INTERVAL_HOURS, archive_source: default_archive_source(), tls_backend: RawTlsBackend::default(), + download_languages: None, } } } -impl<'a> TryFrom<&'a RawUpdatesConfig> for UpdatesConfig<'a> { - type Error = anyhow::Error; - - fn try_from(raw_updates_config: &'a RawUpdatesConfig) -> Result { - let tls_backend = match raw_updates_config.tls_backend { - #[cfg(feature = "native-tls")] - RawTlsBackend::NativeTls => TlsBackend::NativeTls, - #[cfg(feature = "rustls-with-webpki-roots")] - RawTlsBackend::RustlsWithWebpkiRoots => TlsBackend::RustlsWithWebpkiRoots, - #[cfg(feature = "rustls-with-native-roots")] - RawTlsBackend::RustlsWithNativeRoots => TlsBackend::RustlsWithNativeRoots, - // when compiling without all TLS backend features, we want to handle config error. - #[allow(unreachable_patterns)] - _ => return Err(anyhow!( - "Unsupported TLS backend: {}. This tealdeer build has support for the following options: {}", - raw_updates_config.tls_backend, - SUPPORTED_TLS_BACKENDS.iter().map(std::string::ToString::to_string).collect::>().join(", ") - )) - }; - - Ok(Self { - auto_update: raw_updates_config.auto_update, - auto_update_interval: Duration::from_secs( - raw_updates_config.auto_update_interval_hours * 3600, - ), - archive_source: &raw_updates_config.archive_source, - tls_backend, - }) - } -} - #[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] struct RawDirectoriesConfig { #[serde(default)] @@ -299,6 +271,7 @@ pub struct UpdatesConfig<'a> { pub auto_update_interval: Duration, pub archive_source: &'a str, pub tls_backend: TlsBackend, + pub download_languages: Vec>, } #[derive(Clone, Debug, PartialEq, Eq)] @@ -330,7 +303,7 @@ pub struct SearchConfig<'a> { pub languages: Vec>, } -#[derive(Debug, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct Language<'a>(pub &'a str); fn get_languages<'a>( @@ -410,6 +383,28 @@ pub enum TlsBackend { RustlsWithNativeRoots, } +impl TryFrom for TlsBackend { + type Error = anyhow::Error; + + fn try_from(raw: RawTlsBackend) -> Result { + match raw { + #[cfg(feature = "native-tls")] + RawTlsBackend::NativeTls => Ok(TlsBackend::NativeTls), + #[cfg(feature = "rustls-with-webpki-roots")] + RawTlsBackend::RustlsWithWebpkiRoots => Ok(TlsBackend::RustlsWithWebpkiRoots), + #[cfg(feature = "rustls-with-native-roots")] + RawTlsBackend::RustlsWithNativeRoots => Ok(TlsBackend::RustlsWithNativeRoots), + // when compiling without all TLS backend features, we want to handle config error. + #[allow(unreachable_patterns)] + _ => Err(anyhow!( + "Unsupported TLS backend: {}. This tealdeer build has support for the following options: {}", + raw, + SUPPORTED_TLS_BACKENDS.iter().map(std::string::ToString::to_string).collect::>().join(", ") + )) + } + } +} + #[derive(Clone, Debug, PartialEq, Eq)] pub struct Config<'a> { pub style: StyleConfig, @@ -428,7 +423,7 @@ impl<'a> Config<'a> { fn from_raw(raw_config: &'a RawConfig, config_file_path: PathWithSource) -> Result { let style = (&raw_config.style).into(); let display = (&raw_config.display).into(); - let updates = (&raw_config.updates).try_into()?; + let search = SearchConfig { languages: raw_config .search @@ -439,6 +434,19 @@ impl<'a> Config<'a> { }), }; + let updates = UpdatesConfig { + auto_update: raw_config.updates.auto_update, + auto_update_interval: Duration::from_secs( + raw_config.updates.auto_update_interval_hours * 3600, + ), + archive_source: &raw_config.updates.archive_source, + tls_backend: raw_config.updates.tls_backend.try_into()?, + download_languages: raw_config.updates.download_languages.as_ref().map_or_else( + || search.languages.clone(), + |languages| languages.iter().map(|lang| Language(lang)).collect(), + ), + }; + let relative_path_root = config_file_path .path() .parent() diff --git a/src/main.rs b/src/main.rs index 5bd0fa0..2f730a4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -82,11 +82,21 @@ fn update_cache( tls_backend: TlsBackend, quietly: bool, ) -> Result<()> { - cache + let downloaded_languages = cache .update(archive_source, tls_backend) .context("Could not update cache")?; if !quietly { eprintln!("Successfully updated cache."); + eprint!("Pages for the following languages were downloaded: "); + let language_strings: Vec<_> = downloaded_languages + .into_iter() + .map(|lang| lang.0) + .collect(); + if language_strings.is_empty() { + eprintln!("(none)"); + } else { + eprintln!("{}", language_strings.join(", ")); + } } Ok(()) } @@ -250,9 +260,9 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { } let platforms = compute_platforms(args.platforms.as_ref()); - let languages = match args.language.as_deref() { - Some(lang) => &[Language(lang)] as &[_], - None => &config.search.languages, + let (search_languages, download_languages): (&[_], &[_]) = match args.language.as_deref() { + Some(lang) => (&[Language(lang)], &[Language(lang)]), + None => (&config.search.languages, &config.updates.download_languages), }; let cache_config = CacheConfig { @@ -263,7 +273,8 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { .as_ref() .map(PathWithSource::path), platforms: &platforms, - languages, + search_languages, + download_languages, }; // TODO: remove in tealdeer 1.9 diff --git a/tests/lib.rs b/tests/lib.rs index 37f3b30..eceb427 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -996,6 +996,30 @@ fn test_search_language_precedence() { run(env_cases); } +#[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] +#[test] +fn test_update_language_arg() { + let testenv = TestEnv::new(); + testenv + .command() + .env("LANG", "it") + .arg("--update") + .assert() + .success() + .stderr(contains("it")) + .stderr(contains("en")); + + testenv + .command() + .env("LANG", "en") + .args(["--language", "it"]) + .arg("--update") + .assert() + .success() + .stderr(contains("it")) + .stderr(contains("en").not()); +} + #[test] fn test_list_flag_rendering() { let testenv = TestEnv::new().write_custom_pages_config(); From abb7e8ac5525f4b65141b996ef00e89f5c42bab4 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Mon, 22 Sep 2025 16:06:36 +0200 Subject: [PATCH 337/368] Remove native-tls from default feature set (#436) --- .github/workflows/release.yml | 2 +- Cargo.toml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b144b0f..360dd94 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,7 +93,7 @@ jobs: toolchain: stable targets: "${{ matrix.arch }}-apple-darwin" - name: Build - run: cargo build --release --target ${{ matrix.arch }}-apple-darwin --no-default-features --features webpki-roots + run: cargo build --release --target ${{ matrix.arch }}-apple-darwin - uses: actions/upload-artifact@v4 with: name: "tealdeer-macos-${{ matrix.arch }}" diff --git a/Cargo.toml b/Cargo.toml index 6594b14..3447307 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,8 @@ tempfile = "3.1.0" filetime = "0.2.10" [features] -default = ["native-tls", "rustls-with-webpki-roots", "rustls-with-native-roots"] +# native-tls is not enabled by default, because it is difficult to build for musl +default = ["rustls-with-webpki-roots", "rustls-with-native-roots"] logging = ["env_logger"] # At least one of variants for `ureq` HTTP client must be selected. From 5b306756af6163eb735eee9e84569ef0be9a0ff1 Mon Sep 17 00:00:00 2001 From: hex1c <84087661+hex1c@users.noreply.github.com> Date: Fri, 3 Oct 2025 23:23:25 +0530 Subject: [PATCH 338/368] Add `display.show_title` option to display command titles in output (#439) --- docs/src/config.md | 1 + docs/src/config_display.md | 10 ++++++ src/config.rs | 4 +++ src/formatter.rs | 14 ++++++-- src/output.rs | 2 ++ tests/lib.rs | 36 +++++++++++++++++++ .../inkscape-with-title-no-color.expected | 34 ++++++++++++++++++ tests/rendered/inkscape-with-title.expected | 34 ++++++++++++++++++ 8 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 tests/rendered/inkscape-with-title-no-color.expected create mode 100644 tests/rendered/inkscape-with-title.expected diff --git a/docs/src/config.md b/docs/src/config.md index 6eeede4..b0bf922 100644 --- a/docs/src/config.md +++ b/docs/src/config.md @@ -29,6 +29,7 @@ please refer to the subsections of this documentation page [display] compact = false use_pager = true +show_title = false [style.command_name] foreground = "red" diff --git a/docs/src/config_display.md b/docs/src/config_display.md index 36d5f23..56b5cd3 100644 --- a/docs/src/config_display.md +++ b/docs/src/config_display.md @@ -21,3 +21,13 @@ Set this to enforce more compact output, where empty lines are stripped out [display] compact = true + +## `show_title` + +Display the command name at the top of the page output (default `false`). + + [display] + show_title = true + +When enabled, the command name will be displayed at the top of the output, +styled with the `command_name` style configuration. \ No newline at end of file diff --git a/src/config.rs b/src/config.rs index bac3f74..446b841 100644 --- a/src/config.rs +++ b/src/config.rs @@ -157,6 +157,8 @@ struct RawDisplayConfig { pub compact: bool, #[serde(default)] pub use_pager: bool, + #[serde(default)] + pub show_title: bool, } impl From<&RawDisplayConfig> for DisplayConfig { @@ -164,6 +166,7 @@ impl From<&RawDisplayConfig> for DisplayConfig { Self { compact: raw_display_config.compact, use_pager: raw_display_config.use_pager, + show_title: raw_display_config.show_title, } } } @@ -263,6 +266,7 @@ pub struct StyleConfig { pub struct DisplayConfig { pub compact: bool, pub use_pager: bool, + pub show_title: bool, } #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/src/formatter.rs b/src/formatter.rs index 369efce..d86de9b 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -12,6 +12,7 @@ pub enum PageSnippet<'a> { NormalCode(&'a str), Description(&'a str), Text(&'a str), + Title(&'a str), Linebreak, } @@ -20,7 +21,9 @@ impl PageSnippet<'_> { use PageSnippet::*; match self { - CommandName(s) | Variable(s) | NormalCode(s) | Description(s) | Text(s) => s.is_empty(), + CommandName(s) | Variable(s) | NormalCode(s) | Description(s) | Text(s) | Title(s) => { + s.is_empty() + } Linebreak => false, } } @@ -31,6 +34,7 @@ pub fn highlight_lines( lines: L, process_snippet: &mut F, keep_empty_lines: bool, + show_title: bool, ) -> Result<(), E> where L: Iterator, @@ -45,8 +49,12 @@ where } } LineType::Title(title) => { - debug!("Ignoring title"); - + if show_title { + process_snippet(PageSnippet::Linebreak)?; + process_snippet(PageSnippet::Title(&title))?; + } else { + debug!("Ignoring title"); + } // This is safe as long as the parsed title is only the command, // and the iterator yields values in order of appearance. command = title; diff --git a/src/output.rs b/src/output.rs index 046abe8..5f1aeae 100644 --- a/src/output.rs +++ b/src/output.rs @@ -69,6 +69,7 @@ pub fn print_page( LineIterator::new(reader), &mut process_snippet, !config.display.compact, + config.display.show_title, ) .context("Could not write to stdout")?; } @@ -92,6 +93,7 @@ fn print_snippet( NormalCode(s) => write!(writer, "{}", s.paint(style.example_code)), Description(s) => writeln!(writer, " {}", s.paint(style.description)), Text(s) => writeln!(writer, " {}", s.paint(style.example_text)), + Title(s) => writeln!(writer, " {}", s.paint(style.command_name)), Linebreak => writeln!(writer), } } diff --git a/tests/lib.rs b/tests/lib.rs index eceb427..ef5777d 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -807,6 +807,42 @@ fn test_correct_rendering_with_config() { .stdout(diff(expected)); } +/// An end-to-end integration test for rendering with show_title config option enabled. +#[test] +fn test_show_title_config() { + // Test that default behavior without show_title shows no title + let testenv = TestEnv::new().install_default_cache(); + let expected_no_title = include_str!("rendered/inkscape-default.expected"); + + testenv + .command() + .args(["--color", "always", "inkscape-v2"]) + .assert() + .success() + .stdout(diff(expected_no_title)); + + // Configure to enable show_title + testenv.append_to_config("display.show_title = true\n"); + + let expected_no_color = include_str!("rendered/inkscape-with-title-no-color.expected"); + + testenv + .command() + .args(["inkscape-v2"]) + .assert() + .success() + .stdout(diff(expected_no_color)); + + let expected = include_str!("rendered/inkscape-with-title.expected"); + + testenv + .command() + .args(["--color", "always", "inkscape-v2"]) + .assert() + .success() + .stdout(diff(expected)); +} + #[test] fn test_spaces_find_command() { let testenv = TestEnv::new().install_default_cache(); diff --git a/tests/rendered/inkscape-with-title-no-color.expected b/tests/rendered/inkscape-with-title-no-color.expected new file mode 100644 index 0000000..b6a4572 --- /dev/null +++ b/tests/rendered/inkscape-with-title-no-color.expected @@ -0,0 +1,34 @@ + + inkscape + + An SVG (Scalable Vector Graphics) editing program. + Use -z to not open the GUI and only process files in the console. + + Open an SVG file in the Inkscape GUI: + + inkscape filename.svg + + Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): + + inkscape filename.svg -e filename.png + + Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): + + inkscape filename.svg -e filename.png -w 600 -h 400 + + Export a single object, given its ID, into a bitmap: + + inkscape filename.svg -i id -e object.png + + Export an SVG document to PDF, converting all texts to paths: + + inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path + + Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: + + inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit + + Some invalid command just to test the correct highlighting of the command name: + + inkscape --use-inkscape=v3.0 file + diff --git a/tests/rendered/inkscape-with-title.expected b/tests/rendered/inkscape-with-title.expected new file mode 100644 index 0000000..7e7d428 --- /dev/null +++ b/tests/rendered/inkscape-with-title.expected @@ -0,0 +1,34 @@ + + inkscape + + An SVG (Scalable Vector Graphics) editing program. + Use -z to not open the GUI and only process files in the console. + + Open an SVG file in the Inkscape GUI: + + inkscape filename.svg + + Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): + + inkscape filename.svg -e filename.png + + Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): + + inkscape filename.svg -e filename.png -w 600 -h 400 + + Export a single object, given its ID, into a bitmap: + + inkscape filename.svg -i id -e object.png + + Export an SVG document to PDF, converting all texts to paths: + + inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path + + Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: + + inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit + + Some invalid command just to test the correct highlighting of the command name: + + inkscape --use-inkscape=v3.0 file + From 911508ce33cf2d405e663de056bea4a483060efe Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 3 Oct 2025 20:15:34 +0200 Subject: [PATCH 339/368] Add `search.platforms` config option and search all platforms by default (#435) --- docs/src/config_search.md | 15 +++++++++ src/config.rs | 70 +++++++++++++++++++++++++++++++++------ src/main.rs | 27 ++++++--------- tests/lib.rs | 38 +++++++++++++++++++++ 4 files changed, 122 insertions(+), 28 deletions(-) diff --git a/docs/src/config_search.md b/docs/src/config_search.md index 2d59d65..d368159 100644 --- a/docs/src/config_search.md +++ b/docs/src/config_search.md @@ -12,3 +12,18 @@ Either way, the language used can be overwritten using the `--language` command [search] # Show pages in German if available, otherwise show in English languages = ["de", "en"] + +## `platforms` + +The list of platforms that should be considered when searching. +In addition to the platforms listed in the help text of the `--platform` flag, there are two special platforms available: +- `"current"`: equals the platform that tealdeer was compiled for +- `"all"`: adds all remaining platforms to the list + +Tealdeer searches the platforms in order of appearance in this list. +The default list of platforms is `["current", "common", "all"]`. +The list of platforms can be overwritten using the `--platform` command line flag. + + [search] + # Search for linux and common, and then search windows before trying the remaining platforms + platforms = ["linux", "common", "windows", "all"] diff --git a/src/config.rs b/src/config.rs index 446b841..e5e85e8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -9,11 +9,15 @@ use std::{ use anyhow::{anyhow, bail, ensure, Context, Result}; use app_dirs::{get_app_root, AppDataType}; +use clap::ValueEnum; use serde::Serialize as _; use serde_derive::{Deserialize, Serialize}; use yansi::{Color, Style}; -use crate::{extensions::Dedup as _, types::PathSource}; +use crate::{ + extensions::Dedup as _, + types::{PathSource, PlatformType}, +}; pub const CONFIG_FILE_NAME: &str = "config.toml"; pub const MAX_CACHE_AGE: Duration = Duration::from_secs(2_592_000); // 30 days @@ -217,9 +221,61 @@ struct RawDirectoriesConfig { pub custom_pages_dir: Option, } +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "lowercase")] +enum RawPlatformType { + Current, + All, + MacOs, // alias for Platform(PlatformType::OsX) + #[serde(untagged)] + Platform(PlatformType), +} + +impl RawPlatformType { + pub fn flatten(raw_platforms: impl IntoIterator) -> Vec { + let mut flattened = Vec::new(); + for raw_platform in raw_platforms { + match raw_platform { + RawPlatformType::Current => flattened.push(PlatformType::current()), + RawPlatformType::Platform(platform) => flattened.push(platform), + RawPlatformType::MacOs => flattened.push(PlatformType::OsX), + RawPlatformType::All => flattened.extend(PlatformType::value_variants()), + } + } + flattened.clear_duplicates(); + flattened + } +} + #[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)] struct RawSearchConfig { pub languages: Option>, + pub platforms: Option>, +} + +impl<'a> From<&'a RawSearchConfig> for SearchConfig<'a> { + fn from(raw_search_config: &'a RawSearchConfig) -> Self { + let languages = raw_search_config + .languages + .as_ref() + .map_or_else(get_languages_from_env, |langs| { + langs.iter().map(|lang| Language(lang)).collect() + }); + let platforms = if let Some(raw_platforms) = raw_search_config.platforms.as_ref() { + RawPlatformType::flatten(raw_platforms.iter().copied()) + } else { + RawPlatformType::flatten([ + RawPlatformType::Current, + RawPlatformType::Platform(PlatformType::Common), + RawPlatformType::All, + ]) + }; + + Self { + languages, + platforms, + } + } } #[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] @@ -305,6 +361,7 @@ pub struct DirectoriesConfig { #[derive(Clone, Debug, PartialEq, Eq)] pub struct SearchConfig<'a> { pub languages: Vec>, + pub platforms: Vec, } #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] @@ -427,16 +484,7 @@ impl<'a> Config<'a> { fn from_raw(raw_config: &'a RawConfig, config_file_path: PathWithSource) -> Result { let style = (&raw_config.style).into(); let display = (&raw_config.display).into(); - - let search = SearchConfig { - languages: raw_config - .search - .languages - .as_ref() - .map_or_else(get_languages_from_env, |langs| { - langs.iter().map(|lang| Language(lang)).collect() - }), - }; + let search: SearchConfig<'a> = (&raw_config.search).into(); let updates = UpdatesConfig { auto_update: raw_config.updates.auto_update, diff --git a/src/main.rs b/src/main.rs index 2f730a4..fcf3273 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,6 +39,7 @@ use cache::{CacheConfig, TLDR_OLD_PAGES_DIR}; use clap::Parser; use config::{ConfigLoader, Language, StyleConfig, TlsBackend}; use log::debug; +use types::PlatformType; mod cache; mod cli; @@ -55,7 +56,7 @@ use crate::{ cli::Cli, config::{get_config_dir, make_default_config, Config, PathWithSource}, output::print_page, - types::{ColorOptions, PlatformType}, + types::ColorOptions, utils::{print_error, print_warning}, }; @@ -259,7 +260,13 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { return Ok(ExitCode::SUCCESS); } - let platforms = compute_platforms(args.platforms.as_ref()); + if let Some(platforms) = args.platforms { + config.search.platforms = platforms; + if !config.search.platforms.contains(&PlatformType::Common) { + config.search.platforms.push(PlatformType::Common); + } + } + let (search_languages, download_languages): (&[_], &[_]) = match args.language.as_deref() { Some(lang) => (&[Language(lang)], &[Language(lang)]), None => (&config.search.languages, &config.updates.download_languages), @@ -272,7 +279,7 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { .custom_pages_dir .as_ref() .map(PathWithSource::path), - platforms: &platforms, + platforms: &config.search.platforms, search_languages, download_languages, }; @@ -394,17 +401,3 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { Ok(ExitCode::SUCCESS) } - -/// Returns the passed or default platform types and appends `PlatformType::Common` as fallback. -fn compute_platforms(platforms: Option<&Vec>) -> Vec { - match platforms { - Some(p) => { - let mut result = p.clone(); - if !result.contains(&PlatformType::Common) { - result.push(PlatformType::Common); - } - result - } - None => vec![PlatformType::current(), PlatformType::Common], - } -} diff --git a/tests/lib.rs b/tests/lib.rs index ef5777d..cb987db 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -715,6 +715,36 @@ fn test_os_specific_page() { .success(); } +#[test] +fn test_config_platforms() { + let testenv = TestEnv::new(); + testenv.add_os_entry("sunos", "sunos-command", ""); + + let set_config_platforms = |platforms| { + testenv.delete_config(); + testenv.init_config(); + testenv.append_to_config(format!("search.platforms = {platforms}")); + }; + + // By default all platforms are searched + testenv.command().arg("sunos-command").assert().success(); + + set_config_platforms("[]"); + testenv.command().arg("sunos-command").assert().failure(); + + set_config_platforms("['linux']"); + testenv.command().arg("sunos-command").assert().failure(); + + set_config_platforms("['sunos']"); + testenv.command().arg("sunos-command").assert().success(); + + set_config_platforms("['linux', 'all']"); + testenv.command().arg("sunos-command").assert().success(); + + set_config_platforms("['current', 'all']"); + testenv.command().arg("sunos-command").assert().success(); +} + #[test] fn test_markdown_rendering() { let testenv = TestEnv::new().install_default_cache(); @@ -956,6 +986,14 @@ fn test_macos_is_alias_for_osx() { .args(["--platform", "osx", "--list"]) .assert() .stdout("maconly\n"); + + testenv.append_to_config("search.platforms = ['osx']\n"); + testenv.command().arg("--list").assert().stdout("maconly\n"); + + testenv.delete_config(); + testenv.init_config(); + testenv.append_to_config("search.platforms = ['macos']\n"); + testenv.command().arg("--list").assert().stdout("maconly\n"); } #[test] From 2b127fd67e7c0eef59efdff907dcf63da4dfcbe1 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 3 Oct 2025 20:59:22 +0200 Subject: [PATCH 340/368] Highlight code examples in user docs (#440) * Highlight code examples in user docs * Add missing quotes to archive_source example --- docs/src/config.md | 8 +++++-- docs/src/config_directories.md | 12 +++++++---- docs/src/config_display.md | 20 +++++++++++------ docs/src/config_search.md | 16 ++++++++------ docs/src/config_style.md | 12 ++++++++--- docs/src/config_updates.md | 39 +++++++++++++++++++++------------- docs/src/installing.md | 16 ++++++++++---- docs/src/usage_custom_pages.md | 16 ++++++++++---- 8 files changed, 94 insertions(+), 45 deletions(-) diff --git a/docs/src/config.md b/docs/src/config.md index b0bf922..a662b57 100644 --- a/docs/src/config.md +++ b/docs/src/config.md @@ -9,11 +9,15 @@ The configuration file path follows OS conventions (e.g. `$XDG_CONFIG_HOME/tealdeer/config.toml` on Linux). The paths can be queried with the following command: - $ tldr --show-paths +```shell +$ tldr --show-paths +``` Creating the config file can be done manually or with the help of `tldr`: - $ tldr --seed-config +```shell +$ tldr --seed-config +``` On Linux, this will usually be `~/.config/tealdeer/config.toml`. diff --git a/docs/src/config_directories.md b/docs/src/config_directories.md index b194dbb..507bd27 100644 --- a/docs/src/config_directories.md +++ b/docs/src/config_directories.md @@ -8,8 +8,10 @@ Override the cache directory. Remember to use an absolute path. Variable expansion will not be performed on the path. If the directory does not yet exist, it will be created. - [directories] - cache_dir = "/home/myuser/.tealdeer-cache/" +```toml +[directories] +cache_dir = "/home/myuser/.tealdeer-cache/" +``` If no `cache_dir` is specified, tealdeer will fall back to a location that follows OS conventions. On Linux, it will usually be at `~/.cache/tealdeer/`. @@ -21,5 +23,7 @@ Set the directory to be used to look up [custom pages](usage_custom_pages.html). Remember to use an absolute path. Variable expansion will not be performed on the path. - [directories] - custom_pages_dir = "/home/myuser/custom-tldr-pages/" +```toml +[directories] +custom_pages_dir = "/home/myuser/custom-tldr-pages/" +``` diff --git a/docs/src/config_display.md b/docs/src/config_display.md index 56b5cd3..78656a4 100644 --- a/docs/src/config_display.md +++ b/docs/src/config_display.md @@ -6,8 +6,10 @@ In the `display` section you can configure the output format. Specifies whether the pager should be used by default or not (default `false`). - [display] - use_pager = true +```toml +[display] +use_pager = true +``` When enabled, `less -R` is used as pager. To override the pager command used, set the `PAGER` environment variable. @@ -19,15 +21,19 @@ NOTE: This feature is not available on Windows. Set this to enforce more compact output, where empty lines are stripped out (default `false`). - [display] - compact = true +```toml +[display] +compact = true +``` ## `show_title` Display the command name at the top of the page output (default `false`). - [display] - show_title = true +```toml +[display] +show_title = true +``` When enabled, the command name will be displayed at the top of the output, -styled with the `command_name` style configuration. \ No newline at end of file +styled with the `command_name` style configuration. diff --git a/docs/src/config_search.md b/docs/src/config_search.md index d368159..28e00d6 100644 --- a/docs/src/config_search.md +++ b/docs/src/config_search.md @@ -9,9 +9,11 @@ The list of languages that should be considered when searching. If unspecified, the list of languages will be inferred from the `LANG` and `LANGUAGE` environment variables. Either way, the language used can be overwritten using the `--language` command line flag. - [search] - # Show pages in German if available, otherwise show in English - languages = ["de", "en"] +```toml +[search] +# Show pages in German if available, otherwise show in English +languages = ["de", "en"] +``` ## `platforms` @@ -24,6 +26,8 @@ Tealdeer searches the platforms in order of appearance in this list. The default list of platforms is `["current", "common", "all"]`. The list of platforms can be overwritten using the `--platform` command line flag. - [search] - # Search for linux and common, and then search windows before trying the remaining platforms - platforms = ["linux", "common", "windows", "all"] +```toml +[search] +# Search for linux and common, and then search windows before trying the remaining platforms +platforms = ["linux", "common", "windows", "all"] +``` diff --git a/docs/src/config_style.md b/docs/src/config_style.md index 190df4c..593a5b5 100644 --- a/docs/src/config_style.md +++ b/docs/src/config_style.md @@ -26,16 +26,22 @@ Colors can be specified in one of three ways: Example: - foreground = "green" + ```toml + foreground = "green" + ``` - 256 color ANSI code (*tealdeer v1.5.0+*) Example: - foreground = { ansi = 4 } + ```toml + foreground = { ansi = 4 } + ``` - 24-bit RGB color (*tealdeer v1.5.0+*) Example: - background = { rgb = { r = 255, g = 255, b = 255 } } + ```toml + background = { rgb = { r = 255, g = 255, b = 255 } } + ``` diff --git a/docs/src/config_updates.md b/docs/src/config_updates.md index cc5868e..9acba55 100644 --- a/docs/src/config_updates.md +++ b/docs/src/config_updates.md @@ -13,8 +13,10 @@ default. Specifies whether the auto-update feature should be enabled (defaults to `false`). - [updates] - auto_update = true +```toml +[updates] +auto_update = true +``` ### `auto_update_interval_hours` @@ -22,9 +24,11 @@ Duration, since the last cache update, after which the cache will be refreshed (defaults to 720 hours). This parameter is ignored if `auto_update` is set to `false`. - [updates] - auto_update = true - auto_update_interval_hours = 24 +```toml +[updates] +auto_update = true +auto_update_interval_hours = 24 +``` ## Download configuration @@ -35,20 +39,24 @@ If unspecified, the languages listed in the `search.languages` setting are used. Thus, this setting is the most useful to instruct tealdeer to download pages in additional languages that are not searched by default. Either way, the language used can be overwritten using the `--language` command line flag. - [search] - languages = ["de", "en"] +```toml +[search] +languages = ["de", "en"] - [updates] - # sometimes I like to read the Italian description - download_languages = ["de", "en", "it"] +[updates] +# sometimes I like to read the Italian description +download_languages = ["de", "en", "it"] +``` ### `archive_source` URL for the location of the tldr pages archive. By default the pages are fetched from the latest `tldr-pages/tldr` GitHub release. - [updates] - archive_source = https://my-company.example.com/tldr/ +```toml +[updates] +archive_source = "https://my-company.example.com/tldr/" +``` ### `tls_backend` @@ -62,9 +70,10 @@ Available options: - Secure Transport on macOS - OpenSSL on other platforms - [updates] - tls_backend = "native-tls" - +```toml +[updates] +tls_backend = "native-tls" +``` [rustls]: https://github.com/rustls/rustls [rustls-webpki]: https://github.com/rustls/webpki diff --git a/docs/src/installing.md b/docs/src/installing.md index 39de050..0bee062 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -38,21 +38,29 @@ Simply download the binary for your platform and run it! Build and install the tool via cargo... - $ cargo install tealdeer +```shell +$ cargo install tealdeer +``` ## Build From Source Release build: - $ cargo build --release +```shell +$ cargo build --release +``` Release build with bundled CA roots: - $ cargo build --release --no-default-features --features rustls-with-webpki-roots +```shell +$ cargo build --release --no-default-features --features rustls-with-webpki-roots +``` Debug build with logging support: - $ cargo build --features logging +```shell +$ cargo build --features logging +``` (To enable logging at runtime, export the `RUST_LOG=tldr=debug` env variable.) diff --git a/docs/src/usage_custom_pages.md b/docs/src/usage_custom_pages.md index d5d0f89..c73bf90 100644 --- a/docs/src/usage_custom_pages.md +++ b/docs/src/usage_custom_pages.md @@ -28,11 +28,15 @@ your custom page will be shown instead of the upstream version in the cache. Path: - $CUSTOM_PAGES_DIR/.page.md +```plain +$CUSTOM_PAGES_DIR/.page.md +``` Example: - ~/.local/share/tealdeer/pages/ufw.page.md +```plain +~/.local/share/tealdeer/pages/ufw.page.md +``` ## Custom Patches @@ -43,8 +47,12 @@ pages. Path: - $CUSTOM_PAGES_DIR/.patch.md +```plain +$CUSTOM_PAGES_DIR/.patch.md +``` Example: - ~/.local/share/tealdeer/pages/ufw.patch.md +```plain +~/.local/share/tealdeer/pages/ufw.patch.md +``` From 9a83b58d5110a6134546a9e1be227394c055caa2 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 3 Oct 2025 22:38:02 +0200 Subject: [PATCH 341/368] Bump MSRV to 1.85 and update dependencies (#441) The latest version of base64ct requires 1.85, and I don't want to think about whether older versions of crypto libraries are safe. --- .github/workflows/ci.yml | 2 +- Cargo.lock | 773 +++++++++++++++++++++++---------------- Cargo.toml | 4 +- 3 files changed, 463 insertions(+), 316 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f20709e..93b83e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - toolchain: [stable, 1.80.1] + toolchain: [stable, 1.85.0] include: - platform: windows-latest exe_suffix: .exe diff --git a/Cargo.lock b/Cargo.lock index 4da46ef..1ac11fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" @@ -19,9 +19,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -34,43 +34,44 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "once_cell_polyfill", + "windows-sys 0.60.2", ] [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "app_dirs2" @@ -78,7 +79,7 @@ version = "2.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7e7b35733e3a8c1ccb90385088dd5b6eaa61325cb4d1ad56e683b5224ff352e" dependencies = [ - "jni 0.21.1", + "jni", "ndk-context", "winapi", "xdg", @@ -86,18 +87,18 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" dependencies = [ "derive_arbitrary", ] [[package]] name = "assert_cmd" -version = "2.0.16" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1835b7f27878de8525dc71410b5a31cdcc5f230aed5ba5df968e09c201b23d" +checksum = "2bd389a4b2970a01282ee455294913c0a43724daedcd1a24c3eb0ec1c1320b66" dependencies = [ "anstyle", "bstr", @@ -111,9 +112,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "base64" @@ -123,21 +124,21 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" [[package]] name = "bstr" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" +checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" dependencies = [ "memchr", "regex-automata", @@ -146,22 +147,23 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytes" -version = "1.7.2" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.6" +version = "1.2.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333" +checksum = "e1d05d92f4b1fd76aad469d46cdd858ca761576082cd37df81416691e50199fb" dependencies = [ + "find-msvc-tools", "shlex", ] @@ -173,15 +175,15 @@ checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "clap" -version = "4.5.19" +version = "4.5.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" +checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" dependencies = [ "clap_builder", "clap_derive", @@ -189,9 +191,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.19" +version = "4.5.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" +checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" dependencies = [ "anstream", "anstyle", @@ -201,9 +203,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.18" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c" dependencies = [ "heck", "proc-macro2", @@ -213,15 +215,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "combine" @@ -243,6 +245,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -251,24 +263,18 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - [[package]] name = "der" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ "pem-rfc7468", "zeroize", @@ -276,9 +282,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", @@ -291,17 +297,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "doc-comment" version = "0.3.3" @@ -310,9 +305,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "env_filter" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ "log", "regex", @@ -320,22 +315,22 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.5" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ "anstream", "anstyle", "env_filter", - "humantime", + "jiff", "log", ] [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" @@ -350,12 +345,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.9" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.1", ] [[package]] @@ -370,49 +365,55 @@ dependencies = [ [[package]] name = "escargot" -version = "0.5.12" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c000f23e9d459aef148b7267e02b03b94a0aaacf4ec64c65612f67e02f525fb6" +checksum = "11c3aea32bc97b500c9ca6a72b768a26e558264303d101d3409cf6d57a9ed0cf" dependencies = [ "log", - "once_cell", "serde", "serde_json", ] [[package]] name = "fastrand" -version = "2.1.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "filetime" -version = "0.2.25" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" dependencies = [ "cfg-if", "libc", "libredox", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] -name = "flate2" -version = "1.0.34" +name = "find-msvc-tools" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "0399f9d26e5191ce32c498bebd31e7a3ceabc2745f0ac54af3f335126c3f24b3" + +[[package]] +name = "flate2" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" dependencies = [ "crc32fast", + "libz-rs-sys", "miniz_oxide", ] [[package]] name = "float-cmp" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" dependencies = [ "num-traits", ] @@ -440,20 +441,32 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.7+wasi-0.2.4", ] [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" [[package]] name = "heck" @@ -463,9 +476,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "http" -version = "1.1.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", @@ -474,21 +487,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.5" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "indexmap" -version = "2.6.0" +version = "2.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" dependencies = [ "equivalent", "hashbrown", @@ -502,22 +509,32 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] -name = "jni" -version = "0.19.0" +name = "jiff" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +checksum = "be1f93b8b1eb69c77f24bbb0afdf66f54b632ee39af40ca21c4365a1d7347e49" dependencies = [ - "cesu8", - "combine", - "jni-sys", + "jiff-static", "log", - "thiserror 1.0.64", - "walkdir", + "portable-atomic", + "portable-atomic-util", + "serde", +] + +[[package]] +name = "jiff-static" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -531,7 +548,7 @@ dependencies = [ "combine", "jni-sys", "log", - "thiserror 1.0.64", + "thiserror", "walkdir", "windows-sys 0.45.0", ] @@ -544,15 +561,15 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "libc" -version = "0.2.169" +version = "0.2.176" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" [[package]] name = "libredox" -version = "0.1.3" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" dependencies = [ "bitflags", "libc", @@ -560,43 +577,46 @@ dependencies = [ ] [[package]] -name = "linux-raw-sys" -version = "0.4.14" +name = "libz-rs-sys" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "840db8cf39d9ec4dd794376f38acc40d0fc65eec2a8f484f7fd375b84602becd" +dependencies = [ + "zlib-rs", +] [[package]] -name = "lockfree-object-pool" -version = "0.1.6" +name = "linux-raw-sys" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "log" -version = "0.4.26" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ] [[package]] name = "native-tls" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" dependencies = [ "libc", "log", @@ -604,7 +624,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "security-framework", + "security-framework 2.11.1", "security-framework-sys", "tempfile", ] @@ -621,25 +641,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -651,15 +652,21 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.20.2" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" [[package]] name = "openssl" -version = "0.10.71" +version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ "bitflags", "cfg-if", @@ -689,9 +696,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.106" +version = "0.9.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" dependencies = [ "cc", "libc", @@ -720,21 +727,36 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "portable-atomic" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] [[package]] name = "predicates" -version = "3.1.2" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" dependencies = [ "anstyle", "difflib", @@ -746,15 +768,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" [[package]] name = "predicates-tree" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" dependencies = [ "predicates-core", "termtree", @@ -762,36 +784,42 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.37" +version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" dependencies = [ "proc-macro2", ] [[package]] -name = "redox_syscall" -version = "0.5.7" +name = "r-efi" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "redox_syscall" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.11.0" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "8b5288124840bee7b386bc413c487869b360b2b4ec421ea56425128692f2a82c" dependencies = [ "aho-corasick", "memchr", @@ -801,9 +829,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" dependencies = [ "aho-corasick", "memchr", @@ -812,43 +840,42 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "ring" -version = "0.17.8" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.16", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] [[package]] name = "rustix" -version = "0.38.37" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ "bitflags", - "errno 0.3.9", + "errno 0.3.14", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.61.1", ] [[package]] name = "rustls" -version = "0.23.23" +version = "0.23.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" +checksum = "cd3c25631629d034ce7cd9940adc9d45762d46de2b0f57193c4443b92c6d4d40" dependencies = [ "log", "once_cell", @@ -861,15 +888,14 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" dependencies = [ "openssl-probe", - "rustls-pemfile", "rustls-pki-types", "schannel", - "security-framework", + "security-framework 3.5.1", ] [[package]] @@ -883,29 +909,32 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] [[package]] name = "rustls-platform-verifier" -version = "0.3.4" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afbb878bdfdf63a336a5e63561b1835e7a8c91524f51621db870169eac84b490" +checksum = "be59af91596cac372a6942530653ad0c3a246cdd491aaa9dcaee47f88d67d5a0" dependencies = [ - "core-foundation", + "core-foundation 0.10.1", "core-foundation-sys", - "jni 0.19.0", + "jni", "log", "once_cell", "rustls", "rustls-native-certs", "rustls-platform-verifier-android", "rustls-webpki", - "security-framework", + "security-framework 3.5.1", "security-framework-sys", - "webpki-roots", - "winapi", + "webpki-root-certs", + "windows-sys 0.59.0", ] [[package]] @@ -916,9 +945,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.102.8" +version = "0.103.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +checksum = "e10b3f4191e8a80e6b43eebabfac91e5dcecebb27a71f04e820c47ec41d314bf" dependencies = [ "ring", "rustls-pki-types", @@ -927,9 +956,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -942,11 +971,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] @@ -956,18 +985,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags", - "core-foundation", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" +dependencies = [ + "bitflags", + "core-foundation 0.10.1", "core-foundation-sys", "libc", - "num-bigint", "security-framework-sys", ] [[package]] name = "security-framework-sys" -version = "2.14.0" +version = "2.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" dependencies = [ "core-foundation-sys", "libc", @@ -975,18 +1016,28 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.210" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -995,21 +1046,22 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] name = "serde_spanned" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] @@ -1026,12 +1078,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "subtle" version = "2.6.1" @@ -1040,9 +1086,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.100" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -1074,67 +1120,47 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.13.0" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ - "cfg-if", "fastrand", + "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] name = "terminal_size" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef" +checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" dependencies = [ "rustix", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "termtree" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.64", -] - -[[package]] -name = "thiserror" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" -dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", @@ -1143,9 +1169,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.19" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", @@ -1155,31 +1181,38 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", + "toml_write", "winnow", ] [[package]] -name = "unicode-ident" -version = "1.0.13" +name = "toml_write" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "unicode-ident" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" [[package]] name = "untrusted" @@ -1189,9 +1222,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "3.0.8" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06f78313c985f2fba11100dd06d60dd402d0cabb458af4d94791b8e09c025323" +checksum = "99ba1025f18a4a3fc3e9b48c868e9beb4f24f4b4b1a325bada26bd4119f46537" dependencies = [ "base64", "der", @@ -1211,9 +1244,9 @@ dependencies = [ [[package]] name = "ureq-proto" -version = "0.3.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64adb55464bad1ab1aa9229133d0d59d2f679180f4d15f0d9debe616f541f25e" +checksum = "60b4531c118335662134346048ddb0e54cc86bd7e81866757873055f0e38f5d2" dependencies = [ "base64", "http", @@ -1241,9 +1274,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "wait-timeout" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" dependencies = [ "libc", ] @@ -1260,24 +1293,42 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.7+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" +dependencies = [ + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] [[package]] name = "webpki-root-certs" -version = "0.26.8" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09aed61f5e8d2c18344b3faa33a4c837855fe56642757754775548fee21386c4" +checksum = "4e4ffd8df1c57e87c325000a3d6ef93db75279dc3a231125aac571650f22b12a" dependencies = [ "rustls-pki-types", ] [[package]] name = "webpki-roots" -version = "0.26.8" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" dependencies = [ "rustls-pki-types", ] @@ -1300,11 +1351,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] @@ -1313,6 +1364,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-link" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" + [[package]] name = "windows-sys" version = "0.45.0" @@ -1340,6 +1397,24 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.4", +] + +[[package]] +name = "windows-sys" +version = "0.61.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -1364,13 +1439,30 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d42b7b7f66d2a06854650af09cfdf8713e427a439c97ad65a6375318033ac4b" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -1383,6 +1475,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -1395,6 +1493,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -1407,12 +1511,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -1425,6 +1541,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -1437,6 +1559,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -1449,6 +1577,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -1462,14 +1596,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "winnow" -version = "0.6.20" +name = "windows_x86_64_msvc" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "winnow" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + [[package]] name = "xdg" version = "2.5.2" @@ -1484,37 +1630,38 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "zeroize" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" [[package]] name = "zip" -version = "2.4.1" +version = "5.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938cc23ac49778ac8340e366ddc422b2227ea176edb447e23fc0627608dddadd" +checksum = "2f852905151ac8d4d06fdca66520a661c09730a74c6d4e2b0f27b436b382e532" dependencies = [ "arbitrary", "crc32fast", - "crossbeam-utils", - "displaydoc", "flate2", "indexmap", "memchr", - "thiserror 2.0.12", "zopfli", ] [[package]] -name = "zopfli" -version = "0.8.1" +name = "zlib-rs" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +checksum = "2f06ae92f42f5e5c42443fd094f245eb656abf56dd7cce9b8b263236565e00f2" + +[[package]] +name = "zopfli" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfc5ee405f504cd4984ecc6f14d02d55cfda60fa4b689434ef4102aae150cd7" dependencies = [ "bumpalo", "crc32fast", - "lockfree-object-pool", "log", - "once_cell", "simd-adler32", ] diff --git a/Cargo.toml b/Cargo.toml index 3447307..1123a69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/tealdeer-rs/tealdeer/" documentation = "https://tealdeer-rs.github.io/tealdeer/" version = "1.7.2" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"] -rust-version = "1.80" +rust-version = "1.85" edition = "2021" [[bin]] @@ -30,7 +30,7 @@ serde_derive = "1.0.21" ureq = { version = "3.0.8", default-features = false, features = ["gzip"] } toml = "0.8.19" yansi = "1" -zip = { version = "2.3.0", default-features = false, features = ["deflate"] } +zip = { version = "5.1.1", default-features = false, features = ["deflate"] } [target.'cfg(not(windows))'.dependencies] pager = "0.16" From 49626977ffc42b8445dddebde078028357ae3125 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 3 Oct 2025 22:44:39 +0200 Subject: [PATCH 342/368] Run `cargo +nightly clippy --fix` and formatting (#442) --- src/cache.rs | 5 +---- src/cli.rs | 2 +- src/formatter.rs | 2 +- src/line_iterator.rs | 4 ++-- src/main.rs | 1 + src/types.rs | 8 ++------ 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index 23fd668..b181310 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -369,10 +369,7 @@ impl Cache<'_> { } Ok(response) if response.status() == StatusCode::NOT_FOUND => Ok(None), _ => { - bail!( - "Could not download tldr pages from {archive_url}: {:?}", - response, - ) + bail!("Could not download tldr pages from {archive_url}: {response:?}",) } } } diff --git a/src/cli.rs b/src/cli.rs index 55fe74f..d461a3e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -2,7 +2,7 @@ use std::path::PathBuf; -use clap::{arg, builder::ArgAction, command, ArgGroup, Parser}; +use clap::{builder::ArgAction, ArgGroup, Parser}; use crate::types::{ColorOptions, PlatformType}; diff --git a/src/formatter.rs b/src/formatter.rs index d86de9b..5270124 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -68,7 +68,7 @@ where process_snippet(PageSnippet::Linebreak)?; } - LineType::Other(text) => debug!("Unknown line type: {:?}", text), + LineType::Other(text) => debug!("Unknown line type: {text:?}"), } } process_snippet(PageSnippet::Linebreak)?; diff --git a/src/line_iterator.rs b/src/line_iterator.rs index 2e11378..98088c0 100644 --- a/src/line_iterator.rs +++ b/src/line_iterator.rs @@ -53,7 +53,7 @@ impl Iterator for LineIterator { match bytes_read { Ok(0) => None, Err(e) => { - warn!("Could not read line from reader: {:?}", e); + warn!("Could not read line from reader: {e:?}"); None } Ok(_) => { @@ -68,7 +68,7 @@ impl Iterator for LineIterator { .find(|b| matches!(b, Ok(b'\n') | Err(_))) .transpose() { - warn!("Could not read line from reader: {:?}", e); + warn!("Could not read line from reader: {e:?}"); return None; } self.first_line = false; diff --git a/src/main.rs b/src/main.rs index fcf3273..a0cd593 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,7 @@ #![allow(clippy::similar_names)] #![allow(clippy::struct_excessive_bools)] #![allow(clippy::too_many_lines)] +#![allow(clippy::unnecessary_debug_formatting)] #[cfg(not(any( feature = "native-tls", diff --git a/src/types.rs b/src/types.rs index 69c7599..7ca6e2d 100644 --- a/src/types.rs +++ b/src/types.rs @@ -118,18 +118,14 @@ impl PlatformType { #[derive(Debug, Eq, PartialEq, Copy, Clone, Deserialize, clap::ValueEnum)] #[serde(rename_all = "lowercase")] +#[derive(Default)] pub enum ColorOptions { Always, + #[default] Auto, Never, } -impl Default for ColorOptions { - fn default() -> Self { - Self::Auto - } -} - #[derive(Debug, Eq, PartialEq)] pub enum LineType { Empty, From d49c4a9e05eab5018e322c03da01279040def538 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 3 Oct 2025 22:59:18 +0200 Subject: [PATCH 343/368] Release v1.8.0 --- CHANGELOG.md | 142 ++++++++++++++++++++++++++++++++++++----- Cargo.lock | 2 +- Cargo.toml | 2 +- docs/src/installing.md | 4 +- docs/src/usage.txt | 2 +- 5 files changed, 131 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c8af3a..a1c479f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,86 @@ Possible log types: - `[docs]` for documentation changes. - `[chore]` for maintenance work. +### [v1.8.0][v1.8.0] (2025-10-03) + +One year and one day have passed since tealdeer version 1.7.0 was released, so +it's time for an update! Tealdeer 1.8 comes with a complete rewrite of the page +cache and contains many long awaited improvements around it. + +Firstly, tealdeer now supports language-specific downloads. This means that only +the pages matching the configured languages are downloaded when updating the +cache. The languages used for searching pages can be configured separately to +the ones used for updating, so it is possible to download pages in languages +that are not usually queried. + +Next to configuring which languages are used for searching, it is now also +possible to specify which platforms are used in the config file. Importantly, +the default behavior for page search has changed so that all platforms are +searched if no page is found for the platform that tealdeer is running on. To +restore the behavior of tealdeer 1.7, users should set +```toml +[search] +platforms = ["current", "common"] +``` +in their config file. + +Coming back to updating, the default build configuration of tealdeer now +includes multiple TLS backends. This means that tealdeer does not have to be +rebuilt to try out a different TLS backend. The used backend can be chosen in +the config file. By default, tealdeer comes with support for rustls using webpki +certificates or system certificates. Native TLS is supported, but not enabled by +default to avoid build troubles with OpenSSL and musl. + +For details, please refer to the [user documentation]. + +#### Changes: + +- [added] Resolve paths in config `[directories]` relative to the config directory ([#306]) +- [added] Add `common` platform to CLI ([#401]) +- [added] Add configuration option for `archive_source` ([#337]) +- [added] Allows configuring TLS backend ([#386]) +- [added] Add args: `--edit-page` and `--edit-patch` ([#388]) +- [added] Add an option to specify a custom config file to be used ([#422]) +- [added] Upload binaries from build step as artifact ([#423]) +- [added] Add `search.languages` and `updates.download_languages` settings ([#430]) +- [added] Add `search.platforms` config option and search all platforms by default ([#435]) +- [added] Add `display.show_title` option to display command titles in output ([#439]) +- [chore] Various test improvements ([#399]) +- [chore] Add tests for osx/macos alias ([#407]) +- [chore] Move most of `main` to `try_main` ([#400]) +- [chore] Only create a single temporary directory in integration tests ([#411]) +- [chore] Replace reqwest with ureq ([#417]) +- [chore] Introduce Language struct ([#425]) +- [chore] Cache rewrite ([#416]) +- [chore] Allow references in `Config` ([#429]) +- [docs] Highlight code examples in user docs ([#440]) +- [removed] Remove native-tls from default feature set ([#436]) + +#### Contributors to this version: + +- [Christoph Loy][@beatbrot] +- [Erick Guan][@erickguan] +- [@MHS-0][@MHS-0] +- [Matěj Kafka][@MatejKafka] +- [Nachiket Kanore][@nachiketkanore] +- [Niklas Mohrin][@niklasmohrin] +- [Predrag Minic][@mipedja] +- [@hex1c][@hex1c] +- [lyj][@lengyijun] + +Thanks! + +#### Notes to package maintainers + +1. The MSRV has been bumped to 1.85. +2. Consider whether you want to include the `native-tls` feature in your build + of tealdeer. The feature is disabled for the binaries in the GitHub release + because we target musl, but it might work out of the box for your + distribution. +3. We have added the `ignore-online-tests` feature to automatically mark all + tests that require an internet connection as skipped, so you can use this + feature instead of maintaining a list of these tests yourself. + ### [v1.7.2][v1.7.2] (2025-03-18) This patch release updates the `zip` dependency to mitigate a potential security @@ -34,11 +114,11 @@ This patch release updates the `yansi` dependency to version 1, so that the previous versions of `yansi` can be removed from the package sets of Linux distributions. This change should not impact the behavior of tealdeer. -Changes: +#### Changes: - [chore] Upgrade yansi: 0.5.1 -> 1.0.1 ([#389]) -Contributors to this version: +#### Contributors to this version: - [Blair Noctis][@nc7s] @@ -74,7 +154,7 @@ On a personal note, this will be the last release from me ([Danilo](https://github.com/dbrgn/)) as primary maintainer of tealdeer. For details, see [#376](https://github.com/tealdeer-rs/tealdeer/issues/376). -Changes: +#### Changes: - [added] Allow querying multiple platforms ([#300]) - [added] Add BSD platform support ([#354]) @@ -94,7 +174,7 @@ Changes: - [chore] Update Cargo.toml license field following SPDX 2.1 ([#336]) - [chore] Dependency updates -Contributors to this version: +#### Contributors to this version: - [Adam Henley][@adamazing] - [Andrea Frigido][@frisoft] @@ -118,12 +198,12 @@ Thanks! ### [v1.6.1][v1.6.1] (2022-10-24) -Changes: +#### Changes: - [fixed] Fix path source for custom pages dir ([#297]) - [chore] Update dependendencies ([#299]) -Contributors to this version: +#### Contributors to this version: - [Cyrus Yip][@CyrusYip] - [Danilo Bargen][@dbrgn] @@ -142,7 +222,7 @@ The `TEALDEER_CACHE_DIR` env variable is now deprecated. A note to packagers: Shell completions have been moved to the `completion/` subdirectory! Packaging scripts might need to be updated. -Changes: +#### Changes: - [added] Allow overriding cache directory through config ([#276]) - [added] Add `--no-auto-update` CLI flag ([#257]) @@ -163,7 +243,7 @@ Changes: - [chore] Use anyhow for error handling ([#249]) - [chore] Switch to Rust 2021 edition ([#284]) -Contributors to this version: +#### Contributors to this version: - [@bagohart][@bagohart] - [@cyqsimon][@cyqsimon] @@ -212,7 +292,7 @@ Note that the MSRV (Minimal Supported Rust Version) of the project > When publishing a tealdeer release, the Rust version required to build it > should be stable for at least a month. -Changes: +#### Changes: - [added] Support custom pages and patches ([#142][i142]) - [added] Multi-language support ([#125][i125], [#161][i161]) @@ -243,7 +323,7 @@ Changes: - [chore] All release binaries are now generated in CI. Binaries for macOS and Windows are also provided. ([#240][i240]) - [chore] Update all dependencies -Contributors to this version: +#### Contributors to this version: - [@bl-ue][@bl-ue] - [Cameron Tod][@cam8001] @@ -272,7 +352,7 @@ co-maintainer. Thank you for your help! - [fixed] Syntax error in zsh completion file ([#138][i138]) -Contributors to this version: +#### Contributors to this version: - [Danilo Bargen][@dbrgn] - [Bruno A. Muciño][@mucinoab] @@ -289,7 +369,7 @@ Thanks! - [changed] Make `--list` option comply with official spec ([#112][i112]) - [changed] Move cache age warning to stderr ([#113][i113]) -Contributors to this version: +#### Contributors to this version: - [Atul Bhosale][@Atul9] - [Danilo Bargen][@dbrgn] @@ -315,7 +395,7 @@ Thanks! - [fixed] Fix Fish autocompletion on macOS ([#87][i87]) - [fixed] Fix compilation on Windows by disabling pager ([#99][i99]) -Contributors to this version: +#### Contributors to this version: - [Bruno Heridet][@Delapouite] - [Danilo Bargen][@dbrgn] @@ -341,7 +421,7 @@ Thanks! - [changed] Move to Rust 2018, require Rust 1.32 ([#69][i69] / [#84][i84]) - [fixed] Add (back) support for proxies ([#68][i68]) -Contributors to this version: +#### Contributors to this version: - [Bar Hatsor][@Bassets] - [Danilo Bargen][@dbrgn] @@ -364,7 +444,7 @@ Thanks! - [changed] Require at least Rust 1.28 to build (previous: 1.19) - [fixed] Fix building on systems with openssl 1.1.1 ([#47][i47]) -Contributors to this version: +#### Contributors to this version: - [Danilo Bargen][@dbrgn] - [@equal-l2][@equal-l2] @@ -397,7 +477,7 @@ Thanks! - First crates.io release - +[user documentation]: https://tealdeer-rs.github.io/tealdeer/ [@0ndorio]: https://github.com/0ndorio [@adamazing]: https://github.com/adamazing @@ -460,6 +540,14 @@ Thanks! [@Walker-00]: https://github.com/Walker-00 [@YDX-2147483647]: https://github.com/YDX-2147483647 [@zedseven]: https://github.com/zedseven +[@beatbrot]: https://github.com/beatbrot +[@erickguan]: https://github.com/erickguan +[@MHS-0]: https://github.com/MHS-0 +[@MatejKafka]: https://github.com/MatejKafka +[@nachiketkanore]: https://github.com/nachiketkanore +[@mipedja]: https://github.com/mipedja +[@hex1c]: https://github.com/hex1c +[@lengyijun]: https://github.com/lengyijun [v1.0.0]: https://github.com/tealdeer-rs/tealdeer/compare/v0.4.0...v1.0.0 [v1.1.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.0.0...v1.1.0 @@ -473,6 +561,7 @@ Thanks! [v1.7.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.6.1...v1.7.0 [v1.7.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.0...v1.7.1 [v1.7.2]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.1...v1.7.2 +[v1.8.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.2...v1.8.0 [i34]: https://github.com/tealdeer-rs/tealdeer/issues/34 [i43]: https://github.com/tealdeer-rs/tealdeer/issues/43 @@ -544,6 +633,7 @@ Thanks! [#300]: https://github.com/tealdeer-rs/tealdeer/pull/300 [#303]: https://github.com/tealdeer-rs/tealdeer/pull/303 [#305]: https://github.com/tealdeer-rs/tealdeer/pull/305 +[#306]: https://github.com/tealdeer-rs/tealdeer/pull/306 [#314]: https://github.com/tealdeer-rs/tealdeer/pull/314 [#315]: https://github.com/tealdeer-rs/tealdeer/pull/315 [#322]: https://github.com/tealdeer-rs/tealdeer/pull/322 @@ -552,8 +642,28 @@ Thanks! [#331]: https://github.com/tealdeer-rs/tealdeer/pull/331 [#333]: https://github.com/tealdeer-rs/tealdeer/pull/333 [#336]: https://github.com/tealdeer-rs/tealdeer/pull/336 +[#337]: https://github.com/tealdeer-rs/tealdeer/pull/337 [#342]: https://github.com/tealdeer-rs/tealdeer/pull/342 [#354]: https://github.com/tealdeer-rs/tealdeer/pull/354 [#355]: https://github.com/tealdeer-rs/tealdeer/pull/355 [#362]: https://github.com/tealdeer-rs/tealdeer/pull/362 +[#386]: https://github.com/tealdeer-rs/tealdeer/pull/386 +[#388]: https://github.com/tealdeer-rs/tealdeer/pull/388 [#389]: https://github.com/tealdeer-rs/tealdeer/pull/389 +[#399]: https://github.com/tealdeer-rs/tealdeer/pull/399 +[#400]: https://github.com/tealdeer-rs/tealdeer/pull/400 +[#401]: https://github.com/tealdeer-rs/tealdeer/pull/401 +[#407]: https://github.com/tealdeer-rs/tealdeer/pull/407 +[#411]: https://github.com/tealdeer-rs/tealdeer/pull/411 +[#416]: https://github.com/tealdeer-rs/tealdeer/pull/416 +[#417]: https://github.com/tealdeer-rs/tealdeer/pull/417 +[#422]: https://github.com/tealdeer-rs/tealdeer/pull/422 +[#423]: https://github.com/tealdeer-rs/tealdeer/pull/423 +[#425]: https://github.com/tealdeer-rs/tealdeer/pull/425 +[#426]: https://github.com/tealdeer-rs/tealdeer/pull/426 +[#429]: https://github.com/tealdeer-rs/tealdeer/pull/429 +[#430]: https://github.com/tealdeer-rs/tealdeer/pull/430 +[#435]: https://github.com/tealdeer-rs/tealdeer/pull/435 +[#436]: https://github.com/tealdeer-rs/tealdeer/pull/436 +[#439]: https://github.com/tealdeer-rs/tealdeer/pull/439 +[#440]: https://github.com/tealdeer-rs/tealdeer/pull/440 diff --git a/Cargo.lock b/Cargo.lock index 1ac11fe..661c998 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1097,7 +1097,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.7.2" +version = "1.8.0" dependencies = [ "anyhow", "app_dirs2", diff --git a/Cargo.toml b/Cargo.toml index 1123a69..44c13ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ name = "tealdeer" readme = "README.md" repository = "https://github.com/tealdeer-rs/tealdeer/" documentation = "https://tealdeer-rs.github.io/tealdeer/" -version = "1.7.2" +version = "1.8.0" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"] rust-version = "1.85" edition = "2021" diff --git a/docs/src/installing.md b/docs/src/installing.md index 0bee062..f0ca823 100644 --- a/docs/src/installing.md +++ b/docs/src/installing.md @@ -50,10 +50,10 @@ Release build: $ cargo build --release ``` -Release build with bundled CA roots: +Release build with native TLS support: ```shell -$ cargo build --release --no-default-features --features rustls-with-webpki-roots +$ cargo build --release --features native-tls ``` Debug build with logging support: diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 33e6020..7618ac4 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -1,4 +1,4 @@ -tealdeer 1.7.2: A fast TLDR client +tealdeer 1.8.0: A fast TLDR client Danilo Bargen , Niklas Mohrin Usage: tldr [OPTIONS] [COMMAND]... From 6c1d7027696530f30d5ce47f57a8b6ad1e6552d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 00:18:45 +0100 Subject: [PATCH 344/368] Bump actions/download-artifact from 5 to 6 (#448) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 360dd94..ee63de1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -135,7 +135,7 @@ jobs: - windows-x86_64-msvc steps: - uses: actions/checkout@v5 - - uses: actions/download-artifact@v5 + - uses: actions/download-artifact@v6 - name: Upload binary if: startsWith(github.ref, 'refs/tags/') run: | From e1213158e45679680540eaec32648ca19d704393 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 00:19:23 +0100 Subject: [PATCH 345/368] Bump actions/upload-artifact from 4 to 5 (#447) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93b83e4..2fc4485 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: # expects runners have the proper Native SSL library cargo build --features native-tls --no-default-features cp target/debug/tldr${{ matrix.exe_suffix}} artifacts/tldr-native-tls${{ matrix.exe_suffix}} - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v5 with: name: tldr-debug-build-${{ matrix.platform }}-rust-${{ matrix.toolchain }} path: artifacts/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee63de1..539f2ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,7 @@ jobs: run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} cargo build --release - name: Strip binary run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} musl-strip -s /home/rust/src/target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v5 with: name: "tealdeer-linux-${{ matrix.arch }}-${{ matrix.libc }}" path: "target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr" @@ -94,7 +94,7 @@ jobs: targets: "${{ matrix.arch }}-apple-darwin" - name: Build run: cargo build --release --target ${{ matrix.arch }}-apple-darwin - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v5 with: name: "tealdeer-macos-${{ matrix.arch }}" path: "target/${{ matrix.arch }}-apple-darwin/release/tldr" @@ -109,7 +109,7 @@ jobs: toolchain: stable - name: Build run: cargo build --release --target x86_64-pc-windows-msvc - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v5 with: name: "tealdeer-windows-x86_64-msvc" path: "target/x86_64-pc-windows-msvc/release/tldr.exe" From e769114d8b2dd35096dd00a0bf3e7584a57815fb Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Tue, 11 Nov 2025 17:33:19 +0100 Subject: [PATCH 346/368] Enable ureq's socks-proxy feature (#451) --- Cargo.lock | 18 ++++++++++++++++++ Cargo.toml | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 661c998..dbd9a3f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -151,6 +151,12 @@ version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.10.1" @@ -1078,6 +1084,17 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +[[package]] +name = "socks" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b" +dependencies = [ + "byteorder", + "libc", + "winapi", +] + [[package]] name = "subtle" version = "2.6.1" @@ -1236,6 +1253,7 @@ dependencies = [ "rustls-pemfile", "rustls-pki-types", "rustls-platform-verifier", + "socks", "ureq-proto", "utf-8", "webpki-root-certs", diff --git a/Cargo.toml b/Cargo.toml index 44c13ef..e9aff22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ env_logger = { version = "0.11", optional = true } log = "0.4" serde = "1.0.21" serde_derive = "1.0.21" -ureq = { version = "3.0.8", default-features = false, features = ["gzip"] } +ureq = { version = "3.0.8", default-features = false, features = ["gzip", "socks-proxy"] } toml = "0.8.19" yansi = "1" zip = { version = "5.1.1", default-features = false, features = ["deflate"] } From b3cd7b1c216656ea3416a86104363589157477dc Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Tue, 11 Nov 2025 22:27:52 +0100 Subject: [PATCH 347/368] Release v1.8.1 --- CHANGELOG.md | 12 ++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- docs/src/usage.txt | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1c479f..5a80bbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,16 @@ Possible log types: - `[docs]` for documentation changes. - `[chore]` for maintenance work. +### [v1.8.1][v1.8.1] (2025-11-11) + +This patch release tweaks the enabled features for ureq, the library we use to +perform HTTP requests when updating the cache. In particular, support for socks +proxies is now enabled. + +#### Changes: + +- [added] Enable ureq's socks-proxy feature ([#451]) + ### [v1.8.0][v1.8.0] (2025-10-03) One year and one day have passed since tealdeer version 1.7.0 was released, so @@ -562,6 +572,7 @@ Thanks! [v1.7.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.0...v1.7.1 [v1.7.2]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.1...v1.7.2 [v1.8.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.2...v1.8.0 +[v1.8.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.8.0...v1.8.1 [i34]: https://github.com/tealdeer-rs/tealdeer/issues/34 [i43]: https://github.com/tealdeer-rs/tealdeer/issues/43 @@ -667,3 +678,4 @@ Thanks! [#436]: https://github.com/tealdeer-rs/tealdeer/pull/436 [#439]: https://github.com/tealdeer-rs/tealdeer/pull/439 [#440]: https://github.com/tealdeer-rs/tealdeer/pull/440 +[#451]: https://github.com/tealdeer-rs/tealdeer/pull/451 diff --git a/Cargo.lock b/Cargo.lock index dbd9a3f..be9bd24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1114,7 +1114,7 @@ dependencies = [ [[package]] name = "tealdeer" -version = "1.8.0" +version = "1.8.1" dependencies = [ "anyhow", "app_dirs2", diff --git a/Cargo.toml b/Cargo.toml index e9aff22..aa7ae49 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ name = "tealdeer" readme = "README.md" repository = "https://github.com/tealdeer-rs/tealdeer/" documentation = "https://tealdeer-rs.github.io/tealdeer/" -version = "1.8.0" +version = "1.8.1" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"] rust-version = "1.85" edition = "2021" diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 7618ac4..f7fcc46 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -1,4 +1,4 @@ -tealdeer 1.8.0: A fast TLDR client +tealdeer 1.8.1: A fast TLDR client Danilo Bargen , Niklas Mohrin Usage: tldr [OPTIONS] [COMMAND]... From c5d62e5987b38705814b72354373c50fe165dbb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 20:32:38 +0100 Subject: [PATCH 348/368] Bump actions/checkout from 5 to 6 (#454) Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/gh-pages.yml | 2 +- .github/workflows/release.yml | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fc4485..b557674 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: exe_suffix: .exe runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} @@ -50,7 +50,7 @@ jobs: name: run clippy lints runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -62,7 +62,7 @@ jobs: name: run rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -74,7 +74,7 @@ jobs: name: build docs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup mdBook uses: peaceiris/actions-mdbook@v2 with: diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 8746d42..f841705 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -8,7 +8,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup mdBook uses: peaceiris/actions-mdbook@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 539f2ab..e48fc17 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ jobs: create-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Create release for tag if: startsWith(github.ref, 'refs/tags/') run: | @@ -24,7 +24,7 @@ jobs: matrix: target: ["bash", "fish", "zsh"] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Upload completion if: startsWith(github.ref, 'refs/tags/') run: | @@ -40,7 +40,7 @@ jobs: matrix: target: ["MIT", "APACHE"] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Upload license if: startsWith(github.ref, 'refs/tags/') run: | @@ -66,7 +66,7 @@ jobs: - arch: "arm" libc: "musleabihf" steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Pull Docker image run: docker pull messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} - name: Build in Docker @@ -86,7 +86,7 @@ jobs: - arch: "x86_64" - arch: "aarch64" steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup toolchain uses: dtolnay/rust-toolchain@master with: @@ -102,7 +102,7 @@ jobs: build-windows: runs-on: windows-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup toolchain uses: dtolnay/rust-toolchain@master with: @@ -134,7 +134,7 @@ jobs: - macos-aarch64 - windows-x86_64-msvc steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/download-artifact@v6 - name: Upload binary if: startsWith(github.ref, 'refs/tags/') From 3a6fd99c859a28c1913963d8d25303b43d5fcce0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jan 2026 18:55:41 +0100 Subject: [PATCH 349/368] Bump actions/download-artifact from 6 to 7 (#457) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 7. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e48fc17..1d978e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -135,7 +135,7 @@ jobs: - windows-x86_64-msvc steps: - uses: actions/checkout@v6 - - uses: actions/download-artifact@v6 + - uses: actions/download-artifact@v7 - name: Upload binary if: startsWith(github.ref, 'refs/tags/') run: | From 5ee1f28021a563ab9d2ec06cc9d07c80254164a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jan 2026 18:55:53 +0100 Subject: [PATCH 350/368] Bump actions/upload-artifact from 5 to 6 (#456) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b557674..a0b20ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: # expects runners have the proper Native SSL library cargo build --features native-tls --no-default-features cp target/debug/tldr${{ matrix.exe_suffix}} artifacts/tldr-native-tls${{ matrix.exe_suffix}} - - uses: actions/upload-artifact@v5 + - uses: actions/upload-artifact@v6 with: name: tldr-debug-build-${{ matrix.platform }}-rust-${{ matrix.toolchain }} path: artifacts/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d978e6..9813f00 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,7 @@ jobs: run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} cargo build --release - name: Strip binary run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} musl-strip -s /home/rust/src/target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr - - uses: actions/upload-artifact@v5 + - uses: actions/upload-artifact@v6 with: name: "tealdeer-linux-${{ matrix.arch }}-${{ matrix.libc }}" path: "target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr" @@ -94,7 +94,7 @@ jobs: targets: "${{ matrix.arch }}-apple-darwin" - name: Build run: cargo build --release --target ${{ matrix.arch }}-apple-darwin - - uses: actions/upload-artifact@v5 + - uses: actions/upload-artifact@v6 with: name: "tealdeer-macos-${{ matrix.arch }}" path: "target/${{ matrix.arch }}-apple-darwin/release/tldr" @@ -109,7 +109,7 @@ jobs: toolchain: stable - name: Build run: cargo build --release --target x86_64-pc-windows-msvc - - uses: actions/upload-artifact@v5 + - uses: actions/upload-artifact@v6 with: name: "tealdeer-windows-x86_64-msvc" path: "target/x86_64-pc-windows-msvc/release/tldr.exe" From 75e5462312e91cd55831067219560dedb234473f Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sun, 25 Jan 2026 18:13:31 +0100 Subject: [PATCH 351/368] Update CHANGELOG.md --- CHANGELOG.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a80bbb..644a30a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,46 @@ Possible log types: - `[docs]` for documentation changes. - `[chore]` for maintenance work. +### [v1.5.1][v1.5.1], [v1.6.2][v1.6.2], [v1.7.3][v1.7.3] (2026-01-25) + +Today I am releasing three patch updates for outdated versions of tealdeer. +They are minimal patches for Linux distributions that ship old versions of +tealdeer which recently broke due to an upstream change. If you can choose +freely which version of tealdeer to use, I recommend using the latest version of +tealdeer, 1.8.1. For more details, see the "Notes to package maintainers" +section below. + +All three updates contain only a single change compared to their respective +previous versions which changes the `ARCHIVE_URL` constant used for updating the +page cache. The reason for this change is that the upstream tldr-pages +repository shut down the domain that clients were previously required to use. + +Note that this issue is already fixed in tealdeer 1.8.0 where we introduced a +config file option for changing the URL used at runtime. The versions 1.8.0 and +1.8.1 also use the new domain of the tldr-pages archive by default, so no action +is needed for users of those versions. + +#### Changes + +- [fixed] Update `ARCHIVE_URL` + +#### Notes to package maintainers + +I have _not_ updated the lockfile for any of these releases, so the locked +dependency versions are still the same as they were for the previous release in +the respective v1.x series. Updating the lockfile for tealdeer 1.5.0 to remove +any `cargo audit` warnings while also maintaining compatibility with Rust 1.54 +also brings larger changes through transitive dependencies, which contradicts my +plan to make this update easy to plug into existing build pipelines. + +If you want to build / distribute tealdeer v1.5.1, v1.6.2, or v1.7.3, please use +an up to date Rust toolchain to permit updates to newer versions of (transitive) +dependencies. Do not use the lockfile, instead update to the newest available +dependency versions. + +For the same reason, there are no artifacts attached to the GitHub releases of +these versions. + ### [v1.8.1][v1.8.1] (2025-11-11) This patch release tweaks the enabled features for ureq, the library we use to @@ -566,11 +606,14 @@ Thanks! [v1.4.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.3.0...v1.4.0 [v1.4.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.4.0...v1.4.1 [v1.5.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.4.1...v1.5.0 +[v1.5.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.5.0...v1.5.1 [v1.6.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.5.0...v1.6.0 [v1.6.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.6.0...v1.6.1 +[v1.6.2]: https://github.com/tealdeer-rs/tealdeer/compare/v1.6.1...v1.6.2 [v1.7.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.6.1...v1.7.0 [v1.7.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.0...v1.7.1 [v1.7.2]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.1...v1.7.2 +[v1.7.3]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.2...v1.7.3 [v1.8.0]: https://github.com/tealdeer-rs/tealdeer/compare/v1.7.2...v1.8.0 [v1.8.1]: https://github.com/tealdeer-rs/tealdeer/compare/v1.8.0...v1.8.1 From 8b97afe7aa305feaff1a31e6364eae42aa30f439 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sun, 25 Jan 2026 18:39:52 +0100 Subject: [PATCH 352/368] Add workflow_dispatch trigger for GitHub Pages workflow --- .github/workflows/gh-pages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index f841705..f8b6f6e 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -3,6 +3,7 @@ on: push: tags: - "v[1-9]*" # push events matching `v` followed by anything larger than 0, e.g. v1.0, v20.15.10 + workflow_dispatch: jobs: deploy: From 593e9309b9a78dfbc5a1ad5db9d5982b817151be Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 20 Feb 2026 23:44:36 +0100 Subject: [PATCH 353/368] Placeholder escaping (#414) Closes #402 This adds special handling for escaped placeholders as required by the client spec. The added tests include examples from current pages that rely on this behavior. The text replacements use `str::replace` which constructs a new allocated `String`. I considered using a custom `replace_inplace` method on `&mut str` (which works if the replacement string is at most as long as the pattern to be replaced), but decided against it because I think that the performance improvement is not significant enough to justify adding `unsafe` code. It is also possible to avoid `unsafe` by re-checking UTF-8 validity after all modifications, but the code still felt a bit out of place for tealdeer. We can always add these optimizations later if we want to. --- src/formatter.rs | 361 ++++++++++++++++++++++++++++++++++++----------- src/output.rs | 4 +- 2 files changed, 278 insertions(+), 87 deletions(-) diff --git a/src/formatter.rs b/src/formatter.rs index 5270124..1b504dd 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -4,19 +4,52 @@ use log::debug; use crate::{extensions::FindFrom, types::LineType}; -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Eq)] /// Represents a snippet from a page of a specific highlighting class. -pub enum PageSnippet<'a> { - CommandName(&'a str), - Variable(&'a str), - NormalCode(&'a str), - Description(&'a str), - Text(&'a str), - Title(&'a str), +pub enum PageSnippet { + CommandName(T), + Variable(T), + NormalCode(T), + Description(T), + Text(T), + Title(T), Linebreak, } -impl PageSnippet<'_> { +#[cfg_attr(not(test), allow(dead_code))] +impl PageSnippet { + pub fn map(self, f: F) -> PageSnippet + where + F: FnOnce(T) -> U, + { + match self { + PageSnippet::CommandName(s) => PageSnippet::CommandName(f(s)), + PageSnippet::Variable(s) => PageSnippet::Variable(f(s)), + PageSnippet::NormalCode(s) => PageSnippet::NormalCode(f(s)), + PageSnippet::Description(s) => PageSnippet::Description(f(s)), + PageSnippet::Text(s) => PageSnippet::Text(f(s)), + PageSnippet::Title(s) => PageSnippet::Title(f(s)), + PageSnippet::Linebreak => PageSnippet::Linebreak, + } + } +} + +impl, U> PartialEq> for PageSnippet { + fn eq(&self, other: &PageSnippet) -> bool { + match (self, other) { + (PageSnippet::CommandName(s), PageSnippet::CommandName(t)) + | (PageSnippet::Variable(s), PageSnippet::Variable(t)) + | (PageSnippet::NormalCode(s), PageSnippet::NormalCode(t)) + | (PageSnippet::Description(s), PageSnippet::Description(t)) + | (PageSnippet::Text(s), PageSnippet::Text(t)) + | (PageSnippet::Title(s), PageSnippet::Title(t)) => s == t, + (PageSnippet::Linebreak, PageSnippet::Linebreak) => true, + _ => false, + } + } +} + +impl PageSnippet<&str> { pub fn is_empty(&self) -> bool { use PageSnippet::*; @@ -38,7 +71,7 @@ pub fn highlight_lines( ) -> Result<(), E> where L: Iterator, - F: for<'snip> FnMut(PageSnippet<'snip>) -> Result<(), E>, + F: for<'snip> FnMut(PageSnippet<&'snip str>) -> Result<(), E>, { let mut command = String::new(); for line in lines { @@ -75,29 +108,82 @@ where Ok(()) } -/// Highlight code examples including user variables in {{ curly braces }}. -fn highlight_code<'a, E>( - command: &'a str, - text: &'a str, - process_snippet: &mut impl FnMut(PageSnippet<'a>) -> Result<(), E>, +/// Highlight code examples. +/// - parse placeholders (`{{ curly braces }}`) +/// - replace escaped placeholder markers (`\{\{` and `\}\}`) +fn highlight_code( + command: &str, + mut text: &str, + process_snippet: &mut impl FnMut(PageSnippet<&str>) -> Result<(), E>, ) -> Result<(), E> { - let variable_splits = text - .split("}}") - .map(|s| s.split_once("{{").unwrap_or((s, ""))); - for (code_segment, variable) in variable_splits { - highlight_code_segment(command, code_segment, process_snippet)?; - process_snippet(PageSnippet::Variable(variable))?; + // We replace escaped placeholder markers at the end so that our replacing does not interfere + // with finding the actual markers. + // NOTE: This is not optimal, as it allocates one String for each `replace` + let replace_escaped = |s: &str| s.replace(r"\{\{", "{{").replace(r"\}\}", "}}"); + + loop { + // Find placeholder markers and split into code and placeholder accordingly + + let Some(start_marker) = find_marker(text, "{{", r"\{\{") else { + break; + }; + let Some(mut end_marker) = find_marker(&text[start_marker + 2..], "}}", r"\}\}") else { + break; + }; + end_marker += start_marker + 2; + + // Greedily extend matched range + while end_marker + 2 < text.len() && text.as_bytes()[end_marker + 2] == b'}' { + end_marker += 1; + } + + let placeholder_content = &text[start_marker + 2..end_marker]; + + if start_marker > 0 { + highlight_code_segment( + command, + &replace_escaped(&text[..start_marker]), + process_snippet, + )?; + } + process_snippet(PageSnippet::Variable(&replace_escaped(placeholder_content)))?; + + text = &text[end_marker + 2..]; } + + if !text.is_empty() { + highlight_code_segment(command, &replace_escaped(text), process_snippet)?; + } + Ok(()) } +/// Find a "{{" (or "}}") substring that does not overlap with a preceding "\{\{" (or "\}\}"). +fn find_marker(s: &str, marker: &str, forbidden_prefix: &str) -> Option { + let mut search_start = 0; + loop { + let marker_index = s.find_from(marker, search_start)?; + + let overlaps_with_prefix = (forbidden_prefix.len() <= marker_index + 1) && { + let prefix_start = marker_index + 1 - forbidden_prefix.len(); + &s[prefix_start..=marker_index] == forbidden_prefix + }; + if !overlaps_with_prefix { + return Some(marker_index); + } + + // The next valid marker cannot include the first character of the current match + search_start = marker_index + 1; + } +} + /// Yields `NormalCode` and `CommandName` in alternating order according to the occurrences of /// `command_name` in `segment`. Variables are not detected here, see `highlight_code` /// instead. fn highlight_code_segment<'a, E>( command_name: &'a str, mut segment: &'a str, - process_snippet: &mut impl FnMut(PageSnippet<'a>) -> Result<(), E>, + process_snippet: &mut impl FnMut(PageSnippet<&'a str>) -> Result<(), E>, ) -> Result<(), E> { if !command_name.is_empty() { let mut search_start = 0; @@ -140,7 +226,6 @@ fn is_freestanding_substring(surrounding: &str, substring: (usize, usize)) -> bo #[cfg(test)] mod tests { use super::*; - use PageSnippet::*; #[test] fn test_is_freestanding_substring() { @@ -167,80 +252,186 @@ mod tests { )); } - fn run<'a>(cmd: &'a str, segment: &'a str) -> Vec> { + fn run<'a>(cmd: &'a str, segment: &'a str) -> Vec> { let mut yielded = Vec::new(); - let mut process_snippet = |snip: PageSnippet<'a>| { + let mut process_snippet = |snip: PageSnippet<&str>| { if !snip.is_empty() { - yielded.push(snip); + yielded.push(snip.map(str::to_string)); } Ok::<(), ()>(()) }; - highlight_code_segment(cmd, segment, &mut process_snippet) - .expect("highlight code segment failed"); + highlight_code(cmd, segment, &mut process_snippet).expect("highlight code segment failed"); yielded } - #[test] - fn test_highlight_code_segment() { - assert!(run("make", "").is_empty()); - assert_eq!( - &run("make", "make all CC=clang -q"), - &[CommandName("make"), NormalCode(" all CC=clang -q")] - ); - assert_eq!( - &run("make", " make money --always-make"), - &[ - NormalCode(" "), - CommandName("make"), - NormalCode(" money --always-make") - ] - ); - assert_eq!( - &run("git commit", "git commit -m 'git commit'"), - &[CommandName("git commit"), NormalCode(" -m 'git commit'"),] - ); + mod highlight_code_segment { + use super::*; + use PageSnippet::*; + + #[test] + fn test_highlight_code_segment() { + assert!(run("make", "").is_empty()); + assert_eq!( + &run("make", "make all CC=clang -q"), + &[CommandName("make"), NormalCode(" all CC=clang -q")] + ); + assert_eq!( + &run("make", " make money --always-make"), + &[ + NormalCode(" "), + CommandName("make"), + NormalCode(" money --always-make") + ] + ); + assert_eq!( + &run("git commit", "git commit -m 'git commit'"), + &[CommandName("git commit"), NormalCode(" -m 'git commit'"),] + ); + } + + #[test] + fn test_i18n() { + assert_eq!( + &run("mäke", "mäke höhlenrätselbücher"), + &[CommandName("mäke"), NormalCode(" höhlenrätselbücher")] + ); + assert_eq!( + &run( + "Müll", + "1000 Gründe warum Müll heute größer ist als Müll früher, ärgerlich" + ), + &[ + NormalCode("1000 Gründe warum "), + CommandName("Müll"), + NormalCode(" heute größer ist als "), + CommandName("Müll"), + NormalCode(" früher, ärgerlich") + ] + ); + assert_eq!( + &run( + "übergang", + "die Zustandsübergangsfunktion übergang Änderungen", + ), + &[ + NormalCode("die Zustandsübergangsfunktion "), + CommandName("übergang"), + NormalCode(" Änderungen") + ], + ); + } + + #[test] + fn test_empty_command() { + let segment = "some code"; + let snippets = [NormalCode(segment)]; + + assert_eq!(run("", segment), snippets); + assert_eq!(run(" ", segment), snippets); + assert_eq!(run(" \t ", segment), snippets); + } } - #[test] - fn test_i18n() { - assert_eq!( - &run("mäke", "mäke höhlenrätselbücher"), - &[CommandName("mäke"), NormalCode(" höhlenrätselbücher")] - ); - assert_eq!( - &run( - "Müll", - "1000 Gründe warum Müll heute größer ist als Müll früher, ärgerlich" - ), - &[ - NormalCode("1000 Gründe warum "), - CommandName("Müll"), - NormalCode(" heute größer ist als "), - CommandName("Müll"), - NormalCode(" früher, ärgerlich") - ] - ); - assert_eq!( - &run( - "übergang", - "die Zustandsübergangsfunktion übergang Änderungen", - ), - &[ - NormalCode("die Zustandsübergangsfunktion "), - CommandName("übergang"), - NormalCode(" Änderungen") - ], - ); - } + mod placeholders { + use super::*; + use PageSnippet::*; - #[test] - fn test_empty_command() { - let segment = "some code"; - let snippets = [NormalCode(segment)]; + #[test] + fn variable_vs_escaped() { + assert_eq!( + run("ping", "ping {{example.com}}"), + [ + CommandName("ping"), + NormalCode(" "), + Variable("example.com"), + ], + ); + assert_eq!( + run( + "docker inspect", + r"docker inspect --format '\{\{range.NetworkSettings.Networks\}\}\{\{.IPAddress\}\}\{\{end\}\}' {{container}}" + ), + [ + CommandName("docker inspect"), + NormalCode( + " --format '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' " + ), + Variable("container"), + ], + ); + assert_eq!( + run("mount", r"mount \\{{computer_name}}\{{share_name}} Z:"), + [ + CommandName("mount"), + NormalCode(r" \\"), + Variable("computer_name"), + NormalCode(r"\"), + Variable("share_name"), + NormalCode(" Z:"), + ], + ); - assert_eq!(run("", segment), snippets); - assert_eq!(run(" ", segment), snippets); - assert_eq!(run(" \t ", segment), snippets); + assert_eq!(run("", r"\{"), [NormalCode(r"\{")]); + assert_eq!(run("", r"\{{a"), [NormalCode(r"\{{a")]); + assert_eq!(run("", r"\{{a}}"), [NormalCode(r"\"), Variable("a")]); + + // Placeholder has begin marker, but no end marker + assert_eq!(run("", r"{{\}\}}"), [NormalCode("{{}}}")]); + } + + #[test] + fn outer_precedence() { + assert_eq!( + run("git stash", "git stash show --patch {{stash@{0}}}"), + [ + CommandName("git stash"), + NormalCode(" show --patch "), + Variable("stash@{0}"), + ], + ); + + // The following is not listed in the specification, but this is the highlighting I would expect. + assert_eq!( + run("rg", "rg {{}}}"), + [CommandName("rg"), NormalCode(" "), Variable("}")] + ); + + // And these are just to document the current behavior + assert_eq!(run("", "{{{}}}"), [Variable("{}")]); + assert_eq!(run("", "{{{{}}}"), [Variable("{{}")]); + assert_eq!(run("", "{{{}}}}"), [Variable("{}}")]); + } + + #[test] + fn escaped_inside_placeholder() { + assert_eq!( + run( + "playerctl", + r#"playerctl metadata {{[-f|--format]}} "{{Now playing: \{\{artist\}\} - \{\{album\}\} - \{\{title\}\}}}""# + ), + [ + CommandName("playerctl"), + NormalCode(" metadata "), + Variable("[-f|--format]"), + NormalCode(" \""), + Variable("Now playing: {{artist}} - {{album}} - {{title}}"), + NormalCode("\""), + ], + ); + } + + #[test] + fn placeholder_inside_escaped() { + assert_eq!( + run("test", r#"test \{\{{{var}} normal\}\}"#), + [ + CommandName("test"), + NormalCode(" {{"), + Variable("var"), + NormalCode(" normal}}"), + ], + ); + } } } diff --git a/src/output.rs b/src/output.rs index 5f1aeae..927d20e 100644 --- a/src/output.rs +++ b/src/output.rs @@ -56,7 +56,7 @@ pub fn print_page( } } else { // Closure that processes a page snippet and writes it to stdout - let mut process_snippet = |snip: PageSnippet<'_>| { + let mut process_snippet = |snip: PageSnippet<&str>| { if snip.is_empty() { Ok(()) } else { @@ -82,7 +82,7 @@ pub fn print_page( fn print_snippet( writer: &mut impl Write, - snip: PageSnippet<'_>, + snip: PageSnippet<&str>, style: &StyleConfig, ) -> io::Result<()> { use PageSnippet::*; From 47a936e7363ca2afd6a8513862cceccf044d6bf8 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sat, 21 Feb 2026 00:32:23 +0100 Subject: [PATCH 354/368] Suggest trying different TLS backend when update fails (#465) Closes #453 - Add note about changing tls_backend setting - impl Display for TlsBackend - Remove trailing slash in default archive source to make URL in error look nicer --- src/config.rs | 31 +++++++++++++++++++++++++++++-- src/main.rs | 32 +++++++++++++++++++++++++++++--- 2 files changed, 58 insertions(+), 5 deletions(-) diff --git a/src/config.rs b/src/config.rs index e5e85e8..2c39235 100644 --- a/src/config.rs +++ b/src/config.rs @@ -31,6 +31,14 @@ const SUPPORTED_TLS_BACKENDS: &[RawTlsBackend] = &[ RawTlsBackend::RustlsWithNativeRoots, ]; +pub(crate) fn supported_tls_backends_string() -> String { + SUPPORTED_TLS_BACKENDS + .iter() + .map(std::string::ToString::to_string) + .collect::>() + .join(", ") +} + fn default_underline() -> bool { false } @@ -184,7 +192,7 @@ const fn default_auto_update_interval_hours() -> u64 { } fn default_archive_source() -> String { - "https://github.com/tldr-pages/tldr/releases/latest/download/".to_owned() + "https://github.com/tldr-pages/tldr/releases/latest/download".to_owned() } #[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] @@ -460,12 +468,31 @@ impl TryFrom for TlsBackend { _ => Err(anyhow!( "Unsupported TLS backend: {}. This tealdeer build has support for the following options: {}", raw, - SUPPORTED_TLS_BACKENDS.iter().map(std::string::ToString::to_string).collect::>().join(", ") + supported_tls_backends_string(), )) } } } +impl TlsBackend { + const fn as_raw(self) -> RawTlsBackend { + match self { + #[cfg(feature = "native-tls")] + Self::NativeTls => RawTlsBackend::NativeTls, + #[cfg(feature = "rustls-with-webpki-roots")] + Self::RustlsWithWebpkiRoots => RawTlsBackend::RustlsWithWebpkiRoots, + #[cfg(feature = "rustls-with-native-roots")] + Self::RustlsWithNativeRoots => RawTlsBackend::RustlsWithNativeRoots, + } + } +} + +impl fmt::Display for TlsBackend { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.as_raw().fmt(f) + } +} + #[derive(Clone, Debug, PartialEq, Eq)] pub struct Config<'a> { pub style: StyleConfig, diff --git a/src/main.rs b/src/main.rs index a0cd593..1d1b5fc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,7 +55,9 @@ mod utils; use crate::{ cache::{Cache, PageLookupResult, TLDR_PAGES_DIR}, cli::Cli, - config::{get_config_dir, make_default_config, Config, PathWithSource}, + config::{ + get_config_dir, make_default_config, supported_tls_backends_string, Config, PathWithSource, + }, output::print_page, types::ColorOptions, utils::{print_error, print_warning}, @@ -305,12 +307,36 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { let cache = if args.update || config.updates.auto_update && !args.no_auto_update { let (mut cache, was_created) = Cache::open_or_create(cache_config)?; if was_created || args.update || cache.age()? >= config.updates.auto_update_interval { - update_cache( + let result = update_cache( &mut cache, config.updates.archive_source, config.updates.tls_backend, args.quiet, - )?; + ); + + if let Err(e) = result { + print_error(enable_styles, &e); + + eprintln!(); + eprintln!("Note: Update errors are often caused by unexpected or missing TLS certificates."); + eprintln!( + "You are currently using the following TLS backend: {}", + config.updates.tls_backend, + ); + eprintln!( + "Try changing the updates.tls_backend setting in the config file, for example:" + ); + eprintln!(); + eprintln!(" [updates]"); + eprintln!(" tls_backend = \"rustls-with-native-roots\""); + eprintln!(); + eprintln!( + "This build of tealdeer has support for the following options: {}", + supported_tls_backends_string(), + ); + + return Ok(ExitCode::FAILURE); + } } cache From 41739c5bf9599d71f6ee1d35f0dab4a4e8ce580c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 14:52:53 +0100 Subject: [PATCH 355/368] Bump actions/upload-artifact from 6 to 7 (#468) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.

Release notes

Sourced from actions/upload-artifact's releases.

v7.0.0

v7 What's new

Direct Uploads

Adds support for uploading single files directly (unzipped). Callers can set the new archive parameter to false to skip zipping the file during upload. Right now, we only support single files. The action will fail if the glob passed resolves to multiple files. The name parameter is also ignored with this setting. Instead, the name of the artifact will be the name of the uploaded file.

ESM

To support new versions of the @actions/* packages, we've upgraded the package to ESM.

What's Changed

New Contributors

Full Changelog: https://github.com/actions/upload-artifact/compare/v6...v7.0.0

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=6&new-version=7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0b20ce..a17ba90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: # expects runners have the proper Native SSL library cargo build --features native-tls --no-default-features cp target/debug/tldr${{ matrix.exe_suffix}} artifacts/tldr-native-tls${{ matrix.exe_suffix}} - - uses: actions/upload-artifact@v6 + - uses: actions/upload-artifact@v7 with: name: tldr-debug-build-${{ matrix.platform }}-rust-${{ matrix.toolchain }} path: artifacts/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9813f00..316208e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,7 @@ jobs: run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} cargo build --release - name: Strip binary run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} musl-strip -s /home/rust/src/target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr - - uses: actions/upload-artifact@v6 + - uses: actions/upload-artifact@v7 with: name: "tealdeer-linux-${{ matrix.arch }}-${{ matrix.libc }}" path: "target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr" @@ -94,7 +94,7 @@ jobs: targets: "${{ matrix.arch }}-apple-darwin" - name: Build run: cargo build --release --target ${{ matrix.arch }}-apple-darwin - - uses: actions/upload-artifact@v6 + - uses: actions/upload-artifact@v7 with: name: "tealdeer-macos-${{ matrix.arch }}" path: "target/${{ matrix.arch }}-apple-darwin/release/tldr" @@ -109,7 +109,7 @@ jobs: toolchain: stable - name: Build run: cargo build --release --target x86_64-pc-windows-msvc - - uses: actions/upload-artifact@v6 + - uses: actions/upload-artifact@v7 with: name: "tealdeer-windows-x86_64-msvc" path: "target/x86_64-pc-windows-msvc/release/tldr.exe" From 6f91c3a765513c1030723e2ab96a8c6d5ea1dca0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 14:53:06 +0100 Subject: [PATCH 356/368] Bump actions/download-artifact from 7 to 8 (#469) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8.
Release notes

Sourced from actions/download-artifact's releases.

v8.0.0

v8 - What's new

Direct downloads

To support direct uploads in actions/upload-artifact, the action will no longer attempt to unzip all downloaded files. Instead, the action checks the Content-Type header ahead of unzipping and skips non-zipped files. Callers wishing to download a zipped file as-is can also set the new skip-decompress parameter to false.

Enforced checks (breaking)

A previous release introduced digest checks on the download. If a download hash didn't match the expected hash from the server, the action would log a warning. Callers can now configure the behavior on mismatch with the digest-mismatch parameter. To be secure by default, we are now defaulting the behavior to error which will fail the workflow run.

ESM

To support new versions of the @actions/* packages, we've upgraded the package to ESM.

What's Changed

Full Changelog: https://github.com/actions/download-artifact/compare/v7...v8.0.0

Commits
  • 70fc10c Merge pull request #461 from actions/danwkennedy/digest-mismatch-behavior
  • f258da9 Add change docs
  • ccc058e Fix linting issues
  • bd7976b Add a setting to specify what to do on hash mismatch and default it to error
  • ac21fcf Merge pull request #460 from actions/danwkennedy/download-no-unzip
  • 15999bf Add note about package bumps
  • 974686e Bump the version to v8 and add release notes
  • fbe48b1 Update test names to make it clearer what they do
  • 96bf374 One more test fix
  • b8c4819 Fix skip decompress test
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/download-artifact&package-manager=github_actions&previous-version=7&new-version=8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 316208e..41de665 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -135,7 +135,7 @@ jobs: - windows-x86_64-msvc steps: - uses: actions/checkout@v6 - - uses: actions/download-artifact@v7 + - uses: actions/download-artifact@v8 - name: Upload binary if: startsWith(github.ref, 'refs/tags/') run: | From b19517097ae0a5f9015794030b782ae9fd54535c Mon Sep 17 00:00:00 2001 From: Pavel Timofeev Date: Mon, 13 Apr 2026 18:31:31 -0400 Subject: [PATCH 357/368] Add builtin `tldr tealdeer` page (#472) Fixes #218. --- docs/src/usage.txt | 2 ++ pages/tealdeer.md | 42 ++++++++++++++++++++++++++++++++++++++++++ src/cache.rs | 10 +++++----- src/cli.rs | 4 +++- src/main.rs | 29 ++++++++++++++++++++++++----- src/output.rs | 8 +++----- tests/lib.rs | 10 ++++++++++ 7 files changed, 89 insertions(+), 16 deletions(-) create mode 100644 pages/tealdeer.md diff --git a/docs/src/usage.txt b/docs/src/usage.txt index f7fcc46..6a04de7 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -29,3 +29,5 @@ Options: -h, --help Print help To view the user documentation, please visit https://tealdeer-rs.github.io/tealdeer/. + +To view usage examples, run tldr tldr or tldr tealdeer. diff --git a/pages/tealdeer.md b/pages/tealdeer.md new file mode 100644 index 0000000..948b278 --- /dev/null +++ b/pages/tealdeer.md @@ -0,0 +1,42 @@ +# tldr + +> This is a builtin page that shows information for your installed tealdeer version. +> More information: . + +> This page shows tealdeer specific functionality. See tldr tldr for more examples. + +- Render a local markdown file as a tldr page: + +`tldr --render {{path/to/file.md}}` + +- Show the raw markdown source of a page instead of rendering it: + +`tldr --raw {{command}}` + +- Show file and directory paths used by tealdeer: + +`tldr --show-paths` + +- Create an initial config file: + +`tldr --seed-config` + +- Override config file location: + +`tldr --config-path ` + +- Open a custom page for a command in `$EDITOR` (creates it if it doesn't exist): + +`tldr --edit-page {{command}}` + +- Open a custom patch for a command in `$EDITOR` (appended to the existing page): + +`tldr --edit-patch {{command}}` + +- Clear the local cache: + +`tldr --clear-cache` + +- If auto update is configured, disable it for this run: + +`tldr --no-auto-update` diff --git a/src/cache.rs b/src/cache.rs index b181310..a77036d 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -1,6 +1,6 @@ use std::{ fs::{self, File}, - io::{BufReader, Cursor, ErrorKind, Read}, + io::{Cursor, ErrorKind, Read}, path::{Path, PathBuf}, time::{Duration, SystemTime}, }; @@ -277,12 +277,12 @@ impl PageLookupResult { self } - /// Create a buffered reader that sequentially reads from the page and the + /// Create a reader that sequentially reads from the page and the /// patch, as if they were concatenated. /// /// This will return an error if either the page file or the patch file /// cannot be opened. - pub fn reader(&self) -> Result>> { + pub fn reader(&self) -> Result> { // Open page file let page_file = File::open(&self.page_path) .with_context(|| format!("Could not open page file at {}", self.page_path.display()))?; @@ -302,11 +302,11 @@ impl PageLookupResult { // the page and patch files and that will read them sequentially, // because it avoids the boxing below. However, the performance impact // would first need to be shown to be significant using a benchmark. - Ok(BufReader::new(if let Some(patch_file) = patch_file_opt { + Ok(if let Some(patch_file) = patch_file_opt { Box::new(page_file.chain(&b"\n"[..]).chain(patch_file)) as Box } else { Box::new(page_file) as Box - })) + }) } } diff --git a/src/cli.rs b/src/cli.rs index d461a3e..161d69d 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -18,7 +18,9 @@ use crate::types::{ColorOptions, PlatformType}; {usage-heading} {usage} {all-args}{after-help}", - after_help = "To view the user documentation, please visit https://tealdeer-rs.github.io/tealdeer/.", + after_help = "To view the user documentation, please visit https://tealdeer-rs.github.io/tealdeer/. + +To view usage examples, run tldr tldr or tldr tealdeer.", arg_required_else_help = true, help_expected = true, group = ArgGroup::new("command_or_file").args(&["command", "render"]), diff --git a/src/main.rs b/src/main.rs index 1d1b5fc..5b12613 100644 --- a/src/main.rs +++ b/src/main.rs @@ -68,6 +68,8 @@ const APP_INFO: AppInfo = AppInfo { name: NAME, author: NAME, }; +static TEALDEER_PAGE: &str = + include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/pages/tealdeer.md")); /// Clear the cache fn clear_cache(cache: Cache, quietly: bool) -> Result<()> { @@ -258,8 +260,20 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { // If a local file was passed in, render it and exit if let Some(file) = args.render { - let path = PageLookupResult::with_page(file); - print_page(&path, args.raw, enable_styles, args.pager, &config)?; + let reader = PageLookupResult::with_page(file).reader()?; + print_page(reader, args.raw, enable_styles, args.pager, &config)?; + return Ok(ExitCode::SUCCESS); + } + + // The tealdeer page is embedded in the binary, no cache needed + if command == "tealdeer" { + print_page( + TEALDEER_PAGE.as_bytes(), + args.raw, + enable_styles, + args.pager, + &config, + )?; return Ok(ExitCode::SUCCESS); } @@ -407,7 +421,7 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { ); } - let Some(lookup_result) = cache.find_page(&command) else { + let Some(result) = cache.find_page(&command) else { if !args.quiet { print_warning( enable_styles, @@ -419,11 +433,16 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { ), ); } - return Ok(ExitCode::FAILURE); }; - print_page(&lookup_result, args.raw, enable_styles, args.pager, &config)?; + print_page( + result.reader()?, + args.raw, + enable_styles, + args.pager, + &config, + )?; } Ok(ExitCode::SUCCESS) diff --git a/src/output.rs b/src/output.rs index 927d20e..9305c20 100644 --- a/src/output.rs +++ b/src/output.rs @@ -1,12 +1,11 @@ //! Functions for printing pages to the terminal -use std::io::{self, BufRead, Write}; +use std::io::{self, BufRead, BufReader, Read, Write}; use anyhow::{Context, Result}; use yansi::Paint; use crate::{ - cache::PageLookupResult, config::{Config, StyleConfig}, formatter::{highlight_lines, PageSnippet}, line_iterator::LineIterator, @@ -30,14 +29,13 @@ fn configure_pager(enable_styles: bool) { /// Print page by path pub fn print_page( - lookup_result: &PageLookupResult, + reader: impl Read, enable_markdown: bool, enable_styles: bool, use_pager: bool, config: &Config, ) -> Result<()> { - // Create reader from file(s) - let reader = lookup_result.reader()?; + let reader = BufReader::new(reader); // Configure pager if applicable if use_pager || config.display.use_pager { diff --git a/tests/lib.rs b/tests/lib.rs index cb987db..40cb7e9 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -301,6 +301,16 @@ fn test_missing_cache() { .stderr(contains("Page cache not found. Please run `tldr --update`")); } +#[test] +fn test_tealdeer_page_works_without_cache() { + TestEnv::new() + .command() + .args(["tealdeer"]) + .assert() + .success() + .stdout(contains("for your installed tealdeer version")); +} + #[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] #[test] fn test_update_cache_default_features() { From b8f7c0cc2d96a5d2c6be4c374b4893285bbf6e39 Mon Sep 17 00:00:00 2001 From: Pavel Timofeev Date: Fri, 17 Apr 2026 15:59:34 -0400 Subject: [PATCH 358/368] Add `display.indent` config option (#471) Fixes #394. --- docs/src/config_display.md | 32 ++++++++++++++++ src/config.rs | 38 +++++++++++++++++++ src/formatter.rs | 21 ++++++++-- src/output.rs | 7 ++-- tests/lib.rs | 18 +++++++++ tests/rendered/apt.ja.expected | 16 ++++---- .../inkscape-compact-no-color.expected | 32 ++++++++++++++++ tests/rendered/inkscape-default.expected | 14 +++---- tests/rendered/inkscape-with-config.expected | 14 +++---- tests/rendered/inkscape-with-title.expected | 16 ++++---- 10 files changed, 171 insertions(+), 37 deletions(-) create mode 100644 tests/rendered/inkscape-compact-no-color.expected diff --git a/docs/src/config_display.md b/docs/src/config_display.md index 78656a4..007d64b 100644 --- a/docs/src/config_display.md +++ b/docs/src/config_display.md @@ -37,3 +37,35 @@ show_title = true When enabled, the command name will be displayed at the top of the output, styled with the `command_name` style configuration. + +## `indent` + +Controls the indentation of the output via two sub-keys. + +### `indent.base` + +Specifies the number of spaces used to indent descriptions, example text, and titles (default `2`). + +```toml +[display.indent] +base = 2 +``` + +### `indent.command` + +Specifies the number of spaces used to indent example code lines (default `6`). + +```toml +[display.indent] +command = 6 +``` + +You can also configure both subkeys in a single line like this: + +```toml +[display] +indent = { + base = 2, + command = 6, +} +``` diff --git a/src/config.rs b/src/config.rs index 2c39235..b31f422 100644 --- a/src/config.rs +++ b/src/config.rs @@ -43,6 +43,14 @@ fn default_underline() -> bool { false } +const fn default_base_indent() -> usize { + 2 +} + +const fn default_command_indent() -> usize { + 6 +} + fn default_bold() -> bool { false } @@ -171,6 +179,25 @@ struct RawDisplayConfig { pub use_pager: bool, #[serde(default)] pub show_title: bool, + #[serde(default)] + pub indent: RawIndent, +} + +#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +struct RawIndent { + #[serde(default = "default_base_indent")] + base: usize, + #[serde(default = "default_command_indent")] + command: usize, +} + +impl Default for RawIndent { + fn default() -> Self { + Self { + base: 2, + command: 6, + } + } } impl From<&RawDisplayConfig> for DisplayConfig { @@ -179,6 +206,10 @@ impl From<&RawDisplayConfig> for DisplayConfig { compact: raw_display_config.compact, use_pager: raw_display_config.use_pager, show_title: raw_display_config.show_title, + indent: Indent { + base: raw_display_config.indent.base, + command: raw_display_config.indent.command, + }, } } } @@ -331,6 +362,13 @@ pub struct DisplayConfig { pub compact: bool, pub use_pager: bool, pub show_title: bool, + pub indent: Indent, +} + +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +pub struct Indent { + pub base: usize, + pub command: usize, } #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/src/formatter.rs b/src/formatter.rs index 1b504dd..1cdc681 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -2,7 +2,7 @@ use log::debug; -use crate::{extensions::FindFrom, types::LineType}; +use crate::{config::Indent, extensions::FindFrom, types::LineType}; #[derive(Debug, Clone, Copy, Eq)] /// Represents a snippet from a page of a specific highlighting class. @@ -68,11 +68,14 @@ pub fn highlight_lines( process_snippet: &mut F, keep_empty_lines: bool, show_title: bool, + indent: Indent, ) -> Result<(), E> where L: Iterator, F: for<'snip> FnMut(PageSnippet<&'snip str>) -> Result<(), E>, { + let base_indent = " ".repeat(indent.base); + let command_indent = " ".repeat(indent.command); let mut command = String::new(); for line in lines { match line { @@ -84,7 +87,9 @@ where LineType::Title(title) => { if show_title { process_snippet(PageSnippet::Linebreak)?; + process_snippet(PageSnippet::Title(&base_indent))?; process_snippet(PageSnippet::Title(&title))?; + process_snippet(PageSnippet::Linebreak)?; } else { debug!("Ignoring title"); } @@ -93,10 +98,18 @@ where command = title; debug!("Detected command name: {}", &command); } - LineType::Description(text) => process_snippet(PageSnippet::Description(&text))?, - LineType::ExampleText(text) => process_snippet(PageSnippet::Text(&text))?, + LineType::Description(text) => { + process_snippet(PageSnippet::Description(&base_indent))?; + process_snippet(PageSnippet::Description(&text))?; + process_snippet(PageSnippet::Linebreak)?; + } + LineType::ExampleText(text) => { + process_snippet(PageSnippet::Text(&base_indent))?; + process_snippet(PageSnippet::Text(&text))?; + process_snippet(PageSnippet::Linebreak)?; + } LineType::ExampleCode(text) => { - process_snippet(PageSnippet::NormalCode(" "))?; + process_snippet(PageSnippet::NormalCode(&command_indent))?; highlight_code(&command, &text, process_snippet)?; process_snippet(PageSnippet::Linebreak)?; } diff --git a/src/output.rs b/src/output.rs index 9305c20..117ed1e 100644 --- a/src/output.rs +++ b/src/output.rs @@ -68,6 +68,7 @@ pub fn print_page( &mut process_snippet, !config.display.compact, config.display.show_title, + config.display.indent, ) .context("Could not write to stdout")?; } @@ -89,9 +90,9 @@ fn print_snippet( CommandName(s) => write!(writer, "{}", s.paint(style.command_name)), Variable(s) => write!(writer, "{}", s.paint(style.example_variable)), NormalCode(s) => write!(writer, "{}", s.paint(style.example_code)), - Description(s) => writeln!(writer, " {}", s.paint(style.description)), - Text(s) => writeln!(writer, " {}", s.paint(style.example_text)), - Title(s) => writeln!(writer, " {}", s.paint(style.command_name)), + Description(s) => write!(writer, "{}", s.paint(style.description)), + Text(s) => write!(writer, "{}", s.paint(style.example_text)), + Title(s) => write!(writer, "{}", s.paint(style.command_name)), Linebreak => writeln!(writer), } } diff --git a/tests/lib.rs b/tests/lib.rs index 40cb7e9..acdd048 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -821,6 +821,24 @@ fn test_rendering_color_never() { ); } +/// An end-to-end integration test for the indent config option +#[test] +fn test_rendering_with_indentation() { + let testenv = TestEnv::new().install_default_cache(); + let expected_custom_indentation = include_str!("rendered/inkscape-compact-no-color.expected"); + + // Configure to set base and command indents + testenv.append_to_config("display.indent.base = 3\n"); + testenv.append_to_config("display.indent.command = 1\n"); + + testenv + .command() + .args(["--color", "never", "inkscape-v2"]) + .assert() + .success() + .stdout(diff(expected_custom_indentation)); +} + #[test] fn test_rendering_i18n() { _test_correct_rendering( diff --git a/tests/rendered/apt.ja.expected b/tests/rendered/apt.ja.expected index 22424e3..efdd35d 100644 --- a/tests/rendered/apt.ja.expected +++ b/tests/rendered/apt.ja.expected @@ -3,35 +3,35 @@ Ubuntuのバージョンが16.04か、それ以降で対話モードを使う場合`apt-get`の代わりとして使用します。 詳しくはこちら: - 利用可能なパーケージとバージョンのリストの更新(他の`apt`コマンドの前での実行を推奨): + 利用可能なパーケージとバージョンのリストの更新(他の`apt`コマンドの前での実行を推奨):  sudo apt update - 指定されたパッケージの検索: + 指定されたパッケージの検索:  apt search パッケージ - パッケージの情報を出力: + パッケージの情報を出力:  apt show パッケージ - パッケージのインストール、または利用可能な最新バージョンに更新: + パッケージのインストール、または利用可能な最新バージョンに更新:  sudo apt install パッケージ - パッケージの削除(`sudo apt remove --purge`の場合設定ファイルも削除): + パッケージの削除(`sudo apt remove --purge`の場合設定ファイルも削除):  sudo apt remove パッケージ - インストールされている全てのパッケージを最新のバージョンにアップグレード: + インストールされている全てのパッケージを最新のバージョンにアップグレード:  sudo apt upgrade - インストールできるすべてのパッケージを表示: + インストールできるすべてのパッケージを表示:  apt list - インストールされた全てのパッケージを表示(依存関係も表示): + インストールされた全てのパッケージを表示(依存関係も表示):  apt list --installed diff --git a/tests/rendered/inkscape-compact-no-color.expected b/tests/rendered/inkscape-compact-no-color.expected new file mode 100644 index 0000000..473bbe9 --- /dev/null +++ b/tests/rendered/inkscape-compact-no-color.expected @@ -0,0 +1,32 @@ + + An SVG (Scalable Vector Graphics) editing program. + Use -z to not open the GUI and only process files in the console. + + Open an SVG file in the Inkscape GUI: + + inkscape filename.svg + + Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): + + inkscape filename.svg -e filename.png + + Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): + + inkscape filename.svg -e filename.png -w 600 -h 400 + + Export a single object, given its ID, into a bitmap: + + inkscape filename.svg -i id -e object.png + + Export an SVG document to PDF, converting all texts to paths: + + inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path + + Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: + + inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit + + Some invalid command just to test the correct highlighting of the command name: + + inkscape --use-inkscape=v3.0 file + diff --git a/tests/rendered/inkscape-default.expected b/tests/rendered/inkscape-default.expected index da909f2..3b37f0e 100644 --- a/tests/rendered/inkscape-default.expected +++ b/tests/rendered/inkscape-default.expected @@ -2,31 +2,31 @@ An SVG (Scalable Vector Graphics) editing program. Use -z to not open the GUI and only process files in the console. - Open an SVG file in the Inkscape GUI: + Open an SVG file in the Inkscape GUI:  inkscape filename.svg - Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): + Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI):  inkscape filename.svg -e filename.png - Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): + Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur):  inkscape filename.svg -e filename.png -w 600 -h 400 - Export a single object, given its ID, into a bitmap: + Export a single object, given its ID, into a bitmap:  inkscape filename.svg -i id -e object.png - Export an SVG document to PDF, converting all texts to paths: + Export an SVG document to PDF, converting all texts to paths:  inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path - Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: + Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape:  inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit - Some invalid command just to test the correct highlighting of the command name: + Some invalid command just to test the correct highlighting of the command name:  inkscape --use-inkscape=v3.0 file diff --git a/tests/rendered/inkscape-with-config.expected b/tests/rendered/inkscape-with-config.expected index e79b219..33540a3 100644 --- a/tests/rendered/inkscape-with-config.expected +++ b/tests/rendered/inkscape-with-config.expected @@ -2,31 +2,31 @@ An SVG (Scalable Vector Graphics) editing program. Use -z to not open the GUI and only process files in the console. - Open an SVG file in the Inkscape GUI: + Open an SVG file in the Inkscape GUI: inkscape filename.svg - Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): + Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): inkscape filename.svg -e filename.png - Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): + Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): inkscape filename.svg -e filename.png -w 600 -h 400 - Export a single object, given its ID, into a bitmap: + Export a single object, given its ID, into a bitmap: inkscape filename.svg -i id -e object.png - Export an SVG document to PDF, converting all texts to paths: + Export an SVG document to PDF, converting all texts to paths: inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path - Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: + Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit - Some invalid command just to test the correct highlighting of the command name: + Some invalid command just to test the correct highlighting of the command name: inkscape --use-inkscape=v3.0 file diff --git a/tests/rendered/inkscape-with-title.expected b/tests/rendered/inkscape-with-title.expected index 7e7d428..ff2de4a 100644 --- a/tests/rendered/inkscape-with-title.expected +++ b/tests/rendered/inkscape-with-title.expected @@ -1,34 +1,34 @@ - inkscape + inkscape An SVG (Scalable Vector Graphics) editing program. Use -z to not open the GUI and only process files in the console. - Open an SVG file in the Inkscape GUI: + Open an SVG file in the Inkscape GUI:  inkscape filename.svg - Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI): + Export an SVG file into a bitmap with the default format (PNG) and the default resolution (90 DPI):  inkscape filename.svg -e filename.png - Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): + Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur):  inkscape filename.svg -e filename.png -w 600 -h 400 - Export a single object, given its ID, into a bitmap: + Export a single object, given its ID, into a bitmap:  inkscape filename.svg -i id -e object.png - Export an SVG document to PDF, converting all texts to paths: + Export an SVG document to PDF, converting all texts to paths:  inkscape filename.svg | inkscape | inkscape --export-pdf=inkscape.pdf | inkscape | inkscape --export-text-to-path - Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: + Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape:  inkscape filename.svg --select=path123 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileQuit - Some invalid command just to test the correct highlighting of the command name: + Some invalid command just to test the correct highlighting of the command name:  inkscape --use-inkscape=v3.0 file From 6c65c8f71c7e062507abee4fee8d3773c3f6aa68 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 17 Apr 2026 22:01:45 +0200 Subject: [PATCH 359/368] Fix off-boundary string access in formatter (#474) Closes #473 This regression was introduced in 593e9309b9a78dfbc5a1ad5db9d5982b817151be (#414) and leads to a panic when trying to display pages where characters line up like in the issue or the test. I checked other places and found that a similar panic could occur when parsing language strings, so I added code to ignore them instead. - Add regression test - Fix prefix check - Skip non-ASCII locales --- src/config.rs | 6 ++++++ src/formatter.rs | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index b31f422..7c29ed4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -10,6 +10,7 @@ use std::{ use anyhow::{anyhow, bail, ensure, Context, Result}; use app_dirs::{get_app_root, AppDataType}; use clap::ValueEnum; +use log::info; use serde::Serialize as _; use serde_derive::{Deserialize, Serialize}; use yansi::{Color, Style}; @@ -429,6 +430,11 @@ fn get_languages<'a>( let mut lang_list = Vec::new(); for locale in locales { + if !locale.is_ascii() { + info!("Skipping non-ASCII locale string: {}", locale); + continue; + } + // Language plus country code (e.g. `en_US`) if locale.len() >= 5 && locale.chars().nth(2) == Some('_') { lang_list.push(Language(&locale[..5])); diff --git a/src/formatter.rs b/src/formatter.rs index 1cdc681..c0d3a91 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -179,7 +179,11 @@ fn find_marker(s: &str, marker: &str, forbidden_prefix: &str) -> Option { let overlaps_with_prefix = (forbidden_prefix.len() <= marker_index + 1) && { let prefix_start = marker_index + 1 - forbidden_prefix.len(); - &s[prefix_start..=marker_index] == forbidden_prefix + // NOTE: The indices might not be valid character offsets, so we should do this + // comparison on raw bytes. If prefix_start is indeed not a character offset than the + // comparison is guaranteed to return false because forbidden_prefix[0] definitely _is_ + // the start of a (single byte, ASCII) character. + &s.as_bytes()[prefix_start..=marker_index] == forbidden_prefix.as_bytes() }; if !overlaps_with_prefix { return Some(marker_index); @@ -446,5 +450,12 @@ mod tests { ], ); } + + #[test] + /// Regression test for https://github.com/tealdeer-rs/tealdeer/issues/473 + fn prefix_check_character_boundary() { + assert_eq!("Ä".len(), 2); + assert_eq!(run("", r#"Äxx{{x}}"#), [NormalCode("Äxx"), Variable("x")],); + } } } From 24e7f383b8ada277c2ab6ac5c954263daab38679 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Fri, 17 Apr 2026 22:08:42 +0200 Subject: [PATCH 360/368] Fix Rust 1.95 clippy lints --- src/cache.rs | 2 +- src/config.rs | 2 +- src/formatter.rs | 6 ++---- src/main.rs | 1 + src/output.rs | 3 +-- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/cache.rs b/src/cache.rs index a77036d..afa3603 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -369,7 +369,7 @@ impl Cache<'_> { } Ok(response) if response.status() == StatusCode::NOT_FOUND => Ok(None), _ => { - bail!("Could not download tldr pages from {archive_url}: {response:?}",) + bail!("Could not download tldr pages from {archive_url}: {response:?}") } } } diff --git a/src/config.rs b/src/config.rs index 7c29ed4..212c1e2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -431,7 +431,7 @@ fn get_languages<'a>( let mut lang_list = Vec::new(); for locale in locales { if !locale.is_ascii() { - info!("Skipping non-ASCII locale string: {}", locale); + info!("Skipping non-ASCII locale string: {locale}"); continue; } diff --git a/src/formatter.rs b/src/formatter.rs index c0d3a91..b2d6b8e 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -230,13 +230,11 @@ fn is_freestanding_substring(surrounding: &str, substring: (usize, usize)) -> bo let char_before_is_okay = surrounding[..start] .chars() .last() - .filter(|prev_char| !prev_char.is_whitespace()) - .is_none(); + .is_none_or(char::is_whitespace); let char_after_is_okay = surrounding[end..] .chars() .next() - .filter(|next_char| !next_char.is_whitespace()) - .is_none(); + .is_none_or(char::is_whitespace); char_before_is_okay && char_after_is_okay } diff --git a/src/main.rs b/src/main.rs index 5b12613..29dad95 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,7 @@ #![allow(clippy::struct_excessive_bools)] #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_debug_formatting)] +#![allow(clippy::while_let_loop)] #[cfg(not(any( feature = "native-tls", diff --git a/src/output.rs b/src/output.rs index 117ed1e..6243b44 100644 --- a/src/output.rs +++ b/src/output.rs @@ -87,12 +87,11 @@ fn print_snippet( use PageSnippet::*; match snip { - CommandName(s) => write!(writer, "{}", s.paint(style.command_name)), + CommandName(s) | Title(s) => write!(writer, "{}", s.paint(style.command_name)), Variable(s) => write!(writer, "{}", s.paint(style.example_variable)), NormalCode(s) => write!(writer, "{}", s.paint(style.example_code)), Description(s) => write!(writer, "{}", s.paint(style.description)), Text(s) => write!(writer, "{}", s.paint(style.example_text)), - Title(s) => write!(writer, "{}", s.paint(style.command_name)), Linebreak => writeln!(writer), } } From 1252261d662fcedecce229f08bf23277da8bf51e Mon Sep 17 00:00:00 2001 From: Ellis Clayton Date: Mon, 4 May 2026 05:47:29 +1000 Subject: [PATCH 361/368] Support tilde (`~`) expansion on config paths (#476) Allows directories in the configuration file (cache & custom pages) to be relative to the user's home directory by expanding the common `~` path prefix notation. Works for the current user only (`~diferentUser/` syntax is not supported, and will cause an error if attempted). Works for Linux/Unix (via `HOME` env var) and Windows (via `USERPROFILE` env var). Examples (assuming a user called "foo" on a Linux system): ``` ~/my/custom-pages # /home/foo/custom-pages ~ # /home/foo ~bar/cache # error ``` --- src/config.rs | 107 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 99 insertions(+), 8 deletions(-) diff --git a/src/config.rs b/src/config.rs index 212c1e2..89c5d8f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,8 +1,9 @@ use std::{ + borrow::Cow, env, fmt, fs::{self, File}, io::{ErrorKind, Write}, - path::{Path, PathBuf}, + path::{Component, Path, PathBuf}, sync::LazyLock, time::Duration, }; @@ -574,6 +575,7 @@ impl<'a> Config<'a> { .path() .parent() .context("Failed to get config directory")?; + let home_path = env::home_dir(); // Determine directories config. For this, we need to take some // additional factory into account, like env variables, or the @@ -589,11 +591,13 @@ impl<'a> Config<'a> { source: PathSource::EnvVar, } } else if let Some(config_value) = &raw_config.directories.cache_dir { - // If the user explicitly configured a cache directory, use that. + // Resolve possible ~ prefixed path + let expanded_path = expand_home(config_value, home_path.as_deref())?; + // Resolve possible relative path. + let resolved_path = relative_path_root.join(expanded_path); + PathWithSource { - // Resolve possible relative path. It would be nicer to clean up the path, but Rust stdlib - // does not give any method for that that does not need the paths to exist. - path: relative_path_root.join(config_value), + path: resolved_path, source: PathSource::ConfigFile, } } else if let Ok(default_dir) = get_app_root(AppDataType::UserCache, &crate::APP_INFO) { @@ -610,11 +614,18 @@ impl<'a> Config<'a> { .directories .custom_pages_dir .as_ref() - .map(|path| PathWithSource { + .map(|path| -> Result { + // Resolve possible ~ prefixed path + let expanded_path = expand_home(path, home_path.as_deref())?; // Resolve possible relative path. - path: relative_path_root.join(path), - source: PathSource::ConfigFile, + let resolved_path = relative_path_root.join(expanded_path); + + Ok(PathWithSource { + path: resolved_path, + source: PathSource::ConfigFile, + }) }) + .transpose()? .or_else(|| { get_app_root(AppDataType::UserData, &crate::APP_INFO) .map(|path| { @@ -642,6 +653,29 @@ impl<'a> Config<'a> { } } +/// Expands tilde (~) prefixed directories into its absolute version +fn expand_home<'a>(input_path: &'a Path, home_path: Option<&Path>) -> Result> { + let mut components = input_path.components(); + + if let Some(Component::Normal(first_component_raw)) = components.next() { + let first_component = first_component_raw + .to_str() + .ok_or(anyhow!("Path contains invalid UTF-8"))?; + + if first_component == "~" { + let home_path = home_path.ok_or(anyhow!("Unable to find user home directory"))?; + let rest: PathBuf = components.collect(); + let expanded = home_path.join(rest); + + return Ok(Cow::Owned(expanded)); + } else if first_component.starts_with('~') { + return Err(anyhow!("Tilde expansion with a login name not supported")); + } + } + + Ok(Cow::Borrowed(input_path)) +} + /// The [`ConfigLoader`] is used to load a [`Config`] from a file. /// /// Since the rich [`Config`] keeps references to [`RawConfig`], the raw config needs to be kept alive outside of the @@ -790,6 +824,63 @@ mod test { assert_eq!(raw_config, deserialized); } + #[test] + fn expand_path_with_valid_home() { + let home = Some(PathBuf::from("/foo/bar")); + let path_to_expand = PathBuf::from("~/baz"); + + assert_eq!( + *expand_home(&path_to_expand, home.as_deref()).unwrap(), + PathBuf::from("/foo/bar/baz") + ); + } + + #[test] + fn expand_path_with_absolute_path() { + let home = Some(PathBuf::from("/foo/bar")); + let dir_to_expand = PathBuf::from("/one/two"); + + assert_eq!( + *expand_home(&dir_to_expand, home.as_deref()).unwrap(), + dir_to_expand + ); + } + + #[test] + fn error_with_tilde_username() { + let home = Some(PathBuf::from("/foo/bar")); + let dir_to_expand = PathBuf::from("~baz/foo"); + + assert!(expand_home(&dir_to_expand, home.as_deref()).is_err()); + } + + #[test] + fn expand_tilde_in_config_file() { + let mut raw_config = RawConfig::default(); + raw_config.directories.cache_dir = Some("~/my/custom_cache".into()); + raw_config.directories.custom_pages_dir = Some("~/custom_pages".into()); + + let config = Config::from_raw( + &raw_config, + PathWithSource { + path: PathBuf::from("/path/to/config/config.toml"), + source: PathSource::OsConvention, + }, + ) + .unwrap(); + + let home_dir = env::home_dir().unwrap(); + + assert_eq!( + config.directories.cache_dir.path(), + home_dir.join("my/custom_cache") + ); + assert_eq!( + config.directories.custom_pages_dir.unwrap().path(), + home_dir.join("custom_pages") + ); + } + #[test] fn relative_path_resolution() { let mut raw_config = RawConfig::default(); From 4d33e8a2790b9c53ed4bba91fd5ed1fb4ee103da Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Wed, 6 May 2026 15:36:37 +0100 Subject: [PATCH 362/368] Remove `tldr-c` entry from benchmark results in README.md (#480) `tldr-c-client` is unmaintained. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 230dfa8..3d22e0a 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,6 @@ Docker container using sharkdp's [`hyperfine`][hyperfine-gh] | [`fast-tldr`][fast-tldr-gh] | Haskell | 17.0 | 0.6 | no example highlighting | | [`tldr-hs`][hs-gh] | Haskell | 25.1 | 0.5 | no example highlighting | | [`tldr-bash`][bash-gh] | Bash | 30.0 | 0.8 | | -| [`tldr-c`][c-gh] | C | 38.4 | 1.0 | | | [`tldr-python-client`][python-gh] | Python | 87.0 | 2.4 | | | [`tldr-node-client`][node-gh] | JavaScript / NodeJS | 407.1 | 12.9 | | @@ -113,7 +112,6 @@ Thanks to @severen for coming up with the name "tealdeer"! [node-gh]: https://github.com/tldr-pages/tldr-node-client -[c-gh]: https://github.com/tldr-pages/tldr-c-client [hs-gh]: https://github.com/psibi/tldr-hs [fast-tldr-gh]: https://github.com/gutjuri/fast-tldr [bash-gh]: https://4e4.win/tldr From d0108b23e450dddd59f79f4f2d693ce787aed5e4 Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Thu, 7 May 2026 14:07:27 +0100 Subject: [PATCH 363/368] Fix clippy lints on all targets (#481) --- .github/workflows/ci.yml | 2 +- src/formatter.rs | 6 +++--- tests/lib.rs | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a17ba90..78a27ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,7 @@ jobs: toolchain: stable components: clippy - name: run clippy lints - run: cargo clippy --features logging + run: cargo clippy --all-targets --features logging fmt: name: run rustfmt diff --git a/src/formatter.rs b/src/formatter.rs index b2d6b8e..06d575e 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -439,7 +439,7 @@ mod tests { #[test] fn placeholder_inside_escaped() { assert_eq!( - run("test", r#"test \{\{{{var}} normal\}\}"#), + run("test", r"test \{\{{{var}} normal\}\}"), [ CommandName("test"), NormalCode(" {{"), @@ -450,10 +450,10 @@ mod tests { } #[test] - /// Regression test for https://github.com/tealdeer-rs/tealdeer/issues/473 + /// Regression test for fn prefix_check_character_boundary() { assert_eq!("Ä".len(), 2); - assert_eq!(run("", r#"Äxx{{x}}"#), [NormalCode("Äxx"), Variable("x")],); + assert_eq!(run("", r"Äxx{{x}}"), [NormalCode("Äxx"), Variable("x")],); } } } diff --git a/tests/lib.rs b/tests/lib.rs index acdd048..30254e9 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -555,7 +555,7 @@ fn test_cache_location_permission_denied() { // Make cache directory unreadable let cache_dir = testenv.cache_dir(); let mut permissions = cache_dir.metadata().unwrap().permissions(); - permissions.set_mode(0); + permissions.set_mode(0o0); fs::set_permissions(cache_dir, permissions).unwrap(); testenv @@ -1047,6 +1047,7 @@ fn test_search_language_precedence() { testenv.add_lang_entry(lang, lang, ""); } + #[expect(clippy::type_complexity)] let run = |cases: &[(Vec<(&str, &str)>, Vec<&str>, &str)]| { for (extra_env, extra_args, expected) in cases { let mut cmd = testenv.command(); From 51593d27ebc2f76931c4a1ee01cded12620ac717 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 4 Jul 2026 22:59:46 +0200 Subject: [PATCH 364/368] Bump actions/checkout from 6 to 7 (#493) --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/gh-pages.yml | 2 +- .github/workflows/release.yml | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78a27ca..62eb86d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: exe_suffix: .exe runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} @@ -50,7 +50,7 @@ jobs: name: run clippy lints runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -62,7 +62,7 @@ jobs: name: run rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -74,7 +74,7 @@ jobs: name: build docs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Setup mdBook uses: peaceiris/actions-mdbook@v2 with: diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index f8b6f6e..ae9ae93 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -9,7 +9,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Setup mdBook uses: peaceiris/actions-mdbook@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41de665..9337d6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ jobs: create-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Create release for tag if: startsWith(github.ref, 'refs/tags/') run: | @@ -24,7 +24,7 @@ jobs: matrix: target: ["bash", "fish", "zsh"] steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Upload completion if: startsWith(github.ref, 'refs/tags/') run: | @@ -40,7 +40,7 @@ jobs: matrix: target: ["MIT", "APACHE"] steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Upload license if: startsWith(github.ref, 'refs/tags/') run: | @@ -66,7 +66,7 @@ jobs: - arch: "arm" libc: "musleabihf" steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Pull Docker image run: docker pull messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} - name: Build in Docker @@ -86,7 +86,7 @@ jobs: - arch: "x86_64" - arch: "aarch64" steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Setup toolchain uses: dtolnay/rust-toolchain@master with: @@ -102,7 +102,7 @@ jobs: build-windows: runs-on: windows-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Setup toolchain uses: dtolnay/rust-toolchain@master with: @@ -134,7 +134,7 @@ jobs: - macos-aarch64 - windows-x86_64-msvc steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: actions/download-artifact@v8 - name: Upload binary if: startsWith(github.ref, 'refs/tags/') From df5113ddaa045ce87654ea17482a3778ae58833d Mon Sep 17 00:00:00 2001 From: RedHare <74206389+RedHare-Exe@users.noreply.github.com> Date: Sat, 4 Jul 2026 17:05:15 -0400 Subject: [PATCH 365/368] Added AI Policy to README (#489) Addresses #479, and adds a section for an AI policy based on what is outlined by @niklasmohrin in that issue. The AI Policy is located below the "Development" section. --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 3d22e0a..859d06f 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,17 @@ To run lints: $ cargo clean && cargo clippy +### AI Policy + +Using AI is generally discouraged. However, if it is used as part of a contribution, the contributor MUST: + +1. Clearly mark what parts (if any) of a contribution were created with the help of AI tools. This includes issue and pull request comments. +2. Check all output of AI tools before sharing it with others in the tealdeer project. +3. Not post slop, spam, or low quality contributions. This includes pull request descriptions and comments with excessive text and markdown flair. +4. Leave small or easy tasks to new contributors who want to learn without the use of AI. This is to maintain the presence of the `good-first-issue` tag. +5. Be respectful of everyone's time: *maintainers and other contributors will be reviewing your PRs.* + + ## MSRV (Minimally Supported Rust Version) When publishing a tealdeer release, the Rust version required to build it From f8a2003bc28a67f8f17809699716c0d7b92b479b Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Tue, 7 Jul 2026 13:24:06 +0100 Subject: [PATCH 366/368] Add `updates.warn_cache_age` config option (#492) This is useful when the cache is managed externally, e.g. provisioned from a Nix store path or by a package manager, where the directory's mtime doesn't reflect the cache's real age, causing a spurious warning on every invocation. Today the only way to silence it is `--quiet`, which must be passed every call and hides all other output too. --- docs/src/config_updates.md | 12 ++++++++++++ src/config.rs | 19 +++++++++++++++++++ src/main.rs | 22 ++++++++++++---------- tests/lib.rs | 20 ++++++++++++++++++++ 4 files changed, 63 insertions(+), 10 deletions(-) diff --git a/docs/src/config_updates.md b/docs/src/config_updates.md index 9acba55..a8a10c8 100644 --- a/docs/src/config_updates.md +++ b/docs/src/config_updates.md @@ -30,6 +30,18 @@ auto_update = true auto_update_interval_hours = 24 ``` +### `warn_cache_age` + +Controls when a warning is printed if the cache has not been updated in a while. +By default, the warning is shown once the cache is older than 30 days. Set this +to `"never"` to silence the warning. This is useful if, for some reason, the +modification time does not reflect its actual age. + +```toml +[updates] +warn_cache_age = "never" +``` + ## Download configuration ### `download_languages` diff --git a/src/config.rs b/src/config.rs index 89c5d8f..498b49f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -228,6 +228,17 @@ fn default_archive_source() -> String { "https://github.com/tldr-pages/tldr/releases/latest/download".to_owned() } +/// Controls when a warning about an outdated cache is printed. +/// +/// Currently, the only nameable option is `"never"`. In the future, this may +/// be extended to also accept a duration (e.g. `"60d"`), after which the +/// warning should be shown. +#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "lowercase")] +enum RawWarnCacheAge { + Never, +} + #[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] struct RawUpdatesConfig { #[serde(default)] @@ -240,6 +251,8 @@ struct RawUpdatesConfig { pub tls_backend: RawTlsBackend, #[serde(default)] pub download_languages: Option>, + #[serde(default)] + pub warn_cache_age: Option, } impl Default for RawUpdatesConfig { @@ -250,6 +263,7 @@ impl Default for RawUpdatesConfig { archive_source: default_archive_source(), tls_backend: RawTlsBackend::default(), download_languages: None, + warn_cache_age: None, } } } @@ -380,6 +394,7 @@ pub struct UpdatesConfig<'a> { pub archive_source: &'a str, pub tls_backend: TlsBackend, pub download_languages: Vec>, + pub warn_cache_age: Option, } #[derive(Clone, Debug, PartialEq, Eq)] @@ -569,6 +584,10 @@ impl<'a> Config<'a> { || search.languages.clone(), |languages| languages.iter().map(|lang| Language(lang)).collect(), ), + warn_cache_age: match raw_config.updates.warn_cache_age { + None => Some(MAX_CACHE_AGE), + Some(RawWarnCacheAge::Never) => None, + }, }; let relative_path_root = config_file_path diff --git a/src/main.rs b/src/main.rs index 29dad95..9a7c423 100644 --- a/src/main.rs +++ b/src/main.rs @@ -376,16 +376,18 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { return Ok(ExitCode::FAILURE); }; - let age = cache.age()?; - if age > config::MAX_CACHE_AGE && !args.quiet { - print_warning( - enable_styles, - &format!( - "The cache hasn't been updated for {} days.\n\ - You should probably run `tldr --update` soon.", - age.as_secs() / 24 / 3600 - ), - ); + if let Some(max_cache_age) = config.updates.warn_cache_age { + let age = cache.age()?; + if age > max_cache_age && !args.quiet { + print_warning( + enable_styles, + &format!( + "The cache hasn't been updated for {} days.\n\ + You should probably run `tldr --update` soon.", + age.as_secs() / 24 / 3600 + ), + ); + } } cache diff --git a/tests/lib.rs b/tests/lib.rs index 30254e9..d431b5f 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -493,6 +493,26 @@ fn test_quiet_old_cache() { .stderr(contains("The cache hasn't been updated for ").not()); } +#[test] +fn test_warn_cache_age_never() { + let testenv = TestEnv::new().install_default_cache(); + + filetime::set_file_mtime( + testenv.cache_dir().join(TLDR_PAGES_DIR), + filetime::FileTime::from_unix_time(1, 0), + ) + .unwrap(); + + testenv.append_to_config("[updates]\nwarn_cache_age = \"never\"\n"); + + testenv + .command() + .args(["which"]) + .assert() + .success() + .stderr(contains("The cache hasn't been updated for ").not()); +} + #[cfg_attr(feature = "ignore-online-tests", ignore = "online test")] #[test] fn test_create_cache_directory_path() { From 28ed7850016813a5a6625c2748794cd7045d3055 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Sun, 26 Jul 2026 23:52:43 +0200 Subject: [PATCH 367/368] Fix 1.97 clippy lints --- src/formatter.rs | 2 +- src/main.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/formatter.rs b/src/formatter.rs index 06d575e..082f436 100644 --- a/src/formatter.rs +++ b/src/formatter.rs @@ -96,7 +96,7 @@ where // This is safe as long as the parsed title is only the command, // and the iterator yields values in order of appearance. command = title; - debug!("Detected command name: {}", &command); + debug!("Detected command name: {command}"); } LineType::Description(text) => { process_snippet(PageSnippet::Description(&base_indent))?; diff --git a/src/main.rs b/src/main.rs index 9a7c423..cc03d01 100644 --- a/src/main.rs +++ b/src/main.rs @@ -429,10 +429,9 @@ fn try_main(args: Cli, enable_styles: bool) -> Result { print_warning( enable_styles, &format!( - "Page `{}` not found in cache.\n\ + "Page `{command}` not found in cache.\n\ Try updating with `tldr --update`, or submit a pull request to:\n\ - https://github.com/tldr-pages/tldr", - &command + https://github.com/tldr-pages/tldr" ), ); } From 37b0dee39ffc7eeb95ad8e3dfda3b70991338b0f Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Thu, 6 Aug 2026 00:37:37 +0200 Subject: [PATCH 368/368] Support XDG directory spec on macOS by switching `app_dirs2` to `etcetera` (#467) Closes #311 Similar to how `bat` does it, we now have a global struct which holds all the queried system directories. We prefer the XDG directories, but use the "native" directories as a fallback. This should ensure that when MacOs users upgrade from an older version, their existing config and cache are still used. After deleting the old directories, the new ones should be used by tealdeer automatically. --- .github/workflows/ci.yml | 2 +- Cargo.lock | 36 +++++----------- Cargo.toml | 4 +- src/config.rs | 93 ++++++++++++++++++++++++++-------------- src/main.rs | 23 ++++------ 5 files changed, 83 insertions(+), 75 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62eb86d..faf3111 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - toolchain: [stable, 1.85.0] + toolchain: [stable, 1.87.0] # MSRV include: - platform: windows-latest exe_suffix: .exe diff --git a/Cargo.lock b/Cargo.lock index be9bd24..4fba42b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -73,18 +73,6 @@ version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" -[[package]] -name = "app_dirs2" -version = "2.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e7b35733e3a8c1ccb90385088dd5b6eaa61325cb4d1ad56e683b5224ff352e" -dependencies = [ - "jni", - "ndk-context", - "winapi", - "xdg", -] - [[package]] name = "arbitrary" version = "1.4.2" @@ -380,6 +368,16 @@ dependencies = [ "serde_json", ] +[[package]] +name = "etcetera" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de48cc4d1c1d97a20fd819def54b890cadde72ed3ad0c614822a0a433361be96" +dependencies = [ + "cfg-if", + "windows-sys 0.61.1", +] + [[package]] name = "fastrand" version = "2.3.0" @@ -635,12 +633,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - [[package]] name = "normalize-line-endings" version = "0.3.0" @@ -1117,11 +1109,11 @@ name = "tealdeer" version = "1.8.1" dependencies = [ "anyhow", - "app_dirs2", "assert_cmd", "clap", "env_logger", "escargot", + "etcetera", "filetime", "log", "pager", @@ -1634,12 +1626,6 @@ version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" -[[package]] -name = "xdg" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" - [[package]] name = "yansi" version = "1.0.1" diff --git a/Cargo.toml b/Cargo.toml index aa7ae49..1d98992 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/tealdeer-rs/tealdeer/" documentation = "https://tealdeer-rs.github.io/tealdeer/" version = "1.8.1" include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"] -rust-version = "1.85" +rust-version = "1.87" # MSRV edition = "2021" [[bin]] @@ -21,9 +21,9 @@ path = "src/main.rs" [dependencies] anyhow = "1" -app_dirs = { version = "2", package = "app_dirs2" } clap = { version = "4", features = ["std", "derive", "help", "usage", "cargo", "error-context", "color", "wrap_help"], default-features = false } env_logger = { version = "0.11", optional = true } +etcetera = "0.11.0" log = "0.4" serde = "1.0.21" serde_derive = "1.0.21" diff --git a/src/config.rs b/src/config.rs index 498b49f..f0feeb4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -8,8 +8,7 @@ use std::{ time::Duration, }; -use anyhow::{anyhow, bail, ensure, Context, Result}; -use app_dirs::{get_app_root, AppDataType}; +use anyhow::{anyhow, ensure, Context, Result}; use clap::ValueEnum; use log::info; use serde::Serialize as _; @@ -33,6 +32,50 @@ const SUPPORTED_TLS_BACKENDS: &[RawTlsBackend] = &[ RawTlsBackend::RustlsWithNativeRoots, ]; +struct SystemDirectories { + config: PathBuf, + cache: PathBuf, + data: PathBuf, +} + +impl SystemDirectories { + fn discover() -> Result { + use etcetera::{ + app_strategy::choose_native_strategy, choose_app_strategy, AppStrategy, AppStrategyArgs, + }; + + let args = AppStrategyArgs { + top_level_domain: String::new(), + author: String::new(), + app_name: crate::NAME.to_string(), + }; + + // The app strategy prefers XDG on MacOs, whereas the native strategy returns paths which + // are used by installed applications. On Linux and Windows, the strategies are the same. + let app_dirs = choose_app_strategy(args.clone())?; + let native_dirs = choose_native_strategy(args)?; + + // We prefer the XDG paths, but before tealdeer 1.9, we used only the native paths on MacOs. + // So if we find files in these locations, we keep using them. + let fallback = |app_dir: PathBuf, native_dir: PathBuf| { + if !app_dir.exists() && native_dir.exists() { + native_dir + } else { + app_dir + } + }; + + Ok(Self { + config: fallback(app_dirs.config_dir(), native_dirs.config_dir()), + cache: fallback(app_dirs.cache_dir(), native_dirs.cache_dir()), + data: fallback(app_dirs.data_dir(), native_dirs.data_dir()), + }) + } +} +static SYSTEM_DIRECTORIES: LazyLock = LazyLock::new(|| { + SystemDirectories::discover().expect("Failed to initialize system directories.") +}); + pub(crate) fn supported_tls_backends_string() -> String { SUPPORTED_TLS_BACKENDS .iter() @@ -619,15 +662,11 @@ impl<'a> Config<'a> { path: resolved_path, source: PathSource::ConfigFile, } - } else if let Ok(default_dir) = get_app_root(AppDataType::UserCache, &crate::APP_INFO) { - // Otherwise, fall back to the default user cache directory. + } else { PathWithSource { - path: default_dir, + path: SYSTEM_DIRECTORIES.cache.clone(), source: PathSource::OsConvention, } - } else { - // If everything fails, give up - bail!("Could not determine user cache directory"); }; let custom_pages_dir = raw_config .directories @@ -646,15 +685,11 @@ impl<'a> Config<'a> { }) .transpose()? .or_else(|| { - get_app_root(AppDataType::UserData, &crate::APP_INFO) - .map(|path| { - // Note: The `join("")` call ensures that there's a trailing slash - PathWithSource { - path: path.join("pages").join(""), - source: PathSource::OsConvention, - } - }) - .ok() + // Note: The `join("")` call ensures that there's a trailing slash + Some(PathWithSource { + path: SYSTEM_DIRECTORIES.data.join("pages").join(""), + source: PathSource::OsConvention, + }) }); let directories = DirectoriesConfig { cache_dir, @@ -743,7 +778,7 @@ impl ConfigLoader { /// Create a loader that uses the default config file location. If no file is present at the default location, the /// default configuration is used. pub fn read_default_path() -> Result { - let path = get_default_config_path().context("Could not determine default config path.")?; + let path = get_default_config_path(); Self::read_internal(path, true) } @@ -761,30 +796,24 @@ impl ConfigLoader { /// /// Note that this function does not verify whether the directory at that /// location exists, or is a directory. -pub fn get_config_dir() -> Result<(PathBuf, PathSource)> { +pub fn get_config_dir() -> (PathBuf, PathSource) { // Allow overriding the config directory by setting the // $TEALDEER_CONFIG_DIR env variable. if let Ok(value) = env::var("TEALDEER_CONFIG_DIR") { - return Ok((PathBuf::from(value), PathSource::EnvVar)); + return (PathBuf::from(value), PathSource::EnvVar); } - // Otherwise, fall back to the user config directory. - let dirs = get_app_root(AppDataType::UserConfig, &crate::APP_INFO) - .context("Failed to determine the user config directory")?; - Ok((dirs, PathSource::OsConvention)) + (SYSTEM_DIRECTORIES.config.clone(), PathSource::OsConvention) } /// Return the path to the config file. /// /// Note that this function does not verify whether the file at that location /// exists, or is a file. -pub fn get_default_config_path() -> Result { - let (config_dir, source) = get_config_dir()?; - let config_file_path = config_dir.join(CONFIG_FILE_NAME); - Ok(PathWithSource { - path: config_file_path, - source, - }) +pub fn get_default_config_path() -> PathWithSource { + let (mut path, source) = get_config_dir(); + path.push(CONFIG_FILE_NAME); + PathWithSource { path, source } } /// Create default config file. @@ -794,7 +823,7 @@ pub fn make_default_config(path: Option<&Path>) -> Result { let config_file_path = if let Some(p) = path { p.into() } else { - let (config_dir, _) = get_config_dir()?; + let (config_dir, _) = get_config_dir(); // Ensure that config directory exists if config_dir.exists() { diff --git a/src/main.rs b/src/main.rs index cc03d01..6678ceb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,7 +36,6 @@ use std::{ }; use anyhow::{anyhow, Context, Result}; -use app_dirs::AppInfo; use cache::{CacheConfig, TLDR_OLD_PAGES_DIR}; use clap::Parser; use config::{ConfigLoader, Language, StyleConfig, TlsBackend}; @@ -65,10 +64,6 @@ use crate::{ }; const NAME: &str = "tealdeer"; -const APP_INFO: AppInfo = AppInfo { - name: NAME, - author: NAME, -}; static TEALDEER_PAGE: &str = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/pages/tealdeer.md")); @@ -110,16 +105,14 @@ fn update_cache( /// Show file paths fn show_paths(config: &Config) { - let config_dir = get_config_dir().map_or_else( - |e| format!("[Error: {e}]"), - |(mut path, source)| { - path.push(""); // Trailing path separator - match path.to_str() { - Some(path) => format!("{path} ({source})"), - None => "[Invalid]".to_string(), - } - }, - ); + let config_dir = { + let (mut path, source) = get_config_dir(); + path.push(""); // Trailing path separator + match path.to_str() { + Some(path) => format!("{path} ({source})"), + None => "[Invalid]".to_string(), + } + }; let config_path = config.file_path.to_string(); let cache_dir = config.directories.cache_dir.to_string(); let pages_dir = {