[package]
name = "premortem"
version = "0.6.1"
edition = "2021"
authors = ["Glen Baker <iepathos@gmail.com>"]
license = "MIT"
description = "A configuration library that performs a premortem on your app's config—finding all the ways it would die before it ever runs"
repository = "https://github.com/iepathos/premortem"
keywords = ["configuration", "validation", "config", "settings", "premortem"]
categories = ["config", "rust-patterns"]
readme = "README.md"

[workspace]
members = ["premortem-derive"]

[dependencies]
stillwater = "0.13.0"
premortem-derive = { version = "0.3.0", path = "premortem-derive", optional = true }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
regex = "1.10"
toml = { version = "0.9", optional = true }
toml_edit = { version = "0.23", optional = true }
serde_yaml = { version = "0.9", optional = true }
notify = { version = "6.1", optional = true }

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
tokio-test = "0.4"
premortem-derive = { version = "0.3.0", path = "premortem-derive" }
axum = "0.8"
tracing = "0.1"
tracing-subscriber = "0.3"
proptest = "1.5"
tempfile = "3.23.0"
criterion = "0.8"

[features]
default = ["toml", "derive"]
derive = ["premortem-derive"]
toml = ["dep:toml", "dep:toml_edit"]
json = []
yaml = ["dep:serde_yaml"]
watch = ["dep:notify"]
remote = []
full = ["toml", "json", "yaml", "watch", "remote", "derive"]

[[example]]
name = "watch"
path = "examples/watch/main.rs"
required-features = ["watch"]

[[example]]
name = "yaml"
path = "examples/yaml/main.rs"
required-features = ["yaml"]

[[bench]]
name = "env_validation"
harness = false
