108 Commits

Author SHA1 Message Date
3bdca1b8ed fix(deps): update all dependencies
Some checks failed
renovate/artifacts Artifact file update failure
2026-03-16 04:56:24 +00:00
a4f583b6de fix(deps): update rust crate tracing-subscriber to v0.3.23 2026-03-14 02:12:21 +00:00
12bab19c43 fix(deps): update rust crate futures to v0.3.32 2026-02-16 01:55:26 +00:00
dcf0b20b69 fix(deps): update rust crate tracing to v0.1.44 2025-12-19 02:09:51 +00:00
b91ea50200 fix(deps): update tokio-tracing monorepo 2025-11-29 02:03:39 +00:00
e12d17608f fix(deps): update rust crate tracing-subscriber to v0.3.20 2025-11-13 02:42:11 +00:00
2b3b4bc38c fix(deps): update rust crate serde to v1.0.218
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-02-20 06:17:31 +00:00
50e9394961 chore(deps): update react monorepo
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-02-18 02:13:37 +00:00
103b26c6ad chore(deps): update dependency @types/react to v19.0.9
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-02-17 02:02:45 +00:00
480b6ae220 chore(deps): update dependency @types/react to v19.0.8
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-01-24 02:22:24 +00:00
482893c4a3 chore(deps): update dependency @types/react to v19.0.7
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-01-15 02:18:30 +00:00
0cee1860b4 chore(deps): update react monorepo
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-01-13 02:07:47 +00:00
cee9bb5879 chore(deps): update dependency @types/react to v19.0.4
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-01-09 02:09:45 +00:00
e5b72484ad chore(deps): update dependency @types/react to v19.0.3
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2025-01-07 02:03:50 +00:00
96c4ffface fix(deps): update rust crate serde to v1.0.217
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-12-28 02:05:22 +00:00
a1aef0ce4c chore(deps): update dependency @types/react to v19.0.2
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-12-19 02:04:44 +00:00
157ec7ac1a fix(deps): update rust crate serde to v1.0.216
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-12-11 02:24:15 +00:00
f5fde5d87a chore(deps): update dependency @types/react-dom to v19.0.2
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-12-10 02:01:36 +00:00
781063c813 chore(deps): update react monorepo to v19.0.1
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-12-07 02:11:22 +00:00
c8ff0de4e7 chore(deps): update react monorepo to v19
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-12-06 02:23:58 +00:00
86edbb571e chore(deps): update dependency @types/react to v18.3.13
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-12-05 02:09:32 +00:00
86264e3f83 fix(deps): update rust crate tracing-subscriber to v0.3.19
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-11-30 02:43:04 +00:00
2b67704175 fix(deps): update rust crate tracing to v0.1.41
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-11-28 02:14:18 +00:00
e307d3c5ba fix(deps): update rust crate serde to v1.0.215
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-11-12 01:55:54 +00:00
3db5a22d74 fix(deps): update rust crate serde to v1.0.214
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-10-29 02:15:14 +00:00
f1ff03045d chore(deps): update dependency @types/react to v18.3.12
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-10-23 05:19:20 +00:00
f6d816f224 fix(deps): update rust crate serde to v1.0.213
Some checks are pending
continuous-integration/drone/pr Build is running
continuous-integration/drone/push Build is pending
2024-10-23 01:19:45 +00:00
ed110d3b4a chore(deps): update dependency @types/react-dom to v18.3.1
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-10-12 01:01:33 +00:00
a034578c0f fix(deps): update rust crate futures to v0.3.31
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2024-10-06 00:58:31 +00:00
644c169d44 chore(deps): update dependency @types/react to v18.3.11
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-10-03 01:09:08 +00:00
47a3f27f8a chore(deps): update dependency @types/react to v18.3.10
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-09-28 01:13:29 +00:00
123b7daccc chore(deps): update dependency @types/react to v18.3.9
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2024-09-25 01:08:58 +00:00
29b371f20e chore(deps): update dependency @types/react to v18.3.8
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-09-20 01:32:26 +00:00
c3a0c5355d chore(deps): update dependency @types/react to v18.3.7
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-09-18 01:07:21 +00:00
0d313f846b chore(deps): update dependency @types/react to v18.3.6
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-09-17 01:01:47 +00:00
e996c59934 fix(deps): update rust crate serde to v1.0.210
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-09-07 01:03:39 +00:00
8cbcbaf373 chore(deps): update dependency @types/react to v18.3.5
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-08-30 10:52:57 +00:00
3882dae5ec fix(deps): update rust crate serde to v1.0.209
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-08-24 04:49:46 +00:00
c2763c6429 fix(deps): update rust crate serde to v1.0.208
Some checks failed
continuous-integration/drone/push Build is failing
2024-08-21 23:59:33 +02:00
334243f1e4 chore(deps): update dependency @types/react to v18.3.4
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-08-21 21:39:10 +00:00
6ae00a1d3a chore(deps): update dependency @types/react to v18.3.3
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-05-25 18:53:49 +00:00
a245b98e32 fix(deps): update rust crate serde to v1.0.203
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-05-25 18:20:03 +00:00
734b5fd91f chore(deps): update dependency @types/react to v18.3.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-05-11 11:03:11 +00:00
7d0fc29984 chore(deps): update dependency @types/react to v18.3.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-26 21:31:57 +00:00
00c486c40d fix(deps): update react monorepo to v18.3.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-26 17:03:54 +00:00
7b102fc1a5 chore(deps): update react monorepo to v18.3.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-25 20:31:37 +00:00
ff3260c08b fix(deps): update react monorepo to v18.3.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-25 16:59:46 +00:00
4ac34bca6f chore(deps): update dependency @types/react to v18.2.79
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-15 22:35:33 +00:00
51800eb11f chore(deps): update dependency @types/react to v18.2.78
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-13 09:57:30 +00:00
9596d0859c chore(deps): update dependency @types/react to v18.2.77
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-11 21:43:41 +00:00
03c79d5190 chore(deps): update react monorepo
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-11 17:41:45 +00:00
dc446ec217 fix(deps): update rust crate futures to 0.3.30
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-10 19:45:09 +00:00
e4b4293f2b chore(deps): update react monorepo
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-10 19:13:25 +00:00
74ea9ddf79 feat: update
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-04-10 20:50:48 +02:00
ec8d0b5ebc feat: update
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-04-10 20:34:56 +02:00
15dd5ce45e feat: update scel
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-04-10 20:34:45 +02:00
13321a44a2 Update dependency @types/react to v18.2.20
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-08-09 19:24:06 +00:00
24b9ab97b5 Update dependency @types/react to v18.2.19
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-08-08 06:53:34 +00:00
39416042ba Update dependency @types/react to v18.2.18
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-07-31 21:04:27 +00:00
5d7539b72d Update dependency @types/react to v18.2.17
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-07-26 18:26:29 +00:00
1953a5b467 Update dependency @types/react to v18.2.16
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-07-24 22:06:49 +00:00
22e8466e3b Update react monorepo
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-07-23 11:03:57 +00:00
82eb9894d7 Merge pull request 'Update dependency @types/react to v18.2.14' (#45) from renovate/react-monorepo into main
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-23 19:27:07 +00:00
a843fbfa04 Merge pull request 'Update react monorepo' (#44) from renovate/react-monorepo into main
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 13:21:34 +00:00
95007ee15b Update dependency @types/react to v18.2.6
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-05-06 11:46:55 +00:00
49ea2bb3a4 Update dependency @types/react-dom to v18.2.4
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-05-05 15:46:40 +00:00
b20574bf6c Update dependency @types/react to v18.2.5
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-05-04 19:10:12 +00:00
650a3b05c2 Update dependency @types/react to v18.2.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-05-03 20:43:01 +00:00
15a72ace70 Update dependency @types/react-dom to v18.2.3
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-05-03 19:48:11 +00:00
86dd72b71a Update react monorepo
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-05-03 16:43:01 +00:00
bbb037ee71 Update react monorepo
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-04-26 20:18:49 +00:00
1e824b0692 Update dependency @types/react to v18.0.38
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-04-21 20:38:57 +00:00
7e18f95026 Update dependency @types/react to v18.0.37
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-04-17 17:15:24 +00:00
989ca5df21 Update dependency @types/react to v18.0.35
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-04-12 15:36:22 +00:00
f571c724dc Update dependency @types/react to v18.0.34
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-04-10 11:24:59 +00:00
82e9bec7c9 Update dependency @types/react to v18.0.32
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-04-02 19:26:35 +00:00
aa992b7e3e Update Rust crate futures to 0.3.28
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-03-30 17:40:15 +00:00
3c77241c93 Update dependency @types/react to v18.0.31
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-03-28 22:20:44 +00:00
a7ca61a086 Update dependency @types/react to v18.0.30
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-03-27 19:14:26 +00:00
484d5b4119 Update react monorepo
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-03-11 16:48:39 +00:00
9a15b512fc Update Rust crate futures to 0.3.27
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-03-11 16:27:08 +00:00
02dbc498ae Update Rust crate futures to 0.3.26
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-01-30 16:26:20 +00:00
1275ac07fd Update Rust crate serde_json to 1.0.89
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2022-11-22 14:40:07 +00:00
a1e9f31dc2 Update Rust crate tokio to 1.22
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-11-18 21:47:30 +00:00
34e009e53c Update Rust crate serde_json to 1.0.88
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-11-18 14:25:56 +00:00
a3a10e7f35 Update dependency typescript to v4.9.3
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-11-15 19:02:06 +00:00
8fca3e147f Update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-11-15 17:19:51 +00:00
120a1ae223 Update dependency vite to v3.2.3
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-11-07 08:36:27 +00:00
cbaa6b9e8d Update Rust crate regex to 1.7.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-11-05 19:57:53 +00:00
502bb26b90 Update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-11-04 19:50:36 +00:00
bf7675d20b Update dependency vite to v3.2.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-10-31 18:26:23 +00:00
edce6fa0ac Update dependency vite to v3.2.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-10-28 09:50:22 +00:00
2cf4169542 Update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-10-27 20:45:20 +00:00
44b0f32a9b Update Rust crate futures to 0.3.25
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-10-27 20:28:56 +00:00
c18db07cba Merge pull request 'Pin dependencies' (#13) from renovate/all into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: https://git.front.kjuulh.io/kjuulh/scel/pulls/13
2022-10-27 20:18:54 +00:00
4df964f023 only push
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2022-10-27 22:14:58 +02:00
adab603511 Pin dependencies
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
2022-10-27 20:12:46 +00:00
b70cf5e25d Merge pull request 'Configure Renovate' (#3) from renovate/configure into main
Some checks failed
continuous-integration/drone Build was killed
Reviewed-on: https://git.front.kjuulh.io/kjuulh/scel/pulls/3
2022-10-25 20:59:50 +00:00
11f02eba00 Add renovate.json 2022-10-25 20:59:30 +00:00
5f90d663cf Add docker for web
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-18 23:12:01 +02:00
ea61ba9ed7 Add web 2022-07-18 22:57:33 +02:00
86cc2ea889 add cors
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-18 14:04:13 +02:00
5aecf1ef26 allow telegram on failure
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-18 13:53:47 +02:00
085fc3b179 set localhost to public
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-18 13:42:20 +02:00
66358bdd05 set localhost to public
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2022-07-18 13:40:17 +02:00
2608b10efa Without env
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-18 13:33:27 +02:00
92ce57dc60 With auto_tag
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-18 13:31:50 +02:00
05745f51ad 07-17-remove_ticker (#2)
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: https://git.front.kjuulh.io/kjuulh/scel/pulls/2
2022-07-18 13:17:02 +02:00
51 changed files with 3331 additions and 622 deletions

4
.dockerignore Normal file
View File

@@ -0,0 +1,4 @@
target/
.git/
.env
data/

2
.drone.yml Normal file
View File

@@ -0,0 +1,2 @@
kind: template
load: cuddle-rust-service-plan.yaml

1
.gitignore vendored
View File

@@ -1 +1,2 @@
target/ target/
.env

2320
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,2 @@
[workspace] [workspace]
members = ["crates/*"]
members = ["src/cmd/scel", "src/lib/scel_core", "src/lib/scel_api"]

31
Dockerfile Normal file
View File

@@ -0,0 +1,31 @@
FROM node:19-alpine as web_builder
WORKDIR /usr/src/scel/web
COPY src/web/ .
RUN --mount=type=cache,target=/usr/src/scel/web/dist yarn
RUN --mount=type=cache,target=/usr/src/scel/web/dist yarn build
FROM rust:1.65 as builder
WORKDIR /usr/src/scel
COPY . .
RUN --mount=type=cache,target=/usr/src/scel/target cargo build --release
RUN --mount=type=cache,target=/usr/src/scel/target cargo install --path src/cmd/scel
FROM debian:bullseye-slim
# Install YTD
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
apt-get update && apt-get install -y python3 python3-pip
RUN python3 -m pip install -U yt-dlp
# Copy binary
COPY --from=builder /usr/local/cargo/bin/scel /usr/local/bin/scel
COPY --from=web_builder /usr/src/scel/web/dist /src/web/dist
CMD ["scel"]

View File

@@ -6,10 +6,11 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
tokio = { version = "1.0", features = ["full"] } tokio = { version = "1.22", features = ["full"] }
tracing = "0.1" tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] } tracing-subscriber = { version = "0.3", features = ["env-filter"] }
anyhow = { version = "1.0.58" } anyhow = { version = "1.0.66" }
dotenv = { version = "*" }
scel_api = { path = "../../lib/scel_api" } scel_api = { path = "../scel_api" }
scel_core = { path = "../../lib/scel_core" } scel_core = { path = "../scel_core" }

28
crates/scel/src/main.rs Normal file
View File

@@ -0,0 +1,28 @@
use std::sync::Arc;
use dotenv::dotenv;
use scel_core::App;
use tracing::info;
use tracing_subscriber::{EnvFilter, FmtSubscriber};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
dotenv().ok();
let subscriber = FmtSubscriber::builder()
.with_env_filter(
EnvFilter::default()
.add_directive("tower_http=debug".parse().unwrap())
.add_directive("scel_api=info".parse().unwrap())
.add_directive("scel=info".parse().unwrap()),
)
.finish();
tracing::subscriber::set_global_default(subscriber)?;
info!("Starting scel");
let app = Arc::new(App::new());
scel_api::Server::new(app.clone()).start().await
}

View File

@@ -0,0 +1,33 @@
[package]
name = "scel_api"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
axum = { version = "0.5.17" }
axum-extra = { version = "0.3.7", features = ["spa"] }
futures = "0.3.30"
tower-http = { version = "0.6.0", features = ["cors", "trace"] }
async-graphql = { version = "7.0.0", features = [
'tracing',
'opentelemetry',
"log",
] }
async-graphql-axum = { version = "7.0.0" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.89"
tokio = { version = "1.22", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3" }
anyhow = { version = "1.0.66" }
oauth2 = { version = "*" }
async-session = { version = "*" }
reqwest = { version = "*", default-features = false, features = [
"rustls-tls",
"json",
] }
hyper = { version = "*" }
scel_core = { path = "../scel_core" }

View File

@@ -0,0 +1,99 @@
use std::env;
use async_session::{MemoryStore, Session, SessionStore};
use axum::{
extract::Query,
http::HeaderMap,
response::{IntoResponse, Redirect},
Extension,
};
use oauth2::{
basic::BasicClient, reqwest::async_http_client, AuthUrl, AuthorizationCode, ClientId,
ClientSecret, CsrfToken, RedirectUrl, TokenResponse, TokenUrl,
};
use reqwest::header::SET_COOKIE;
use serde::Deserialize;
use crate::{User, COOKIE_NAME};
pub fn oauth_client() -> BasicClient {
let client_id = env::var("GITEA_CLIENT_ID").expect("Missing GITEA_CLIENT_ID");
let client_secret = env::var("GITEA_CLIENT_SECRET").expect("Missing GITEA_CLIENT_SECRET");
let redirect_url = env::var("GITEA_REDIRECT_URL")
.unwrap_or_else(|_| "http://127.0.0.1:3000/auth/authorized".to_string());
let auth_url =
env::var("GITEA_AUTH_URL").unwrap_or_else(|_| "https://git.front.kjuulh.io".to_string());
let token_url =
env::var("GITEA_TOKEN_URL").unwrap_or_else(|_| "https://git.front.kjuulh.io".to_string());
BasicClient::new(
ClientId::new(client_id),
Some(ClientSecret::new(client_secret)),
AuthUrl::new(auth_url).expect("AuthUrl was invalid"),
Some(TokenUrl::new(token_url).expect("Token url was invalid")),
)
.set_redirect_uri(RedirectUrl::new(redirect_url).expect("RedirectUrl was invalid"))
}
pub async fn gitea(Extension(client): Extension<BasicClient>) -> impl IntoResponse {
let (auth_url, _crsf_token) = client.authorize_url(CsrfToken::new_random).url();
Redirect::to(&auth_url.to_string())
}
#[derive(Debug, Deserialize)]
pub struct AuthRequest {
code: String,
state: String,
}
pub async fn authorized(
Query(query): Query<AuthRequest>,
Extension(store): Extension<MemoryStore>,
Extension(oauth_client): Extension<BasicClient>,
) -> impl IntoResponse {
let token = oauth_client
.exchange_code(AuthorizationCode::new(query.code.clone()))
.request_async(async_http_client)
.await
.expect("failed to get http client");
let client = reqwest::Client::new();
let user_data_json = client
.get(get_gitea_user_data_url())
.bearer_auth(token.access_token().secret())
.send()
.await
.expect("Request did not succeed");
// .text()
// .await
// .unwrap();
let user_data: User = user_data_json
.json::<User>()
.await
.expect("could not parse user");
let mut session = Session::new();
session
.insert("user", &user_data)
.expect("could not insert user data");
let cookie = store
.store_session(session)
.await
.expect("could not insert session")
.expect("session was not valid");
let cookie = format!("{}={}; SameSite=Lax; Path=/", COOKIE_NAME, cookie);
let mut headers = HeaderMap::new();
headers.insert(SET_COOKIE, cookie.parse().expect("Cookie is not valid"));
(headers, Redirect::to("/"))
}
fn get_gitea_user_data_url() -> String {
env::var("GITEA_USER_INFO_URL").expect("Missing GITEA_USER_INFO_URL")
}

View File

@@ -0,0 +1,4 @@
pub mod mutation;
pub mod query;
pub mod schema;
pub mod subscription;

View File

@@ -0,0 +1,38 @@
use std::sync::Arc;
use async_graphql::{Context, Object, Result, SimpleObject, ID};
use scel_core::{services::Download, App};
pub struct MutationRoot;
#[derive(SimpleObject)]
struct RequestDownloadResponse {
id: ID,
}
#[Object]
impl MutationRoot {
async fn request_download(
&self,
ctx: &Context<'_>,
download_link: String,
) -> Result<RequestDownloadResponse> {
let app = ctx.data_unchecked::<Arc<App>>();
let download = app
.download_service
.clone()
.add_download(Download {
id: None,
link: download_link,
progress: None,
file_name: None,
})
.await
.unwrap();
Ok(RequestDownloadResponse {
id: download.id.unwrap().into(),
})
}
}

View File

@@ -0,0 +1,32 @@
use std::sync::Arc;
use async_graphql::{Context, Object, Result, SimpleObject, ID};
use scel_core::App;
#[derive(SimpleObject, Clone)]
pub struct Download {
pub id: ID,
pub link: String,
pub progress: Option<u32>,
pub file_name: Option<String>,
}
pub struct QueryRoot;
#[Object]
impl QueryRoot {
async fn get_download(&self, ctx: &Context<'_>, id: ID) -> Result<Option<Download>> {
let app = ctx.data_unchecked::<Arc<App>>();
match app.download_service.get_download(id.to_string()).await {
Ok(Some(d)) => Ok(Some(Download {
id: ID::from(d.id.expect("ID could not be found")),
progress: None,
link: d.link,
file_name: None,
})),
Ok(None) => Ok(None),
Err(e) => Err(e.into()),
}
}
}

View File

@@ -1,5 +1,5 @@
use async_graphql::Schema; use async_graphql::Schema;
use crate::{mutation::MutationRoot, query::QueryRoot, subscription::SubscriptionRoot}; use super::{mutation::MutationRoot, query::QueryRoot, subscription::SubscriptionRoot};
pub type ScelSchema = Schema<QueryRoot, MutationRoot, SubscriptionRoot>; pub type ScelSchema = Schema<QueryRoot, MutationRoot, SubscriptionRoot>;

View File

@@ -0,0 +1,49 @@
use std::sync::Arc;
use async_graphql::{
async_stream::stream, futures_util::Stream, Context, Object, Subscription, ID,
};
use scel_core::App;
use super::query::Download;
pub struct SubscriptionRoot;
struct DownloadChanged {
download: Download,
}
#[Object]
impl DownloadChanged {
async fn download(&self) -> Download {
self.download.clone()
}
}
#[Subscription]
impl SubscriptionRoot {
async fn get_download(&self, ctx: &Context<'_>, id: ID) -> impl Stream<Item = DownloadChanged> {
let app = ctx.data_unchecked::<Arc<App>>();
let mut stream = app
.download_service
.subscribe_download(id.to_string())
.await;
stream! {
while stream.changed().await.is_ok() {
let next_download = (*stream.borrow()).clone();
let id = ID::from(next_download.id.unwrap());
yield DownloadChanged {
download: Download {
id: id,
link: next_download.link,
file_name: next_download.file_name,
progress: next_download.progress,
}
}
}
}
}
}

173
crates/scel_api/src/lib.rs Normal file
View File

@@ -0,0 +1,173 @@
mod auth;
mod graphql;
use std::{io, net::SocketAddr, sync::Arc};
use async_graphql::{
extensions::{Logger, Tracing},
http::{playground_source, GraphQLPlaygroundConfig},
Request, Response, Schema,
};
use async_graphql_axum::GraphQLSubscription;
use async_session::{async_trait, MemoryStore, SessionStore};
use auth::{authorized, gitea};
use axum::{
extract::{rejection::TypedHeaderRejectionReason, FromRequest, RequestParts},
headers,
http::{header, Method},
response::{Html, IntoResponse, Redirect},
routing::{self, get_service},
Extension, Json, Router, TypedHeader,
};
use graphql::{
mutation::MutationRoot, query::QueryRoot, schema::ScelSchema, subscription::SubscriptionRoot,
};
use reqwest::StatusCode;
use scel_core::App;
use serde::{Deserialize, Serialize};
use tower_http::{
cors::CorsLayer,
services::ServeDir,
trace::{DefaultMakeSpan, TraceLayer},
};
async fn graphql_playground() -> impl IntoResponse {
Html(playground_source(
GraphQLPlaygroundConfig::new("/graphql").subscription_endpoint("/ws"),
))
}
async fn graphql_handler(
schema: Extension<ScelSchema>,
req: Json<Request>,
_: User,
) -> Json<Response> {
schema.execute(req.0).await.into()
}
pub struct Server {
app: Router,
addr: SocketAddr,
}
impl Server {
pub fn new(app: Arc<App>) -> Server {
let schema = Schema::build(QueryRoot, MutationRoot, SubscriptionRoot)
.extension(Tracing)
.extension(Logger)
.data(app)
.finish();
let cors = vec![
"http://localhost:3000"
.parse()
.expect("Could not parse url"),
"https://scel.front.kjuulh.io"
.parse()
.expect("Could not parse url"),
];
let api_router = Router::new()
.route(
"/graphql",
routing::get(graphql_playground).post(graphql_handler),
)
.route("/ws", GraphQLSubscription::new(schema.clone()))
.route("/auth/gitea", routing::get(gitea))
.route("/auth/authorized", routing::get(authorized))
// .merge(axum_extra::routing::SpaRouter::new(
// "/assets",
// "src/web/dist/assets",
// ))
.fallback(get_service(ServeDir::new("./src/web/dist/")).handle_error(handle_error))
.layer(Extension(schema))
.layer(Extension(MemoryStore::new()))
.layer(Extension(auth::oauth_client()))
.layer(
CorsLayer::new()
.allow_origin(cors)
.allow_headers([axum::http::header::CONTENT_TYPE])
.allow_methods([Method::GET, Method::POST, Method::OPTIONS]),
)
.layer(TraceLayer::new_for_http().make_span_with(DefaultMakeSpan::default()));
let app = Router::new().nest("/api", api_router);
let addr = SocketAddr::from(([0, 0, 0, 0], 3000));
Server { app, addr }
}
pub async fn start(self) -> anyhow::Result<()> {
tracing::info!("listening on {}", self.addr);
match axum::Server::bind(&self.addr)
.serve(self.app.into_make_service())
.await
{
Ok(_) => Ok(()),
Err(e) => Err(e.into()),
}
}
}
#[derive(Debug, Serialize, Deserialize)]
struct User {
#[serde(alias = "sub")]
id: String,
#[serde(alias = "picture")]
avatar: Option<String>,
#[serde(alias = "email")]
email: String,
#[serde(alias = "preferred_username")]
username: String,
}
struct AuthRedirect;
impl IntoResponse for AuthRedirect {
fn into_response(self) -> axum::response::Response {
Redirect::temporary("/auth/gitea").into_response()
}
}
const COOKIE_NAME: &str = "auth";
#[async_trait]
impl<B> FromRequest<B> for User
where
B: Send,
{
type Rejection = AuthRedirect;
async fn from_request(req: &mut RequestParts<B>) -> Result<Self, Self::Rejection> {
let Extension(store) = Extension::<MemoryStore>::from_request(req)
.await
.expect("MemoryStore extension is missing");
let cookies = TypedHeader::<headers::Cookie>::from_request(req)
.await
.map_err(|e| match *e.name() {
header::COOKIE => match e.reason() {
TypedHeaderRejectionReason::Missing => AuthRedirect,
_ => panic!("unexpected error getting Cookie header(s): {}", e),
},
_ => panic!("unexpected error getting cookies: {}", e),
})?;
let session_cookie = cookies.get(COOKIE_NAME).ok_or(AuthRedirect)?;
let session = store
.load_session(session_cookie.to_string())
.await
.expect("could not load session")
.ok_or(AuthRedirect)?;
let user = session.get::<User>("user").ok_or(AuthRedirect)?;
Ok(user)
}
}
async fn handle_error(_err: io::Error) -> impl IntoResponse {
(StatusCode::INTERNAL_SERVER_ERROR, "Something went wrong...")
}

View File

@@ -0,0 +1,17 @@
[package]
name = "scel_core"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tokio = { version = "1.22", features = ["full"] }
anyhow = { version = "*" }
async-trait = { version = "0.1.58" }
futures = "0.3.30"
tracing = "0.1"
lazy_static = "1.4.0"
regex = { version = "1.7.0" }
thiserror = "2.0.0"
uuid = {version = "1.2.2", features = ["v4", "fast-rng"]}

View File

@@ -0,0 +1,19 @@
use std::sync::Arc;
use services::InMemoryDownloadService;
pub mod services;
mod youtube;
#[allow(dead_code)]
pub struct App {
pub download_service: Arc<InMemoryDownloadService>,
}
impl App {
pub fn new() -> Self {
Self {
download_service: Arc::new(InMemoryDownloadService::new()),
}
}
}

View File

@@ -0,0 +1,3 @@
pub trait UsersRepo {
// add code here
}

View File

@@ -0,0 +1,128 @@
use std::{collections::HashMap, path::PathBuf, sync::Arc};
use tokio::sync::{watch, Mutex};
use tracing::error;
use uuid::Uuid;
use crate::youtube::{Arg, YoutubeDL};
#[derive(Clone)]
pub struct Download {
pub id: Option<String>,
pub link: String,
pub progress: Option<u32>,
pub file_name: Option<String>,
}
pub struct InMemoryDownloadService {
downloads: Mutex<
HashMap<
String,
(
Arc<Mutex<Download>>,
Arc<Mutex<tokio::sync::watch::Sender<Download>>>,
tokio::sync::watch::Receiver<Download>,
),
>,
>,
}
impl InMemoryDownloadService {
pub fn new() -> Self {
Self {
downloads: Mutex::new(HashMap::new()),
}
}
pub async fn add_download(self: Arc<Self>, download: Download) -> anyhow::Result<Download> {
let mut downloads = self.downloads.lock().await;
let (tx, rx) = watch::channel(download.clone());
let shared_tx = Arc::new(Mutex::new(tx));
let mut d = download.to_owned();
let id = Uuid::new_v4().to_string();
d.id = Some(id.clone());
downloads.insert(id.clone(), (Arc::new(Mutex::new(d.clone())), shared_tx, rx));
let args = vec![
Arg::new("--progress"),
Arg::new("--newline"),
Arg::new_with_args("--output", "%(title).90s.%(ext)s"),
];
let ytd = YoutubeDL::new(
&PathBuf::from("./data/downloads"),
args,
download.link.as_str(),
)?;
tokio::spawn({
let download_service = self.clone();
async move {
if let Err(e) = ytd
.download(
|percentage| {
let ds = download_service.clone();
let id = id.clone();
async move {
let mut download = ds.get_download(id).await.unwrap().unwrap();
download.progress = Some(percentage);
let _ = ds.update_download(download).await;
}
},
|file_name| {
let ds = download_service.clone();
let id = id.clone();
async move {
let mut download = ds.get_download(id).await.unwrap().unwrap();
download.file_name = Some(file_name);
let _ = ds.update_download(download).await;
}
},
)
.await
{
error!("Download failed: {}", e);
} else {
let download = download_service.get_download(id).await.unwrap().unwrap();
let _ = download_service.update_download(download).await;
}
}
});
Ok(d)
}
pub async fn update_download(self: Arc<Self>, download: Download) -> anyhow::Result<()> {
let mut downloads = self.downloads.lock().await;
if let Some(d) = downloads.get_mut(&download.clone().id.unwrap()) {
let mut d_mut = d.0.lock().await;
*d_mut = download.clone();
let _ = d.1.lock().await.send(download);
}
Ok(())
}
pub async fn get_download(&self, id: String) -> anyhow::Result<Option<Download>> {
let downloads = self.downloads.lock().await;
if let Some(d) = downloads.get(&id) {
let download = d.0.lock().await;
Ok(Some(download.clone()))
} else {
Ok(None)
}
}
pub async fn subscribe_download(&self, id: String) -> tokio::sync::watch::Receiver<Download> {
let downloads = self.downloads.lock().await;
let download = downloads.get(&id).unwrap();
download.2.clone()
}
}

View File

@@ -0,0 +1,256 @@
use std::fmt::{Display, Formatter};
use std::fs::{canonicalize, create_dir_all};
use std::future::Future;
use std::num::ParseIntError;
use std::path::{Path, PathBuf};
use std::process::{Output, Stdio};
use lazy_static::lazy_static;
use regex::Regex;
use thiserror::Error;
use tokio::io::{AsyncBufReadExt, BufReader};
use tokio::process::Command;
#[derive(Error, Debug)]
pub enum YoutubeDLError {
#[error("failed to execute youtube-dl")]
IOError(#[from] std::io::Error),
#[error("failed to convert path")]
UTF8Error(#[from] std::string::FromUtf8Error),
#[error("youtube-dl exited with: {0}")]
Failure(String),
}
type Result<T> = std::result::Result<T, YoutubeDLError>;
const YOUTUBE_DL_COMMAND: &str = "yt-dlp";
#[derive(Clone, Debug)]
pub struct Arg {
arg: String,
input: Option<String>,
}
impl Arg {
pub fn new(argument: &str) -> Self {
Self {
arg: argument.to_string(),
input: None,
}
}
pub fn new_with_args(argument: &str, input: &str) -> Self {
Self {
arg: argument.to_string(),
input: Option::from(input.to_string()),
}
}
}
impl Display for Arg {
fn fmt(&self, fmt: &mut Formatter<'_>) -> std::fmt::Result {
match &self.input {
Some(input) => write!(fmt, "{} {}", self.arg, input),
None => write!(fmt, "{}", self.arg),
}
}
}
#[derive(Clone, Debug)]
pub struct YoutubeDL {
path: PathBuf,
links: Vec<String>,
args: Vec<Arg>,
}
#[derive(Clone, Debug)]
pub struct YoutubeDLResult {
path: PathBuf,
output: String,
}
impl YoutubeDLResult {
fn new(path: &PathBuf) -> Self {
Self {
path: path.clone(),
output: String::new(),
}
}
pub fn output_dir(&self) -> &PathBuf {
&self.path
}
}
impl YoutubeDL {
pub fn new_multiple_links(
dl_path: &PathBuf,
args: Vec<Arg>,
links: Vec<String>,
) -> Result<YoutubeDL> {
let path = Path::new(dl_path);
if !path.exists() {
create_dir_all(&path)?;
}
if !path.is_dir() {
return Err(YoutubeDLError::IOError(std::io::Error::new(
std::io::ErrorKind::Other,
"path is not a directory",
)));
}
let path = canonicalize(dl_path)?;
Ok(YoutubeDL { path, links, args })
}
pub fn new(dl_path: &PathBuf, args: Vec<Arg>, link: &str) -> Result<YoutubeDL> {
YoutubeDL::new_multiple_links(dl_path, args, vec![link.to_string()])
}
pub async fn download<F, FutAvailable, FAvailable, Fut>(
&self,
progress_update_fn: F,
file_name_available: FAvailable,
) -> Result<YoutubeDLResult>
where
F: Fn(u32) -> Fut,
FAvailable: Fn(String) -> FutAvailable,
Fut: Future<Output = ()>,
FutAvailable: Future<Output = ()>,
{
let output = self
.spawn_youtube_dl(progress_update_fn, file_name_available)
.await?;
let mut result = YoutubeDLResult::new(&self.path);
if !output.status.success() {
return Err(YoutubeDLError::Failure(String::from_utf8(output.stderr)?));
}
result.output = String::from_utf8(output.stdout)?;
Ok(result)
}
async fn spawn_youtube_dl<F, FutAvailable, FAvailable, Fut>(
&self,
progress_update_fn: F,
file_name_available: FAvailable,
) -> Result<Output>
where
F: Fn(u32) -> Fut,
FAvailable: Fn(String) -> FutAvailable,
Fut: Future<Output = ()>,
FutAvailable: Future<Output = ()>,
{
let mut cmd = Command::new(YOUTUBE_DL_COMMAND);
cmd.current_dir(&self.path)
.env("LC_ALL", "en_US.UTF-8")
.stdout(Stdio::piped())
.stderr(Stdio::piped());
for arg in self.args.iter() {
match &arg.input {
Some(input) => cmd.arg(&arg.arg).arg(input),
None => cmd.arg(&arg.arg),
};
}
for link in self.links.iter() {
cmd.arg(&link);
}
let mut pr = cmd.spawn()?;
{
let stdout = pr.stdout.as_mut().unwrap();
let stdout_reader = BufReader::new(stdout);
let mut stdout_lines = stdout_reader.lines();
let mut have_gotten_file_name = false;
while let Ok(Some(line)) = stdout_lines.next_line().await {
println!("{}", line.clone());
if !have_gotten_file_name {
if let Some(file_name) = parse_file_name(line.clone()) {
file_name_available(file_name).await;
have_gotten_file_name = true
}
}
if let Some(Ok(percentage)) = parse_line(line) {
progress_update_fn(percentage).await;
}
}
}
Ok(pr.wait_with_output().await?)
}
}
fn parse_line(line: String) -> Option<core::result::Result<u32, ParseIntError>> {
lazy_static! {
static ref RE: Regex = Regex::new(r"\[download\]\s+(\d+)").unwrap();
}
let capture: regex::Captures = RE.captures(line.as_str())?;
if capture.len() != 2 {
return None;
}
let str = &capture[1];
Some(str.to_string().parse::<u32>())
}
fn parse_file_name(line: String) -> Option<String> {
lazy_static! {
static ref RE: Regex = Regex::new(r"^\[download\] Destination: (.+)$").unwrap();
}
let capture: regex::Captures = RE.captures(line.as_str())?;
if capture.len() != 2 {
return None;
}
let str = &capture[1];
Some(str.to_string())
}
#[cfg(test)]
mod tests {
use crate::youtube::{parse_file_name, parse_line};
#[test]
fn test_parse_line() {
let percentage = parse_line(
"[download] 95.4% of ~215.85MiB at 9.61MiB/s ETA 00:01 (frag 144/151)".into(),
);
assert_eq!(percentage, Some(Ok(95)))
}
#[test]
fn test_parse_line_get_nothing() {
let nothing = parse_line("[download] Got server HTTP error: The read operation timed out. Retrying (attempt 1 of 10) ...".into());
assert_eq!(nothing, None)
}
#[test]
fn test_parse_file_name() {
let file_name = parse_file_name(
"[download] Destination: 10 Design Patterns Explained in 10 Minutes.mp4".into(),
);
assert_eq!(
file_name,
Some("10 Design Patterns Explained in 10 Minutes.mp4".into())
);
}
#[test]
fn test_parse_file_name_get_nothing() {
let nothing = parse_file_name("[download] No fit: something".into());
assert_eq!(nothing, None)
}
}

21
cuddle.yaml Normal file
View File

@@ -0,0 +1,21 @@
# yaml-language-server: $schema=https://git.front.kjuulh.io/kjuulh/cuddle/raw/branch/main/schemas/base.json
base: "git@git.front.kjuulh.io:kjuulh/cuddle-rust-service-plan.git"
vars:
service: "scel"
registry: kasperhermansen
clusters:
clank-prod:
replicas: "3"
namespace: prod
deployment:
registry: git@git.front.kjuulh.io:kjuulh/clank-clusters
env:
prod:
clusters:
- clank-prod

Binary file not shown.

3
renovate.json Normal file
View File

@@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}

View File

@@ -1,15 +0,0 @@
use tracing::{info, Level};
use tracing_subscriber::FmtSubscriber;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let subscriber = FmtSubscriber::builder()
.with_max_level(Level::INFO)
.finish();
tracing::subscriber::set_global_default(subscriber)?;
info!("Starting scel");
scel_api::Server::new().start().await
}

View File

@@ -1,19 +0,0 @@
[package]
name = "scel_api"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
axum = { version = "0.5.6" }
futures = "0.3.21"
tower-http = {version = "0.3.3", features = ["cors"]}
async-graphql = { version = "4.0.0" }
async-graphql-axum = { version = "4.0.0" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.68"
tokio = { version = "1.0", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3" }
anyhow = { version = "1.0.58" }

View File

@@ -1,72 +0,0 @@
mod mutation;
mod query;
mod schema;
mod subscription;
use std::net::SocketAddr;
use async_graphql::{
http::{playground_source, GraphQLPlaygroundConfig},
Request, Response, Schema,
};
use async_graphql_axum::GraphQLSubscription;
use axum::{
http::Method,
response::{Html, IntoResponse},
routing, Extension, Json, Router,
};
use mutation::MutationRoot;
use query::QueryRoot;
use schema::ScelSchema;
use subscription::SubscriptionRoot;
use tower_http::cors::CorsLayer;
async fn graphql_playground() -> impl IntoResponse {
Html(playground_source(
GraphQLPlaygroundConfig::new("/").subscription_endpoint("/ws"),
))
}
async fn graphql_handler(schema: Extension<ScelSchema>, req: Json<Request>) -> Json<Response> {
schema.execute(req.0).await.into()
}
pub struct Server {
app: Router,
addr: SocketAddr,
}
impl Server {
pub fn new() -> Server {
let schema = Schema::build(QueryRoot, MutationRoot, SubscriptionRoot).finish();
let cors = vec!["http://localhost:3000"
.parse()
.expect("Could not parse url")];
let app = Router::new()
.route("/", routing::get(graphql_playground).post(graphql_handler))
.route("/ws", GraphQLSubscription::new(schema.clone()))
.layer(Extension(schema))
.layer(
CorsLayer::new()
.allow_origin(cors)
.allow_headers([axum::http::header::CONTENT_TYPE])
.allow_methods([Method::GET, Method::POST, Method::OPTIONS]),
);
let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
return Server { app, addr };
}
pub async fn start(self) -> anyhow::Result<()> {
tracing::info!("listening on {}", self.addr);
match axum::Server::bind(&self.addr)
.serve(self.app.into_make_service())
.await
{
Ok(_) => Ok(()),
Err(e) => Err(e.into()),
}
}
}

View File

@@ -1,15 +0,0 @@
use async_graphql::{Context, Object, Result, SimpleObject, ID};
pub struct MutationRoot;
#[derive(SimpleObject)]
struct RequestDownloadResponse {
id: ID,
}
#[Object]
impl MutationRoot {
async fn request_download(&self, ctx: &Context<'_>) -> Result<RequestDownloadResponse> {
Err("not implemented 123".into())
}
}

View File

@@ -1,10 +0,0 @@
use async_graphql::Object;
pub struct QueryRoot;
#[Object]
impl QueryRoot {
async fn hello_world(&self) -> &str {
"Hello, world!"
}
}

View File

@@ -1,25 +0,0 @@
use async_graphql::{
async_stream::stream, futures_util::Stream, Context, Object, Subscription, ID,
};
pub struct SubscriptionRoot;
struct DownloadChanged {
id: ID,
}
#[Object]
impl DownloadChanged {
async fn id(&self) -> &ID {
&self.id
}
}
#[Subscription]
impl SubscriptionRoot {
async fn get_download(&self, ctx: &Context<'_>) -> impl Stream<Item = DownloadChanged> {
stream! {
yield DownloadChanged {id: "Some-id".into()}
}
}
}

View File

@@ -1,8 +0,0 @@
[package]
name = "scel_core"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@@ -1,12 +0,0 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
}
pub fn something() -> String {
"".into()
}

1
web/.dockerignore Normal file
View File

@@ -0,0 +1 @@
node_modules/

24
web/.gitignore vendored Normal file
View File

@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

13
web/index.html Normal file
View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

22
web/package.json Normal file
View File

@@ -0,0 +1,22 @@
{
"name": "web",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"react": "19.0.0",
"react-dom": "19.0.0"
},
"devDependencies": {
"@types/react": "19.0.10",
"@types/react-dom": "19.0.4",
"@vitejs/plugin-react": "6.0.1",
"typescript": "5.9.3",
"vite": "8.0.0"
}
}

1
web/public/vite.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

12
web/src/App.tsx Normal file
View File

@@ -0,0 +1,12 @@
import Body from "./components/body/Body"
import Navbar from "./components/navbar/Navbar"
import RequestDownload from "./components/request-download/RequestDownload"
const App = () => <div>
<Navbar />
<Body>
<RequestDownload />
</Body>
</div>
export default App

1
web/src/assets/react.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -0,0 +1,8 @@
import { FC, ReactNode } from "react"
interface BodyProps {
children?: ReactNode
}
const Body: FC<BodyProps> = ({ children }) => <div>{children}</div>
export default Body

View File

@@ -0,0 +1,10 @@
import { getServerUrl } from "../../lib/env"
const Navbar = () => {
return <nav>
<div>Scel</div>
<a href={`${getServerUrl()}/auth/gitea`}>Login</a>
</nav>
}
export default Navbar

View File

@@ -0,0 +1,7 @@
const RequestDownload = () => {
return <div>
<input type="text" placeholder="Request download"></input>
</div>
}
export default RequestDownload

3
web/src/lib/env.ts Normal file
View File

@@ -0,0 +1,3 @@
export const getServerUrl = (): string => {
return import.meta.env.VITE_SERVER_BASE_URL
}

9
web/src/main.tsx Normal file
View File

@@ -0,0 +1,9 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App'
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
<App />
</React.StrictMode>
)

1
web/src/vite-env.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
/// <reference types="vite/client" />

21
web/tsconfig.json Normal file
View File

@@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}

9
web/tsconfig.node.json Normal file
View File

@@ -0,0 +1,9 @@
{
"compilerOptions": {
"composite": true,
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}

7
web/vite.config.ts Normal file
View File

@@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()]
})

