Files
asepharyana 763a641593
Deploy Scraper / build-and-deploy (push) Canceled after 0s
feat(downloader): add 26 downloader APIs + detect endpoint
Port downloaders from Shirokami-API (Node.js):
- Instagram/Facebook (snapsave.app, downr.org fallback)
- TikTok (tikwm.com)
- YouTube MP4/MP3 (savetube.media, ydlp.yard.id)
- Spotify, Twitter/X (api.lrm.tube)
- Bilibili, Pinterest, MediaFire, Mega, TeraBox
- PixelDrain, Threads, DoodStream, KrakenFiles
- Danbooru, SoundCloud, Google Drive

Domain layer: DownloadResult + MediaItem entities
Application layer: 7 use-cases + detect_platform auto-detect
Infrastructure: DownloaderRepository (22 fetch functions)
Presentation: 21 handlers + DTO + OpenAPI schemas

Also: upgrade OpenTelemetry to 0.28 (axum 0.7 conflict resolution)
2026-09-01 00:54:06 +07:00

135 lines
4.4 KiB
TOML

[package]
name = "scraper-service"
version = "0.1.0"
edition = "2021"
description = "A batteries-included, production-ready Rust web framework built on Axum"
authors = ["Asep Haryana"]
license = "MIT"
repository = "https://github.com/MythEclipse/ultimate-asepharyana.tech"
keywords = ["web", "framework", "axum", "api", "rest"]
categories = ["web-programming::http-server", "web-programming::websocket"]
default-run = "scraper"
# Dependensi yang dibutuhkan saat aplikasi berjalan
[dependencies]
# Mytheclipse workspace (user's custom library). All crates are published on
# crates.io at 1.21.2 (incl. mytheclipse-queue + mytheclipse-tracing, the
# redis-0.32 cache fix), so the scraper tracks the released crates via
# version deps.
mytheclipse = { version = "1.21", features = ["full"] }
mytheclipse-cache = { version = "1.21", features = ["l2-redis", "cache-aside"] }
mytheclipse-config = { version = "1.21" }
mytheclipse-event = { version = "1.21" }
mytheclipse-queue = { version = "1.21", features = ["in-memory"] }
mytheclipse-tracing = { version = "1.21", features = ["env"] }
axum = { version = "0.8.8", features = ["ws", "multipart", "macros"] }
tokio = { version = "1.49.0", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
dotenvy = "0.15"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
anyhow = "1.0"
# sqlx removed - SeaORM uses it internally via sqlx-postgres feature
sea-orm = { version = "1.1.19", features = ["sqlx-postgres", "runtime-tokio-rustls", "macros", "with-chrono", "with-uuid"] }
uuid = { version = "1.10.0", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
futures = "0.3"
reqwest = { version = "0.12.28", features = ["json", "stream", "multipart"] }
http = "1.4.0"
async-trait = "0.1.89"
regex = "1.12.2"
urlencoding = "2.1"
url = "2.5.8"
base64 = "0.22"
cipher = "0.4"
aes = "0.8"
cbc = "0.1"
block-padding = "0.3"
hex = "0.4"
fastrand = "2.0"
tower-http = { version = "0.6.8", features = ["fs", "cors", "compression-gzip", "compression-br", "compression-zstd"] }
dashmap = "6.1"
deadpool-redis = { version = "0.22.1", features = ["serde"] }
rayon = "1.12"
scraper = "0.25.0"
flate2 = "1.1"
redis = { version = "0.32.7", features = ["tokio-rustls-comp", "safe_iterators"] }
thiserror = "2.0.18"
utoipa = { version = "5.0", features = ["axum_extras"] }
utoipa-swagger-ui = { version = "9.0", features = ["axum"] }
# OpenTelemetry metrics
opentelemetry = { version = "0.28", features = ["metrics"] }
opentelemetry_sdk = { version = "0.28", features = ["metrics", "rt-tokio"] }
opentelemetry-otlp = { version = "0.28", features = ["metrics"] }
# Dependensi yang hanya dibutuhkan untuk build script (build.rs)
# Dependensi yang hanya dibutuhkan untuk tes
[dev-dependencies]
sea-orm = { version = "1.1.19", features = ["sqlx-postgres", "runtime-tokio-rustls", "macros", "with-chrono", "with-uuid", "mock"] }
# Definisi targets secara eksplisit untuk menghindari peringatan cargo-chef (edition/plugin)
[lib]
name = "scraper_service"
path = "src/lib.rs"
[[bin]]
name = "scraper"
path = "src/main.rs"
[lints.rust]
unsafe_code = "forbid"
unused_variables = "deny"
unused_imports = "deny"
unused_must_use = "deny"
dead_code = "deny"
unused_mut = "deny"
unreachable_code = "deny"
trivial_casts = "deny"
trivial_numeric_casts = "deny"
explicit_outlives_requirements = "deny"
unused_labels = "deny"
unused_braces = "deny"
noop_method_call = "deny"
[lints.clippy]
unwrap_used = "warn"
expect_used = "warn"
panic = "deny"
todo = "deny"
unimplemented = "deny"
unnecessary_to_owned = "deny"
[features]
# default = ["ffmpeg"]
ffmpeg = []
# Profile optimasi untuk production - fokus pada performa runtime maksimal
[profile.release]
opt-level = 3 # Optimasi level maksimal
lto = "fat" # Full LTO untuk inlining maksimal dan binary optimal
codegen-units = 1 # Single codegen unit untuk optimasi maksimal (lebih lambat build, binary lebih cepat)
incremental = false # Disable incremental untuk optimasi penuh
debug = false # No debug info untuk binary lebih kecil
strip = true # Strip symbols untuk binary lebih kecil
panic = "abort" # Abort on panic (binary lebih kecil dan lebih cepat)
overflow-checks = false # Non-overflowing arithmetic for speed (disable in debug)
# Optimize dependencies too
[profile.dev]
opt-level = 0
[profile.bench]
opt-level = 3
lto = "fat"