diff options
-rw-r--r-- | .github/workflows/build-release.yml | 8 | ||||
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | Cargo.lock | 755 | ||||
-rw-r--r-- | Cargo.toml | 8 | ||||
-rw-r--r-- | README.md | 275 | ||||
-rw-r--r-- | build.rs | 19 | ||||
-rw-r--r-- | data/style.scss | 274 | ||||
-rw-r--r-- | data/themes/archlinux.scss | 54 | ||||
-rw-r--r-- | data/themes/monokai.scss | 54 | ||||
-rw-r--r-- | data/themes/squirrel.scss | 54 | ||||
-rw-r--r-- | data/themes/zenburn.scss | 54 | ||||
-rw-r--r-- | src/args.rs | 27 | ||||
-rw-r--r-- | src/config.rs | 27 | ||||
-rw-r--r-- | src/errors.rs | 12 | ||||
-rw-r--r-- | src/main.rs | 46 | ||||
-rw-r--r-- | src/renderer.rs | 94 | ||||
-rw-r--r-- | tests/auth_file.rs | 66 | ||||
-rw-r--r-- | tests/data/auth1.txt | 3 | ||||
-rw-r--r-- | tests/serve_request.rs | 18 |
19 files changed, 982 insertions, 868 deletions
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 941d74f..9fde896 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -48,14 +48,6 @@ jobs: compress: true cargo_flags: "--no-default-features" - os: ubuntu-latest - target: mips64-unknown-linux-gnuabi64 - compress: false - cargo_flags: "--no-default-features" - - os: ubuntu-latest - target: mips64el-unknown-linux-gnuabi64 - compress: false - cargo_flags: "--no-default-features" - - os: ubuntu-latest target: riscv64gc-unknown-linux-gnu compress: false cargo_flags: "--no-default-features" diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b2f62b..69badd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). <!-- next-header --> ## [Unreleased] - ReleaseDate +- Add `--pretty-urls` [#1193](https://github.com/svenstaro/miniserve/pull/1193) (thanks @nlopes) +- Fix single quote display with `--show-wget-footer` [#1191](https://github.com/svenstaro/miniserve/pull/1191) (thanks @d-air1) ## [0.24.0] - 2023-07-06 - Fix ANSI color codes are printed when not a tty [#1095](https://github.com/svenstaro/miniserve/pull/1095) @@ -44,9 +44,9 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.3.1" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2079246596c18b4a33e274ae10c0e50613f4d32a4198e09c7b93771013fed74" +checksum = "a92ef85799cba03f76e4f7c10f533e66d87c9a7e7055f3391f09000ad8351bc9" dependencies = [ "actix-codec", "actix-rt", @@ -54,8 +54,8 @@ dependencies = [ "actix-tls", "actix-utils", "ahash 0.8.3", - "base64 0.21.2", - "bitflags 1.3.2", + "base64", + "bitflags 2.4.0", "brotli", "bytes", "bytestring", @@ -84,12 +84,12 @@ dependencies = [ [[package]] name = "actix-macros" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" +checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.37", ] [[package]] @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "actix-rt" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15265b6b8e2347670eb363c47fc8c75208b4a4994b27192f345fcbe707804f3e" +checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" dependencies = [ "futures-core", "tokio", @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "actix-server" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e8613a75dd50cc45f473cee3c34d59ed677c0f7b44480ce3b8247d7dc519327" +checksum = "3eb13e7eef0423ea6eab0e59f6c72e7cb46d33691ad56a726b3cd07ddec2c2d4" dependencies = [ "actix-rt", "actix-service", @@ -145,8 +145,7 @@ dependencies = [ "futures-core", "futures-util", "mio", - "num_cpus", - "socket2 0.4.9", + "socket2 0.5.4", "tokio", "tracing", ] @@ -164,20 +163,23 @@ dependencies = [ [[package]] name = "actix-tls" -version = "3.0.3" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fde0cf292f7cdc7f070803cb9a0d45c018441321a78b1042ffbbb81ec333297" +checksum = "72616e7fbec0aa99c6f3164677fa48ff5a60036d0799c98cab894a44f3e0efc3" dependencies = [ - "actix-codec", "actix-rt", "actix-service", "actix-utils", "futures-core", - "log", + "impl-more", "pin-project-lite", + "rustls 0.21.7", + "rustls-webpki", + "tokio", "tokio-rustls 0.23.4", "tokio-util", - "webpki-roots", + "tracing", + "webpki-roots 0.22.6", ] [[package]] @@ -192,9 +194,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.3.1" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3cb42f9566ab176e1ef0b8b3a896529062b4efc6be0123046095914c4c1c96" +checksum = "0e4a5b5e29603ca8c94a77c65cf874718ceb60292c5a5c3e5f4ace041af462b9" dependencies = [ "actix-codec", "actix-http", @@ -206,7 +208,7 @@ dependencies = [ "actix-tls", "actix-utils", "actix-web-codegen", - "ahash 0.7.6", + "ahash 0.8.3", "bytes", "bytestring", "cfg-if", @@ -214,7 +216,6 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "http", "itoa", "language-tags", "log", @@ -226,32 +227,32 @@ dependencies = [ "serde_json", "serde_urlencoded", "smallvec", - "socket2 0.4.9", - "time 0.3.22", + "socket2 0.5.4", + "time", "url", ] [[package]] name = "actix-web-codegen" -version = "4.2.0" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9" +checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.37", ] [[package]] name = "actix-web-httpauth" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dda62cf04bc3a9ad2ea8f314f721951cfdb4cdacec4e984d20e77c7bb170991" +checksum = "1d613edf08a42ccc6864c941d30fe14e1b676a77d16f1dbadc1174d065a0a775" dependencies = [ "actix-utils", "actix-web", - "base64 0.13.1", + "base64", "futures-core", "futures-util", "log", @@ -260,9 +261,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -304,18 +305,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "aho-corasick" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] @@ -358,24 +350,23 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" [[package]] name = "anstyle-parse" @@ -397,9 +388,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -407,9 +398,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "askama_escape" @@ -419,9 +410,9 @@ checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" [[package]] name = "assert_cmd" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d6b683edf8d1119fe420a94f8a7e389239666aa72e65495d91c00462510151" +checksum = "88903cb14723e4d4003335bb7f8a14f27691649105346a0f0957466c096adfe6" dependencies = [ "anstyle", "bstr", @@ -455,9 +446,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -470,15 +461,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bit-set" @@ -503,9 +488,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "block-buffer" @@ -539,9 +524,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.6.0" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "4c2f7349907b712260e64b0afe2f84692af14a454be26187d9df565c7f69266a" dependencies = [ "memchr", "regex-automata", @@ -550,9 +535,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byteorder" @@ -562,15 +547,15 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "bytesize" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38fcc2979eff34a4b84e1cf9a1e3da42a7d44b3b690a40cdcb23e3d556cfb2e5" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" [[package]] name = "bytestring" @@ -583,11 +568,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -598,85 +584,82 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] name = "chrono-humanize" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32dce1ea1988dbdf9f9815ff11425828523bd2a134ec0805d2ac8af26ee6096e" +checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" dependencies = [ "chrono", ] [[package]] name = "clap" -version = "4.3.11" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" +checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.11" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" +checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" dependencies = [ "anstream", "anstyle", "clap_lex", - "once_cell", "strsim", "terminal_size", ] [[package]] name = "clap_complete" -version = "4.3.2" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" +checksum = "4110a1e6af615a9e6d0a36f805d5c99099f8bab9b8042f5bc1fa220a4a89e36f" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.37", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "clap_mangen" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f2e32b579dae093c2424a8b7e2bea09c89da01e1ce5065eb2f0a6f1cc15cc1f" +checksum = "b44f35c514163027542f7147797ff930523eea288e03642727348ef1a9666f6b" dependencies = [ "clap", "roff", @@ -733,6 +716,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + +[[package]] name = "cpufeatures" version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -770,14 +762,16 @@ dependencies = [ ] [[package]] -name = "ctor" -version = "0.1.26" +name = "dary_heap" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] +checksum = "7762d17f1241643615821a8455a0b2c3e803784b058693d990b11f2dce25a0ca" + +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" [[package]] name = "derive_more" @@ -794,9 +788,9 @@ dependencies = [ [[package]] name = "deunicode" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" +checksum = "d95203a6a50906215a502507c0f879a0ce7ff205a6111e2db2a5ef8e4bb92e43" [[package]] name = "diff" @@ -828,15 +822,15 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] @@ -849,9 +843,9 @@ checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -876,39 +870,33 @@ checksum = "aa6c2a740a5d6940f90a0f13b5828440c2a7160bd1e235cf934d5df0e7a3e1ad" [[package]] name = "fast_qr" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f57cc4da9c1ee5d39f0ef8389680aa1e6b31b951cddb1f0ba7417ab97f25e415" -dependencies = [ - "wasm-bindgen", -] +checksum = "02b09ccb5449ffa2c57933337563fb82b4e0875f031b71410c9faac0cea3d30b" [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "windows-sys 0.48.0", ] [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "miniz_oxide", @@ -1004,7 +992,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.37", ] [[package]] @@ -1061,14 +1049,14 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "glob" @@ -1078,11 +1066,11 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick", "bstr", "fnv", "log", @@ -1102,31 +1090,34 @@ dependencies = [ [[package]] name = "grass" -version = "0.12.4" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cc4b64880a2264a41f9eab431780e72a68a6c88b9bddef361ba638812d572e" +checksum = "7746cd9bf09f9bb7d98638774a70642000356f543898d9a352cd043f82744528" dependencies = [ + "clap", "grass_compiler", + "include_sass", ] [[package]] name = "grass_compiler" -version = "0.12.4" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e4feeef87d958eebd4d55431040768b93a5b088202198e0b203adc3c1d468c6" +checksum = "187adfc0b34289c7f8f3819453ce9da3177c3d73f40ac74bb17faba578813d45" dependencies = [ "codemap", "indexmap", "lasso", "once_cell", "phf", + "rand", ] [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1157,6 +1148,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.3", +] + +[[package]] name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1164,9 +1164,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1224,9 +1224,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[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 = "hyper" @@ -1261,7 +1261,7 @@ dependencies = [ "futures-util", "http", "hyper", - "rustls 0.21.3", + "rustls 0.21.7", "tokio", "tokio-rustls 0.24.1", ] @@ -1327,33 +1327,30 @@ dependencies = [ ] [[package]] -name = "indexmap" -version = "1.9.3" +name = "impl-more" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] +checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" [[package]] -name = "instant" -version = "0.1.12" +name = "include_sass" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "8a09c0170cacc99c494307c6482e81653a8fb767c605ee7cf8febd53d9e72ed6" dependencies = [ - "cfg-if", + "grass_compiler", + "quote", + "syn 1.0.109", ] [[package]] -name = "io-lifetimes" -version = "1.0.11" +name = "indexmap" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", + "autocfg", + "hashbrown 0.12.3", ] [[package]] @@ -1364,29 +1361,29 @@ checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.3", + "rustix", "windows-sys 0.48.0", ] [[package]] name = "itertools" -version = "0.10.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" @@ -1429,51 +1426,48 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libflate" -version = "1.4.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ff4ae71b685bbad2f2f391fe74f6b7659a34871c08b210fdc039e43bee07d18" +checksum = "9f7d5654ae1795afc7ff76f4365c2c8791b0feb18e8996a96adad8ffd7c3b2bf" dependencies = [ "adler32", + "core2", "crc32fast", + "dary_heap", "libflate_lz77", ] [[package]] name = "libflate_lz77" -version = "1.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a52d3a8bfc85f250440e4424db7d857e241a3aebbbe301f3eb606ab15c39acbf" +checksum = "be5f52fb8c451576ec6b79d3f4deb327398bc05bbdbd99021a6e77a4c855d524" dependencies = [ + "core2", + "hashbrown 0.13.2", "rle-decode-fast", ] [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" [[package]] name = "local-channel" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f303ec0e94c6c54447f84f3b0ef7af769858a9c4ef56ef2a986d3dcd4c3fc9c" +checksum = "e0a493488de5f18c8ffcba89eebb8532ffc562dc400490eb65b84893fae0b178" dependencies = [ "futures-core", "futures-sink", - "futures-util", "local-waker", ] @@ -1495,9 +1489,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "mac" @@ -1555,9 +1549,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "mime" @@ -1615,13 +1609,13 @@ dependencies = [ "regex", "reqwest", "rstest", - "rustls 0.20.8", + "rustls 0.20.9", "rustls-pemfile", "select", "serde", "sha2", "simplelog", - "socket2 0.5.3", + "socket2 0.5.4", "strum", "tar", "thiserror", @@ -1646,7 +1640,7 @@ checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -1673,9 +1667,9 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -1701,9 +1695,9 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -1715,15 +1709,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] -name = "output_vt100" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" -dependencies = [ - "winapi", -] - -[[package]] name = "parking_lot" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1741,16 +1726,16 @@ checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall", "smallvec", - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] name = "paste" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "percent-encoding" @@ -1814,9 +1799,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1850,9 +1835,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "predicates" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9" +checksum = "6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0" dependencies = [ "anstyle", "difflib", @@ -1881,13 +1866,11 @@ dependencies = [ [[package]] name = "pretty_assertions" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" dependencies = [ - "ctor", "diff", - "output_vt100", "yansi", ] @@ -1923,18 +1906,18 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1971,15 +1954,6 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" @@ -1989,11 +1963,11 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.0" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89089e897c013b3deb627116ae56a6955a72b8bed395c9526af31c9fe528b484" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ - "aho-corasick 1.0.2", + "aho-corasick", "memchr", "regex-automata", "regex-syntax", @@ -2001,34 +1975,34 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.0" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa250384981ea14565685dea16a9ccc4d1c541a13f82b9c168572264d1df8c56" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ - "aho-corasick 1.0.2", + "aho-corasick", "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "relative-path" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf2521270932c3c7bed1a59151222bd7643c79310f2916f01925e1e16255698" +checksum = "c707298afce11da2efef2f600116fa93ffa7a032b5d7b628aa17711ec81383ca" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ - "base64 0.21.2", + "base64", "bytes", "encoding_rs", "futures-core", @@ -2046,7 +2020,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.3", + "rustls 0.21.7", "rustls-pemfile", "serde", "serde_json", @@ -2058,7 +2032,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.25.2", "winreg", ] @@ -2091,9 +2065,9 @@ checksum = "b833d8d034ea094b1ea68aa6d5c740e0d04bad9d16568d08ba6f76823a114316" [[package]] name = "rstest" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b96577ca10cb3eade7b337eb46520108a67ca2818a24d0b63f41fd62bc9651c" +checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" dependencies = [ "futures", "futures-timer", @@ -2103,9 +2077,9 @@ dependencies = [ [[package]] name = "rstest_macros" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225e674cf31712b8bb15fdbca3ec0c1b9d825c5a24407ff2b7e005fb6a29ba03" +checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" dependencies = [ "cfg-if", "glob", @@ -2114,7 +2088,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.23", + "syn 2.0.37", "unicode-ident", ] @@ -2135,36 +2109,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.3" +version = "0.38.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5ffa1efe7548069688cd7028f32591853cd7b5b756d41bcffd2353e4fc75b4" +checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.3", + "linux-raw-sys", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring", @@ -2174,9 +2134,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.3" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b19faa85ecb5197342b54f987b142fb3e30d0c90da40f80ef4fa9a726e6676ed" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", @@ -2190,14 +2150,14 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.2", + "base64", ] [[package]] name = "rustls-webpki" -version = "0.101.0" +version = "0.101.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89efed4bd0af2a8de0feb22ba38030244c93db56112b8aa67d27022286852b1c" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" dependencies = [ "ring", "untrusted", @@ -2205,15 +2165,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -2226,9 +2186,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -2253,35 +2213,35 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" [[package]] name = "serde" -version = "1.0.166" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.166" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.37", ] [[package]] name = "serde_json" -version = "1.0.100" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -2302,9 +2262,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -2339,20 +2299,20 @@ checksum = "acee08041c5de3d5048c8b3f6f13fafb3026b24ba43c6a695a0c76179b844369" dependencies = [ "log", "termcolor", - "time 0.3.22", + "time", ] [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -2368,9 +2328,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "socket2" @@ -2384,9 +2344,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" dependencies = [ "libc", "windows-sys 0.48.0", @@ -2441,15 +2401,15 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6069ca09d878a33f883cc06aaa9718ede171841d3832450354410b718b097232" +checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.23", + "syn 2.0.37", ] [[package]] @@ -2465,9 +2425,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.23" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -2476,9 +2436,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", @@ -2487,15 +2447,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "autocfg", "cfg-if", "fastrand", - "redox_syscall 0.3.5", - "rustix 0.37.23", + "redox_syscall", + "rustix", "windows-sys 0.48.0", ] @@ -2521,11 +2480,11 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.37.23", + "rustix", "windows-sys 0.48.0", ] @@ -2537,22 +2496,22 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.41" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c16a64ba9387ef3fdae4f9c1a7f07a0997fce91985c0336f1ddc1822b3b37802" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.41" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14928354b01c4d6a4f0e549069adef399a284e7995c7ccca94e8a07a5346c59" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.37", ] [[package]] @@ -2567,21 +2526,11 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ + "deranged", "itoa", "libc", "num_threads", @@ -2592,15 +2541,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -2622,11 +2571,10 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", @@ -2635,7 +2583,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.4.9", + "socket2 0.5.4", "windows-sys 0.48.0", ] @@ -2645,7 +2593,7 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.8", + "rustls 0.20.9", "tokio", "webpki", ] @@ -2656,15 +2604,15 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.3", + "rustls 0.21.7", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -2715,15 +2663,15 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] @@ -2736,9 +2684,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -2763,9 +2711,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -2801,9 +2749,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -2820,12 +2768,6 @@ dependencies = [ [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - -[[package]] -name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" @@ -2851,7 +2793,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.37", "wasm-bindgen-shared", ] @@ -2885,7 +2827,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2908,9 +2850,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" dependencies = [ "ring", "untrusted", @@ -2926,6 +2868,12 @@ dependencies = [ ] [[package]] +name = "webpki-roots" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" + +[[package]] name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2943,9 +2891,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -2962,7 +2910,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -2980,7 +2928,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -3000,17 +2948,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "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]] @@ -3021,9 +2969,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -3033,9 +2981,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -3045,9 +2993,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -3057,9 +3005,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -3069,9 +3017,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -3081,9 +3029,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -3093,24 +3041,25 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[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 = "xattr" -version = "0.2.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] @@ -3145,18 +3094,18 @@ dependencies = [ [[package]] name = "zstd" -version = "0.12.3+zstd.1.5.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "6.0.5+zstd.1.5.4" +version = "6.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56d9e60b4b1758206c238a10165fbcae3ca37b01744e394c463463f6529d23b" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" dependencies = [ "libc", "zstd-sys", @@ -33,13 +33,14 @@ clap_complete = "4" clap_mangen = "0.2" colored = "2" comrak = { version = "0.18", default-features = false } -fast_qr = { version = "0.9", features = ["svg"] } +fast_qr = { version = "0.10", features = ["svg"] } futures = "0.3" +grass = { version = "0.13", features = ["macro"] } hex = "0.4" http = "0.2" httparse = "1" if-addrs = "0.10" -libflate = "1" +libflate = "2" log = "0.4" maud = "0.25" mime = "0.3" @@ -80,6 +81,3 @@ url = "2" [target.'cfg(not(windows))'.dev-dependencies] # fake_tty does not support Windows for now fake-tty = "0.3.1" - -[build-dependencies] -grass = { version = "0.12", default-features = false } @@ -47,6 +47,10 @@ Sometimes this is just a more practical and quick way than doing things properly pw=$(echo -n "123" | sha256sum | cut -f 1 -d ' ') miniserve --auth joe:sha256:$pw unreleased-linux-distros/ + +### Require username/password from file (separate logins with new lines): + + miniserve --auth-file auth.txt unreleased-linux-distros/ ### Generate random 6-hexdigit URL: @@ -113,203 +117,226 @@ Some mobile browsers like Firefox on Android will offer to open the camera app w ## Usage - For when you really just want to serve some files over HTTP right now! +``` +For when you really just want to serve some files over HTTP right now! + +Usage: miniserve [OPTIONS] [PATH] + +Arguments: + [PATH] + Which path to serve + + [env: MINISERVE_PATH=] + +Options: + -v, --verbose + Be verbose, includes emitting access logs + + [env: MINISERVE_VERBOSE=] + + --index <INDEX> + The name of a directory index file to serve, like "index.html" + + Normally, when miniserve serves a directory, it creates a listing for that directory. However, if a directory + contains this file, miniserve will serve that file instead. + + [env: MINISERVE_INDEX=] + + --spa + Activate SPA (Single Page Application) mode - Usage: miniserve [OPTIONS] [PATH] + This will cause the file given by --index to be served for all non-existing file paths. In effect, this will serve + the index file whenever a 404 would otherwise occur in order to allow the SPA router to handle the request instead. - Arguments: - [PATH] - Which path to serve + [env: MINISERVE_SPA=] - [env: MINISERVE_PATH=] + --pretty-urls + Activate Pretty URLs mode - Options: - -v, --verbose - Be verbose, includes emitting access logs + This will cause the server to serve the equivalent `.html` file indicated by the path. - [env: MINISERVE_VERBOSE=] + `/about` will try to find `about.html` and serve it. - --index <INDEX> - The name of a directory index file to serve, like "index.html" + [env: MINISERVE_PRETTY_URLS=] - Normally, when miniserve serves a directory, it creates a listing for that directory. - However, if a directory contains this file, miniserve will serve that file instead. + -p, --port <PORT> + Port to use - [env: MINISERVE_INDEX=] + [env: MINISERVE_PORT=] + [default: 8080] - --spa - Activate SPA (Single Page Application) mode + -i, --interfaces <INTERFACES> + Interface to listen on - This will cause the file given by --index to be served for all non-existing file paths. In - effect, this will serve the index file whenever a 404 would otherwise occur in order to - allow the SPA router to handle the request instead. + [env: MINISERVE_INTERFACE=] - [env: MINISERVE_SPA=] + -a, --auth <AUTH> + Set authentication - -p, --port <PORT> - Port to use + Currently supported formats: + username:password, username:sha256:hash, username:sha512:hash + (e.g. joe:123, joe:sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3) - [env: MINISERVE_PORT=] - [default: 8080] + [env: MINISERVE_AUTH=] - -i, --interfaces <INTERFACES> - Interface to listen on + --auth-file <AUTH_FILE> + Read authentication values from a file - [env: MINISERVE_INTERFACE=] + Example file content: - -a, --auth <AUTH> - Set authentication. Currently supported formats: username:password, username:sha256:hash, - username:sha512:hash (e.g. joe:123, - joe:sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3) + joe:123 + bob:sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3 + bill: - [env: MINISERVE_AUTH=] + [env: MINISERVE_AUTH_FILE=] - --route-prefix <ROUTE_PREFIX> - Use a specific route prefix + --route-prefix <ROUTE_PREFIX> + Use a specific route prefix - [env: MINISERVE_ROUTE_PREFIX=] + [env: MINISERVE_ROUTE_PREFIX=] - --random-route - Generate a random 6-hexdigit route + --random-route + Generate a random 6-hexdigit route - [env: MINISERVE_RANDOM_ROUTE=] + [env: MINISERVE_RANDOM_ROUTE=] - -P, --no-symlinks - Hide symlinks in listing and prevent them from being followed + -P, --no-symlinks + Hide symlinks in listing and prevent them from being followed - [env: MINISERVE_NO_SYMLINKS=] + [env: MINISERVE_NO_SYMLINKS=] - -H, --hidden - Show hidden files + -H, --hidden + Show hidden files - [env: MINISERVE_HIDDEN=] + [env: MINISERVE_HIDDEN=] - -c, --color-scheme <COLOR_SCHEME> - Default color scheme + -c, --color-scheme <COLOR_SCHEME> + Default color scheme - [env: MINISERVE_COLOR_SCHEME=] - [default: squirrel] - [possible values: squirrel, archlinux, zenburn, monokai] + [env: MINISERVE_COLOR_SCHEME=] + [default: squirrel] + [possible values: squirrel, archlinux, zenburn, monokai] - -d, --color-scheme-dark <COLOR_SCHEME_DARK> - Default color scheme + -d, --color-scheme-dark <COLOR_SCHEME_DARK> + Default color scheme - [env: MINISERVE_COLOR_SCHEME_DARK=] - [default: archlinux] - [possible values: squirrel, archlinux, zenburn, monokai] + [env: MINISERVE_COLOR_SCHEME_DARK=] + [default: archlinux] + [possible values: squirrel, archlinux, zenburn, monokai] - -q, --qrcode - Enable QR code display + -q, --qrcode + Enable QR code display - [env: MINISERVE_QRCODE=] + [env: MINISERVE_QRCODE=] - -u, --upload-files [<ALLOWED_UPLOAD_DIR>] - Enable file uploading (and optionally specify for which directory) + -u, --upload-files [<ALLOWED_UPLOAD_DIR>] + Enable file uploading (and optionally specify for which directory) - [env: MINISERVE_ALLOWED_UPLOAD_DIR=] + [env: MINISERVE_ALLOWED_UPLOAD_DIR=] - -U, --mkdir - Enable creating directories + -U, --mkdir + Enable creating directories - [env: MINISERVE_MKDIR_ENABLED=] + [env: MINISERVE_MKDIR_ENABLED=] - -m, --media-type <MEDIA_TYPE> - Specify uploadable media types + -m, --media-type <MEDIA_TYPE> + Specify uploadable media types - [env: MINISERVE_MEDIA_TYPE=] - [possible values: image, audio, video] + [env: MINISERVE_MEDIA_TYPE=] + [possible values: image, audio, video] - -M, --raw-media-type <MEDIA_TYPE_RAW> - Directly specify the uploadable media type expression + -M, --raw-media-type <MEDIA_TYPE_RAW> + Directly specify the uploadable media type expression - [env: MINISERVE_RAW_MEDIA_TYPE=] + [env: MINISERVE_RAW_MEDIA_TYPE=] - -o, --overwrite-files - Enable overriding existing files during file upload + -o, --overwrite-files + Enable overriding existing files during file upload - [env: OVERWRITE_FILES=] + [env: OVERWRITE_FILES=] - -r, --enable-tar - Enable uncompressed tar archive generation + -r, --enable-tar + Enable uncompressed tar archive generation - [env: MINISERVE_ENABLE_TAR=] + [env: MINISERVE_ENABLE_TAR=] - -g, --enable-tar-gz - Enable gz-compressed tar archive generation + -g, --enable-tar-gz + Enable gz-compressed tar archive generation - [env: MINISERVE_ENABLE_TAR_GZ=] + [env: MINISERVE_ENABLE_TAR_GZ=] - -z, --enable-zip - Enable zip archive generation + -z, --enable-zip + Enable zip archive generation - WARNING: Zipping large directories can result in out-of-memory exception because zip - generation is done in memory and cannot be sent on the fly + WARNING: Zipping large directories can result in out-of-memory exception because zip generation is done in memory + and cannot be sent on the fly - [env: MINISERVE_ENABLE_ZIP=] + [env: MINISERVE_ENABLE_ZIP=] - -D, --dirs-first - List directories first + -D, --dirs-first + List directories first - [env: MINISERVE_DIRS_FIRST=] + [env: MINISERVE_DIRS_FIRST=] - -t, --title <TITLE> - Shown instead of host in page title and heading + -t, --title <TITLE> + Shown instead of host in page title and heading - [env: MINISERVE_TITLE=] + [env: MINISERVE_TITLE=] - --header <HEADER> - Set custom header for responses + --header <HEADER> + Set custom header for responses - [env: MINISERVE_HEADER=] + [env: MINISERVE_HEADER=] - -l, --show-symlink-info - Visualize symlinks in directory listing + -l, --show-symlink-info + Visualize symlinks in directory listing - [env: MINISERVE_SHOW_SYMLINK_INFO=] + [env: MINISERVE_SHOW_SYMLINK_INFO=] - -F, --hide-version-footer - Hide version footer + -F, --hide-version-footer + Hide version footer - [env: MINISERVE_HIDE_VERSION_FOOTER=] + [env: MINISERVE_HIDE_VERSION_FOOTER=] - --hide-theme-selector - Hide theme selector + --hide-theme-selector + Hide theme selector - [env: MINISERVE_HIDE_THEME_SELECTOR=] + [env: MINISERVE_HIDE_THEME_SELECTOR=] - -W, --show-wget-footer - If enabled, display a wget command to recursively download the current directory + -W, --show-wget-footer + If enabled, display a wget command to recursively download the current directory - [env: MINISERVE_SHOW_WGET_FOOTER=] + [env: MINISERVE_SHOW_WGET_FOOTER=] - --print-completions <shell> - Generate completion file for a shell + --print-completions <shell> + Generate completion file for a shell - [possible values: bash, elvish, fish, powershell, zsh] + [possible values: bash, elvish, fish, powershell, zsh] - --print-manpage - Generate man page + --print-manpage + Generate man page - --tls-cert <TLS_CERT> - TLS certificate to use + --tls-cert <TLS_CERT> + TLS certificate to use - [env: MINISERVE_TLS_CERT=] + [env: MINISERVE_TLS_CERT=] - --tls-key <TLS_KEY> - TLS private key to use + --tls-key <TLS_KEY> + TLS private key to use - [env: MINISERVE_TLS_KEY=] + [env: MINISERVE_TLS_KEY=] - --readme - Enable README.md rendering in directories + --readme + Enable README.md rendering in directories - [env: MINISERVE_README=] + [env: MINISERVE_README=] - -h, --help - Print help (see a summary with '-h') + -h, --help + Print help (see a summary with '-h') - -V, --version - Print version + -V, --version + Print version +``` ## How to install diff --git a/build.rs b/build.rs deleted file mode 100644 index e65b294..0000000 --- a/build.rs +++ /dev/null @@ -1,19 +0,0 @@ -use std::env; -use std::fs; -use std::path::Path; - -fn main() { - let out_dir = env::var_os("OUT_DIR").expect("OUT_DIR env var missing"); - let dest_path = Path::new(&out_dir).join("style.css"); - fs::write( - dest_path, - grass::from_string( - include_str!("data/style.scss").to_string(), - &grass::Options::default(), - ) - .expect("scss failed to compile"), - ) - .expect("failed to write css file"); - - println!("cargo:rerun-if-changed=data/style.scss"); -} diff --git a/data/style.scss b/data/style.scss index 10c258d..6c0d284 100644 --- a/data/style.scss +++ b/data/style.scss @@ -1,22 +1,11 @@ -@use "sass:selector"; +@use "themes/archlinux" with ($generate_default: false); +@use "themes/monokai" with ($generate_default: false); +@use "themes/squirrel" with ($generate_default: false); +@use "themes/zenburn" with ($generate_default: false); // theme colors can be found at the bottom $themes: squirrel, archlinux, monokai, zenburn; -// This returns a selector that matches body when no theme class is set, -// in which case the default light/dark mode themes should be used. -// The result of this function can be used with #{...} interpolation -// in a selector list. -@function body_not_themed() { - $s: unquote("body"); - - @each $t in $themes { - $s: selector.append($s, unquote(":not(.theme_#{$t})")); - } - - @return $s; -} - html { font-smoothing: antialiased; text-rendering: optimizeLegibility; @@ -210,21 +199,6 @@ nav .theme li a:hover { color: var(--change_theme_link_color_hover); } -%active_theme_link { - font-weight: bold; - color: var(--switch_theme_active); -} - -@each $theme in $themes { - body.theme_#{$theme} nav .theme li.theme_#{$theme} a { - @extend %active_theme_link; - } -} - -#{body_not_themed()} nav .theme li.theme_default a { - @extend %active_theme_link; -} - p { margin: 0; padding: 0; @@ -567,211 +541,21 @@ th span.active span { } } - - -@mixin theme_squirrel { - --background: #ffffff; - --text_color: #323232; - --directory_link_color: #d02474; - --directory_link_color_visited: #9b1985; - --file_link_color: #0086b3; - --file_link_color_visited: #974ec2; - --symlink_color: #ADD8E6; - --table_background: #ffffff; - --table_text_color: #323232; - --table_header_background: #323232; - --table_header_text_color: #f5f5f5; - --table_header_active_color: #ffffff; - --active_row_color: #f6f8fa; - --odd_row_background: #fbfbfb; - --even_row_background: #f2f2f2; - --root_link_color: #323232; - --download_button_background: #d02474; - --download_button_background_hover: #f52d8a; - --download_button_link_color: #ffffff; - --download_button_link_color_hover: #ffffff; - --back_button_background: #d02474; - --back_button_background_hover: #d02474; - --back_button_link_color: #ffffff; - --back_button_link_color_hover: #ffffff; - --date_text_color: #797979; - --at_color: #797979; - --switch_theme_background: #323232; - --switch_theme_link_color: #f5f5f5; - --switch_theme_active: #d02474; - --switch_theme_border: #49483e; - --change_theme_link_color: #f5f5f5; - --change_theme_link_color_hover: #f5f5f5; - --upload_text_color: #323232; - --upload_form_border_color: #d2d2d2; - --upload_form_background: #f2f2f2; - --upload_button_background: #d02474; - --upload_button_text_color: #ffffff; - --drag_background: #3333338f; - --drag_border_color: #ffffff; - --drag_text_color: #ffffff; - --size_background_color: #323232; - --size_text_color: #ffffff; - --error_color: #d02424; - --footer_color: #898989; -} - -@mixin theme_archlinux { - --background: #383c4a; - --text_color: #fefefe; - --directory_link_color: #03a9f4; - --directory_link_color_visited: #0388f4; - --file_link_color: #ea95ff; - --file_link_color_visited: #a595ff; - --symlink_color: #66d9ef; - --table_background: #353946; - --table_text_color: #eeeeee; - --table_header_background: #5294e2; - --table_header_text_color: #eeeeee; - --table_header_active_color: #ffffff; - --active_row_color: #5194e259; - --odd_row_background: #404552; - --even_row_background: #4b5162; - --root_link_color: #abb2bb; - --download_button_background: #ea95ff; - --download_button_background_hover: #eea7ff; - --download_button_link_color: #ffffff; - --download_button_link_color_hover: #ffffff; - --back_button_background: #ea95ff; - --back_button_background_hover: #ea95ff; - --back_button_link_color: #ffffff; - --back_button_link_color_hover: #ffffff; - --date_text_color: #9ebbdc; - --at_color: #9ebbdc; - --switch_theme_background: #4b5162; - --switch_theme_link_color: #fefefe; - --switch_theme_active: #ea95ff; - --switch_theme_border: #6a728a; - --change_theme_link_color: #fefefe; - --change_theme_link_color_hover: #fefefe; - --upload_text_color: #fefefe; - --upload_form_border_color: #353946; - --upload_form_background: #4b5162; - --upload_button_background: #ea95ff; - --upload_button_text_color: #ffffff; - --drag_background: #3333338f; - --drag_border_color: #fefefe; - --drag_text_color: #fefefe; - --size_background_color: #5294e2; - --size_text_color: #fefefe; - --error_color: #e44b4b; - --footer_color: #8eabcc; -} - -@mixin theme_zenburn { - --background: #3f3f3f; - --text_color: #efefef; - --directory_link_color: #f0dfaf; - --directory_link_color_visited: #ebc390; - --file_link_color: #87d6d5; - --file_link_color_visited: #a7b9ec; - --symlink_color: #11a8cd; - --table_background: #4a4949; - --table_text_color: #efefef; - --table_header_background: #7f9f7f; - --table_header_text_color: #efefef; - --table_header_active_color: #efef8f; - --active_row_color: #7e9f7f9c; - --odd_row_background: #777777; - --even_row_background: #5a5a5a; - --root_link_color: #dca3a3; - --download_button_background: #cc9393; - --download_button_background_hover: #dca3a3; - --download_button_link_color: #efefef; - --download_button_link_color_hover: #efefef; - --back_button_background: #cc9393; - --back_button_background_hover: #cc9393; - --back_button_link_color: #efefef; - --back_button_link_color_hover: #efefef; - --date_text_color: #cfbfaf; - --at_color: #cfbfaf; - --switch_theme_background: #4a4949; - --switch_theme_link_color: #efefef; - --switch_theme_active: #efef8f; - --switch_theme_border: #5a5a5a; - --change_theme_link_color: #efefef; - --change_theme_link_color_hover: #efefef; - --upload_text_color: #efefef; - --upload_form_border_color: #4a4949; - --upload_form_background: #777777; - --upload_button_background: #cc9393; - --upload_button_text_color: #efefef; - --drag_background: #3333338f; - --drag_border_color: #efefef; - --drag_text_color: #efefef; - --size_background_color: #7f9f7f; - --size_text_color: #efefef; - --error_color: #d06565; - --footer_color: #bfaf9f; -} - -@mixin theme_monokai { - --background: #272822; - --text_color: #f8f8f2; - --directory_link_color: #f92672; - --directory_link_color_visited: #bc39a7; - --file_link_color: #a6e22e; - --file_link_color_visited: #4cb936; - --symlink_color: #29b8db; - --table_background: #3b3a32; - --table_text_color: #f8f8f0; - --table_header_background: #75715e; - --table_header_text_color: #f8f8f2; - --table_header_active_color: #e6db74; - --active_row_color: #ae81fe3d; - --odd_row_background: #3e3d32; - --even_row_background: #49483e; - --root_link_color: #66d9ef; - --download_button_background: #ae81ff; - --download_button_background_hover: #c6a6ff; - --download_button_link_color: #f8f8f0; - --download_button_link_color_hover: #f8f8f0; - --back_button_background: #ae81ff; - --back_button_background_hover: #ae81ff; - --back_button_link_color: #f8f8f0; - --back_button_link_color_hover: #f8f8f0; - --date_text_color: #66d9ef; - --at_color: #66d9ef; - --switch_theme_background: #3b3a32; - --switch_theme_link_color: #f8f8f2; - --switch_theme_active: #a6e22e; - --switch_theme_border: #49483e; - --change_theme_link_color: #f8f8f2; - --change_theme_link_color_hover: #f8f8f2; - --upload_text_color: #f8f8f2; - --upload_form_border_color: #3b3a32; - --upload_form_background: #49483e; - --upload_button_background: #ae81ff; - --upload_button_text_color: #f8f8f0; - --drag_background: #3333338f; - --drag_border_color: #f8f8f2; - --drag_text_color: #f8f8f2; - --size_background_color: #75715e; - --size_text_color: #f8f8f2; - --error_color: #d02929; - --footer_color: #56c9df; -} - @mixin theme($name) { @if $name == squirrel { - @include theme_squirrel(); + @include squirrel.theme(); } @else if $name == archlinux { - @include theme_archlinux(); + @include archlinux.theme(); } @else if $name == monokai { - @include theme_monokai(); + @include monokai.theme(); } @else if $name == zenburn { - @include theme_zenburn(); + @include zenburn.theme(); } @else { @@ -779,39 +563,23 @@ th span.active span { } } -// For each of the themes, define a placeholder selector containing -// the themes variables. Then add selectors for body when the theme: -// - has explicitly been activated by .theme_* -// - is set as default theme by .default_theme_* and no other theme is active -// to the placeholder selector list by means of @extend. -@each $theme in $themes { - %theme_#{$theme} { - @include theme($theme); - } - - body.theme_#{$theme} { - @extend %theme_#{$theme}; - } +%active_theme_link { + font-weight: bold; + color: var(--switch_theme_active); +} - #{body_not_themed()}.default_theme_#{$theme} { - @extend %theme_#{$theme}; - } +// when no specific theme is applied, highlight the `default` theme button in +// the theme menu +body:not([data-theme]) nav .theme li[data-theme="default"] a { + @extend %active_theme_link; } -// Do the same thing again for the dark mode default. -// Since the media query doesn't affect specificity, all dark mode -// defaults need to come after all light mode defaults to override -// them when dark mode is enabled. @each $theme in $themes { - @media (prefers-color-scheme: dark) { - %theme_dark_#{$theme} { - @include theme($theme); + body[data-theme="#{$theme}"] { + @include theme($theme); + // highlight the currently active theme in the theme selection menu + nav .theme li[data-theme="#{$theme}"] a { + @extend %active_theme_link; } } - - // this extension will still end up inside the media query, - // because that is where %theme_dark_* was defined - #{body_not_themed()}.default_theme_dark_#{$theme} { - @extend %theme_dark_#{$theme}; - } } diff --git a/data/themes/archlinux.scss b/data/themes/archlinux.scss new file mode 100644 index 0000000..f95b8bb --- /dev/null +++ b/data/themes/archlinux.scss @@ -0,0 +1,54 @@ +$generate_default: true !default; + +@mixin theme { + --background: #383c4a; + --text_color: #fefefe; + --directory_link_color: #03a9f4; + --directory_link_color_visited: #0388f4; + --file_link_color: #ea95ff; + --file_link_color_visited: #a595ff; + --symlink_color: #66d9ef; + --table_background: #353946; + --table_text_color: #eeeeee; + --table_header_background: #5294e2; + --table_header_text_color: #eeeeee; + --table_header_active_color: #ffffff; + --active_row_color: #5194e259; + --odd_row_background: #404552; + --even_row_background: #4b5162; + --root_link_color: #abb2bb; + --download_button_background: #ea95ff; + --download_button_background_hover: #eea7ff; + --download_button_link_color: #ffffff; + --download_button_link_color_hover: #ffffff; + --back_button_background: #ea95ff; + --back_button_background_hover: #ea95ff; + --back_button_link_color: #ffffff; + --back_button_link_color_hover: #ffffff; + --date_text_color: #9ebbdc; + --at_color: #9ebbdc; + --switch_theme_background: #4b5162; + --switch_theme_link_color: #fefefe; + --switch_theme_active: #ea95ff; + --switch_theme_border: #6a728a; + --change_theme_link_color: #fefefe; + --change_theme_link_color_hover: #fefefe; + --upload_text_color: #fefefe; + --upload_form_border_color: #353946; + --upload_form_background: #4b5162; + --upload_button_background: #ea95ff; + --upload_button_text_color: #ffffff; + --drag_background: #3333338f; + --drag_border_color: #fefefe; + --drag_text_color: #fefefe; + --size_background_color: #5294e2; + --size_text_color: #fefefe; + --error_color: #e44b4b; + --footer_color: #8eabcc; +}; + +@if $generate_default { + body { + @include theme; + } +} diff --git a/data/themes/monokai.scss b/data/themes/monokai.scss new file mode 100644 index 0000000..4a47794 --- /dev/null +++ b/data/themes/monokai.scss @@ -0,0 +1,54 @@ +$generate_default: true !default; + +@mixin theme { + --background: #272822; + --text_color: #f8f8f2; + --directory_link_color: #f92672; + --directory_link_color_visited: #bc39a7; + --file_link_color: #a6e22e; + --file_link_color_visited: #4cb936; + --symlink_color: #29b8db; + --table_background: #3b3a32; + --table_text_color: #f8f8f0; + --table_header_background: #75715e; + --table_header_text_color: #f8f8f2; + --table_header_active_color: #e6db74; + --active_row_color: #ae81fe3d; + --odd_row_background: #3e3d32; + --even_row_background: #49483e; + --root_link_color: #66d9ef; + --download_button_background: #ae81ff; + --download_button_background_hover: #c6a6ff; + --download_button_link_color: #f8f8f0; + --download_button_link_color_hover: #f8f8f0; + --back_button_background: #ae81ff; + --back_button_background_hover: #ae81ff; + --back_button_link_color: #f8f8f0; + --back_button_link_color_hover: #f8f8f0; + --date_text_color: #66d9ef; + --at_color: #66d9ef; + --switch_theme_background: #3b3a32; + --switch_theme_link_color: #f8f8f2; + --switch_theme_active: #a6e22e; + --switch_theme_border: #49483e; + --change_theme_link_color: #f8f8f2; + --change_theme_link_color_hover: #f8f8f2; + --upload_text_color: #f8f8f2; + --upload_form_border_color: #3b3a32; + --upload_form_background: #49483e; + --upload_button_background: #ae81ff; + --upload_button_text_color: #f8f8f0; + --drag_background: #3333338f; + --drag_border_color: #f8f8f2; + --drag_text_color: #f8f8f2; + --size_background_color: #75715e; + --size_text_color: #f8f8f2; + --error_color: #d02929; + --footer_color: #56c9df; +}; + +@if $generate_default { + body { + @include theme; + } +} diff --git a/data/themes/squirrel.scss b/data/themes/squirrel.scss new file mode 100644 index 0000000..9eb572e --- /dev/null +++ b/data/themes/squirrel.scss @@ -0,0 +1,54 @@ +$generate_default: true !default; + +@mixin theme { + --background: #ffffff; + --text_color: #323232; + --directory_link_color: #d02474; + --directory_link_color_visited: #9b1985; + --file_link_color: #0086b3; + --file_link_color_visited: #974ec2; + --symlink_color: #ADD8E6; + --table_background: #ffffff; + --table_text_color: #323232; + --table_header_background: #323232; + --table_header_text_color: #f5f5f5; + --table_header_active_color: #ffffff; + --active_row_color: #f6f8fa; + --odd_row_background: #fbfbfb; + --even_row_background: #f2f2f2; + --root_link_color: #323232; + --download_button_background: #d02474; + --download_button_background_hover: #f52d8a; + --download_button_link_color: #ffffff; + --download_button_link_color_hover: #ffffff; + --back_button_background: #d02474; + --back_button_background_hover: #d02474; + --back_button_link_color: #ffffff; + --back_button_link_color_hover: #ffffff; + --date_text_color: #797979; + --at_color: #797979; + --switch_theme_background: #323232; + --switch_theme_link_color: #f5f5f5; + --switch_theme_active: #d02474; + --switch_theme_border: #49483e; + --change_theme_link_color: #f5f5f5; + --change_theme_link_color_hover: #f5f5f5; + --upload_text_color: #323232; + --upload_form_border_color: #d2d2d2; + --upload_form_background: #f2f2f2; + --upload_button_background: #d02474; + --upload_button_text_color: #ffffff; + --drag_background: #3333338f; + --drag_border_color: #ffffff; + --drag_text_color: #ffffff; + --size_background_color: #323232; + --size_text_color: #ffffff; + --error_color: #d02424; + --footer_color: #898989; +}; + +@if $generate_default { + body { + @include theme; + } +} diff --git a/data/themes/zenburn.scss b/data/themes/zenburn.scss new file mode 100644 index 0000000..9eb4d11 --- /dev/null +++ b/data/themes/zenburn.scss @@ -0,0 +1,54 @@ +$generate_default: true !default; + +@mixin theme { + --background: #3f3f3f; + --text_color: #efefef; + --directory_link_color: #f0dfaf; + --directory_link_color_visited: #ebc390; + --file_link_color: #87d6d5; + --file_link_color_visited: #a7b9ec; + --symlink_color: #11a8cd; + --table_background: #4a4949; + --table_text_color: #efefef; + --table_header_background: #7f9f7f; + --table_header_text_color: #efefef; + --table_header_active_color: #efef8f; + --active_row_color: #7e9f7f9c; + --odd_row_background: #777777; + --even_row_background: #5a5a5a; + --root_link_color: #dca3a3; + --download_button_background: #cc9393; + --download_button_background_hover: #dca3a3; + --download_button_link_color: #efefef; + --download_button_link_color_hover: #efefef; + --back_button_background: #cc9393; + --back_button_background_hover: #cc9393; + --back_button_link_color: #efefef; + --back_button_link_color_hover: #efefef; + --date_text_color: #cfbfaf; + --at_color: #cfbfaf; + --switch_theme_background: #4a4949; + --switch_theme_link_color: #efefef; + --switch_theme_active: #efef8f; + --switch_theme_border: #5a5a5a; + --change_theme_link_color: #efefef; + --change_theme_link_color_hover: #efefef; + --upload_text_color: #efefef; + --upload_form_border_color: #4a4949; + --upload_form_background: #777777; + --upload_button_background: #cc9393; + --upload_button_text_color: #efefef; + --drag_background: #3333338f; + --drag_border_color: #efefef; + --drag_text_color: #efefef; + --size_background_color: #7f9f7f; + --size_text_color: #efefef; + --error_color: #d06565; + --footer_color: #bfaf9f; +}; + +@if $generate_default { + body { + @include theme; + } +} diff --git a/src/args.rs b/src/args.rs index f7b42f1..c78e08c 100644 --- a/src/args.rs +++ b/src/args.rs @@ -41,6 +41,14 @@ pub struct CliArgs { #[arg(long, requires = "index", env = "MINISERVE_SPA")] pub spa: bool, + /// Activate Pretty URLs mode + /// + /// This will cause the server to serve the equivalent `.html` file indicated by the path. + /// + /// `/about` will try to find `about.html` and serve it. + #[arg(long, env = "MINISERVE_PRETTY_URLS")] + pub pretty_urls: bool, + /// Port to use #[arg( short = 'p', @@ -60,7 +68,9 @@ pub struct CliArgs { )] pub interfaces: Vec<IpAddr>, - /// Set authentication. Currently supported formats: + /// Set authentication + /// + /// Currently supported formats: /// username:password, username:sha256:hash, username:sha512:hash /// (e.g. joe:123, joe:sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3) #[arg( @@ -68,10 +78,21 @@ pub struct CliArgs { long = "auth", value_parser(parse_auth), num_args(1), - env = "MINISERVE_AUTH" + env = "MINISERVE_AUTH", + verbatim_doc_comment )] pub auth: Vec<auth::RequiredAuth>, + /// Read authentication values from a file + /// + /// Example file content: + /// + /// joe:123 + /// bob:sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3 + /// bill: + #[arg(long, value_hint = ValueHint::FilePath, env = "MINISERVE_AUTH_FILE", verbatim_doc_comment)] + pub auth_file: Option<PathBuf>, + /// Use a specific route prefix #[arg(long = "route-prefix", env = "MINISERVE_ROUTE_PREFIX")] pub route_prefix: Option<String>, @@ -241,7 +262,7 @@ fn parse_interface(src: &str) -> Result<IpAddr, std::net::AddrParseError> { } /// Parse authentication requirement -fn parse_auth(src: &str) -> Result<auth::RequiredAuth, ContextualError> { +pub fn parse_auth(src: &str) -> Result<auth::RequiredAuth, ContextualError> { let mut split = src.splitn(3, ':'); let invalid_auth_format = Err(ContextualError::InvalidAuthFormat); diff --git a/src/config.rs b/src/config.rs index 0959e81..8a8a876 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,6 +1,6 @@ -#[cfg(feature = "tls")] -use std::{fs::File, io::BufReader}; use std::{ + fs::File, + io::{BufRead, BufReader}, net::{IpAddr, Ipv4Addr, Ipv6Addr}, path::PathBuf, }; @@ -14,7 +14,7 @@ use http::HeaderMap; use rustls_pemfile as pemfile; use crate::{ - args::{CliArgs, MediaType}, + args::{parse_auth, CliArgs, MediaType}, auth::RequiredAuth, file_utils::sanitize_path, renderer::ThemeSlug, @@ -80,6 +80,13 @@ pub struct MiniserveConfig { /// allow the SPA router to handle the request instead. pub spa: bool, + /// Activate Pretty URLs mode + /// + /// This will cause the server to serve the equivalent `.html` file indicated by the path. + /// + /// `/about` will try to find `about.html` and serve it. + pub pretty_urls: bool, + /// Enable QR code display pub show_qrcode: bool, @@ -157,6 +164,17 @@ impl MiniserveConfig { _ => "".to_owned(), }; + let mut auth = args.auth; + + if let Some(path) = args.auth_file { + let file = File::open(path)?; + let lines = BufReader::new(file).lines(); + + for line in lines { + auth.push(parse_auth(line?.as_str())?); + } + } + // Generate some random routes for the favicon and css so that they are very unlikely to conflict with // real files. // If --random-route is enabled , in order to not leak the random generated route, we must not use it @@ -254,7 +272,7 @@ impl MiniserveConfig { path: args.path.unwrap_or_else(|| PathBuf::from(".")), port, interfaces, - auth: args.auth, + auth, path_explicitly_chosen, no_symlinks: args.no_symlinks, show_hidden: args.hidden, @@ -265,6 +283,7 @@ impl MiniserveConfig { default_color_scheme_dark, index: args.index, spa: args.spa, + pretty_urls: args.pretty_urls, overwrite_files: args.overwrite_files, show_qrcode: args.qrcode, mkdir_enabled: args.mkdir_enabled, diff --git a/src/errors.rs b/src/errors.rs index e502634..6875b90 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -5,6 +5,7 @@ use actix_web::{ HttpRequest, HttpResponse, ResponseError, }; use futures::prelude::*; +use std::str::FromStr; use thiserror::Error; use crate::{renderer::render_error, MiniserveConfig}; @@ -131,8 +132,15 @@ where let res = fut.await?.map_into_boxed_body(); if (res.status().is_client_error() || res.status().is_server_error()) - && res.headers().get(header::CONTENT_TYPE).map(AsRef::as_ref) - == Some(mime::TEXT_PLAIN_UTF_8.essence_str().as_bytes()) + && res + .headers() + .get(header::CONTENT_TYPE) + .map(AsRef::as_ref) + .and_then(|s| std::str::from_utf8(s).ok()) + .and_then(|s| mime::Mime::from_str(s).ok()) + .as_ref() + .map(mime::Mime::essence_str) + == Some(mime::TEXT_PLAIN.as_ref()) { let req = res.request().clone(); Ok(res.map_body(|head, body| map_error_page(&req, head, body))) diff --git a/src/main.rs b/src/main.rs index 2a4d402..6bbebd7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,9 @@ use std::time::Duration; use actix_files::NamedFile; use actix_web::{ - http::header::ContentType, middleware, web, App, HttpRequest, HttpResponse, Responder, + dev::{fn_service, ServiceRequest, ServiceResponse}, + http::header::ContentType, + middleware, web, App, HttpRequest, HttpResponse, Responder, }; use actix_web_httpauth::middleware::HttpAuthentication; use anyhow::Result; @@ -29,6 +31,8 @@ mod renderer; use crate::config::MiniserveConfig; use crate::errors::ContextualError; +static STYLESHEET: &str = grass::include!("data/style.scss"); + fn main() -> Result<()> { let args = args::CliArgs::parse(); @@ -182,10 +186,20 @@ async fn run(miniserve_config: MiniserveConfig) -> Result<(), ContextualError> { .map(|sock| sock.to_string().green().bold().to_string()) .collect::<Vec<_>>(); + let stylesheet = web::Data::new( + [ + STYLESHEET, + inside_config.default_color_scheme.css(), + inside_config.default_color_scheme_dark.css_dark().as_str(), + ] + .join("\n"), + ); + let srv = actix_web::HttpServer::new(move || { App::new() .wrap(configure_header(&inside_config.clone())) .app_data(inside_config.clone()) + .app_data(stylesheet.clone()) .wrap_fn(errors::error_page_middleware) .wrap(middleware::Logger::default()) .route(&inside_config.favicon_route, web::get().to(favicon)) @@ -305,6 +319,31 @@ fn configure_app(app: &mut web::ServiceConfig, conf: &MiniserveConfig) { } } + // Handle --pretty-urls options. + // + // We rewrite the request to append ".html" to the path and serve the file. If the + // path ends with a `/`, we remove it before appending ".html". + // + // This is done to allow for pretty URLs, e.g. "/about" instead of "/about.html". + if conf.pretty_urls { + files = files.default_handler(fn_service(|req: ServiceRequest| async { + let (req, _) = req.into_parts(); + let conf = req + .app_data::<MiniserveConfig>() + .expect("Could not get miniserve config"); + let mut path_base = req.path()[1..].to_string(); + if path_base.ends_with('/') { + path_base.pop(); + } + if !path_base.ends_with("html") { + path_base = format!("{}.html", path_base); + } + let file = NamedFile::open_async(conf.path.join(path_base)).await?; + let res = file.into_response(&req); + Ok(ServiceResponse::new(req, res)) + })); + } + if conf.show_hidden { files = files.use_hidden_files(); } @@ -346,9 +385,8 @@ async fn favicon() -> impl Responder { .body(logo) } -async fn css() -> impl Responder { - let css = include_str!(concat!(env!("OUT_DIR"), "/style.css")); +async fn css(stylesheet: web::Data<String>) -> impl Responder { HttpResponse::Ok() .insert_header(ContentType(mime::TEXT_CSS)) - .body(css) + .body(stylesheet.to_string()) } diff --git a/src/renderer.rs b/src/renderer.rs index b94817d..5a591f0 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -56,33 +56,7 @@ pub fn page( (page_header(&title_path, conf.file_upload, &conf.favicon_route, &conf.css_route)) body #drop-container - .(format!("default_theme_{}", conf.default_color_scheme)) - .(format!("default_theme_dark_{}", conf.default_color_scheme_dark)) { - - (PreEscaped(r#" - <script> - // read theme from local storage and apply it to body - const body = document.body; - var theme = localStorage.getItem('theme'); - - if (theme != null && theme != 'default') { - body.classList.add('theme_' + theme); - } - - // updates the color scheme by replacing the appropriate class - // on body and saving the new theme to local storage - function updateColorScheme(name) { - body.classList.remove.apply(body.classList, Array.from(body.classList).filter(v=>v.startsWith("theme_"))); - - if (name != "default") { - body.classList.add('theme_' + name); - } - - localStorage.setItem('theme', name); - } - </script> - "#)) - + { div.toolbar_box_group { @if conf.file_upload { div.form { @@ -293,8 +267,10 @@ fn wget_footer(abs_path: &Uri, root_dir_name: Option<&str>, current_user: Option None => String::new(), }; - let command = - format!("wget -rcnHp -R 'index.html*'{cut_dirs}{user_params} '{abs_path}?raw=true'"); + let encoded_abs_path = abs_path.to_string().replace('\'', "%27"); + let command = format!( + "wget -rcnHp -R 'index.html*'{cut_dirs}{user_params} '{encoded_abs_path}?raw=true'" + ); let click_to_copy = format!("navigator.clipboard.writeText(\"{command}\")"); html! { @@ -348,6 +324,21 @@ pub enum ThemeSlug { Monokai, } +impl ThemeSlug { + pub fn css(&self) -> &str { + match self { + ThemeSlug::Squirrel => grass::include!("data/themes/squirrel.scss"), + ThemeSlug::Archlinux => grass::include!("data/themes/archlinux.scss"), + ThemeSlug::Zenburn => grass::include!("data/themes/zenburn.scss"), + ThemeSlug::Monokai => grass::include!("data/themes/monokai.scss"), + } + } + + pub fn css_dark(&self) -> String { + format!("@media (prefers-color-scheme: dark) {{\n{}}}", self.css()) + } +} + /// Partial: qr code spoiler fn qr_spoiler(show_qrcode: bool, content: &Uri) -> Markup { html! { @@ -377,7 +368,7 @@ fn color_scheme_selector(hide_theme_selector: bool) -> Markup { } ul.theme { @for color_scheme in THEME_PICKER_CHOICES { - li.(format!("theme_{}", color_scheme.1)) { + li data-theme=(color_scheme.1) { (color_scheme_link(color_scheme)) } } @@ -586,12 +577,40 @@ fn page_header(title: &str, file_upload: bool, favicon_route: &str, css_route: & meta charset="utf-8"; meta http-equiv="X-UA-Compatible" content="IE=edge"; meta name="viewport" content="width=device-width, initial-scale=1"; + meta name="color-scheme" content="dark light"; link rel="icon" type="image/svg+xml" href={ (favicon_route) }; link rel="stylesheet" href={ (css_route) }; title { (title) } + (PreEscaped(r#" + <script> + // updates the color scheme by setting the theme data attribute + // on body and saving the new theme to local storage + function updateColorScheme(name) { + if (name && name != "default") { + localStorage.setItem('theme', name); + document.body.setAttribute("data-theme", name) + } else { + localStorage.removeItem('theme'); + document.body.removeAttribute("data-theme") + } + } + + // read theme from local storage and apply it to body + function loadColorScheme() { + var name = localStorage.getItem('theme'); + updateColorScheme(name); + } + + // load saved theme on page load + addEventListener("load", loadColorScheme); + // load saved theme when local storage is changed (synchronize between tabs) + addEventListener("storage", loadColorScheme); + </script> + "#)) + @if file_upload { (PreEscaped(r#" <script> @@ -660,19 +679,8 @@ pub fn render_error( html { (page_header(&error_code.to_string(), false, &conf.favicon_route, &conf.css_route)) - body.(format!("default_theme_{}", conf.default_color_scheme)) - .(format!("default_theme_dark_{}", conf.default_color_scheme_dark)) { - - (PreEscaped(r#" - <script> - // read theme from local storage and apply it to body - var theme = localStorage.getItem('theme'); - if (theme != null && theme != 'default') { - document.body.classList.add('theme_' + theme); - } - </script> - "#)) - + body + { div.error { p { (error_code.to_string()) } @for error in error_description.lines() { diff --git a/tests/auth_file.rs b/tests/auth_file.rs new file mode 100644 index 0000000..ddc9e25 --- /dev/null +++ b/tests/auth_file.rs @@ -0,0 +1,66 @@ +mod fixtures; + +use fixtures::{server, server_no_stderr, Error, FILES}; +use http::StatusCode; +use reqwest::blocking::Client; +use rstest::rstest; +use select::document::Document; +use select::predicate::Text; + +#[rstest( + cli_auth_file_arg, + client_username, + client_password, + case("tests/data/auth1.txt", "joe", "123"), + case("tests/data/auth1.txt", "bob", "123"), + case("tests/data/auth1.txt", "bill", "") +)] +fn auth_file_accepts( + cli_auth_file_arg: &str, + client_username: &str, + client_password: &str, +) -> Result<(), Error> { + let server = server(&["--auth-file", cli_auth_file_arg]); + let client = Client::new(); + let response = client + .get(server.url()) + .basic_auth(client_username, Some(client_password)) + .send()?; + + let status_code = response.status(); + assert_eq!(status_code, StatusCode::OK); + + let body = response.error_for_status()?; + let parsed = Document::from_read(body)?; + for &file in FILES { + assert!(parsed.find(Text).any(|x| x.text() == file)); + } + + Ok(()) +} + +#[rstest( + cli_auth_file_arg, + client_username, + client_password, + case("tests/data/auth1.txt", "joe", "wrongpassword"), + case("tests/data/auth1.txt", "bob", ""), + case("tests/data/auth1.txt", "nonexistentuser", "wrongpassword") +)] +fn auth_file_rejects( + cli_auth_file_arg: &str, + client_username: &str, + client_password: &str, +) -> Result<(), Error> { + let server = server_no_stderr(&["--auth-file", cli_auth_file_arg]); + let client = Client::new(); + let status = client + .get(server.url()) + .basic_auth(client_username, Some(client_password)) + .send()? + .status(); + + assert_eq!(status, StatusCode::UNAUTHORIZED); + + Ok(()) +} diff --git a/tests/data/auth1.txt b/tests/data/auth1.txt new file mode 100644 index 0000000..3744d61 --- /dev/null +++ b/tests/data/auth1.txt @@ -0,0 +1,3 @@ +joe:123 +bob:sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3 +bill: diff --git a/tests/serve_request.rs b/tests/serve_request.rs index e717525..ac4360e 100644 --- a/tests/serve_request.rs +++ b/tests/serve_request.rs @@ -268,6 +268,24 @@ fn serve_index_instead_of_404_in_spa_mode( } #[rstest] +#[case(server_no_stderr(&["--pretty-urls", "--index", FILES[1]]), "/")] +#[case(server_no_stderr(&["--pretty-urls", "--index", FILES[1]]), "test.html")] +#[case(server_no_stderr(&["--pretty-urls", "--index", FILES[1]]), "test")] +fn serve_file_instead_of_404_in_pretty_urls_mode( + #[case] server: TestServer, + #[case] url: &str, +) -> Result<(), Error> { + let body = reqwest::blocking::get(format!("{}{}", server.url(), url))?.error_for_status()?; + let parsed = Document::from_read(body)?; + assert!(parsed + .find(|x: &Node| x.text() == "Test Hello Yes") + .next() + .is_some()); + + Ok(()) +} + +#[rstest] #[case(server(&["--route-prefix", "foobar"]))] #[case(server(&["--route-prefix", "/foobar/"]))] fn serves_requests_with_route_prefix(#[case] server: TestServer) -> Result<(), Error> { |