# 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 = "cdviz-collector"
version = "0.43.2"
build = false
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A service and CLI tool for collecting SDLC/CI/CD events and dispatching them as CDEvents"
homepage = "https://cdviz.dev"
readme = "README.md"
keywords = [
    "cd",
    "cdevents",
    "sdlc",
]
categories = []
license = "Apache-2.0"
repository = "https://github.com/cdviz-dev/cdviz-collector"

[package.metadata.cargo-machete]
ignored = ["humantime-serde"]

[features]
config_http = ["http_client"]
config_remote = ["dep:opendal"]
default = [
    "config_http",
    "config_remote",
    "parser_all",
    "sink_default",
    "source_default",
    "tool_transform",
    "transformer_vrl",
]
http_client = [
    "dep:async-trait",
    "dep:http",
    "dep:httpdate",
    "dep:reqwest",
    "dep:reqwest-middleware",
    "dep:reqwest-retry",
    "dep:reqwest-tracing",
    "reqwest/charset",
    "reqwest/http2",
    "reqwest/json",
    "reqwest/rustls",
]
parser_all = [
    "parser_csv_row",
    "parser_tap",
    "parser_xml",
    "parser_yaml",
]
parser_csv_row = ["dep:csv"]
parser_tap = [
    "dep:nom",
    "parser_yaml",
]
parser_xml = []
parser_yaml = ["dep:serde_yaml"]
reqwest-eventsource = [
    "dep:eventsource-stream",
    "dep:futures-core",
    "dep:futures-timer",
    "dep:mime",
    "dep:nom",
    "dep:pin-project-lite",
    "reqwest/stream",
]
sink_all = [
    "sink_clickhouse",
    "sink_db",
    "sink_folder",
    "sink_http",
    "sink_kafka",
    "sink_nats",
    "sink_sse",
]
sink_clickhouse = [
    "dep:clickhouse",
    "dep:retry-policies",
]
sink_db = [
    "dep:retry-policies",
    "dep:sqlx",
]
sink_default = [
    "sink_clickhouse",
    "sink_db",
    "sink_folder",
    "sink_http",
    "sink_nats",
    "sink_sse",
]
sink_folder = ["dep:opendal"]
sink_http = ["http_client"]
sink_kafka = ["dep:rdkafka"]
sink_nats = ["dep:async-nats"]
sink_sse = ["dep:tokio-stream"]
source_all = [
    "source_http_polling",
    "source_kafka",
    "source_nats",
    "source_opendal",
    "source_sse",
]
source_default = [
    "source_http_polling",
    "source_nats",
    "source_opendal",
    "source_sse",
]
source_http_polling = [
    "http_client",
    "transformer_vrl",
]
source_kafka = ["dep:rdkafka"]
source_nats = ["dep:async-nats"]
source_opendal = [
    "dep:bytes",
    "dep:opendal",
    "state",
]
source_sse = [
    "dep:uuid",
    "reqwest-eventsource",
]
state = ["dep:opendal"]
tool_transform = [
    "source_opendal",
    "tool_ui",
    "transformer_vrl",
]
tool_ui = [
    "dep:cliclack",
    "dep:console",
    "dep:similar",
]
transformer_vrl = ["dep:vrl"]

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

[[bin]]
name = "cdviz-collector"
path = "src/main.rs"
doc = false

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

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

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

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

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

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

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

[dependencies.async-nats]
version = "0.49"
optional = true

[dependencies.async-trait]
version = "0.1"
optional = true

[dependencies.axum]
version = "0.8"

[dependencies.axum-tracing-opentelemetry]
version = "0.38"

[dependencies.base64]
version = "0.22"

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

[dependencies.cdevents-sdk]
version = "0.4"
features = ["cloudevents"]

[dependencies.cid]
version = "0.11"

[dependencies.clap]
version = "4"
features = [
    "derive",
    "env",
]

[dependencies.clap-verbosity-flag]
version = "3"

[dependencies.clickhouse]
version = "0.15"
features = [
    "lz4",
    "rustls-tls",
]
optional = true
default-features = false

[dependencies.cliclack]
version = "0.5"
optional = true

[dependencies.cloudevents-sdk]
version = "0.9"
features = ["http-binding"]

[dependencies.console]
version = "0.16"
optional = true

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

[dependencies.derive_more]
version = "2"
features = [
    "debug",
    "display",
    "error",
    "from",
]

[dependencies.enum_dispatch]
version = "0.3"

[dependencies.eventsource-stream]
version = "0.2"
optional = true

[dependencies.faster-hex]
version = "0.10"

[dependencies.figment]
version = "0.10"
features = ["env"]

[dependencies.figment_file_provider_adapter]
version = "0.1"

[dependencies.futures]
version = "0.3"

[dependencies.futures-core]
version = "0.3"
optional = true

[dependencies.futures-timer]
version = "3"
optional = true

[dependencies.globset]
version = "0.4"

