# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "bestool"
version = "1.37.1"
authors = [
    "Félix Saparelli <felix@passcod.name>",
    "BES Developers <contact@bes.au>",
]
build = "build.rs"
exclude = [
    "release.toml",
    "update-usage.sh",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
default-run = "bestool"
description = "BES Deployment tooling"
readme = "README.md"
keywords = [
    "bes",
    "tamanu",
    "tupaia",
]
categories = ["command-line-utilities"]
license = "GPL-3.0-or-later"
repository = "https://github.com/beyondessential/bestool"
resolver = "2"

[package.metadata.binstall]
pkg-url = "https://tools.ops.tamanu.io/bestool/{ version }/{ target }/{ name }{ binary-ext }.tar.zst"
pkg-fmt = "tzstd"
bin-dir = "{ bin }{ binary-ext }"

[package.metadata.binstall.signing]
algorithm = "minisign"
pubkey = "RWS1KOzOdZegWyADv/mT0GoLELjY7esgGwjtDVPqt6yaf/Wk1u1ZUCIf"
file = "{ url }.minisig"

[features]
__canopy = ["dep:bestool-canopy"]
__iti = ["dep:zmq"]
__tamanu = [
    "dep:bestool-tamanu",
    "dep:dirs",
    "dep:itertools",
    "dep:node-semver",
    "dep:regex",
]
alertd = [
    "dep:bestool-alertd",
    "dep:bestool-canopy",
]
alertd-tamanu = [
    "alertd",
    "tamanu-config",
    "dep:bestool-postgres",
    "bestool-tamanu/canopy-registration",
]
caddy = [
    "download",
    "dep:tera",
]
canopy = [
    "canopy-register",
    "canopy-export",
    "canopy-import",
    "canopy-tags",
    "canopy-backup",
    "canopy-restore",
]
canopy-backup = [
    "__canopy",
    "bestool-tamanu/canopy-registration",
    "dep:bestool-kopia",
    "bestool-kopia/proxy",
    "dep:bestool-postgres",
    "dep:axum",
    "dep:toml",
    "dep:notify",
    "dep:fs4",
]
canopy-export = [
    "__canopy",
    "dep:algae-cli",
    "dep:base64",
]
canopy-import = [
    "__canopy",
    "dep:algae-cli",
    "dep:base64",
]
canopy-register = [
    "__canopy",
    "dep:algae-cli",
    "dep:base64",
    "dep:bestool-tamanu",
    "bestool-tamanu/device-key",
    "bestool-tamanu/canopy-registration",
    "dep:p256",
]
canopy-restore = ["canopy-backup"]
canopy-tags = [
    "__canopy",
    "tamanu-config",
    "bestool-tamanu/canopy-registration",
    "dep:comfy-table",
    "dep:owo-colors",
]
completions = [
    "dep:clap_complete",
    "clap_complete/unstable-dynamic",
]
crypto = [
    "dep:algae-cli",
    "dep:blake3",
    "dep:merkle_hash",
]
default = [
    "alertd",
    "caddy",
    "canopy",
    "completions",
    "crypto",
    "kopia",
    "rdp",
    "self-update",
    "ssh",
    "tamanu",
]
download = [
    "dep:binstalk-downloader",
    "dep:detect-targets",
    "dep:hickory-resolver",
]
file = [
    "dep:blake3",
    "dep:indicatif",
    "dep:tokio-util",
]
iti = [
    "iti-battery",
    "iti-improv-wifi",
    "iti-lcd",
    "iti-temperature",
]
iti-battery = [
    "__iti",
    "dep:rppal",
]
iti-improv-wifi = [
    "__iti",
    "dep:improv-wifi",
    "dep:rppal",
]
iti-lcd = [
    "__iti",
    "dep:ctrlc",
    "dep:embedded-graphics",
    "dep:rpi-st7789v2-driver",
]
iti-temperature = [
    "__iti",
    "dep:duct",
]
kopia = [
    "dep:bestool-kopia",
    "bestool-kopia/cli",
    "dep:comfy-table",
]
notify = ["dep:notify"]
rdp = [
    "dep:duct",
    "dep:privilege",
    "dep:quick-xml",
    "dep:tauri-winrt-notification",
    "dep:windows-service",
]
self-update = [
    "download",
    "dep:minisign-verify",
    "dep:self-replace",
    "dep:semver",
    "dep:windows-env",
]
ssh = [
    "dep:dirs",
    "dep:duct",
    "dep:fs4",
    "dep:ssh-key",
    "dep:privilege",
    "dep:windows-acl",
]
tamanu = [
    "alertd-tamanu",
    "tamanu-artifacts",
    "tamanu-backup",
    "tamanu-backup-configs",
    "tamanu-config",
    "tamanu-url",
    "tamanu-doctor",
    "tamanu-download",
    "tamanu-find",
    "tamanu-lifecycle",
    "tamanu-logs",
    "tamanu-psql",
    "tamanu-sync",
    "tamanu-tags",
]
tamanu-artifacts = [
    "__tamanu",
    "dep:comfy-table",
    "dep:detect-targets",
    "dep:target-tuples",
]
tamanu-backup = [
    "__tamanu",
    "file",
    "tamanu-config",
    "dep:bestool-psql",
    "dep:algae-cli",
    "dep:duct",
]
tamanu-backup-configs = [
    "__tamanu",
    "tamanu-backup",
    "dep:walkdir",
    "dep:zip",
]
tamanu-config = ["__tamanu"]
tamanu-doctor = [
    "__tamanu",
    "tamanu-config",
    "dep:bestool-alertd",
    "bestool-tamanu/canopy-registration",
    "dep:bestool-canopy",
    "dep:bestool-postgres",
    "dep:bestool-psql",
    "dep:crossterm",
    "dep:owo-colors",
    "dep:p256",
    "dep:tokio-postgres",
]
tamanu-download = [
    "__tamanu",
    "download",
]
tamanu-find = ["__tamanu"]
tamanu-lifecycle = [
    "__tamanu",
    "tamanu-config",
    "dep:bestool-postgres",
    "dep:comfy-table",
    "dep:owo-colors",
    "dep:privilege",
]
tamanu-logs = [
    "__tamanu",
    "tamanu-config",
    "dep:bestool-postgres",
    "dep:owo-colors",
]
tamanu-psql = [
    "__tamanu",
    "tamanu-config",
    "dep:bestool-canopy",
    "bestool-tamanu/canopy-registration",
    "dep:bestool-psql",
]
tamanu-sync = [
    "__tamanu",
    "tamanu-config",
]
tamanu-tags = ["canopy-tags"]
tamanu-upgrade = []
tamanu-url = [
    "__tamanu",
    "tamanu-config",
    "dep:percent-encoding",
]
walg = []

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

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

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

[dependencies.algae-cli]
version = "1.1.6"
optional = true

[dependencies.axum]
version = "0.8.9"
optional = true

[dependencies.base64]
version = "0.22.1"
optional = true

[dependencies.bestool-alertd]
version = "15.0.2"
optional = true
default-features = false

[dependencies.bestool-canopy]
version = "0.4.3"
optional = true

[dependencies.bestool-kopia]
version = "0.3.4"
optional = true

[dependencies.bestool-postgres]
version = "1.1.0"
optional = true

[dependencies.bestool-psql]
version = "1.7.5"
optional = true
default-features = false

[dependencies.bestool-tamanu]
version = "0.14.2"
optional = true
default-features = false

[dependencies.binstalk-downloader]
version = "0.13.38"
features = ["hickory-dns"]
optional = true

[dependencies.blake3]
version = "1.8.5"
optional = true

[dependencies.boxcar]
version = "0.2.14"

[dependencies.bytes]
version = "1.10.0"

[dependencies.clap]
version = "4.6.1"
features = [
    "cargo",
    "derive",
    "wrap_help",
    "env",
    "unicode",
    "string",
]

[dependencies.clap-markdown]
version = "0.1.5"

[dependencies.clap_complete]
version = "4.6.3"
optional = true

[dependencies.comfy-table]
version = "7.2.0"
optional = true

[dependencies.crossterm]
version = "0.29.0"
optional = true

[dependencies.ctrlc]
version = "3.5.0"
optional = true

[dependencies.detect-targets]
version = "0.1.84"
optional = true

[dependencies.dirs]
version = "6.0.0"
optional = true

[dependencies.duct]
version = "1.1.0"
optional = true

[dependencies.embedded-graphics]
version = "0.8.1"
optional = true

[dependencies.fs4]
version = "1.1.0"
features = ["tokio"]
optional = true

[dependencies.futures]
version = "0.3.30"

[dependencies.glob]
version = "0.3.3"
optional = true

[dependencies.hickory-resolver]
version = "0.26.1"
optional = true

[dependencies.improv-wifi]
version = "0.1.2"
features = ["networkmanager"]
optional = true

[dependencies.indicatif]
version = "0.18.2"
features = ["tokio"]
optional = true

[dependencies.itertools]
version = "0.15.0"
optional = true

[dependencies.jiff]
version = "0.2.28"
features = ["serde"]

[dependencies.json5]
version = "1.3.0"
optional = true

[dependencies.leon]
version = "3.0.1"
optional = true

[dependencies.leon-macros]
version = "1.0.2"
optional = true

[dependencies.lloggs]
version = "1.1.0"

[dependencies.merkle_hash]
version = "3.8.0"
optional = true

[dependencies.miette]
version = "7.6.0"
features = ["fancy"]

[dependencies.mimalloc]
version = "0.1.50"

[dependencies.minisign-verify]
version = "0.2.5"
optional = true

[dependencies.node-semver]
version = "2.2.0"
optional = true

[dependencies.notify]
version = "8.2.0"
optional = true

[dependencies.owo-colors]
version = "4.2.3"
optional = true

[dependencies.p256]
version = "0.13.2"
features = [
    "pkcs8",
    "pem",
]
optional = true

[dependencies.percent-encoding]
version = "2.3.1"
optional = true

[dependencies.privilege]
version = "0.3.0"
optional = true

[dependencies.quick-xml]
version = "0.41.0"
features = ["serialize"]
optional = true

[dependencies.regex]
version = "1.11.2"
optional = true

[dependencies.reqwest]
version = "0.13.3"
features = [
    "json",
    "rustls",
]

[dependencies.rpi-st7789v2-driver]
version = "0.3.14"
features = ["miette"]
optional = true

[dependencies.rppal]
version = "0.22.1"
optional = true

[dependencies.self-replace]
version = "1.5.0"
optional = true

[dependencies.semver]
version = "1.0.28"
optional = true

[dependencies.serde]
version = "1.0.219"
features = ["derive"]

[dependencies.serde_json]
version = "1.0.143"

[dependencies.ssh-key]
version = "0.6.6"
optional = true

[dependencies.sysinfo]
version = "0.39.3"

[dependencies.target-tuples]
version = "0.16.1"
optional = true

[dependencies.tempfile]
version = "3.21.0"

[dependencies.tera]
version = "2.0.0"
optional = true

[dependencies.thiserror]
version = "2.0.16"

[dependencies.tokio]
version = "1.47.1"
features = ["full"]

[dependencies.tokio-postgres]
version = "0.7.17"
features = [
    "with-jiff-0_2",
    "with-uuid-1",
]
optional = true

[dependencies.tokio-util]
version = "0.7.16"
optional = true

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

[dependencies.tracing]
version = "0.1.43"
features = ["attributes"]

[dependencies.uuid]
version = "1.23.2"
features = ["v4"]

[dependencies.walkdir]
version = "2.5.0"
optional = true

[dependencies.zip]
version = "8.6.0"
features = ["time"]
optional = true
default-features = false

[dependencies.zmq]
version = "0.10.0"
optional = true

[dev-dependencies.age]
version = "0.11.3"
features = ["async"]

[dev-dependencies.jsonschema]
version = "0.46.5"
default-features = false

[dev-dependencies.minisign]
version = "0.9.1"

[dev-dependencies.trycmd]
version = "1.2.0"

[build-dependencies.windows_exe_info]
version = "0.5.2"
features = ["manifest"]

[target."cfg(windows)".dependencies.tauri-winrt-notification]
version = "0.7.2"
optional = true

[target."cfg(windows)".dependencies.windows-acl]
version = "0.3.0"
optional = true

[target."cfg(windows)".dependencies.windows-env]
version = "0.2.0"
optional = true

[target."cfg(windows)".dependencies.windows-service]
version = "0.8.0"
optional = true

[lints.rust]
unsafe_code = "forbid"

[lints.rust.rust_2018_idioms]
level = "deny"
priority = -1
