[workspace]
resolver = "2"

[workspace.package]
version = "1.4.7"
edition = "2024"
authors = ["bavix"]
license = "MIT"
repository = "https://github.com/gripmock/grpctestify-rust"
readme = "README.md"
rust-version = "1.93"

[workspace.dependencies]
# CLI
clap = { version = "4.5", features = ["derive"] }
clap_complete = "4.5"

# Utilities
once_cell = "1.20"

# Error handling
anyhow = "1.0"

# Async runtime
tokio = { version = "1.48", features = ["full"] }
tokio-stream = { version = "0.1", features = ["sync"] }

# gRPC
tonic = "0.14.5"
tonic-prost = "0.14.5"
prost = "0.14.3"
prost-types = "0.14.3"
prost-reflect = { version = "0.16.3", features = ["serde"] }
tonic-reflection = "0.14.5"

# JSON
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# TLS
rustls = { version = "0.23", default-features = false, features = [
  "ring",
  "logging",
  "std",
  "tls12",
] }

# Regular expressions
regex = "1.10"

# UUID validation
uuid = { version = "1.6", features = ["v4", "v5", "serde"] }

# Timestamp
chrono = "0.4"

# Email validation
email_address = "0.2"

# URL parsing
url = "2.5"


# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# Configuration
dirs = "6.0"
toml = "1.0"

# File operations
walkdir = "2.4"

[package]
name = "grpctestify"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
description = "gRPC testing utility written in Rust"
rust-version.workspace = true

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

[dependencies]
# CLI
clap = { workspace = true }
clap_complete = { workspace = true }

# Error handling
anyhow = { workspace = true }

# Utilities
once_cell = { workspace = true }

# Async runtime
tokio = { workspace = true }
tokio-stream = { workspace = true }

# gRPC
tonic = { workspace = true, features = [
  "tls-ring",
  "tls-native-roots",
  "transport",
  "gzip",
] }
tonic-prost = { workspace = true, optional = true }
prost = { workspace = true }
prost-types = { workspace = true }
tonic-reflection = { workspace = true }

# JSON
serde = { workspace = true }
serde_json = { workspace = true }

# TLS
rustls = { workspace = true }

# Regular expressions
regex = { workspace = true }

# UUID validation
uuid = { workspace = true }

# Timestamp
chrono = { workspace = true }

# Email validation
email_address = { workspace = true }

# URL parsing
url = { workspace = true }

# Logging
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
indicatif = "0.18.4"
console = "0.16.2"

# Configuration
dirs = { workspace = true }
toml = { workspace = true }

# File operations
walkdir = { workspace = true }
rand = "0.10.0"
json5 = "1.3.1"
prost-reflect.workspace = true
jaq-core = "3.0.0-gamma"
jaq-std = "3.0.0-gamma"
jaq-json = { version = "2.0.0-gamma", features = ["serde"] }
dissimilar = "1.0.10"
futures = "0.3.32"
lazy_static = "1.5.0"
tower-lsp = "0.20"

[[test]]
name = "explain"
path = "tests/explain_tests.rs"
harness = true

[[test]]
name = "inspect"
path = "tests/inspect_tests.rs"
harness = true

[[test]]
name = "workflow"
path = "tests/workflow_tests.rs"
harness = true

[[test]]
name = "extract"
path = "tests/extract_tests.rs"
harness = true

[[test]]
name = "extract_metadata"
path = "tests/extract_metadata_tests.rs"
harness = true

[[test]]
name = "extract_ternary"
path = "tests/extract_ternary_tests.rs"
harness = true

[[test]]
name = "ternary_ast"
path = "tests/ternary_ast_tests.rs"
harness = true

[[test]]
name = "fmt"
path = "tests/fmt_tests.rs"
harness = true

[[test]]
name = "lsp_variable"
path = "tests/lsp_variable_tests.rs"
harness = true

[[test]]
name = "lsp_variable_definition"
path = "tests/lsp_variable_definition_tests.rs"
harness = true

[[test]]
name = "lsp_variable_definition_integration"
path = "tests/lsp_variable_definition_integration_tests.rs"
harness = true

[[test]]
name = "report"
path = "tests/report_tests.rs"
harness = true

[[bin]]
name = "test-server"
path = "tests/servers/bin.rs"
required-features = ["test-servers"]

[features]
default = []
proto-build = [
  "dep:tonic-prost",
  "dep:tonic-prost-build",
  "dep:protoc-bin-vendored",
]
test-servers = [
  "dep:tonic-prost",
  "dep:tonic-prost-build",
  "dep:protoc-bin-vendored",
]

[build-dependencies]
tonic-prost-build = { version = "0.14.5", optional = true }
protoc-bin-vendored = { version = "3", optional = true }

[dev-dependencies]
# Testing
tempfile = "3.10"
uuid = { workspace = true }

[package.metadata.cargo-machete]
# Used only in feature-gated proto generation paths (`proto-build`, `test-servers`)
# and referenced by generated code.
ignored = ["tonic-prost", "tonic-prost-build", "protoc-bin-vendored"]