[dependencies.hmac]
version = "0.13"

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

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

[dependencies.humantime-serde]
version = "1"

[dependencies.indexmap]
version = "2"

[dependencies.init-tracing-opentelemetry]
version = "0.38"
features = [
    "logfmt",
    "otlp",
    "tracing_subscriber_ext",
]

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

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

[dependencies.mime]
version = "0.3"
optional = true

[dependencies.multihash]
version = "0.19"

[dependencies.nom]
version = "8"
optional = true

[dependencies.opendal]
version = "0.57"
features = [
    "auto-register-services",
    "services-fs",
    "services-gcs",
    "services-github",
    "services-http",
    "services-s3",
    "services-sftp",
]
optional = true
default-features = false

[dependencies.packageurl]
version = "0.6"

[dependencies.pin-project-lite]
version = "0.2"
optional = true

[dependencies.quick-xml-to-json]
version = "0.2"

[dependencies.rdkafka]
version = "0.39"
features = [
    "cmake-build",
    "curl-static",
    "libz-static",
    "ssl-vendored",
    "static-linking",
    "tokio",
]
optional = true
default-features = false

[dependencies.regex]
version = "1"

[dependencies.reqwest]
version = "0.13"
optional = true
default-features = false

[dependencies.reqwest-middleware]
version = "0.5"
features = ["json"]
optional = true

[dependencies.reqwest-retry]
version = "0.9"
optional = true

[dependencies.reqwest-tracing]
version = "0.7"
optional = true

[dependencies.retry-policies]
version = "0.5"
optional = true

[dependencies.secrecy]
version = "0.10"
features = ["serde"]

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

[dependencies.serde_json]
version = "1"

[dependencies.serde_with]
version = "3"

[dependencies.serde_yaml]
version = "0.9"
optional = true

[dependencies.sha2]
version = "0.11"

[dependencies.similar]
version = "3"
features = [
    "inline",
    "unicode",
]
optional = true

[dependencies.sqlx]
version = "0.9"
features = [
    "json",
    "macros",
    "postgres",
    "runtime-tokio",
    "time",
    "tls-rustls",
]
optional = true
default-features = false

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

[dependencies.tokio-stream]
version = "0.1"
features = ["sync"]
optional = true

[dependencies.tokio-util]
version = "0.7"

[dependencies.toml]
version = "1.0"

[dependencies.tower]
version = "0.5"
features = ["util"]

[dependencies.tower-http]
version = "0.7"
features = [
    "compression-full",
    "cors",
    "decompression-full",
    "sensitive-headers",
    "timeout",
    "validate-request",
]

[dependencies.tracing]
version = "0.1"

[dependencies.tracing-opentelemetry-instrumentation-sdk]
version = "0.38"

[dependencies.tracing-subscriber]
version = "0.3"
features = [
    "env-filter",
    "fmt",
]

[dependencies.url]
version = "2.5.7"

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

[dependencies.vrl]
version = "0.33"
features = [
    "compiler",
    "core",
    "diagnostic",
    "parser",
    "path",
    "stdlib",
    "value",
]
optional = true
default-features = false

[dev-dependencies.assert2]
version = "0.4"

[dev-dependencies.cdevents-sdk]
version = "0.4"
features = ["testkit"]

[dev-dependencies.figment]
version = "0.10"
features = [
    "env",
    "test",
]

[dev-dependencies.indoc]
version = "2"

[dev-dependencies.insta]
version = "1"
features = ["yaml"]

[dev-dependencies.pretty_assertions]
version = "1"

[dev-dependencies.proptest]
version = "1"

[dev-dependencies.rstest]
version = "0.26"

[dev-dependencies.tempfile]
version = "3"

[dev-dependencies.test-strategy]
version = "0.4"

[dev-dependencies.test-trace]
version = "0.3"

[dev-dependencies.testcontainers]
version = "0.27"

[dev-dependencies.tower]
version = "0.5"
features = ["util"]

[dev-dependencies.wiremock]
version = "0.6"

[target.'cfg(all(target_env = "musl", target_pointer_width = "64"))'.dependencies.jemallocator]
version = "0.5"

[lints.clippy]
dbg_macro = "warn"
decimal_literal_representation = "warn"
expect_used = "warn"
if_then_some_else_none = "warn"
indexing_slicing = "allow"
large_include_file = "warn"
module_name_repetitions = "allow"
print_stderr = "warn"
print_stdout = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
undocumented_unsafe_blocks = "deny"
unnecessary_safety_doc = "warn"
unwrap_used = "warn"

[lints.clippy.cargo]
level = "allow"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.clippy.perf]
level = "warn"
priority = -1

[lints.rust]
deprecated = "warn"
missing_docs = "allow"
unsafe_code = "forbid"
warnings = "deny"

[profile.dist]
inherits = "release"

[profile.release]
lto = "thin"
codegen-units = 1
strip = "symbols"