353
web/yarn.lock Normal file
View File

@@ -0,0 +1,353 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@emnapi/core@^1.7.1":
version "1.9.0"
resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.9.0.tgz#4a54213b208fcf288cce25076c74e0f7613e6100"
integrity sha512-0DQ98G9ZQZOxfUcQn1waV2yS8aWdZ6kJMbYCJB3oUBecjWYO1fqJ+a1DRfPF3O5JEkwqwP1A9QEN/9mYm2Yd0w==
dependencies:
"@emnapi/wasi-threads" "1.2.0"
tslib "^2.4.0"
"@emnapi/runtime@^1.7.1":
version "1.9.0"
resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.9.0.tgz#91c54a6e77c36154c125e873409472e2b70efd5b"
integrity sha512-QN75eB0IH2ywSpRpNddCRfQIhmJYBCJ1x5Lb3IscKAL8bMnVAKnRg8dCoXbHzVLLH7P38N2Z3mtulB7W0J0FKw==
dependencies:
tslib "^2.4.0"
"@emnapi/wasi-threads@1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.2.0.tgz#a19d9772cc3d195370bf6e2a805eec40aa75e18e"
integrity sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==
dependencies:
tslib "^2.4.0"
"@napi-rs/wasm-runtime@^1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.1.tgz#c3705ab549d176b8dc5172723d6156c3dc426af2"
integrity sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==
dependencies:
"@emnapi/core" "^1.7.1"
"@emnapi/runtime" "^1.7.1"
"@tybys/wasm-util" "^0.10.1"
"@oxc-project/runtime@0.115.0":
version "0.115.0"
resolved "https://registry.yarnpkg.com/@oxc-project/runtime/-/runtime-0.115.0.tgz#5e8350088964e1d8e0c73cfccfc1d71ca2e2f4a2"
integrity sha512-Rg8Wlt5dCbXhQnsXPrkOjL1DTSvXLgb2R/KYfnf1/K+R0k6UMLEmbQXPM+kwrWqSmWA2t0B1EtHy2/3zikQpvQ==
"@oxc-project/types@=0.115.0":
version "0.115.0"
resolved "https://registry.yarnpkg.com/@oxc-project/types/-/types-0.115.0.tgz#92a599543529bce45f8f2da77f40a124d63349dc"
integrity sha512-4n91DKnebUS4yjUHl2g3/b2T+IUdCfmoZGhmwsovZCDaJSs+QkVAM+0AqqTxHSsHfeiMuueT75cZaZcT/m0pSw==
"@rolldown/binding-android-arm64@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.9.tgz#4bbd28868564948c2bf04b3ca117a6828f95626c"
integrity sha512-lcJL0bN5hpgJfSIz/8PIf02irmyL43P+j1pTCfbD1DbLkmGRuFIA4DD3B3ZOvGqG0XiVvRznbKtN0COQVaKUTg==
"@rolldown/binding-darwin-arm64@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.9.tgz#80864a6997404f264cc7a216cad221fe6148705d"
integrity sha512-J7Zk3kLYFsLtuH6U+F4pS2sYVzac0qkjcO5QxHS7OS7yZu2LRs+IXo+uvJ/mvpyUljDJ3LROZPoQfgBIpCMhdQ==
"@rolldown/binding-darwin-x64@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.9.tgz#747b698878b6f44d817f87e9e3cb197b16076d2a"
integrity sha512-iwtmmghy8nhfRGeNAIltcNXzD0QMNaaA5U/NyZc1Ia4bxrzFByNMDoppoC+hl7cDiUq5/1CnFthpT9n+UtfFyg==
"@rolldown/binding-freebsd-x64@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.9.tgz#35c29d7c83aa75429c74d7d1ee9c7d3e61f4552c"
integrity sha512-DLFYI78SCiZr5VvdEplsVC2Vx53lnA4/Ga5C65iyldMVaErr86aiqCoNBLl92PXPfDtUYjUh+xFFor40ueNs4Q==
"@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.9.tgz#36d2bcbcf07f17f18fb2df727a62f16e5295c816"
integrity sha512-CsjTmTwd0Hri6iTw/DRMK7kOZ7FwAkrO4h8YWKoX/kcj833e4coqo2wzIFywtch/8Eb5enQ/lwLM7w6JX1W5RQ==
"@rolldown/binding-linux-arm64-gnu@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.9.tgz#5b03c11f2b661a275f2d7628e4f456783e1b9f63"
integrity sha512-2x9O2JbSPxpxMDhP9Z74mahAStibTlrBMW0520+epJH5sac7/LwZW5Bmg/E6CXuEF53JJFW509uP+lSedaUNxg==
"@rolldown/binding-linux-arm64-musl@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.9.tgz#d3cbd1b1760d34b5789af89f4bcc09a1446d3eb5"
integrity sha512-JA1QRW31ogheAIRhIg9tjMfsYbglXXYGNPLdPEYrwFxdbkQCAzvpSCSHCDWNl4hTtrol8WeboCSEpjdZK8qrCg==
"@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.9.tgz#8e971e7f066b2c0876e20c9f6174d645f31efb84"
integrity sha512-aOKU9dJheda8Kj8Y3w9gnt9QFOO+qKPAl8SWd7JPHP+Cu0EuDAE5wokQubLzIDQWg2myXq2XhTpOVS07qqvT+w==
"@rolldown/binding-linux-s390x-gnu@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.9.tgz#e7283523780741f07a4441c7c8af5b2550faadf2"
integrity sha512-OalO94fqj7IWRn3VdXWty75jC5dk4C197AWEuMhIpvVv2lw9fiPhud0+bW2ctCxb3YoBZor71QHbY+9/WToadA==
"@rolldown/binding-linux-x64-gnu@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.9.tgz#da2302e079bb5f3a98edf75608621e94f1fb550e"
integrity sha512-cVEl1vZtBsBZna3YMjGXNvnYYrOJ7RzuWvZU0ffvJUexWkukMaDuGhUXn0rjnV0ptzGVkvc+vW9Yqy6h8YX4pg==
"@rolldown/binding-linux-x64-musl@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.9.tgz#3f27a620d56b93644fd1b6fad58fc2dbe93d5d71"
integrity sha512-UzYnKCIIc4heAKgI4PZ3dfBGUZefGCJ1TPDuLHoCzgrMYPb5Rv6TLFuYtyM4rWyHM7hymNdsg5ik2C+UD9VDbA==
"@rolldown/binding-openharmony-arm64@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.9.tgz#9c307777157d029aaf8db1a09221b9275dbe5547"
integrity sha512-+6zoiF+RRyf5cdlFQP7nm58mq7+/2PFaY2DNQeD4B87N36JzfF/l9mdBkkmTvSYcYPE8tMh/o3cRlsx1ldLfog==
"@rolldown/binding-wasm32-wasi@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.9.tgz#c3a82bef0ddd644efa74c050c26223f29f55039c"
integrity sha512-rgFN6sA/dyebil3YTlL2evvi/M+ivhfnyxec7AccTpRPccno/rPoNlqybEZQBkcbZu8Hy+eqNJCqfBR8P7Pg8g==
dependencies:
"@napi-rs/wasm-runtime" "^1.1.1"
"@rolldown/binding-win32-arm64-msvc@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.9.tgz#27e23cbd53b7095d0b66191ef999327b4684a6cf"
integrity sha512-lHVNUG/8nlF1IQk1C0Ci574qKYyty2goMiPlRqkC5R+3LkXDkL5Dhx8ytbxq35m+pkHVIvIxviD+TWLdfeuadA==
"@rolldown/binding-win32-x64-msvc@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.9.tgz#96046309142b398c9c2a9a0a052e7355535e69c8"
integrity sha512-G0oA4+w1iY5AGi5HcDTxWsoxF509hrFIPB2rduV5aDqS9FtDg1CAfa7V34qImbjfhIcA8C+RekocJZA96EarwQ==
"@rolldown/pluginutils@1.0.0-rc.7":
version "1.0.0-rc.7"
resolved "https://registry.yarnpkg.com/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.7.tgz#0414869467f0e471a6515d4f506c85fde867e022"
integrity sha512-qujRfC8sFVInYSPPMLQByRh7zhwkGFS4+tyMQ83srV1qrxL4g8E2tyxVVyxd0+8QeBM1mIk9KbWxkegRr76XzA==
"@rolldown/pluginutils@1.0.0-rc.9":
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.9.tgz#ddb28c13602aea5a5edf03532c28bbfc37c4b5e0"
integrity sha512-w6oiRWgEBl04QkFZgmW+jnU1EC9b57Oihi2ot3HNWIQRqgHp5PnYDia5iZ5FF7rpa4EQdiqMDXjlqKGXBhsoXw==
"@tybys/wasm-util@^0.10.1":
version "0.10.1"
resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.10.1.tgz#ecddd3205cf1e2d5274649ff0eedd2991ed7f414"
integrity sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==
dependencies:
tslib "^2.4.0"
"@types/react-dom@19.0.4":
version "19.0.4"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.0.4.tgz#bedba97f9346bd4c0fe5d39e689713804ec9ac89"
integrity sha512-4fSQ8vWFkg+TGhePfUzVmat3eC14TXYSsiiDSLI0dVLsrm9gZFABjPy/Qu6TKgl1tq1Bu1yDsuQgY3A3DOjCcg==
"@types/react@19.0.10":
version "19.0.10"
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.0.10.tgz#d0c66dafd862474190fe95ce11a68de69ed2b0eb"
integrity sha512-JuRQ9KXLEjaUNjTWpzuR231Z2WpIwczOkBEIvbHNCzQefFIT0L8IqE6NV6ULLyC1SI/i234JnDoMkfg+RjQj2g==
dependencies:
csstype "^3.0.2"
"@vitejs/plugin-react@6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-6.0.1.tgz#d9113b71a0a592714913eafd9e5e63bcafd0ff15"
integrity sha512-l9X/E3cDb+xY3SWzlG1MOGt2usfEHGMNIaegaUGFsLkb3RCn/k8/TOXBcab+OndDI4TBtktT8/9BwwW8Vi9KUQ==
dependencies:
"@rolldown/pluginutils" "1.0.0-rc.7"
csstype@^3.0.2:
version "3.1.0"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2"
integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==
detect-libc@^2.0.3:
version "2.1.2"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.1.2.tgz#689c5dcdc1900ef5583a4cb9f6d7b473742074ad"
integrity sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==
fdir@^6.5.0:
version "6.5.0"
resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.5.0.tgz#ed2ab967a331ade62f18d077dae192684d50d350"
integrity sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==
fsevents@~2.3.3:
version "2.3.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
lightningcss-android-arm64@1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz#f033885116dfefd9c6f54787523e3514b61e1968"
integrity sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==
lightningcss-darwin-arm64@1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz#50b71871b01c8199584b649e292547faea7af9b5"
integrity sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==
lightningcss-darwin-x64@1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz#35f3e97332d130b9ca181e11b568ded6aebc6d5e"
integrity sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==
lightningcss-freebsd-x64@1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz#9777a76472b64ed6ff94342ad64c7bafd794a575"
integrity sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==
lightningcss-linux-arm-gnueabihf@1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz#13ae652e1ab73b9135d7b7da172f666c410ad53d"
integrity sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==
lightningcss-linux-arm64-gnu@1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz#417858795a94592f680123a1b1f9da8a0e1ef335"
integrity sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==
lightningcss-linux-arm64-musl@1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz#6be36692e810b718040802fd809623cffe732133"
integrity sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==
lightningcss-linux-x64-gnu@1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz#0b7803af4eb21cfd38dd39fe2abbb53c7dd091f6"
integrity sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==
lightningcss-linux-x64-musl@1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz#88dc8ba865ddddb1ac5ef04b0f161804418c163b"
integrity sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==
lightningcss-win32-arm64-msvc@1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz#4f30ba3fa5e925f5b79f945e8cc0d176c3b1ab38"
integrity sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==
lightningcss-win32-x64-msvc@1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz#141aa5605645064928902bb4af045fa7d9f4220a"
integrity sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==
lightningcss@^1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/lightningcss/-/lightningcss-1.32.0.tgz#b85aae96486dcb1bf49a7c8571221273f4f1e4a9"
integrity sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==
dependencies:
detect-libc "^2.0.3"
optionalDependencies:
lightningcss-android-arm64 "1.32.0"
lightningcss-darwin-arm64 "1.32.0"
lightningcss-darwin-x64 "1.32.0"
lightningcss-freebsd-x64 "1.32.0"
lightningcss-linux-arm-gnueabihf "1.32.0"
lightningcss-linux-arm64-gnu "1.32.0"
lightningcss-linux-arm64-musl "1.32.0"
lightningcss-linux-x64-gnu "1.32.0"
lightningcss-linux-x64-musl "1.32.0"
lightningcss-win32-arm64-msvc "1.32.0"
lightningcss-win32-x64-msvc "1.32.0"
nanoid@^3.3.11:
version "3.3.11"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b"
integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==
picocolors@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b"
integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==
picomatch@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.3.tgz#796c76136d1eead715db1e7bad785dedd695a042"
integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==
postcss@^8.5.8:
version "8.5.8"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.8.tgz#6230ecc8fb02e7a0f6982e53990937857e13f399"
integrity sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==
dependencies:
nanoid "^3.3.11"
picocolors "^1.1.1"
source-map-js "^1.2.1"
react-dom@19.0.0:
version "19.0.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.0.0.tgz#43446f1f01c65a4cd7f7588083e686a6726cfb57"
integrity sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==
dependencies:
scheduler "^0.25.0"
react@19.0.0:
version "19.0.0"
resolved "https://registry.yarnpkg.com/react/-/react-19.0.0.tgz#6e1969251b9f108870aa4bff37a0ce9ddfaaabdd"
integrity sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==
rolldown@1.0.0-rc.9:
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/rolldown/-/rolldown-1.0.0-rc.9.tgz#5a0d3e194f2bcc7a134870b174042fcaed463689"
integrity sha512-9EbgWge7ZH+yqb4d2EnELAntgPTWbfL8ajiTW+SyhJEC4qhBbkCKbqFV4Ge4zmu5ziQuVbWxb/XwLZ+RIO7E8Q==
dependencies:
"@oxc-project/types" "=0.115.0"
"@rolldown/pluginutils" "1.0.0-rc.9"
optionalDependencies:
"@rolldown/binding-android-arm64" "1.0.0-rc.9"
"@rolldown/binding-darwin-arm64" "1.0.0-rc.9"
"@rolldown/binding-darwin-x64" "1.0.0-rc.9"
"@rolldown/binding-freebsd-x64" "1.0.0-rc.9"
"@rolldown/binding-linux-arm-gnueabihf" "1.0.0-rc.9"
"@rolldown/binding-linux-arm64-gnu" "1.0.0-rc.9"
"@rolldown/binding-linux-arm64-musl" "1.0.0-rc.9"
"@rolldown/binding-linux-ppc64-gnu" "1.0.0-rc.9"
"@rolldown/binding-linux-s390x-gnu" "1.0.0-rc.9"
"@rolldown/binding-linux-x64-gnu" "1.0.0-rc.9"
"@rolldown/binding-linux-x64-musl" "1.0.0-rc.9"
"@rolldown/binding-openharmony-arm64" "1.0.0-rc.9"
"@rolldown/binding-wasm32-wasi" "1.0.0-rc.9"
"@rolldown/binding-win32-arm64-msvc" "1.0.0-rc.9"
"@rolldown/binding-win32-x64-msvc" "1.0.0-rc.9"
scheduler@^0.25.0:
version "0.25.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0.tgz#336cd9768e8cceebf52d3c80e3dcf5de23e7e015"
integrity sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==
source-map-js@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46"
integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==
tinyglobby@^0.2.15:
version "0.2.15"
resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.15.tgz#e228dd1e638cea993d2fdb4fcd2d4602a79951c2"
integrity sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==
dependencies:
fdir "^6.5.0"
picomatch "^4.0.3"
tslib@^2.4.0:
version "2.8.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
typescript@5.9.3:
version "5.9.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
vite@8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/vite/-/vite-8.0.0.tgz#d749f9bf5be196635982bc16ec0c6faf2b31f3a4"
integrity sha512-fPGaRNj9Zytaf8LEiBhY7Z6ijnFKdzU/+mL8EFBaKr7Vw1/FWcTBAMW0wLPJAGMPX38ZPVCVgLceWiEqeoqL2Q==
dependencies:
"@oxc-project/runtime" "0.115.0"
lightningcss "^1.32.0"
picomatch "^4.0.3"
postcss "^8.5.8"
rolldown "1.0.0-rc.9"
tinyglobby "^0.2.15"
optionalDependencies:
fsevents "~2.3.3"