0dcb783e94
- Server: POST /api/analytics endpoint with per-IP rate limit (5/min), batch validation (≤50 events, event_type regex, UUID dedup, clock check), INSERT OR IGNORE for idempotency, and migration 004_analytics.sql - Client (solitaire_data): AnalyticsClient with in-memory Mutex buffer, UUID session_id per launch, async flush via background task - Engine: AnalyticsPlugin records game_won, game_forfeit, game_start, achievement_unlocked; flushes immediately on game-end, every 60 s otherwise - Settings UI: Privacy section with ON/OFF toggle, hidden in local-only mode - Default: analytics_enabled = false (explicit opt-in required) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 lines
1.7 KiB
TOML
45 lines
1.7 KiB
TOML
[package]
|
|
name = "solitaire_data"
|
|
version.workspace = true
|
|
license.workspace = true
|
|
edition.workspace = true
|
|
|
|
[dependencies]
|
|
solitaire_core = { workspace = true }
|
|
solitaire_sync = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
chrono = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
async-trait = { workspace = true }
|
|
dirs = { workspace = true }
|
|
reqwest = { workspace = true }
|
|
tokio = { workspace = true }
|
|
uuid = { workspace = true }
|
|
|
|
# `keyring-core` is the typed Entry/Error API used by
|
|
# `auth_tokens`. The crate's own dependency tree pulls in
|
|
# `rpassword` which uses `libc::__errno_location` — a symbol the
|
|
# Android NDK doesn't expose (`__errno` lives at a different path
|
|
# on bionic). On Android `auth_tokens` falls back to a stub
|
|
# implementation that always returns `KeychainUnavailable`; the
|
|
# real backend lands when we wire Android Keystore via JNI.
|
|
[target.'cfg(not(target_os = "android"))'.dependencies]
|
|
keyring-core = { workspace = true }
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
jni = { workspace = true }
|
|
# android_keystore.rs uses bevy::android::ANDROID_APP to obtain the
|
|
# process-wide JavaVM handle for JNI. Must be listed here so the
|
|
# symbol resolves when cross-compiling for Android targets.
|
|
bevy = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
solitaire_server = { path = "../solitaire_server" }
|
|
solitaire_sync = { workspace = true }
|
|
axum = { workspace = true }
|
|
sqlx = { workspace = true }
|
|
jsonwebtoken = { workspace = true }
|
|
uuid = { workspace = true }
|
|
chrono = { workspace = true }
|