[package]
name = "mockforge-collab"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
documentation.workspace = true
readme = "README.md"
keywords.workspace = true
categories.workspace = true
description = "Cloud collaboration features for MockForge - team workspaces, real-time sync, and version control"
include = ["src/**/*", "migrations/**/*", ".sqlx/**/*", ".cargo/**/*", "build.rs", "Cargo.toml", "README.md", "LICENSE-*"]

[lints]
workspace = true

[dependencies]
# Core dependencies
mockforge-core = { version = "0.3.70", path = "../mockforge-core" }
mockforge-foundation = { version = "0.3.194", path = "../mockforge-foundation" }
mockforge-intelligence = { version = "0.3.194", path = "../mockforge-intelligence" }
mockforge-pipelines = { version = "0.3.70", path = "../mockforge-pipelines", optional = true }

# Serialization
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = { workspace = true }

# Async runtime
tokio = { workspace = true, features = ["full"] }
futures = { workspace = true }
async-trait = { workspace = true }

# Logging
tracing = { workspace = true }

# HTTP/web framework for collaboration API
axum = { workspace = true, features = ["ws", "macros"] }
tower = { workspace = true }
tower-http = { workspace = true, features = ["cors", "trace"] }
reqwest = { workspace = true }

# WebSocket for real-time sync
tokio-tungstenite = "0.24"

# Error handling
thiserror = { workspace = true }
anyhow = { workspace = true }

# Utility libraries
uuid = { workspace = true, features = ["v4", "serde"] }
chrono = { workspace = true, features = ["serde"] }
url = { workspace = true }

# Authentication & authorization
jsonwebtoken = { workspace = true }
argon2 = { workspace = true }
blake3 = { workspace = true }

# Database for persistence (SQLite for self-hosted, PostgreSQL support)
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "sqlite", "postgres", "chrono", "uuid", "json", "migrate"] }

# Concurrency
parking_lot = { workspace = true }
dashmap = "6.2"

# Conflict resolution
similar = "2.6"

# Hashing for state snapshots
sha2 = "0.10"

# Azure Storage support (optional)
# Using 0.21.x for azure_storage/blobs to match azure_identity 0.21.x (both use azure_core 0.21)
azure_storage = { version = "0.21", optional = true }
azure_storage_blobs = { version = "0.21", optional = true }
azure_identity = { version = "0.21", optional = true }

# Google Cloud Storage support (optional)
# Updated to 1.5.0 for latest API compatibility
google-cloud-storage = { version = "1.12", optional = true }
bytes = { workspace = true, optional = true }

# AWS S3 support (optional)
aws-sdk-s3 = { version = "1", optional = true }
aws-config = { version = "1", optional = true }

[dev-dependencies]
tokio = { workspace = true, features = ["test-util", "macros"] }
tempfile = "3.27"
tower = { workspace = true, features = ["util"] }
hyper = { workspace = true, features = ["client", "http1"] }
axum-test = "16.0"

[features]
default = ["sqlite"]
sqlite = []
postgres = []
cloud = []
azure = ["azure_storage", "azure_storage_blobs", "azure_identity"]
gcs = ["google-cloud-storage", "bytes"]
s3 = ["aws-sdk-s3", "aws-config"]
pipelines = ["mockforge-pipelines"]
