[package]
name = "picloud-cli"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
description = "PiCloud command-line client"
# Each top-level `tests/*.rs` would otherwise auto-discover as its own
# test binary, respawning picloud once per file. We want one binary
# with module sub-files (auth.rs, apps.rs, …) so the LazyLock fixture
# is genuinely shared.
autotests = false

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

[[test]]
name = "cli"
path = "tests/cli.rs"

[dependencies]
picloud-shared.workspace = true
reqwest = { workspace = true, features = ["json"] }
percent-encoding.workspace = true
serde.workspace = true
serde_json.workspace = true
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
chrono = { workspace = true }
clap = { version = "4", features = ["derive"] }
toml = "0.8"
directories = "5"
rpassword = "7"
anyhow = "1"

[dev-dependencies]
assert_cmd = "2"
predicates = "3"
tempfile = "3"
reqwest = { workspace = true, features = ["json", "blocking"] }
libc = "0.2"
# Synchronous Postgres driver used by the dead-letters integration test
# to inject a row the replay path can act on. Smaller compile cost than
# pulling sqlx into the CLI tree, and the existing tests are
# blocking-style anyway.
postgres = { version = "0.19", features = ["with-uuid-1", "with-serde_json-1"] }
uuid = { version = "1", features = ["v4"] }
