mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
2a24da517f
* Add S3 Cloud Sync design document Design for adding AWS S3 as a new Cloud Sync backend alongside WebDAV. Hybrid approach: extract shared sync protocol, add independent S3 transport. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add S3 cloud sync implementation design (reqwest + Sig V4) Updated design based on 2026-03-06 draft: switches from rust-s3 crate to hand-rolled AWS Sig V4 on existing reqwest for broader S3-compatible service support (AWS, MinIO, R2, Alibaba OSS, Tencent COS, Huawei OBS). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add S3 cloud sync implementation plan (11 tasks, TDD) Detailed step-by-step plan covering: sync_protocol extraction, S3 Sig V4 transport, settings, sync/auto-sync modules, Tauri commands, frontend presets/dynamic form, and i18n. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * deps: add hmac crate for S3 Sig V4 signing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: extract sync_protocol.rs from webdav_sync.rs for shared use Move transport-agnostic sync protocol logic (constants, types, snapshot building, manifest validation, artifact verification, snapshot application, utilities) into a new shared sync_protocol module so both WebDAV and the upcoming S3 transport can reuse it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: use transport-neutral error keys in sync_protocol Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add S3 transport layer with AWS Sig V4 signing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add S3SyncSettings to AppSettings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add S3 sync module with upload/download/fetch Implements the S3 sync protocol layer (s3_sync.rs) that combines the shared sync_protocol with the S3 transport. Mirrors the WebDAV sync module structure with independent sync mutex, connection check, upload, download, fetch_remote_info, and sync status persistence. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add S3 auto sync worker with debounce Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add S3 sync Tauri commands and auto sync worker startup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add S3 sync TypeScript types and API layer Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add S3 sync i18n translations (en/zh/ja) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add S3 sync presets and dynamic form to sync settings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: preserve HTTP scheme for S3 custom endpoints (MinIO support) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test: add live S3 integration tests (env-var driven, --ignored) Run with: S3_TEST_AK=... S3_TEST_SK=... S3_TEST_BUCKET=... cargo test --lib services::s3::integration_tests -- --ignored Verifies test_connection, put_object, get_object, head_object, and 404 handling against a real S3 bucket using the project's own Sig V4 signing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: remove internal design docs before PR * fix: wire S3 auto-sync to DB hook & sync UI state on async load - P1: Add s3_auto_sync::notify_db_changed call in SQLite update_hook so S3 auto-sync worker receives DB change signals (was only wired for WebDAV, leaving S3 worker idle) - P2: Add useEffect to update syncType selector when s3Config loads asynchronously, preventing stale "webdav" default for S3 users * fix: satisfy clippy for s3 sync * fix: address s3 sync review feedback --------- Co-authored-by: Keith (via OpenClaw) <keithyt06@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Jason <farion1231@gmail.com>
110 lines
3.1 KiB
TOML
110 lines
3.1 KiB
TOML
[package]
|
||
name = "cc-switch"
|
||
version = "3.16.1"
|
||
description = "All-in-One Assistant for Claude Code, Codex & Gemini CLI"
|
||
authors = ["Jason Young"]
|
||
license = "MIT"
|
||
repository = "https://github.com/farion1231/cc-switch"
|
||
edition = "2021"
|
||
rust-version = "1.85.0"
|
||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||
|
||
[lib]
|
||
name = "cc_switch_lib"
|
||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||
doctest = false
|
||
|
||
[features]
|
||
default = []
|
||
test-hooks = []
|
||
|
||
[build-dependencies]
|
||
tauri-build = { version = "2.4.0", features = [] }
|
||
|
||
[dependencies]
|
||
serde_json = { version = "1.0", features = ["preserve_order"] }
|
||
serde = { version = "1.0", features = ["derive"] }
|
||
log = "0.4"
|
||
chrono = { version = "0.4", features = ["serde"] }
|
||
tauri = { version = "2.8.2", features = ["tray-icon", "protocol-asset", "image-png"] }
|
||
tauri-plugin-log = "2"
|
||
tauri-plugin-opener = "2"
|
||
tauri-plugin-process = "2"
|
||
tauri-plugin-updater = "2"
|
||
tauri-plugin-dialog = "2"
|
||
tauri-plugin-store = "2"
|
||
tauri-plugin-deep-link = "2"
|
||
tauri-plugin-window-state = "2"
|
||
dirs = "5.0"
|
||
toml = "0.8"
|
||
toml_edit = "0.22"
|
||
reqwest = { version = "0.12", features = ["rustls-tls", "json", "stream", "socks"] }
|
||
arboard = "3.6"
|
||
flate2 = "1"
|
||
brotli = "7"
|
||
tokio = { version = "1", features = ["macros", "rt-multi-thread", "time", "sync"] }
|
||
futures = "0.3"
|
||
async-stream = "0.3"
|
||
bytes = "1.5"
|
||
axum = "0.7"
|
||
tower = "0.4"
|
||
tower-http = { version = "0.5", features = ["cors"] }
|
||
hyper = { version = "1.0", features = ["full"] }
|
||
hyper-util = { version = "0.1", features = ["tokio", "http1", "client-legacy"] }
|
||
hyper-rustls = { version = "0.27", features = ["http1", "tls12", "ring", "webpki-tokio"] }
|
||
http = "1"
|
||
http-body = "1"
|
||
http-body-util = "0.1"
|
||
httparse = "1"
|
||
tokio-rustls = "0.26"
|
||
rustls = "0.23"
|
||
webpki-roots = "0.26"
|
||
rustls-native-certs = "0.8"
|
||
regex = "1.10"
|
||
rquickjs = { version = "0.8", features = ["array-buffer", "classes"] }
|
||
thiserror = "2.0"
|
||
anyhow = "1.0"
|
||
zip = "2.2"
|
||
serde_yaml = "0.9"
|
||
tempfile = "3"
|
||
url = "2.5"
|
||
auto-launch = "0.5"
|
||
once_cell = "1.21.3"
|
||
base64 = "0.22"
|
||
rusqlite = { version = "0.31", features = ["bundled", "backup", "hooks"] }
|
||
indexmap = { version = "2", features = ["serde"] }
|
||
rust_decimal = "1.33"
|
||
uuid = { version = "1.11", features = ["v4"] }
|
||
sha2 = "0.10"
|
||
hmac = "0.12"
|
||
json5 = "0.4"
|
||
json-five = "0.3.1"
|
||
|
||
[target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))'.dependencies]
|
||
tauri-plugin-single-instance = "2"
|
||
|
||
[target.'cfg(target_os = "linux")'.dependencies]
|
||
webkit2gtk = { version = "2.0.1", features = ["v2_16"] }
|
||
|
||
[target.'cfg(target_os = "windows")'.dependencies]
|
||
winreg = "0.52"
|
||
windows-sys = { version = "0.61", features = ["Win32_Globalization"] }
|
||
|
||
[target.'cfg(target_os = "macos")'.dependencies]
|
||
objc2 = "0.5"
|
||
objc2-app-kit = { version = "0.2", features = ["NSColor"] }
|
||
|
||
# Optimize release binary size to help reduce AppImage footprint
|
||
[profile.release]
|
||
codegen-units = 1
|
||
lto = "thin"
|
||
opt-level = "s"
|
||
# 使用 unwind 以便 panic hook 能捕获 backtrace(abort 会直接终止无法捕获)
|
||
panic = "unwind"
|
||
strip = "symbols"
|
||
|
||
[dev-dependencies]
|
||
serial_test = "3"
|
||
tempfile = "3"
|