[package]
name          = "doiget-cli"
description   = "doiget CLI binary"
version.workspace      = true
edition.workspace      = true
rust-version.workspace = true
license.workspace      = true
repository.workspace   = true
homepage.workspace     = true
authors.workspace      = true
keywords.workspace     = true
categories.workspace   = true
readme                 = "README.md"

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

[lints]
workspace = true

[features]
default  = ["oa-only"]
oa-only  = ["doiget-core/oa-only"]
metadata = ["doiget-core/metadata"]
citation = ["doiget-core/citation"]
tdm-elsevier = ["doiget-core/tdm-elsevier"]
tdm-aps      = ["doiget-core/tdm-aps"]
tdm-springer = ["doiget-core/tdm-springer"]

[dependencies]
doiget-core        = { workspace = true }
# `doiget serve` (Phase 3 MCP foundation) hands off to the MCP server.
# Stdio-only per ADR-0001; transitive features are constrained by the
# workspace-root `rmcp` dep declaration.
doiget-mcp         = { workspace = true }
clap               = { workspace = true }
anyhow             = { workspace = true }
tokio              = { workspace = true }
tracing            = { workspace = true }
tracing-subscriber = { workspace = true }
serde              = { workspace = true }
serde_json         = { workspace = true }
# Enable the `serde1` feature here (workspace default omits it) so that
# `ResolvedConfig`'s `Utf8PathBuf` fields serialize for `config show`.
camino             = { workspace = true, features = ["serde1"] }
chrono             = { workspace = true }
# TOML serialization for `config show`, `info`, and metadata round-trip.
toml               = { workspace = true }
# Cross-platform $HOME / $XDG_CONFIG_HOME / %APPDATA% resolution.
dirs               = { workspace = true }
# Session-id generation for the provenance log (`docs/PROVENANCE_LOG.md` §3
# requires a 26-char ULID per process invocation).
ulid               = { workspace = true }
# URL parsing for the source-base env-var overrides
# (`DOIGET_ARXIV_BASE` / `DOIGET_CROSSREF_BASE` / `DOIGET_UNPAYWALL_BASE`).
url                = { workspace = true }
# Production dep: the orchestrator stages PDF bytes to a tempfile so the
# existing `Store::write(_, _, Some(&Utf8Path))` atomic-rename code path
# applies (Source impls return `Bytes`, Store takes a path).
tempfile           = { workspace = true }

[dev-dependencies]
assert_cmd = { workspace = true }
predicates = { workspace = true }
# Wiremock-driven integration tests for the `doiget fetch` orchestrator
# (`tests/fetch_arxiv_e2e.rs`). The network-purity guard in CI relies on
# all integration tests using wiremock instead of real upstream hosts.
wiremock    = { workspace = true }
# Serializes tests that mutate process-global env state — used by the
# `fetch_arxiv_e2e` test and `doiget config` tests.
serial_test = "3"
