[package]
name = "rustelo-leptos-server"
version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
default-run = "rustelo-leptos-server"

[[bin]]
name = "rustelo-leptos-server"
path = "src/main.rs"

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

[dependencies]
clap.workspace = true
leptos.workspace = true
leptos_meta.workspace = true
leptos_axum.workspace = true
leptos_config.workspace = true
axum.workspace = true
tokio.workspace = true
tower.workspace = true
tower-http.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
serde_json.workspace = true
serde.workspace = true
toml.workspace = true
once_cell.workspace = true
lazy_static.workspace = true
env_logger.workspace = true
pulldown-cmark.workspace = true
gray_matter.workspace = true
walkdir.workspace = true
chrono.workspace = true
html-escape.workspace = true

# Rustelo framework ports (primary entry points)
rustelo_web     = { workspace = true, features = ["ssr"] }
rustelo_auth    = { workspace = true, features = ["ssr"] }
rustelo_content = { workspace = true, features = ["ssr", "markdown"] }
# Foundation kept for build.rs generated code compatibility
rustelo_core_lib.workspace = true
rustelo_pages_leptos     = { workspace = true, optional = true }
rustelo_components_leptos = { workspace = true, optional = true }
rustelo_components_htmx.workspace = true
rustelo_pages_htmx.workspace = true
rustelo_seo.workspace = true
minijinja.workspace = true

# Website crates
website-pages-htmx.workspace = true
website-client = { path = "../client", optional = true }
rustelo_server = { workspace = true, default-features = false, features = ["auth", "email", "nats-admin"] }
rustelo_utils.workspace = true
dashmap.workspace = true

website-pages = { path = "../pages", optional = true }

[build-dependencies]
build-config = { path = "../build-config" }
toml.workspace = true
serde.workspace = true
serde_json.workspace = true
tera.workspace = true
sha2.workspace = true
chrono.workspace = true

# Use new PAP-compliant manifest system
rustelo_utils.workspace = true
rustelo_tools.workspace = true

[features]
default = ["ssr", "auth", "email"]
ssr          = ["leptos/ssr"]
wasm-client  = [
    "dep:website-client", "website-client/ssr",
    "dep:rustelo_pages_leptos",
    "dep:rustelo_components_leptos",
    "dep:website-pages",
    "rustelo_server/leptos-hydration",
    "rustelo_server/hydrate",
]
csr     = ["leptos/csr"]
auth    = ["rustelo_server/auth"]
email   = ["rustelo_server/email"]
# htmx-ssr: server-only build (no wasm32 target, no cargo-leptos WASM step).
# Single source of truth for the full feature set — use --no-default-features
# --features htmx-ssr everywhere (local-install, lian-build, build-auto, dev).
htmx-ssr        = ["ssr", "auth", "email"]
content-watcher = []
content-static  = []

[lib]
name = "rustelo_leptos_server"
path = "src/lib.rs"
