[package]
name = "readur"
version = "2.4.2"
edition = "2021"

[[bin]]
name = "readur"
path = "src/main.rs"

[[bin]]
name = "test_runner"
path = "src/bin/test_runner.rs"

[dependencies]
tokio = { version = "1", features = ["full"] }
axum = { version = "0.8", features = ["multipart"] }
tower = { version = "0.5", features = ["util"] }
tower-http = { version = "0.6", features = ["cors", "fs"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "sqlite", "chrono", "uuid", "migrate"] }
regex = "1.11"
uuid = { version = "1", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
bcrypt = "0.17"
base64ct = "=1.8.0"
jsonwebtoken = "9"
anyhow = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tokio-util = { version = "0.7", features = ["io"] }
futures-util = "0.3"
futures = "0.3"
notify = "8"
mime_guess = "2"
tesseract = { version = "0.15", optional = true }
image = { version = "0.25", features = ["png", "jpeg", "tiff", "bmp"], optional = true }
imageproc = { version = "0.25", optional = true }
thiserror = "2.0"
sysinfo = "0.36"
raw-cpuid = { version = "11", optional = true }
reqwest = { version = "0.12", features = ["json", "multipart"] }
quick-xml = { version = "0.37", features = ["serialize"] }
urlencoding = "2.1"
oauth2 = "4.4"
url = "2.4"
dotenvy = "0.15"
hostname = "0.4"
walkdir = "2"
clap = { version = "4", features = ["derive"] }
utoipa = { version = "5", features = ["axum_extras", "chrono", "uuid"] }
aws-config = { version = "1.8", optional = true }
aws-sdk-s3 = { version = "1.92", optional = true }
aws-credential-types = { version = "1.2", optional = true }
aws-types = { version = "1.3", optional = true }
sha2 = "0.10"
utoipa-swagger-ui = { version = "9", features = ["axum"] }
testcontainers = { version = "0.24", optional = true }
testcontainers-modules = { version = "0.12", features = ["postgres"], optional = true }

[features]
default = ["ocr", "s3"]
ocr = ["tesseract", "image", "imageproc", "raw-cpuid"]
s3 = ["aws-config", "aws-sdk-s3", "aws-credential-types", "aws-types"]
test-utils = ["testcontainers", "testcontainers-modules"]

[dev-dependencies]
tempfile = "3"
wiremock = "0.6" 
tokio-test = "0.4"
futures = "0.3"
# Database testing dependencies
testcontainers = "0.24"
testcontainers-modules = { version = "0.12", features = ["postgres"] }

# Enable test-utils feature for all tests
readur = { path = ".", features = ["test-utils"] }

[profile.test]
incremental = false
debug = false
