lychee/lychee-lib/Cargo.toml
Techassi 1b1fd0c707
feat: Add support for ranges in the --accept option / config field (#1167)
Adds support for accept ranges discussed in #1157. This allows the user to specify custom HTTP status codes accepted during checking and thus will report as valid (not broken). The accept option only supports specifying status codes as a comma-separated list. With this PR, the option will accept a list of status code ranges formatted like this:

```toml
accept = ["100..=103", "200..=299", "403"]
```

These combinations will be supported: `..<end>`, ` ..=<end>`, `<start>..<end>` and `<start>..=<end>`.
The behavior is copied from the Rust Range like concepts:

```
    ..<end>, includes 0 to <end> (exclusive)
    ..=<end>, includes 0 to <end> (inclusive)
    <start>..<end>, includes <start> to <end> (exclusive)
    <start>..=<end>, includes <start> to <end> (inclusive)
```


- Foundation and enhancements for accept ranges, including support for comma-separated strings and integration into the CLI.
- Implementations and updates for AcceptSelector, including Default, Display, and serde defaults.
- Address and fix various errors: clippy, cargo fmt, and tests.
- Add more tests, address edge cases, and enhance error messaging, especially for TOML config parsing.
- Update dependencies.
2023-09-17 21:39:01 +02:00

93 lines
2.5 KiB
TOML

[package]
name = "lychee-lib"
authors = ["Matthias Endler <matthias@endler.dev>"]
description = "A fast, async link checker"
documentation = "https://docs.rs/lychee_lib"
edition = "2021"
homepage = "https://github.com/lycheeverse/lychee"
keywords = [
"link",
"checker",
"cli",
"link-checker",
"validator",
]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/lycheeverse/lychee"
version = "0.13.0"
[dependencies]
async-stream = "0.3.5"
cached = "0.44.0"
check-if-email-exists = { version = "0.9.0", optional = true }
email_address = "0.2.4"
futures = "0.3.28"
glob = "0.3.1"
headers = "0.3.8"
html5ever = "0.26.0"
html5gum = "0.5.7"
http = "0.2.9"
hyper = "0.14.27"
ip_network = "0.4.1"
jwalk = "0.8.1"
linkify = "0.10.0"
log = "0.4.20"
octocrab = "0.30.1"
once_cell = "1.18.0"
openssl-sys = { version = "0.9.92", optional = true }
path-clean = "1.0.1"
percent-encoding = "2.3.0"
pulldown-cmark = "0.9.3"
regex = "1.9.5"
# Use trust-dns to avoid lookup failures on high concurrency
# https://github.com/seanmonstar/reqwest/issues/296
reqwest = { version = "0.11.20", default-features = false, features = ["gzip", "trust-dns", "cookies"] }
reqwest_cookie_store = "0.6.0"
# Make build work on Apple Silicon.
# See https://github.com/briansmith/ring/issues/1163
# This is necessary for the homebrew build
# https://github.com/Homebrew/homebrew-core/pull/70216
ring = "0.16.20"
secrecy = "0.8.0"
serde = { version = "1.0.185", features = ["derive"] }
serde_with = "3.3.0"
shellexpand = "3.1.0"
thiserror = "1.0.48"
tokio = { version = "1.32.0", features = ["full"] }
typed-builder = "0.16.0"
url = { version = "2.4.1", features = ["serde"] }
[dependencies.par-stream]
version = "0.10.2"
features = ["runtime-tokio"]
[dev-dependencies]
doc-comment = "0.3.3"
tempfile = "3.8.0"
wiremock = "0.5.19"
serde_json = "1.0.105"
rstest = "0.18.1"
toml = "0.7.6"
[features]
# Enable checking email addresses. Requires the native-tls feature.
email-check = ["check-if-email-exists"]
# Use platform-native TLS.
native-tls = ["openssl-sys", "reqwest/native-tls"]
# Use Rustls TLS.
rustls-tls = ["reqwest/rustls-tls-native-roots"]
# Compile and statically link a copy of OpenSSL.
vendored-openssl = ["openssl-sys/vendored"]
# Feature flag to include checking reserved example domains
# as per RFC 2606, section 3.
# This flag is off by default and only exists to allow example domains in
# integration tests, which don't respect `#[cfg(test)]`.
# See https://users.rust-lang.org/t/36630
check_example_domains = []
default = ["native-tls", "email-check"]