# cfgd-core ships its own version line (not workspace.package.version) so
# anodizer can bump it independently of the cfgd binary, cfgd-operator, and
# cfgd-csi. Each of those three crates pins this version via workspace
# dependency declarations; anodizer's version_sync (enabled in
# .anodizer.yaml) updates those pins automatically on bump.
[package]
name = "cfgd-core"
version = "0.4.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
authors.workspace = true
description = "Core library for cfgd — shared types, providers, reconciler, state"
keywords = ["config", "management", "gitops", "reconciliation", "declarative"]
categories = ["config", "command-line-utilities"]

[dependencies]
# Serialization / Config
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"
toml = "0.8"

# Output & Theming
console = "0.15"
indicatif = { version = "0.17", features = ["tokio"] }
syntect = "5"
unicode-width = "0.2"

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

# Error handling
thiserror = "2"

# Database (state store)
rusqlite = { version = "0.32", features = ["bundled"] }

# Filesystem watching (daemon)
notify = "7"
notify-rust = "4"

# Async runtime
tokio = { version = "1", features = ["full"] }

# Secret memory zeroization
secrecy = "0.10"

# Hashing
sha2 = "0.10"

# Diffing
similar = "2"

# Paths
directories = "5"

# Hostname detection
hostname = "0.4"

# Interactive prompts
inquire = "0.7"

# HTTP client (daemon webhooks)
ureq = "2"

# Git
git2 = "0.19"

# Templating (output format)
tera = "1"

# Semver (multi-source version pinning)
semver = "1"

# Glob pattern matching (source security)
glob = "0.3"

# Temp files (upgrade)
tempfile = "3"

# Tar/gzip extraction (upgrade)
flate2 = "1"
tar = "0.4"

libc = "0.2"

# Zip extraction (upgrade on Windows)
zip = { version = "2", default-features = false, features = ["deflate"] }

[target.'cfg(not(windows))'.dependencies]
# Force vendored OpenSSL for git2/libgit2 on Linux and macOS; avoids needing
# a system OpenSSL install while keeping SSH and HTTPS support in git2.
openssl = { version = "0.10", features = ["vendored"] }

[target.'cfg(unix)'.dependencies]
# Safe wrappers over libc for signals, process control, file locking
nix = { version = "0.29", features = ["signal", "fs", "process", "user"] }

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.59", features = [
    "Win32_Foundation",
    "Win32_Security",
    "Win32_Storage_FileSystem",
    "Win32_System_EventLog",
    "Win32_System_IO",
    "Win32_System_Registry",
    "Win32_System_Threading",
    "Win32_UI_Shell",
] }
windows-service = "0.7"

[features]
test-helpers = ["dep:pretty_assertions"]

[dependencies.pretty_assertions]
version = "1"
optional = true

[dev-dependencies]
tempfile = "3"
serial_test = "3"
mockito = "1"
tracing-test = "0.2"

