[package]
authors = ["周睿 <zrufo747@outlook.com>"]
categories = ["command-line-interface", "config"]
description = "A Ratatui-based TUI component library for JSON Schema configuration"
edition = "2024"
keywords = ["tui", "config", "json-schema", "terminal"]
license = "MIT OR Apache-2.0"
name = "jkconfig"
repository = "https://github.com/drivercraft/ostool"
version = "0.2.3"

[[bin]]
name = "jkconfig"
path = "src/main.rs"
required-features = ["web"]

[dependencies]
crossterm = {workspace = true}
ratatui = {workspace = true}
unicode-width = "0.2"

# Data processing
anyhow = {workspace = true}
clap = {workspace = true, features = ["derive"]}
serde = {workspace = true, features = ["derive"]}
serde_json = {workspace = true}
schemars = {workspace = true, features = ["derive"]}
cargo_metadata = "0.23"
toml = {workspace = true}

# Error handling
thiserror = {workspace = true}

# Web server dependencies (optional)
axum = {version = "0.8", optional = true}
chrono = {version = "0.4", optional = true}
tokio = {version = "1.0", features = ["full"]}
tower = {version = "0.5", optional = true}
tower-http = {version = "0.6", features = ["fs", "cors"], optional = true}

[features]
default = ["web"]
web = ["axum", "tower", "tower-http", "chrono"]

[dev-dependencies]
schemars = {workspace=true, features = ["derive"]}
tokio-test = "0.4"
