From 93bccd3b19d62db2a8c08bac930e689c7eaec8ab Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Fri, 9 Dec 2022 08:35:38 -0500 Subject: [PATCH 01/57] fix graphiql url --- services/api/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/api/src/main.rs b/services/api/src/main.rs index 8823ca4..7c143f9 100644 --- a/services/api/src/main.rs +++ b/services/api/src/main.rs @@ -75,7 +75,7 @@ async fn main() { "/graphql", post(graphql_handler_post).get(graphql_handler_get), ) - .route("/graphql/playground", get(graphiql)) + .route("/graphiql", get(graphiql)) .fallback(handle_404) .layer(Extension(db)) .layer(Extension(schema)) From 05e30e4420d83b81ce8a1188e879039741bf072e Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Fri, 9 Dec 2022 11:16:53 -0500 Subject: [PATCH 02/57] cleanup --- Cargo.lock | 1 - docker-compose.live.yaml | 2 +- services/websocket/Cargo.toml | 1 - services/websocket/src/main.rs | 7 ------- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4429ee7..321c5d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2510,7 +2510,6 @@ dependencies = [ "futures", "futures-util", "lazy_static", - "redis", "serde", "serde-aux", "serde_json", diff --git a/docker-compose.live.yaml b/docker-compose.live.yaml index fa2d310..a3e9dfd 100644 --- a/docker-compose.live.yaml +++ b/docker-compose.live.yaml @@ -16,7 +16,7 @@ services: image: ghcr.io/genudine/saerro/api:latest pull_policy: always ports: - - 8000:80 + - 80:8000 links: - tsdb restart: always diff --git a/services/websocket/Cargo.toml b/services/websocket/Cargo.toml index 61b545f..091231f 100644 --- a/services/websocket/Cargo.toml +++ b/services/websocket/Cargo.toml @@ -6,7 +6,6 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -redis = { version = "0.22.1", default_features = false, features = ["r2d2"] } lazy_static = "1.4.0" tokio-tungstenite = { version = "0.18.0", features=["native-tls"] } serde = { version = "1.0.149", features = ["derive"] } diff --git a/services/websocket/src/main.rs b/services/websocket/src/main.rs index c292c13..70aadcf 100644 --- a/services/websocket/src/main.rs +++ b/services/websocket/src/main.rs @@ -14,8 +14,6 @@ use tokio_tungstenite::{connect_async, tungstenite::Message}; mod translators; lazy_static! { - // static ref PAIR: String = env::var("PAIR").unwrap_or_default(); - // static ref ROLE: String = env::var("ROLE").unwrap_or("primary".to_string()); static ref WS_ADDR: String = env::var("WS_ADDR").unwrap_or_default(); static ref PG: AsyncOnce = AsyncOnce::new(async { let db_url = std::env::var("DATABASE_URL") @@ -77,11 +75,6 @@ struct AnalyticsEvent { event_name: String, } -// async fn track_pop(pop_event: PopEvent) { -// track_pop_db(pop_event.clone()).await; -// track_pop_redis(pop_event).await; -// } - async fn track_pop(pop_event: PopEvent) { // println!("[ws/track_pop]"); let pool = PG.get().await; From c89eb6ea74fdeec02769fae5f92f6f9bdadc97c4 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Fri, 9 Dec 2022 13:59:20 -0500 Subject: [PATCH 03/57] update readme --- README.md | 71 ++++++++++++++++++++----------------------------------- 1 file changed, 26 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index beeaff9..9ea0ea8 100644 --- a/README.md +++ b/README.md @@ -4,31 +4,33 @@ PlanetSide 2 live population API. This API is free and open for anyone to use. https://saerro.harasse.rs -Our methodology is to add any player ID seen on the Census websockets to a time-sorted set, and returning the number of player IDs seen within 15 minutes. +tl;dr: Watch for specific events, transform and add them to a timeseries set, and query that set for the last 15 minutes. + +We're built on 3 core types, `players`, `classes`, and `vehicles`. Each can be filtered by Continent/Zone, Faction, and World. --- -The one and only goal of this app is to provide a current "point-in-time" population status for PlanetSide 2, per world, per faction, (and later, per continent.) Historical info is _not_ a goal; you may implement this on your end. - Please open an issue here or get in touch with Pomf (okano#0001) on the PS2 Discord if you have complex use cases for this data; it may be trivial/easy to implement APIs tailored to your needs. The main use case is for [Medkit](https://github.com/kayteh/medkit2) bot to have an in-house source of population data, without relying too heavily on any third-party stats service, like Fisu, Honu, or Voidwell; which all have different population tracking needs and goals (and thus, different data.) +An example of how it can be used on [pstop](https://pstop.harasse.rs) ([GitHub](https://github.com/genudine/pstop)). + ## Architecture -- Websocket processors - - A pair per PC, PS4US, PS4EU - - Connects to [wss://push.nanite-systems.net](https://nanite-systems.net) and Census Websocket - - Primary will connect to NS. - - Backup will connect to Census. It will wait for 60 seconds before deciding the primary is dead, and then start processing events. -- API +- GraphQL API - Serves https://saerro.harasse.rs - - Built on axum and async-graphql -- Redis - - Using ZADD with score as timestamp, ZCOUNTBYSCORE by timestamp in 15 minute windows, and cleaned up with SCAN+ZREMBYSCORE, population data is tracked. - - There is deliberately no persistence. -- Redis "Tender" - - Cleans up Redis every 5 mins. + - Built on a "stacking filter" graph model, where each dimension adds a filter to lower dimensions. +- Event Streaming Service (ESS) Ingest + - WebSocket listening to https://push.nanite-systems.net (which is a resilient mirror to https://push.planetside2.com) + - Listens for `Death`, `VehicleDestroy`, and possibly other events +- Postgres with TimescaleDB + - Holds `players`, `vehicles`, `classes`, and also `analytics` tables as hypertables. + - Timescale makes this way too fast, mind-blowing :) +- Tasks + - Occasional jobs that prune the database past what we actually want to retain, + - Core data tables are kept to about 20 mins max of data, analytics to 1 week + - Can do database resets/migrations. # Developing @@ -37,48 +39,27 @@ This app is built with Rust. You can set up a build environment via https://rust To run, ```sh -# Start Redis/backing services +# Start backing services docker compose up -d -# Start Websocket for PC -env \ - WS_ADDR="wss://push.planetside2.com/streaming?environment=ps2&service-id=s:$SERVICE_ID" \ - PAIR=pc \ - ROLE=primary \ - WORLDS=1,10,13,17,19,40 \ - cargo run --bin websocket +# Run database migrations (required first step on a freshly up'd database) +cargo run --bin tasks migrate -# (Optional:) Start redundant websocket for PC +# Start NSS ingest. Use push.planetside2.com if NSS isn't quite working... env \ - WS_ADDR="wss://push.planetside2.com/streaming?environment=ps2&service-id=s:$SERVICE_ID" \ - PAIR=pc \ - ROLE=backup \ - WORLDS=1,10,13,17,19,40 \ - cargo run --bin websocket - -# (Optional:) Start PS4US websocket -env \ - WS_ADDR="wss://push.planetside2.com/streaming?environment=ps2ps4us&service-id=s:$SERVICE_ID" \ - PAIR=ps4us \ - WORLDS=1000 \ - cargo run --bin websocket - -# (Optional:) Start PS4EU websocket -env \ - WS_ADDR="wss://push.planetside2.com/streaming?environment=ps2ps4eu&service-id=s:$SERVICE_ID" \ - PAIR=ps4eu \ - WORLDS=2000 \ + WS_ADDR="wss://push.nanite-systems.net/streaming?environment=all&service-id=s:$SERVICE_ID" \ + WORLDS=all cargo run --bin websocket # Start API cargo run --bin api # Run prune tool -cargo run --bin tools prune +cargo run --bin tasks prune # Build containers docker build . --build-arg SERVICE=api -t saerro:api -docker build . --build-arg SERVICE=tools -t saerro:tools +docker build . --build-arg SERVICE=tasks -t saerro:tasks docker build . --build-arg SERVICE=websocket -t saerro:websocket ``` @@ -94,4 +75,4 @@ Currently, the entire stack runs on Docker. You may deploy it to any server via: docker compose up -d -f docker-compose.live.yaml ``` -It listens on port 80, it's up to you from here. +It listens on port 80, it's up to you from here. Make sure to change passwords present in the file. It's not _that secret_ of data, but why risk it? From 3bfc0b4e28bf51147e1f73b2d7389e49c32f4dcf Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Fri, 9 Dec 2022 15:23:09 -0500 Subject: [PATCH 04/57] update htmls --- services/api/src/html/404.html | 4 +- services/api/src/html/index.html | 164 +++++++++++++++++++++++++++++-- 2 files changed, 156 insertions(+), 12 deletions(-) diff --git a/services/api/src/html/404.html b/services/api/src/html/404.html index 3e1f179..bfda5d1 100644 --- a/services/api/src/html/404.html +++ b/services/api/src/html/404.html @@ -17,6 +17,4 @@

404 Not Found

-

- [home] [graphql playground] -

+

[home]

diff --git a/services/api/src/html/index.html b/services/api/src/html/index.html index ee8fbed..b0e9446 100644 --- a/services/api/src/html/index.html +++ b/services/api/src/html/index.html @@ -14,39 +14,185 @@ color: #cead42; text-decoration: none; } + + .hidden { + display: none; + }

Saerro Listening Post

Live Population Stats API for PlanetSide 2

+

+ This is a GraphQL API, which means you can query for exactly the data you + need. You can also use the GraphiQL interface to explore the data and build + your queries. +

+

+ This API supports two query methods, + GET + and + POST. + To view the JSON outputs, you can use a tool like + JSONView for Firefox + or + JSONVue for Chrome. +

All data is an aggregate of the last 15 minutes of Death and VehicleDestroy events, including both attacker and victim.

- +

This API is provided by Genudine Dynamics.
As always, we take no responsibility for your use of this data... or our weapons. :) From 26f0ce1a1ab1b8f1cfed1ed82d86b620d7828eb7 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Fri, 9 Dec 2022 15:48:25 -0500 Subject: [PATCH 05/57] update htmls --- services/api/src/html/index.html | 77 +++++++++++++++++++++++++++----- 1 file changed, 67 insertions(+), 10 deletions(-) diff --git a/services/api/src/html/index.html b/services/api/src/html/index.html index b0e9446..0677a47 100644 --- a/services/api/src/html/index.html +++ b/services/api/src/html/index.html @@ -18,6 +18,22 @@ .hidden { display: none; } + + .query { + list-style-type: none; + padding-left: 0; + background-color: #131313; + width: fit-content; + padding: 2rem; + margin: 2rem; + border-radius: 10px; + border-left: #918b79 3px solid; + font-size: 1rem; + } + + .query pre { + margin: 0; + }

Saerro Listening Post

@@ -30,12 +46,13 @@ @@ -178,7 +215,7 @@ GET and POST. - To view the JSON outputs, you can use a tool like + To view the JSON outputs without fancy UIs, you can use a browser plugin like JSONView for Firefox @@ -204,3 +241,23 @@ >pstop]

+ From b91019e8b4c1552567681eb139ccb937b8d3b9a0 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Fri, 9 Dec 2022 17:42:17 -0500 Subject: [PATCH 06/57] allow attacker_team_id to be empty, PS4 bug --- services/websocket/src/main.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/services/websocket/src/main.rs b/services/websocket/src/main.rs index 70aadcf..741857a 100644 --- a/services/websocket/src/main.rs +++ b/services/websocket/src/main.rs @@ -23,11 +23,7 @@ lazy_static! { } async fn send_init(tx: futures::channel::mpsc::UnboundedSender) { - let worlds_raw = env::var("WORLDS").unwrap_or_default(); - if worlds_raw == "" { - println!("WORLDS not set"); - return; - } + let worlds_raw = env::var("WORLDS").unwrap_or("all".to_string()); let worlds: Vec<&str> = worlds_raw.split(',').collect(); // Send setup message @@ -261,7 +257,7 @@ struct Event { world_id: i32, character_id: String, attacker_character_id: String, - #[serde(deserialize_with = "deserialize_number_from_string")] + #[serde(default, deserialize_with = "deserialize_number_from_string")] attacker_team_id: i32, #[serde(deserialize_with = "deserialize_number_from_string")] team_id: i32, From 89d115b61d0409e9304853ce269b7fc74bec462f Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Fri, 9 Dec 2022 17:47:56 -0500 Subject: [PATCH 07/57] update codegen to translate ant, valk, and gal variants --- hack/codegen/src/main.rs | 14 +++++++++++--- services/websocket/src/translators.rs | 5 +++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/hack/codegen/src/main.rs b/hack/codegen/src/main.rs index 012931c..68ac6ed 100644 --- a/hack/codegen/src/main.rs +++ b/hack/codegen/src/main.rs @@ -46,6 +46,9 @@ async fn translators_rs() { "mosquito", "galaxy", "valkyrie", + "wasp", + "deliverer", + "lodestar", "liberator", "ant", "harasser", @@ -107,11 +110,16 @@ async fn translators_rs() { .find(&item.name.as_ref().unwrap().en.as_ref().unwrap()) .unwrap(); + let name = matched + .as_str() + .to_lowercase() + .replace("wasp", "valkyrie") + .replace("deliverer", "ant") + .replace("lodestar", "galaxy"); + Vehicle { vehicle_id: item.vehicle_id, - name: Some(LangEn { - en: Some(matched.as_str().to_string().to_lowercase()), - }), + name: Some(LangEn { en: Some(name) }), propulsion_type: item.propulsion_type, } }) diff --git a/services/websocket/src/translators.rs b/services/websocket/src/translators.rs index 9d35799..1711c85 100644 --- a/services/websocket/src/translators.rs +++ b/services/websocket/src/translators.rs @@ -34,6 +34,8 @@ lazy_static! { ("1105", "vanguard"), ("2010", "flash"), ("2033", "javelin"), + ("2039", "ant"), + ("2040", "valkyrie"), ("2122", "mosquito"), ("2123", "reaver"), ("2124", "scythe"), @@ -47,6 +49,9 @@ lazy_static! { ("2135", "prowler"), ("2136", "dervish"), ("2137", "chimera"), + ("2139", "ant"), + ("2140", "galaxy"), + ("2141", "valkyrie"), ("2142", "corsair"), ]); static ref LOADOUT_TO_CLASS: HashMap<&'static str, &'static str> = HashMap::from([ From 004def8fbbf22c6ebe41657ef91e6f9b54e65c27 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Sat, 10 Dec 2022 22:01:27 -0500 Subject: [PATCH 08/57] update health to be more helpful --- Cargo.lock | 27 ++++++++++++- services/api/Cargo.toml | 7 ++-- services/api/src/health.rs | 63 ++++++++++++++++++++++++++++++- services/api/src/html/index.html | 18 ++++++--- services/api/src/html/ingest.html | 19 ++++++++++ services/api/src/main.rs | 5 +++ services/websocket/src/main.rs | 11 ++++-- 7 files changed, 135 insertions(+), 15 deletions(-) create mode 100644 services/api/src/html/ingest.html diff --git a/Cargo.lock b/Cargo.lock index 321c5d9..7935f7d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,6 +48,7 @@ dependencies = [ "async-graphql", "async-graphql-axum", "axum", + "chrono", "lazy_static", "reqwest", "serde", @@ -76,6 +77,7 @@ dependencies = [ "async-trait", "base64", "bytes", + "chrono", "fast_chemail", "fnv", "futures-util", @@ -329,8 +331,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" dependencies = [ "iana-time-zone", + "js-sys", "num-integer", "num-traits", + "time", + "wasm-bindgen", "winapi", ] @@ -744,7 +749,7 @@ checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] @@ -1141,7 +1146,7 @@ checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.42.0", ] @@ -1843,6 +1848,7 @@ dependencies = [ "bitflags", "byteorder", "bytes", + "chrono", "crc", "crossbeam-queue", "dirs", @@ -2038,6 +2044,17 @@ dependencies = [ "once_cell", ] +[[package]] +name = "time" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -2419,6 +2436,12 @@ dependencies = [ "try-lock", ] +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" diff --git a/services/api/Cargo.toml b/services/api/Cargo.toml index 08997d5..178d5a7 100644 --- a/services/api/Cargo.toml +++ b/services/api/Cargo.toml @@ -8,11 +8,12 @@ edition = "2021" [dependencies] serde_json = "1.0.89" serde = "1.0.149" -async-graphql = { version = "5.0.3" } +async-graphql = { version = "5.0.3", features = ["chrono"] } async-graphql-axum = "5.0.3" axum = "0.6.1" -sqlx = { version = "0.6.2", features = [ "runtime-tokio-native-tls", "postgres" ] } +sqlx = { version = "0.6.2", features = [ "runtime-tokio-native-tls", "postgres", "chrono" ] } tokio = { version = "1.23.0", features = [ "full" ] } tower-http = { version = "0.3.5", features = ["cors"] } lazy_static = "1.4.0" -reqwest = "0.11.13" \ No newline at end of file +reqwest = "0.11.13" +chrono = "0.4.23" \ No newline at end of file diff --git a/services/api/src/health.rs b/services/api/src/health.rs index 84eca16..66a4c8c 100644 --- a/services/api/src/health.rs +++ b/services/api/src/health.rs @@ -1,5 +1,7 @@ -use async_graphql::{Context, Enum, Object}; +use crate::utils::ID_TO_WORLD; +use async_graphql::{Context, Enum, Object, SimpleObject}; use axum::{http::StatusCode, response::IntoResponse, Extension, Json}; +use chrono::{DateTime, Utc}; use sqlx::{query, Pool, Postgres, Row}; pub async fn get_health(Extension(pool): Extension>) -> impl IntoResponse { @@ -53,6 +55,37 @@ enum UpDown { pub struct Health {} +impl Health { + async fn most_recent_event_time<'ctx>( + &self, + ctx: &Context<'ctx>, + world_id: i32, + ) -> (UpDown, Option>) { + let pool = ctx.data::>().unwrap(); + + let events_resp = + query("SELECT time FROM analytics WHERE world_id = $1 ORDER BY time DESC LIMIT 1") + .bind(world_id) + .fetch_one(pool) + .await; + + match events_resp { + Ok(row) => { + let last_event: DateTime = row.get(0); + + if last_event < Utc::now() - chrono::Duration::minutes(5) { + return (UpDown::Down, None); + } else { + return (UpDown::Up, Some(last_event)); + } + } + Err(_) => { + return (UpDown::Down, None); + } + } + } +} + /// Reports on the health of Saerro Listening Post #[Object] impl Health { @@ -104,6 +137,34 @@ impl Health { .map(|_| UpDown::Up) .unwrap_or(UpDown::Down) } + + /// Shows a disclaimer for the worlds check + async fn worlds_disclaimer(&self) -> String { + "This is a best-effort check. A world reports `DOWN` when it doesn't have new events for 5 minutes. It could be broken, it could be the reality of the game state.".to_string() + } + + /// Checks if a world has had any events for the last 5 minutes + async fn worlds<'ctx>(&self, ctx: &Context<'ctx>) -> Vec { + let mut worlds = Vec::new(); + for (id, name) in ID_TO_WORLD.iter() { + let (status, last_event) = self.most_recent_event_time(ctx, *id).await; + worlds.push(WorldUpDown { + id: *id, + name: name.to_string(), + status, + last_event, + }); + } + worlds + } +} + +#[derive(SimpleObject)] +struct WorldUpDown { + id: i32, + name: String, + status: UpDown, + last_event: Option>, } #[derive(Default)] diff --git a/services/api/src/html/index.html b/services/api/src/html/index.html index 0677a47..70e807e 100644 --- a/services/api/src/html/index.html +++ b/services/api/src/html/index.html @@ -48,7 +48,7 @@
  • Current system status (

    For help, please contact us in #api-dev on the PlanetSide 2 Discord.

    - [github] [pstop] + [ingest stats] [github] [pstop]

    + + diff --git a/services/api/src/query.rs b/services/api/src/query.rs index d025142..a53f8fb 100644 --- a/services/api/src/query.rs +++ b/services/api/src/query.rs @@ -1,6 +1,6 @@ use crate::{ - classes::ClassesQuery, health::HealthQuery, population::PopulationQuery, - vehicles::VehicleQuery, world::WorldQuery, zone::ZoneQuery, + analytics::AnalyticsQuery, classes::ClassesQuery, health::HealthQuery, + population::PopulationQuery, vehicles::VehicleQuery, world::WorldQuery, zone::ZoneQuery, }; use async_graphql::MergedObject; @@ -12,4 +12,5 @@ pub struct Query( WorldQuery, ZoneQuery, HealthQuery, + AnalyticsQuery, ); diff --git a/services/tasks/src/main.rs b/services/tasks/src/main.rs index ba61378..579a91d 100644 --- a/services/tasks/src/main.rs +++ b/services/tasks/src/main.rs @@ -65,6 +65,10 @@ async fn main() { match command.as_str() { "help" => cmd_help(), "prune" => cmd_prune().await, + "auto-prune" => loop { + cmd_prune().await; + tokio::time::sleep(tokio::time::Duration::from_secs(60 * 5)).await; + }, "migrate" => cmd_migrate().await, _ => { println!("Unknown command: {}", command); diff --git a/services/websocket/Cargo.toml b/services/websocket/Cargo.toml index 091231f..b57fcf2 100644 --- a/services/websocket/Cargo.toml +++ b/services/websocket/Cargo.toml @@ -17,4 +17,5 @@ futures-util = "0.3.25" futures = "0.3.25" async_once = "0.2.6" serde-aux = "4.1.2" -axum = "0.6.1" \ No newline at end of file +axum = "0.6.1" +chrono = "0.4.23" \ No newline at end of file diff --git a/services/websocket/src/main.rs b/services/websocket/src/main.rs index d5f2954..465b83a 100644 --- a/services/websocket/src/main.rs +++ b/services/websocket/src/main.rs @@ -1,5 +1,5 @@ use async_once::AsyncOnce; -use axum::{routing::get, Router}; +use axum::{routing::get, Json, Router}; use futures::{pin_mut, FutureExt}; use futures_util::StreamExt; use lazy_static::lazy_static; @@ -283,7 +283,14 @@ struct Payload { } async fn healthz() { - let app = Router::new().route("/healthz", get(|| async { "ok" })); + let app = Router::new().route( + "/healthz", + get(|| async { + Json(json!({ + "status": "ok", + })) + }), + ); let port: u16 = std::env::var("PORT") .unwrap_or("8999".to_string()) @@ -314,7 +321,7 @@ async fn main() { let fused_writer = rx.map(Ok).forward(write).fuse(); let fused_reader = read - .for_each(|msg| async move { + .for_each(|msg| async { let body = &msg.unwrap().to_string(); let data: Payload = match serde_json::from_str(body) { From 170fdf647db22294386c763bf33b2bac2d264dfe Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Mon, 12 Dec 2022 23:07:47 -0500 Subject: [PATCH 11/57] improvements to ingest.html --- services/api/src/html/ingest.html | 217 ++++++++++++++++++++++-------- 1 file changed, 161 insertions(+), 56 deletions(-) diff --git a/services/api/src/html/ingest.html b/services/api/src/html/ingest.html index f0d6939..4a58545 100644 --- a/services/api/src/html/ingest.html +++ b/services/api/src/html/ingest.html @@ -15,82 +15,187 @@ text-decoration: none; } + h3 { + margin: 0; + } + .chart-container { - height: 50vh; position: relative; } - .smaller { - height: 33vh; + .main { + display: grid; + grid-template-columns: repeat(2, minmax(300px, 1fr)); + gap: 1rem; + padding: 1rem; + } + + .wide { + grid-column: span 2; + } + + .graph-head { + display: flex; + justify-content: space-between; + align-items: center; + } + + .sums-15m { + color: rgba(165, 165, 165, 1); + } + + .sums-1h { + color: rgba(165, 165, 165, 0.8); + } + + .sums-6h { + color: rgba(165, 165, 165, 0.6); + } + + .sums-1d { + color: rgba(165, 165, 165, 0.4); } -

    Ingest Stats

    -
    -

    All Events by Type

    -
    - +

    Ingest Stats [LOADING...]

    +
    +
    +
    +

    All Events by Type

    +

    (0, 0, 0, 0)

    +
    +
    + +
    -
    -
    -

    Events by World

    -
    - +
    +
    +

    Events by World

    +
    +
    + +
    -
    -
    -

    Connery

    -
    - +
    +
    +

    Connery [US West]

    +

    (0, 0, 0, 0)

    +
    +
    + +
    -
    -
    -

    Miller

    -
    - +
    +
    +

    Miller [EU]

    +

    (0, 0, 0, 0)

    +
    +
    + +
    -
    -
    -

    Cobalt

    -
    - +
    +
    +

    Cobalt [EU]

    +

    (0, 0, 0, 0)

    +
    +
    + +
    -
    -
    -

    Emerald

    -
    - +
    +
    +

    Emerald [US East]

    +

    (0, 0, 0, 0)

    +
    +
    + +
    -
    -
    -

    Jaeger

    -
    - +
    +
    +

    Jaeger [US East]

    +

    (0, 0, 0, 0)

    +
    +
    + +
    -
    -
    -

    SolTech

    -
    - +
    +
    +

    SolTech [Tokyo]

    +

    (0, 0, 0, 0)

    +
    +
    + +
    -
    -
    -

    Genudine

    -
    - +
    +
    +

    Genudine [US East] [PS4]

    +

    (0, 0, 0, 0)

    +
    +
    + +
    -
    -
    -

    Ceres

    -
    - +
    +
    +

    Ceres [EU] [PS4]

    +

    (0, 0, 0, 0)

    +
    +
    + +
    + @@ -293,7 +299,11 @@ query: ` { analytics { - events(bucketSize: ${60 * 5}) { + events(${ + location.search.includes("hi=1") + ? "hiPrecision: true" + : "bucketSize: 300" + }) { eventName count time From 9ccd47afa0c37229851264a30b6de3127cfaad4f Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Mon, 12 Dec 2022 23:27:42 -0500 Subject: [PATCH 14/57] remove deploy step --- .github/workflows/ci.yaml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c001aaa..d30d012 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,26 +27,3 @@ jobs: if: github.ref == 'refs/heads/main' - run: | docker push ghcr.io/${{ github.repository }}/${{ matrix.service }} - deploy: - runs-on: ubuntu-latest - needs: build - if: github.ref == 'refs/heads/main' - environment: - name: production - url: https://saerro.harasse.rs - permissions: - contents: "read" - id-token: "write" - steps: - - id: "auth" - uses: "google-github-actions/auth@v1" - with: - workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} - service_account: ${{ secrets.SERVICE_ACCOUNT }} - - - name: "Set up Cloud SDK" - uses: "google-github-actions/setup-gcloud@v1" - - - name: "Deploy" - run: | - gcloud compute ssh ${{ secrets.VM_NAME }} --zone=us-central1-a --command "cd /opt && sudo docker compose pull && sudo docker compose up -d" From 267a8c11c3a453d6cee5eb39eadfe382d2741349 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 00:07:27 -0500 Subject: [PATCH 15/57] optimize build --- .env | 0 Cargo.lock | 160 +--------------------------------- Dockerfile | 53 ++++++++--- Dockerfile.old | 18 ++++ hack/codegen/Cargo.toml | 1 - services/api/Cargo.toml | 3 +- services/tasks/Cargo.toml | 7 +- services/tasks/src/main.rs | 3 - services/websocket/Cargo.toml | 5 +- 9 files changed, 66 insertions(+), 184 deletions(-) delete mode 100644 .env create mode 100644 Dockerfile.old diff --git a/.env b/.env deleted file mode 100644 index e69de29..0000000 diff --git a/Cargo.lock b/Cargo.lock index 06efec2..d88db8a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -46,7 +46,6 @@ name = "api" version = "0.1.0" dependencies = [ "async-graphql", - "async-graphql-axum", "axum", "chrono", "lazy_static", @@ -97,23 +96,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "async-graphql-axum" -version = "5.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "077bf197d54397cff2324b79d86a7a21b2a83260e62e33eccae33009427897c9" -dependencies = [ - "async-graphql", - "async-trait", - "axum", - "bytes", - "futures-util", - "http-body", - "serde_json", - "tokio-util", - "tower-service", -] - [[package]] name = "async-graphql-derive" version = "5.0.3" @@ -215,11 +197,9 @@ checksum = "08b108ad2665fa3f6e6a517c3d80ec3e77d224c47d605167aefaa5d7ef97fa48" dependencies = [ "async-trait", "axum-core", - "base64", "bitflags", "bytes", "futures-util", - "headers", "http", "http-body", "hyper", @@ -234,10 +214,8 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sha-1", "sync_wrapper", "tokio", - "tokio-tungstenite 0.17.2", "tower", "tower-http", "tower-layer", @@ -343,7 +321,6 @@ dependencies = [ name = "codegen" version = "0.1.0" dependencies = [ - "futures", "lazy_static", "regex", "reqwest", @@ -363,20 +340,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "combine" -version = "4.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" -dependencies = [ - "bytes", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", - "tokio-util", -] - [[package]] name = "core-foundation" version = "0.9.3" @@ -813,31 +776,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "headers" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" -dependencies = [ - "base64", - "bitflags", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" -dependencies = [ - "http", -] - [[package]] name = "heck" version = "0.4.0" @@ -1453,17 +1391,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "r2d2" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" -dependencies = [ - "log", - "parking_lot 0.12.1", - "scheduled-thread-pool", -] - [[package]] name = "rand" version = "0.8.5" @@ -1494,27 +1421,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "redis" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "513b3649f1a111c17954296e4a3b9eecb108b766c803e2b99f179ebe27005985" -dependencies = [ - "async-trait", - "bytes", - "combine", - "futures-util", - "itoa", - "percent-encoding", - "pin-project-lite", - "r2d2", - "ryu", - "sha1_smol", - "tokio", - "tokio-util", - "url", -] - [[package]] name = "redox_syscall" version = "0.2.16" @@ -1629,15 +1535,6 @@ dependencies = [ "windows-sys 0.36.1", ] -[[package]] -name = "scheduled-thread-pool" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "977a7519bff143a44f842fd07e80ad1329295bd71686457f18e496736f4bf9bf" -dependencies = [ - "parking_lot 0.12.1", -] - [[package]] name = "scopeguard" version = "1.1.0" @@ -1736,17 +1633,6 @@ dependencies = [ "serde", ] -[[package]] -name = "sha-1" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sha1" version = "0.10.5" @@ -1758,12 +1644,6 @@ dependencies = [ "digest", ] -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[package]] name = "sha2" version = "0.10.6" @@ -1968,10 +1848,7 @@ name = "tasks" version = "0.1.0" dependencies = [ "async_once", - "dotenvy", "lazy_static", - "once_cell", - "redis", "sqlx", "tokio", ] @@ -2122,18 +1999,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-tungstenite" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite 0.17.3", -] - [[package]] name = "tokio-tungstenite" version = "0.18.0" @@ -2145,7 +2010,7 @@ dependencies = [ "native-tls", "tokio", "tokio-native-tls", - "tungstenite 0.18.0", + "tungstenite", ] [[package]] @@ -2156,7 +2021,6 @@ checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ "bytes", "futures-core", - "futures-io", "futures-sink", "pin-project-lite", "tokio", @@ -2246,25 +2110,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" -[[package]] -name = "tungstenite" -version = "0.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" -dependencies = [ - "base64", - "byteorder", - "bytes", - "http", - "httparse", - "log", - "rand", - "sha-1", - "thiserror", - "url", - "utf-8", -] - [[package]] name = "tungstenite" version = "0.18.0" @@ -2530,7 +2375,6 @@ version = "0.1.0" dependencies = [ "async_once", "axum", - "chrono", "futures", "futures-util", "lazy_static", @@ -2539,7 +2383,7 @@ dependencies = [ "serde_json", "sqlx", "tokio", - "tokio-tungstenite 0.18.0", + "tokio-tungstenite", "url", ] diff --git a/Dockerfile b/Dockerfile index 4710ed4..9417c99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,47 @@ -FROM rust:1.65.0-bullseye AS builder -ARG SERVICE +# Step -1: Grab mold +FROM debian:bullseye as mold +RUN apt-get update && apt-get install -y curl +ARG MOLD_VERSION=1.7.1 +RUN curl -sSL https://github.com/rui314/mold/releases/download/v${MOLD_VERSION}/mold-${MOLD_VERSION}-x86_64-linux.tar.gz | tar xzv && \ + mv mold-${MOLD_VERSION}-x86_64-linux/bin/mold /mold && \ + rm -rf mold-${MOLD_VERSION}-x86_64-linux +# Step 1: Compute a recipe file +FROM rust as planner WORKDIR /app -COPY Cargo.toml Cargo.lock ./ -COPY services ./services -COPY hack ./hack +RUN cargo install cargo-chef +COPY . . +RUN cargo chef prepare --recipe-path recipe.json -RUN cargo build --bin ${SERVICE} --release +# Step 2: Cache project dependencies +FROM rust as cacher +WORKDIR /app +RUN cargo install cargo-chef +RUN apt-get update && apt-get install -y --no-install-recommends clang +COPY --from=mold /mold /mold +COPY --from=planner /app/recipe.json recipe.json +ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang +ENV RUSTFLAGS="-C link-arg=-fuse-ld=/mold" +RUN cargo chef cook --release --recipe-path recipe.json - -FROM debian:bullseye-slim AS target +# Step 3: Build the binary +FROM rust as builder +WORKDIR /app +RUN apt-get update && apt-get install -y --no-install-recommends clang +COPY . . +# Copy over the cached dependencies from above +COPY --from=cacher /app/target target +COPY --from=mold /mold /mold +COPY --from=cacher /usr/local/cargo /usr/local/cargo +ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang +ENV RUSTFLAGS="-C link-arg=-fuse-ld=/mold" ARG SERVICE -RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* -COPY --from=builder /app/target/release/${SERVICE} /app +RUN cargo build --release --bin ${SERVICE} -RUN chmod a+x /app -CMD /app +# Step 4: +# Create a tiny output image. +# It only contains our final binary. +FROM debian:bullseye-slim as runtime +ARG SERVICE +COPY --from=builder /app/target/release/${SERVICE} /app +ENTRYPOINT ["/app"] \ No newline at end of file diff --git a/Dockerfile.old b/Dockerfile.old new file mode 100644 index 0000000..4710ed4 --- /dev/null +++ b/Dockerfile.old @@ -0,0 +1,18 @@ +FROM rust:1.65.0-bullseye AS builder +ARG SERVICE + +WORKDIR /app +COPY Cargo.toml Cargo.lock ./ +COPY services ./services +COPY hack ./hack + +RUN cargo build --bin ${SERVICE} --release + + +FROM debian:bullseye-slim AS target +ARG SERVICE +RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* +COPY --from=builder /app/target/release/${SERVICE} /app + +RUN chmod a+x /app +CMD /app diff --git a/hack/codegen/Cargo.toml b/hack/codegen/Cargo.toml index 450f2e5..9abb83a 100644 --- a/hack/codegen/Cargo.toml +++ b/hack/codegen/Cargo.toml @@ -8,7 +8,6 @@ reqwest = { version="0.11.13", features = ["json"] } tera = { version = "1.17.1", default-features = false } lazy_static = "1.4.0" regex = "1.7.0" -futures = "0.3.25" tokio = { version = "1.22.0", features = ["full"] } serde = { version = "1.0.147", features = ["derive"] } serde_json = "1.0.89" \ No newline at end of file diff --git a/services/api/Cargo.toml b/services/api/Cargo.toml index 178d5a7..b73009a 100644 --- a/services/api/Cargo.toml +++ b/services/api/Cargo.toml @@ -9,10 +9,9 @@ edition = "2021" serde_json = "1.0.89" serde = "1.0.149" async-graphql = { version = "5.0.3", features = ["chrono"] } -async-graphql-axum = "5.0.3" axum = "0.6.1" sqlx = { version = "0.6.2", features = [ "runtime-tokio-native-tls", "postgres", "chrono" ] } -tokio = { version = "1.23.0", features = [ "full" ] } +tokio = { version = "1.23.0" } tower-http = { version = "0.3.5", features = ["cors"] } lazy_static = "1.4.0" reqwest = "0.11.13" diff --git a/services/tasks/Cargo.toml b/services/tasks/Cargo.toml index feb9a2d..7dd5df1 100644 --- a/services/tasks/Cargo.toml +++ b/services/tasks/Cargo.toml @@ -6,10 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -redis = { version = "0.22.1", features = ["aio", "r2d2", "tokio-comp"] } -once_cell = "1.16.0" -tokio = { version = "1.23.0", features = ["full"] } +tokio = { version = "1.23.0" } sqlx = { version = "0.6.2", features = [ "runtime-tokio-native-tls" , "postgres" ] } lazy_static = "1.4.0" -async_once = "0.2.6" -dotenvy = "0.15.6" \ No newline at end of file +async_once = "0.2.6" \ No newline at end of file diff --git a/services/tasks/src/main.rs b/services/tasks/src/main.rs index 579a91d..6b9c61c 100644 --- a/services/tasks/src/main.rs +++ b/services/tasks/src/main.rs @@ -1,5 +1,4 @@ use async_once::AsyncOnce; -use dotenvy::dotenv; use lazy_static::lazy_static; use migrations::cmd_migrate; use sqlx::query; @@ -58,8 +57,6 @@ fn cmd_help() { #[tokio::main] async fn main() { - dotenv().ok(); - let command = args().nth(1).unwrap_or("help".to_string()); match command.as_str() { diff --git a/services/websocket/Cargo.toml b/services/websocket/Cargo.toml index b57fcf2..2f5c66a 100644 --- a/services/websocket/Cargo.toml +++ b/services/websocket/Cargo.toml @@ -10,12 +10,11 @@ lazy_static = "1.4.0" tokio-tungstenite = { version = "0.18.0", features=["native-tls"] } serde = { version = "1.0.149", features = ["derive"] } serde_json = "1.0.89" -tokio = { version = "1.23.0", features = ["full"] } +tokio = { version = "1.23.0" } sqlx = { version = "0.6.2", features = [ "runtime-tokio-native-tls" , "postgres" ] } url = "2.3.1" futures-util = "0.3.25" futures = "0.3.25" async_once = "0.2.6" serde-aux = "4.1.2" -axum = "0.6.1" -chrono = "0.4.23" \ No newline at end of file +axum = "0.6.1" \ No newline at end of file From 5ca02948dfac14cee2484e78016e634fec905936 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 00:20:24 -0500 Subject: [PATCH 16/57] more build optimization --- Cargo.lock | 235 +----- Cargo.toml | 4 +- Dockerfile | 17 +- hack/codegen/.gitignore | 1 + hack/codegen/Cargo.lock | 1411 +++++++++++++++++++++++++++++++++ hack/codegen/src/main.rs | 1 - services/api/Cargo.toml | 2 +- services/tasks/Cargo.toml | 2 +- services/websocket/Cargo.toml | 2 +- 9 files changed, 1429 insertions(+), 246 deletions(-) create mode 100644 hack/codegen/.gitignore create mode 100644 hack/codegen/Cargo.lock diff --git a/Cargo.lock b/Cargo.lock index d88db8a..a64689f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -260,15 +260,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bstr" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" -dependencies = [ - "memchr", -] - [[package]] name = "bumpalo" version = "3.11.1" @@ -317,19 +308,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "codegen" -version = "0.1.0" -dependencies = [ - "lazy_static", - "regex", - "reqwest", - "serde", - "serde_json", - "tera", - "tokio", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -644,7 +622,7 @@ checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" dependencies = [ "futures-core", "lock_api", - "parking_lot 0.11.2", + "parking_lot", ] [[package]] @@ -715,30 +693,6 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "globset" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a" -dependencies = [ - "aho-corasick", - "bstr", - "fnv", - "log", - "regex", -] - -[[package]] -name = "globwalk" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" -dependencies = [ - "bitflags", - "ignore", - "walkdir", -] - [[package]] name = "h2" version = "0.3.15" @@ -935,24 +889,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "ignore" -version = "0.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" -dependencies = [ - "crossbeam-utils", - "globset", - "lazy_static", - "log", - "memchr", - "regex", - "same-file", - "thread_local", - "walkdir", - "winapi-util", -] - [[package]] name = "indexmap" version = "1.9.2" @@ -1222,17 +1158,7 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core 0.8.5", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core 0.9.4", + "parking_lot_core", ] [[package]] @@ -1249,19 +1175,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "parking_lot_core" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-sys 0.42.0", -] - [[package]] name = "paste" version = "1.0.9" @@ -1284,40 +1197,6 @@ dependencies = [ "ucd-trie", ] -[[package]] -name = "pest_derive" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "423c2ba011d6e27b02b482a3707c773d19aec65cc024637aec44e19652e66f63" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e64e6c2c85031c02fdbd9e5c72845445ca0a724d419aa0bc068ac620c9935c1" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pest_meta" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57959b91f0a133f89a68be874a5c88ed689c19cd729ecdb5d762ebf16c64d662" -dependencies = [ - "once_cell", - "pest", - "sha1", -] - [[package]] name = "pin-project" version = "1.0.12" @@ -1516,15 +1395,6 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - [[package]] name = "schannel" version = "0.1.20" @@ -1655,15 +1525,6 @@ dependencies = [ "digest", ] -[[package]] -name = "signal-hook-registry" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" -dependencies = [ - "libc", -] - [[package]] name = "slab" version = "0.4.7" @@ -1867,22 +1728,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "tera" -version = "1.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3df578c295f9ec044ff1c829daf31bb7581d5b3c2a7a3d87419afe1f2531438c" -dependencies = [ - "globwalk", - "lazy_static", - "pest", - "pest_derive", - "regex", - "serde", - "serde_json", - "unic-segment", -] - [[package]] name = "termcolor" version = "1.1.3" @@ -1912,15 +1757,6 @@ dependencies = [ "syn", ] -[[package]] -name = "thread_local" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" -dependencies = [ - "once_cell", -] - [[package]] name = "time" version = "0.1.45" @@ -1959,9 +1795,7 @@ dependencies = [ "memchr", "mio", "num_cpus", - "parking_lot 0.12.1", "pin-project-lite", - "signal-hook-registry", "socket2", "tokio-macros", "windows-sys 0.42.0", @@ -1969,9 +1803,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.8.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2", "quote", @@ -2142,56 +1976,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" -[[package]] -name = "unic-char-property" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" -dependencies = [ - "unic-char-range", -] - -[[package]] -name = "unic-char-range" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" - -[[package]] -name = "unic-common" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" - -[[package]] -name = "unic-segment" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" -dependencies = [ - "unic-ucd-segment", -] - -[[package]] -name = "unic-ucd-segment" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" -dependencies = [ - "unic-char-property", - "unic-char-range", - "unic-ucd-version", -] - -[[package]] -name = "unic-ucd-version" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" -dependencies = [ - "unic-common", -] - [[package]] name = "unicode-bidi" version = "0.3.8" @@ -2260,17 +2044,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "walkdir" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" -dependencies = [ - "same-file", - "winapi", - "winapi-util", -] - [[package]] name = "want" version = "0.3.0" diff --git a/Cargo.toml b/Cargo.toml index b180b7b..26b2493 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,7 @@ [workspace] members = [ "services/*", - "hack/*" +] +exclude = [ + "hack/codegen", ] \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 9417c99..9a584ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,40 +1,37 @@ # Step -1: Grab mold -FROM debian:bullseye as mold +FROM lukemathwalker/cargo-chef as rust-base RUN apt-get update && apt-get install -y curl ARG MOLD_VERSION=1.7.1 +RUN apt-get update && apt-get install -y --no-install-recommends clang RUN curl -sSL https://github.com/rui314/mold/releases/download/v${MOLD_VERSION}/mold-${MOLD_VERSION}-x86_64-linux.tar.gz | tar xzv && \ mv mold-${MOLD_VERSION}-x86_64-linux/bin/mold /mold && \ rm -rf mold-${MOLD_VERSION}-x86_64-linux +ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang +ENV RUSTFLAGS="-C link-arg=-fuse-ld=/mold" # Step 1: Compute a recipe file -FROM rust as planner +FROM rust-base as planner WORKDIR /app RUN cargo install cargo-chef COPY . . RUN cargo chef prepare --recipe-path recipe.json # Step 2: Cache project dependencies -FROM rust as cacher +FROM rust-base as cacher WORKDIR /app RUN cargo install cargo-chef -RUN apt-get update && apt-get install -y --no-install-recommends clang COPY --from=mold /mold /mold COPY --from=planner /app/recipe.json recipe.json -ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang -ENV RUSTFLAGS="-C link-arg=-fuse-ld=/mold" RUN cargo chef cook --release --recipe-path recipe.json # Step 3: Build the binary -FROM rust as builder +FROM rust-base as builder WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends clang COPY . . # Copy over the cached dependencies from above COPY --from=cacher /app/target target -COPY --from=mold /mold /mold COPY --from=cacher /usr/local/cargo /usr/local/cargo -ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang -ENV RUSTFLAGS="-C link-arg=-fuse-ld=/mold" ARG SERVICE RUN cargo build --release --bin ${SERVICE} diff --git a/hack/codegen/.gitignore b/hack/codegen/.gitignore new file mode 100644 index 0000000..1de5659 --- /dev/null +++ b/hack/codegen/.gitignore @@ -0,0 +1 @@ +target \ No newline at end of file diff --git a/hack/codegen/Cargo.lock b/hack/codegen/Cargo.lock new file mode 100644 index 0000000..c3ec357 --- /dev/null +++ b/hack/codegen/Cargo.lock @@ -0,0 +1,1411 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +dependencies = [ + "memchr", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "block-buffer" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bstr" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +dependencies = [ + "memchr", +] + +[[package]] +name = "bumpalo" +version = "3.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" + +[[package]] +name = "bytes" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" + +[[package]] +name = "cc" +version = "1.0.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "codegen" +version = "0.1.0" +dependencies = [ + "lazy_static", + "regex", + "reqwest", + "serde", + "serde_json", + "tera", + "tokio", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + +[[package]] +name = "cpufeatures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "digest" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "encoding_rs" +version = "0.8.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" + +[[package]] +name = "futures-sink" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" + +[[package]] +name = "futures-task" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-util" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "generic-array" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "globset" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a" +dependencies = [ + "aho-corasick", + "bstr", + "fnv", + "log", + "regex", +] + +[[package]] +name = "globwalk" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" +dependencies = [ + "bitflags", + "ignore", + "walkdir", +] + +[[package]] +name = "h2" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "http" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "hyper" +version = "0.14.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "ignore" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" +dependencies = [ + "crossbeam-utils", + "globset", + "lazy_static", + "log", + "memchr", + "regex", + "same-file", + "thread_local", + "walkdir", + "winapi-util", +] + +[[package]] +name = "indexmap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipnet" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" + +[[package]] +name = "itoa" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" + +[[package]] +name = "js-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.138" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" + +[[package]] +name = "lock_api" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "mio" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.42.0", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "num_cpus" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "once_cell" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" + +[[package]] +name = "openssl" +version = "0.10.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29d971fd5722fec23977260f6e81aa67d2f22cadbdc2aa049f1022d9a3be1566" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5454462c0eced1e97f2ec09036abc8da362e66802f66fd20f86854d9d8cbcbc4" +dependencies = [ + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys 0.42.0", +] + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "pest" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc8bed3549e0f9b0a2a78bf7c0018237a2cdf085eecbbc048e52612438e4e9d0" +dependencies = [ + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc078600d06ff90d4ed238f0119d84ab5d43dbaad278b0e33a8820293b32344" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28a1af60b1c4148bb269006a750cff8e2ea36aff34d2d96cf7be0b14d1bed23c" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pest_meta" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fec8605d59fc2ae0c6c1aefc0c7c7a9769732017c0ce07f7a9cfffa7b4404f20" +dependencies = [ + "once_cell", + "pest", + "sha1", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" + +[[package]] +name = "proc-macro2" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] + +[[package]] +name = "reqwest" +version = "0.11.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "ryu" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +dependencies = [ + "lazy_static", + "windows-sys 0.36.1", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "security-framework" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "serde" +version = "1.0.150" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.150" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +dependencies = [ + "libc", +] + +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "syn" +version = "1.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +dependencies = [ + "cfg-if", + "fastrand", + "libc", + "redox_syscall", + "remove_dir_all", + "winapi", +] + +[[package]] +name = "tera" +version = "1.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df578c295f9ec044ff1c829daf31bb7581d5b3c2a7a3d87419afe1f2531438c" +dependencies = [ + "globwalk", + "lazy_static", + "pest", + "pest_derive", + "regex", + "serde", + "serde_json", + "unic-segment", +] + +[[package]] +name = "thiserror" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "tokio" +version = "1.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.42.0", +] + +[[package]] +name = "tokio-macros" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "ucd-trie" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" + +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-segment" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" +dependencies = [ + "unic-ucd-segment", +] + +[[package]] +name = "unic-ucd-segment" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + +[[package]] +name = "unicode-ident" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + +[[package]] +name = "web-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] diff --git a/hack/codegen/src/main.rs b/hack/codegen/src/main.rs index 68ac6ed..390f0d1 100644 --- a/hack/codegen/src/main.rs +++ b/hack/codegen/src/main.rs @@ -1,5 +1,4 @@ use std::process; - use lazy_static::lazy_static; use regex::{Regex, RegexBuilder}; use serde::{Deserialize, Serialize}; diff --git a/services/api/Cargo.toml b/services/api/Cargo.toml index b73009a..40bd5f4 100644 --- a/services/api/Cargo.toml +++ b/services/api/Cargo.toml @@ -11,7 +11,7 @@ serde = "1.0.149" async-graphql = { version = "5.0.3", features = ["chrono"] } axum = "0.6.1" sqlx = { version = "0.6.2", features = [ "runtime-tokio-native-tls", "postgres", "chrono" ] } -tokio = { version = "1.23.0" } +tokio = { version = "1.23.0", features = ["macros"] } tower-http = { version = "0.3.5", features = ["cors"] } lazy_static = "1.4.0" reqwest = "0.11.13" diff --git a/services/tasks/Cargo.toml b/services/tasks/Cargo.toml index 7dd5df1..9f8e13b 100644 --- a/services/tasks/Cargo.toml +++ b/services/tasks/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tokio = { version = "1.23.0" } +tokio = { version = "1.23.0", features = ["macros"] } sqlx = { version = "0.6.2", features = [ "runtime-tokio-native-tls" , "postgres" ] } lazy_static = "1.4.0" async_once = "0.2.6" \ No newline at end of file diff --git a/services/websocket/Cargo.toml b/services/websocket/Cargo.toml index 2f5c66a..b9d26a2 100644 --- a/services/websocket/Cargo.toml +++ b/services/websocket/Cargo.toml @@ -10,7 +10,7 @@ lazy_static = "1.4.0" tokio-tungstenite = { version = "0.18.0", features=["native-tls"] } serde = { version = "1.0.149", features = ["derive"] } serde_json = "1.0.89" -tokio = { version = "1.23.0" } +tokio = { version = "1.23.0", features = ["macros"] } sqlx = { version = "0.6.2", features = [ "runtime-tokio-native-tls" , "postgres" ] } url = "2.3.1" futures-util = "0.3.25" From 83f5f02a8804e62726a880fa8d8fb8089520bb97 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 00:23:02 -0500 Subject: [PATCH 17/57] fix mold import --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9a584ed..642be0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,7 @@ # Step -1: Grab mold FROM lukemathwalker/cargo-chef as rust-base -RUN apt-get update && apt-get install -y curl +RUN apt-get update && apt-get install -y --no-install-recommends curl clang ARG MOLD_VERSION=1.7.1 -RUN apt-get update && apt-get install -y --no-install-recommends clang RUN curl -sSL https://github.com/rui314/mold/releases/download/v${MOLD_VERSION}/mold-${MOLD_VERSION}-x86_64-linux.tar.gz | tar xzv && \ mv mold-${MOLD_VERSION}-x86_64-linux/bin/mold /mold && \ rm -rf mold-${MOLD_VERSION}-x86_64-linux @@ -20,7 +19,6 @@ RUN cargo chef prepare --recipe-path recipe.json FROM rust-base as cacher WORKDIR /app RUN cargo install cargo-chef -COPY --from=mold /mold /mold COPY --from=planner /app/recipe.json recipe.json RUN cargo chef cook --release --recipe-path recipe.json From 9365abc7f89191a08ea6d0fb7c42772b4a0fa25f Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 00:23:31 -0500 Subject: [PATCH 18/57] remove extra clang --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 642be0d..c665d4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,6 @@ RUN cargo chef cook --release --recipe-path recipe.json # Step 3: Build the binary FROM rust-base as builder WORKDIR /app -RUN apt-get update && apt-get install -y --no-install-recommends clang COPY . . # Copy over the cached dependencies from above COPY --from=cacher /app/target target From c483764b4b9266c4bba639737182eb7e90355c07 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 00:30:50 -0500 Subject: [PATCH 19/57] bin-select on cargo chef --- Dockerfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index c665d4a..ddbb0d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ # Step -1: Grab mold FROM lukemathwalker/cargo-chef as rust-base +WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends curl clang ARG MOLD_VERSION=1.7.1 RUN curl -sSL https://github.com/rui314/mold/releases/download/v${MOLD_VERSION}/mold-${MOLD_VERSION}-x86_64-linux.tar.gz | tar xzv && \ @@ -10,21 +11,18 @@ ENV RUSTFLAGS="-C link-arg=-fuse-ld=/mold" # Step 1: Compute a recipe file FROM rust-base as planner -WORKDIR /app -RUN cargo install cargo-chef +ARG SERVICE COPY . . -RUN cargo chef prepare --recipe-path recipe.json +RUN cargo chef prepare --recipe-path recipe.json --bin ${SERVICE} # Step 2: Cache project dependencies FROM rust-base as cacher -WORKDIR /app -RUN cargo install cargo-chef +ARG SERVICE COPY --from=planner /app/recipe.json recipe.json -RUN cargo chef cook --release --recipe-path recipe.json +RUN cargo chef cook --release --recipe-path recipe.json --bin ${SERVICE} # Step 3: Build the binary FROM rust-base as builder -WORKDIR /app COPY . . # Copy over the cached dependencies from above COPY --from=cacher /app/target target From b8fa5d95956f24a27cbee34a90c5d1a4075fe962 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 00:40:39 -0500 Subject: [PATCH 20/57] fix bin-selects --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ddbb0d5..c10fc4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,11 +13,12 @@ ENV RUSTFLAGS="-C link-arg=-fuse-ld=/mold" FROM rust-base as planner ARG SERVICE COPY . . -RUN cargo chef prepare --recipe-path recipe.json --bin ${SERVICE} +RUN cargo chef prepare --recipe-path recipe.json --bin services/${SERVICE} # Step 2: Cache project dependencies FROM rust-base as cacher ARG SERVICE +COPY . . COPY --from=planner /app/recipe.json recipe.json RUN cargo chef cook --release --recipe-path recipe.json --bin ${SERVICE} From 6bd048a9f4850215cf915fd909ce74718ed7f3f1 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 00:43:59 -0500 Subject: [PATCH 21/57] gha cache docker build --- .github/workflows/ci.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d30d012..907f939 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,9 +18,11 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - run: | - docker build . \ + docker buildx build . \ --build-arg SERVICE=${{ matrix.service }} \ - -t ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} + -t ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} \ + --cache-to type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }} \ + --cache-from type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }} . - run: | docker tag ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} \ ghcr.io/${{ github.repository }}/${{ matrix.service }}:latest From 505e71f65f0db6c39d7a01d04ceee1016f7c1283 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 00:45:34 -0500 Subject: [PATCH 22/57] fix build command --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 907f939..9591200 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,7 +22,7 @@ jobs: --build-arg SERVICE=${{ matrix.service }} \ -t ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} \ --cache-to type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }} \ - --cache-from type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }} . + --cache-from type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }} - run: | docker tag ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} \ ghcr.io/${{ github.repository }}/${{ matrix.service }}:latest From a9d1daf397b0c1617c4a0ef98e8b4d05621fca64 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 00:49:53 -0500 Subject: [PATCH 23/57] remove cacher copy --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c10fc4e..e4b373e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,6 @@ RUN cargo chef prepare --recipe-path recipe.json --bin services/${SERVICE} # Step 2: Cache project dependencies FROM rust-base as cacher ARG SERVICE -COPY . . COPY --from=planner /app/recipe.json recipe.json RUN cargo chef cook --release --recipe-path recipe.json --bin ${SERVICE} From 97474de07e5d4584be747d2d3a00da69be17100f Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 00:52:02 -0500 Subject: [PATCH 24/57] reset sqlx features --- Cargo.lock | 17 ----------------- services/api/Cargo.toml | 2 +- services/tasks/Cargo.toml | 2 +- services/websocket/Cargo.toml | 2 +- 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a64689f..5347d90 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -343,21 +343,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" - [[package]] name = "crossbeam-queue" version = "0.3.8" @@ -1590,7 +1575,6 @@ dependencies = [ "byteorder", "bytes", "chrono", - "crc", "crossbeam-queue", "dirs", "dotenvy", @@ -1640,7 +1624,6 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "sha2", "sqlx-core", "sqlx-rt", "syn", diff --git a/services/api/Cargo.toml b/services/api/Cargo.toml index 40bd5f4..3c4309e 100644 --- a/services/api/Cargo.toml +++ b/services/api/Cargo.toml @@ -10,7 +10,7 @@ serde_json = "1.0.89" serde = "1.0.149" async-graphql = { version = "5.0.3", features = ["chrono"] } axum = "0.6.1" -sqlx = { version = "0.6.2", features = [ "runtime-tokio-native-tls", "postgres", "chrono" ] } +sqlx = { version = "0.6.2", default_features = false, features = [ "runtime-tokio-native-tls", "postgres", "chrono" ] } tokio = { version = "1.23.0", features = ["macros"] } tower-http = { version = "0.3.5", features = ["cors"] } lazy_static = "1.4.0" diff --git a/services/tasks/Cargo.toml b/services/tasks/Cargo.toml index 9f8e13b..e649c32 100644 --- a/services/tasks/Cargo.toml +++ b/services/tasks/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" [dependencies] tokio = { version = "1.23.0", features = ["macros"] } -sqlx = { version = "0.6.2", features = [ "runtime-tokio-native-tls" , "postgres" ] } +sqlx = { version = "0.6.2", default_features = false, features = [ "runtime-tokio-native-tls" , "postgres" ] } lazy_static = "1.4.0" async_once = "0.2.6" \ No newline at end of file diff --git a/services/websocket/Cargo.toml b/services/websocket/Cargo.toml index b9d26a2..d9f9832 100644 --- a/services/websocket/Cargo.toml +++ b/services/websocket/Cargo.toml @@ -11,7 +11,7 @@ tokio-tungstenite = { version = "0.18.0", features=["native-tls"] } serde = { version = "1.0.149", features = ["derive"] } serde_json = "1.0.89" tokio = { version = "1.23.0", features = ["macros"] } -sqlx = { version = "0.6.2", features = [ "runtime-tokio-native-tls" , "postgres" ] } +sqlx = { version = "0.6.2", default_features = false, features = [ "runtime-tokio-native-tls" , "postgres" ] } url = "2.3.1" futures-util = "0.3.25" futures = "0.3.25" From 9b6b261c169d5a9ef293e4dce5ed4c5afb166811 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 00:57:58 -0500 Subject: [PATCH 25/57] debug why gha cache is failing --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9591200..c71a5b9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,6 +17,7 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - run: docker buildx create --use --driver=docker-container - run: | docker buildx build . \ --build-arg SERVICE=${{ matrix.service }} \ From 0f710f27124283fa554203781a14fd0a8e6ae900 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 01:07:15 -0500 Subject: [PATCH 26/57] tokio machine broke --- Cargo.lock | 105 ++++++++++++++++++++++++++++++++-- services/api/Cargo.toml | 4 +- services/tasks/Cargo.toml | 4 +- services/websocket/Cargo.toml | 6 +- 4 files changed, 106 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5347d90..03fb555 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1023,7 +1023,7 @@ dependencies = [ "log", "memchr", "mime", - "spin", + "spin 0.9.4", "version_check", ] @@ -1368,6 +1368,42 @@ dependencies = [ "winreg", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted", + "web-sys", + "winapi", +] + +[[package]] +name = "rustls" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" +dependencies = [ + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" +dependencies = [ + "base64", +] + [[package]] name = "rustversion" version = "1.0.9" @@ -1402,6 +1438,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "security-framework" version = "2.7.0" @@ -1535,6 +1581,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "spin" version = "0.9.4" @@ -1598,6 +1650,8 @@ dependencies = [ "paste", "percent-encoding", "rand", + "rustls", + "rustls-pemfile", "serde", "serde_json", "sha1", @@ -1609,6 +1663,7 @@ dependencies = [ "thiserror", "tokio-stream", "url", + "webpki-roots", "whoami", ] @@ -1636,10 +1691,9 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24c5b2d25fa654cc5f841750b8e1cdedbe21189bf9a9382ee90bfa9dd3562396" dependencies = [ - "native-tls", "once_cell", "tokio", - "tokio-native-tls", + "tokio-rustls", ] [[package]] @@ -1805,6 +1859,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.23.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +dependencies = [ + "rustls", + "tokio", + "webpki", +] + [[package]] name = "tokio-stream" version = "0.1.11" @@ -1824,10 +1889,12 @@ checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" dependencies = [ "futures-util", "log", - "native-tls", + "rustls", "tokio", - "tokio-native-tls", + "tokio-rustls", "tungstenite", + "webpki", + "webpki-roots", ] [[package]] @@ -1939,12 +2006,13 @@ dependencies = [ "http", "httparse", "log", - "native-tls", "rand", + "rustls", "sha1", "thiserror", "url", "utf-8", + "webpki", ] [[package]] @@ -1998,6 +2066,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "url" version = "2.3.1" @@ -2125,6 +2199,25 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki", +] + [[package]] name = "websocket" version = "0.1.0" diff --git a/services/api/Cargo.toml b/services/api/Cargo.toml index 3c4309e..f6fa88a 100644 --- a/services/api/Cargo.toml +++ b/services/api/Cargo.toml @@ -10,8 +10,8 @@ serde_json = "1.0.89" serde = "1.0.149" async-graphql = { version = "5.0.3", features = ["chrono"] } axum = "0.6.1" -sqlx = { version = "0.6.2", default_features = false, features = [ "runtime-tokio-native-tls", "postgres", "chrono" ] } -tokio = { version = "1.23.0", features = ["macros"] } +sqlx = { version = "0.6.2", default_features = false, features = [ "runtime-tokio-rustls", "postgres", "chrono" ] } +tokio = { version = "1.23.0", features = ["macros", "rt-multi-thread"] } tower-http = { version = "0.3.5", features = ["cors"] } lazy_static = "1.4.0" reqwest = "0.11.13" diff --git a/services/tasks/Cargo.toml b/services/tasks/Cargo.toml index e649c32..203ad2a 100644 --- a/services/tasks/Cargo.toml +++ b/services/tasks/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tokio = { version = "1.23.0", features = ["macros"] } -sqlx = { version = "0.6.2", default_features = false, features = [ "runtime-tokio-native-tls" , "postgres" ] } +tokio = { version = "1.23.0", features = ["macros", "rt-multi-thread"] } +sqlx = { version = "0.6.2", default_features = false, features = [ "runtime-tokio-rustls" , "postgres" ] } lazy_static = "1.4.0" async_once = "0.2.6" \ No newline at end of file diff --git a/services/websocket/Cargo.toml b/services/websocket/Cargo.toml index d9f9832..1366c30 100644 --- a/services/websocket/Cargo.toml +++ b/services/websocket/Cargo.toml @@ -7,11 +7,11 @@ edition = "2021" [dependencies] lazy_static = "1.4.0" -tokio-tungstenite = { version = "0.18.0", features=["native-tls"] } +tokio-tungstenite = { version = "0.18.0", features=["rustls-tls-webpki-roots"] } serde = { version = "1.0.149", features = ["derive"] } serde_json = "1.0.89" -tokio = { version = "1.23.0", features = ["macros"] } -sqlx = { version = "0.6.2", default_features = false, features = [ "runtime-tokio-native-tls" , "postgres" ] } +tokio = { version = "1.23.0", features = ["macros", "rt-multi-thread"] } +sqlx = { version = "0.6.2", default_features = false, features = [ "runtime-tokio-rustls" , "postgres" ] } url = "2.3.1" futures-util = "0.3.25" futures = "0.3.25" From 1c3440d9198734107272fd067f600a5d5e214def Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 01:11:55 -0500 Subject: [PATCH 27/57] thonk --- .github/workflows/ci.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c71a5b9..2601846 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,14 +19,16 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - run: docker buildx create --use --driver=docker-container - run: | + TAG_LATEST_IF_MASTER=$(if [ "$GITHUB_REF_NAME" = "main" ]; then echo "-t ghcr.io/${{ github.repository }}/${{ matrix.service }}:latest"; else echo ""; fi) docker buildx build . \ --build-arg SERVICE=${{ matrix.service }} \ - -t ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} \ + -t ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} $TAG_LATEST_IF_MASTER \ + --push \ --cache-to type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }} \ --cache-from type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }} - - run: | - docker tag ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} \ - ghcr.io/${{ github.repository }}/${{ matrix.service }}:latest - if: github.ref == 'refs/heads/main' + # - run: | + # docker tag ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} \ + # ghcr.io/${{ github.repository }}/${{ matrix.service }}:latest + # if: github.ref == 'refs/heads/main' - run: | docker push ghcr.io/${{ github.repository }}/${{ matrix.service }} From 2d6da8343dc4aa1a08a12664cd2bbbf60550ae81 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Tue, 13 Dec 2022 01:17:31 -0500 Subject: [PATCH 28/57] remove double push: --- .github/workflows/ci.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2601846..efa9251 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,9 +26,3 @@ jobs: --push \ --cache-to type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }} \ --cache-from type=gha,scope=$GITHUB_REF_NAME-${{ matrix.service }} - # - run: | - # docker tag ghcr.io/${{ github.repository }}/${{ matrix.service }}:${{ github.sha }} \ - # ghcr.io/${{ github.repository }}/${{ matrix.service }}:latest - # if: github.ref == 'refs/heads/main' - - run: | - docker push ghcr.io/${{ github.repository }}/${{ matrix.service }} From 9940e9dd90638078e9a5b144ad51dee863a4a109 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Wed, 14 Dec 2022 08:40:59 -0500 Subject: [PATCH 29/57] zerofill analytics --- services/api/src/analytics.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/api/src/analytics.rs b/services/api/src/analytics.rs index b88ee90..a1edb5f 100644 --- a/services/api/src/analytics.rs +++ b/services/api/src/analytics.rs @@ -24,7 +24,7 @@ impl Analytics { ) -> Vec { let pool = ctx.data::>().unwrap(); - let sql = format!("SELECT time_bucket('{} seconds', time) AS bucket, count(*), event_name, world_id FROM analytics WHERE time > now() - interval '{}' {} GROUP BY bucket, world_id, event_name ORDER BY bucket ASC", + let sql = format!("SELECT time_bucket_gapfill('{} seconds', time, start => now() - '{}'::interval, finish => now()) AS bucket, CASE WHEN count(*) IS NULL THEN 0 ELSE count(*) END AS count, event_name, world_id FROM analytics WHERE time > now() - '{}'::interval {} GROUP BY bucket, world_id, event_name ORDER BY bucket ASC", if hi_precision { 5 } else { @@ -35,6 +35,11 @@ impl Analytics { } else { "1 day" }, + if hi_precision { + "1 hour" + } else { + "1 day" + }, if let Some(world_id) = world_id { format!("AND world_id = {}", world_id) } else { From 679b49ff886a555e192bb794f3c11ed52f6b2a02 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Mon, 23 Jan 2023 08:53:06 -0500 Subject: [PATCH 30/57] add general maintenance script to always run in prod --- services/tasks/src/main.rs | 12 ++++++++++++ services/tasks/src/migrations.rs | 14 +++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/services/tasks/src/main.rs b/services/tasks/src/main.rs index 6b9c61c..2387e59 100644 --- a/services/tasks/src/main.rs +++ b/services/tasks/src/main.rs @@ -66,6 +66,18 @@ async fn main() { cmd_prune().await; tokio::time::sleep(tokio::time::Duration::from_secs(60 * 5)).await; }, + "maintenance" => { + println!("Running maintenance tasks..."); + println!("Checking if DB is migrated..."); + if !migrations::is_migrated().await { + println!("DB is not migrated, running migrations..."); + cmd_migrate().await; + } + + println!("Running prune..."); + cmd_prune().await; + println!("Done!"); + } "migrate" => cmd_migrate().await, _ => { println!("Unknown command: {}", command); diff --git a/services/tasks/src/migrations.rs b/services/tasks/src/migrations.rs index 658a9aa..46ee116 100644 --- a/services/tasks/src/migrations.rs +++ b/services/tasks/src/migrations.rs @@ -1,5 +1,5 @@ use crate::PG; -use sqlx::query; +use sqlx::{query, Row}; pub async fn cmd_migrate() { println!("Migrating database..."); @@ -173,3 +173,15 @@ async fn migrate_analytics() { println!("ANALYTICS => done!"); } + +pub async fn is_migrated() -> bool { + let pool = PG.get().await; + + let tables: i64 = query("SELECT count(1) FROM pg_tables WHERE schemaname = 'public' AND tablename IN ('players', 'vehicles', 'classes', 'analytics');") + .fetch_one(pool) + .await + .unwrap() + .get(0); + + tables == 4 +} From bca70e2d5be3b731136e30c9bf02508a15530271 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Sun, 5 Mar 2023 11:34:16 -0500 Subject: [PATCH 31/57] fix faction IDs --- .gitignore | 2 ++ services/api/src/classes.rs | 11 +++++++---- services/api/src/factions.rs | 4 ++++ services/api/src/main.rs | 1 + services/api/src/population.rs | 13 ++++++++----- services/api/src/vehicles.rs | 11 +++++++---- 6 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 services/api/src/factions.rs diff --git a/.gitignore b/.gitignore index ea8c4bf..7dc35cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /target +.DS_Store +*/.DS_Store \ No newline at end of file diff --git a/services/api/src/classes.rs b/services/api/src/classes.rs index 8629bfd..95817cd 100644 --- a/services/api/src/classes.rs +++ b/services/api/src/classes.rs @@ -1,4 +1,7 @@ -use crate::utils::{Filters, IdOrNameBy}; +use crate::{ + factions::{NC, TR, VS}, + utils::{Filters, IdOrNameBy}, +}; use async_graphql::{Context, Object}; use sqlx::{Pool, Postgres, Row}; @@ -39,7 +42,7 @@ impl Class { self.fetch( ctx, Filters { - faction: Some(IdOrNameBy::Id(1)), + faction: Some(IdOrNameBy::Id(NC)), ..self.filters.clone() }, ) @@ -49,7 +52,7 @@ impl Class { self.fetch( ctx, Filters { - faction: Some(IdOrNameBy::Id(2)), + faction: Some(IdOrNameBy::Id(TR)), ..self.filters.clone() }, ) @@ -59,7 +62,7 @@ impl Class { self.fetch( ctx, Filters { - faction: Some(IdOrNameBy::Id(3)), + faction: Some(IdOrNameBy::Id(VS)), ..self.filters.clone() }, ) diff --git a/services/api/src/factions.rs b/services/api/src/factions.rs new file mode 100644 index 0000000..b542087 --- /dev/null +++ b/services/api/src/factions.rs @@ -0,0 +1,4 @@ +pub const VS: i32 = 1; +pub const NC: i32 = 2; +pub const TR: i32 = 3; +pub const NSO: i32 = 4; diff --git a/services/api/src/main.rs b/services/api/src/main.rs index d9fc9f6..414b6fb 100644 --- a/services/api/src/main.rs +++ b/services/api/src/main.rs @@ -1,5 +1,6 @@ mod analytics; mod classes; +mod factions; mod health; mod population; mod query; diff --git a/services/api/src/population.rs b/services/api/src/population.rs index 4e7f9f7..0b4ee92 100644 --- a/services/api/src/population.rs +++ b/services/api/src/population.rs @@ -1,4 +1,7 @@ -use crate::utils::Filters; +use crate::{ + factions::{NC, NSO, TR, VS}, + utils::Filters, +}; use async_graphql::{Context, Object}; use sqlx::{Pool, Postgres, Row}; @@ -58,16 +61,16 @@ impl Population { query } async fn nc<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { - self.by_faction(ctx, 1).await + self.by_faction(ctx, NC).await } async fn vs<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { - self.by_faction(ctx, 2).await + self.by_faction(ctx, VS).await } async fn tr<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { - self.by_faction(ctx, 3).await + self.by_faction(ctx, TR).await } async fn ns<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { - self.by_faction(ctx, 4).await + self.by_faction(ctx, NSO).await } } diff --git a/services/api/src/vehicles.rs b/services/api/src/vehicles.rs index bf53dd2..c7facfa 100644 --- a/services/api/src/vehicles.rs +++ b/services/api/src/vehicles.rs @@ -1,4 +1,7 @@ -use crate::utils::{Filters, IdOrNameBy}; +use crate::{ + factions::{NC, TR, VS}, + utils::{Filters, IdOrNameBy}, +}; use async_graphql::{Context, Object}; use sqlx::{Pool, Postgres, Row}; @@ -39,7 +42,7 @@ impl Vehicle { self.fetch( ctx, Filters { - faction: Some(IdOrNameBy::Id(1)), + faction: Some(IdOrNameBy::Id(NC)), ..self.filters.clone() }, ) @@ -49,7 +52,7 @@ impl Vehicle { self.fetch( ctx, Filters { - faction: Some(IdOrNameBy::Id(2)), + faction: Some(IdOrNameBy::Id(TR)), ..self.filters.clone() }, ) @@ -59,7 +62,7 @@ impl Vehicle { self.fetch( ctx, Filters { - faction: Some(IdOrNameBy::Id(3)), + faction: Some(IdOrNameBy::Id(VS)), ..self.filters.clone() }, ) From 24437b5520f1ad3fa5df03c8c30251794ffd22d4 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Sat, 20 May 2023 23:17:57 -0400 Subject: [PATCH 32/57] fix lightning, add corsair; update packages --- Cargo.lock | 253 ++++++++++++++++++++++++++-------- services/api/Cargo.toml | 12 +- services/api/src/vehicles.rs | 8 +- services/websocket/Cargo.toml | 8 +- 4 files changed, 209 insertions(+), 72 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 03fb555..e58c42d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,21 +65,22 @@ checksum = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a" [[package]] name = "async-graphql" -version = "5.0.3" +version = "5.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42bb92ffef089e5b61e90bcc004c9689554dfb5a150d88e81c7f6fef9e76eeae" +checksum = "6ae09afb01514b3dbd6328547b2b11fcbcb0205d9c5e6f2e17e60cb166a82d7f" dependencies = [ "async-graphql-derive", "async-graphql-parser", "async-graphql-value", "async-stream", "async-trait", - "base64", + "base64 0.13.1", "bytes", "chrono", "fast_chemail", "fnv", "futures-util", + "handlebars", "http", "indexmap", "mime", @@ -98,9 +99,9 @@ dependencies = [ [[package]] name = "async-graphql-derive" -version = "5.0.3" +version = "5.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa579c7cea32030600994d579554b257e10d5ad87705f3d150b49ee08bd629d" +checksum = "60ae62851dd3ff9a7550aee75e848e8834b75285b458753e98dd71d0733ad3f2" dependencies = [ "Inflector", "async-graphql-parser", @@ -108,15 +109,15 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.104", "thiserror", ] [[package]] name = "async-graphql-parser" -version = "5.0.3" +version = "5.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b67a5bea60997ca72908854655ae87f7970dc7d786d9a42fd1d17069fa42ebc" +checksum = "9e6ee332acd99d2c50c3443beae46e9ed784c205eead9a668b7b5118b4a60a8b" dependencies = [ "async-graphql-value", "pest", @@ -126,9 +127,9 @@ dependencies = [ [[package]] name = "async-graphql-value" -version = "5.0.3" +version = "5.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c2721eb88245ca055e148a3f03cb11a88535c206ac5a7c59e9edb22816320a" +checksum = "122da50452383410545b9428b579f4cda5616feb6aa0aff0003500c53fcff7b7" dependencies = [ "bytes", "indexmap", @@ -154,18 +155,18 @@ checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.104", ] [[package]] name = "async-trait" -version = "0.1.58" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] @@ -191,9 +192,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.1" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08b108ad2665fa3f6e6a517c3d80ec3e77d224c47d605167aefaa5d7ef97fa48" +checksum = "2fb79c228270dcf2426e74864cabc94babb5dbab01a4314e702d2f16540e1591" dependencies = [ "async-trait", "axum-core", @@ -224,9 +225,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b8558f5a0581152dc94dcd289132a1d377494bdeafcd41869b3258e3e2ad92" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", "bytes", @@ -245,6 +246,12 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" + [[package]] name = "bitflags" version = "1.3.2" @@ -396,7 +403,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 1.0.104", ] [[package]] @@ -413,7 +420,7 @@ checksum = "1362b0ddcfc4eb0a1f57b68bd77dd99f0e826958a96abd0ae9bd092e114ffed6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.104", ] [[package]] @@ -437,7 +444,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn", + "syn 1.0.104", ] [[package]] @@ -448,7 +455,7 @@ checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", - "syn", + "syn 1.0.104", ] [[package]] @@ -624,7 +631,7 @@ checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.104", ] [[package]] @@ -697,6 +704,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "handlebars" +version = "4.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +dependencies = [ + "log", + "pest", + "pest_derive", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -932,9 +953,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.137" +version = "0.2.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" [[package]] name = "link-cplusplus" @@ -1113,7 +1134,7 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.104", ] [[package]] @@ -1174,14 +1195,48 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f400b0f7905bf702f9f3dc3df5a121b16c54e9e8012c082905fdf09a931861a" +checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" dependencies = [ "thiserror", "ucd-trie", ] +[[package]] +name = "pest_derive" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "pest_meta" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + [[package]] name = "pin-project" version = "1.0.12" @@ -1199,7 +1254,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.104", ] [[package]] @@ -1239,18 +1294,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.21" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" dependencies = [ "proc-macro2", ] @@ -1333,11 +1388,11 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.13" +version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" +checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ - "base64", + "base64 0.21.0", "bytes", "encoding_rs", "futures-core", @@ -1401,7 +1456,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" dependencies = [ - "base64", + "base64 0.13.1", ] [[package]] @@ -1473,9 +1528,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.149" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256b9932320c590e707b94576e3cc1f7c9024d0ee6612dfbcf1cb106cbe8e055" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" dependencies = [ "serde_derive", ] @@ -1493,20 +1548,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.149" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eae9b04cbffdfd550eb462ed33bc6a1b68c935127d008b27444d08380f94e4" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] name = "serde_json" -version = "1.0.89" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", @@ -1573,9 +1628,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -1622,7 +1677,7 @@ checksum = "dcbc16ddba161afc99e14d1713a453747a2b07fc097d2009f4c300ec99286105" dependencies = [ "ahash", "atoi", - "base64", + "base64 0.13.1", "bitflags", "byteorder", "bytes", @@ -1681,7 +1736,7 @@ dependencies = [ "quote", "sqlx-core", "sqlx-rt", - "syn", + "syn 1.0.104", "url", ] @@ -1735,6 +1790,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sync_wrapper" version = "0.1.1" @@ -1791,7 +1857,7 @@ checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.104", ] [[package]] @@ -1822,31 +1888,30 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.23.0" +version = "1.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46" +checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", "pin-project-lite", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] @@ -2000,7 +2065,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" dependencies = [ - "base64", + "base64 0.13.1", "byteorder", "bytes", "http", @@ -2144,7 +2209,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.104", "wasm-bindgen-shared", ] @@ -2178,7 +2243,7 @@ checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.104", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2297,21 +2362,51 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.0", "windows_aarch64_msvc 0.42.0", "windows_i686_gnu 0.42.0", "windows_i686_msvc 0.42.0", "windows_x86_64_gnu 0.42.0", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.0", "windows_x86_64_msvc 0.42.0", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -2324,6 +2419,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -2336,6 +2437,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -2348,6 +2455,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -2360,12 +2473,24 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -2378,6 +2503,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + [[package]] name = "winreg" version = "0.10.1" diff --git a/services/api/Cargo.toml b/services/api/Cargo.toml index f6fa88a..e849c91 100644 --- a/services/api/Cargo.toml +++ b/services/api/Cargo.toml @@ -6,13 +6,13 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde_json = "1.0.89" -serde = "1.0.149" -async-graphql = { version = "5.0.3", features = ["chrono"] } -axum = "0.6.1" +serde_json = "1.0.91" +serde = "1.0.152" +async-graphql = { version = "5.0.5", features = ["chrono"] } +axum = "0.6.3" sqlx = { version = "0.6.2", default_features = false, features = [ "runtime-tokio-rustls", "postgres", "chrono" ] } -tokio = { version = "1.23.0", features = ["macros", "rt-multi-thread"] } +tokio = { version = "1.24.2", features = ["macros", "rt-multi-thread"] } tower-http = { version = "0.3.5", features = ["cors"] } lazy_static = "1.4.0" -reqwest = "0.11.13" +reqwest = "0.11.14" chrono = "0.4.23" \ No newline at end of file diff --git a/services/api/src/vehicles.rs b/services/api/src/vehicles.rs index c7facfa..9642067 100644 --- a/services/api/src/vehicles.rs +++ b/services/api/src/vehicles.rs @@ -135,12 +135,18 @@ impl Vehicles { vehicle_name: "javelin".to_string(), } } + async fn corsair(&self) -> Vehicle { + Vehicle { + filters: self.filters.clone(), + vehicle_name: "corsair".to_string(), + } + } // Tanks async fn lightning(&self) -> Vehicle { Vehicle { filters: self.filters.clone(), - vehicle_name: "javelin".to_string(), + vehicle_name: "lightning".to_string(), } } async fn prowler(&self) -> Vehicle { diff --git a/services/websocket/Cargo.toml b/services/websocket/Cargo.toml index 1366c30..a957d6e 100644 --- a/services/websocket/Cargo.toml +++ b/services/websocket/Cargo.toml @@ -8,13 +8,13 @@ edition = "2021" [dependencies] lazy_static = "1.4.0" tokio-tungstenite = { version = "0.18.0", features=["rustls-tls-webpki-roots"] } -serde = { version = "1.0.149", features = ["derive"] } -serde_json = "1.0.89" -tokio = { version = "1.23.0", features = ["macros", "rt-multi-thread"] } +serde = { version = "1.0.152", features = ["derive"] } +serde_json = "1.0.91" +tokio = { version = "1.24.2", features = ["macros", "rt-multi-thread"] } sqlx = { version = "0.6.2", default_features = false, features = [ "runtime-tokio-rustls" , "postgres" ] } url = "2.3.1" futures-util = "0.3.25" futures = "0.3.25" async_once = "0.2.6" serde-aux = "4.1.2" -axum = "0.6.1" \ No newline at end of file +axum = "0.6.3" \ No newline at end of file From 738d2975ec6743c305eba75195a30863656a4f6e Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Sun, 28 May 2023 13:07:05 -0400 Subject: [PATCH 33/57] add GainExperience listeners --- Cargo.lock | 73 ++++++++++++++++++++++++++++--- services/api/Cargo.toml | 10 ++++- services/api/src/analytics.rs | 2 +- services/api/src/html/ingest.html | 6 ++- services/websocket/src/main.rs | 73 +++++++++++++++++++++++++++++-- 5 files changed, 151 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e58c42d..7a402b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,6 +49,7 @@ dependencies = [ "axum", "chrono", "lazy_static", + "openssl", "reqwest", "serde", "serde_json", @@ -842,6 +843,19 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" +dependencies = [ + "http", + "hyper", + "rustls 0.21.1", + "tokio", + "tokio-rustls 0.24.0", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -1143,6 +1157,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "111.25.0+1.1.1t" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3173cd3626c43e3854b1b727422a276e568d9ec5fe8cec197822cf52cfb743d6" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.77" @@ -1152,6 +1175,7 @@ dependencies = [ "autocfg", "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] @@ -1401,6 +1425,7 @@ dependencies = [ "http", "http-body", "hyper", + "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -1410,16 +1435,20 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls 0.21.1", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", + "tokio-rustls 0.24.0", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots", "winreg", ] @@ -1450,6 +1479,18 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustls" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c911ba11bc8433e811ce56fde130ccf32f5127cab0e0194e9c68c5a5b671791e" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + [[package]] name = "rustls-pemfile" version = "1.0.1" @@ -1459,6 +1500,16 @@ dependencies = [ "base64 0.13.1", ] +[[package]] +name = "rustls-webpki" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.9" @@ -1705,7 +1756,7 @@ dependencies = [ "paste", "percent-encoding", "rand", - "rustls", + "rustls 0.20.7", "rustls-pemfile", "serde", "serde_json", @@ -1748,7 +1799,7 @@ checksum = "24c5b2d25fa654cc5f841750b8e1cdedbe21189bf9a9382ee90bfa9dd3562396" dependencies = [ "once_cell", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", ] [[package]] @@ -1930,11 +1981,21 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls", + "rustls 0.20.7", "tokio", "webpki", ] +[[package]] +name = "tokio-rustls" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" +dependencies = [ + "rustls 0.21.1", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.11" @@ -1954,9 +2015,9 @@ checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.20.7", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", "tungstenite", "webpki", "webpki-roots", @@ -2072,7 +2133,7 @@ dependencies = [ "httparse", "log", "rand", - "rustls", + "rustls 0.20.7", "sha1", "thiserror", "url", diff --git a/services/api/Cargo.toml b/services/api/Cargo.toml index e849c91..92b5e99 100644 --- a/services/api/Cargo.toml +++ b/services/api/Cargo.toml @@ -14,5 +14,11 @@ sqlx = { version = "0.6.2", default_features = false, features = [ "runtime-toki tokio = { version = "1.24.2", features = ["macros", "rt-multi-thread"] } tower-http = { version = "0.3.5", features = ["cors"] } lazy_static = "1.4.0" -reqwest = "0.11.14" -chrono = "0.4.23" \ No newline at end of file +reqwest = { version = "0.11.14", features = ["rustls-tls-webpki-roots"] } +chrono = "0.4.23" + +[dependencies.openssl] +version = "0.10.29" +features = [ + "vendored" +] \ No newline at end of file diff --git a/services/api/src/analytics.rs b/services/api/src/analytics.rs index a1edb5f..1967569 100644 --- a/services/api/src/analytics.rs +++ b/services/api/src/analytics.rs @@ -24,7 +24,7 @@ impl Analytics { ) -> Vec { let pool = ctx.data::>().unwrap(); - let sql = format!("SELECT time_bucket_gapfill('{} seconds', time, start => now() - '{}'::interval, finish => now()) AS bucket, CASE WHEN count(*) IS NULL THEN 0 ELSE count(*) END AS count, event_name, world_id FROM analytics WHERE time > now() - '{}'::interval {} GROUP BY bucket, world_id, event_name ORDER BY bucket ASC", + let sql = format!("SELECT time_bucket_gapfill('{} seconds', time, start => now() - '{}'::interval, finish => now()) AS bucket, CASE WHEN count(*) IS NULL THEN 0 ELSE count(*) END AS count, event_name, world_id FROM analytics WHERE event_name IN ('Death', 'VehicleDestroy', 'GainExperience') AND time > now() - '{}'::interval {} GROUP BY bucket, world_id, event_name ORDER BY bucket ASC", if hi_precision { 5 } else { diff --git a/services/api/src/html/ingest.html b/services/api/src/html/ingest.html index ae5d958..5a68ff4 100644 --- a/services/api/src/html/ingest.html +++ b/services/api/src/html/ingest.html @@ -207,7 +207,7 @@ acc[ev.eventName][ev.time] = (acc[ev.time] || 0) + ev.count; return acc; }, - { Death: {}, VehicleDestroy: {} } + { Death: {}, VehicleDestroy: {}, GainExperience: {} } ); new Chart(document.getElementById(id), { @@ -228,6 +228,10 @@ label: "Vehicle Destroys", data: allEvents.VehicleDestroy, }, + { + label: "Experience Events", + data: allEvents.GainExperience, + }, ], }, }); diff --git a/services/websocket/src/main.rs b/services/websocket/src/main.rs index 465b83a..4fbd046 100644 --- a/services/websocket/src/main.rs +++ b/services/websocket/src/main.rs @@ -26,11 +26,20 @@ async fn send_init(tx: futures::channel::mpsc::UnboundedSender) { let worlds_raw = env::var("WORLDS").unwrap_or("all".to_string()); let worlds: Vec<&str> = worlds_raw.split(',').collect(); + let experience_ids = vec![5, 6, 7, 36, 53, 54, 201, 233, 293, 294, 353, 354, 355]; + let mut events = experience_ids + .iter() + .map(|id| format!("GainExperience_experience_id_{}", id)) + .collect::>(); + + events.push("Death".to_string()); + events.push("VehicleDestroy".to_string()); + // Send setup message let setup_msg = json!({ "action": "subscribe", "worlds": worlds, - "eventNames": ["Death", "VehicleDestroy"], + "eventNames": events, "characters": ["all"], "logicalAndCharactersWithWorlds": true, "service": "event", @@ -176,7 +185,7 @@ async fn track_analytics(analytics_event: AnalyticsEvent) { .unwrap(); } -async fn process_event(event: &Event) { +async fn process_death_event(event: &Event) { let mut set = JoinSet::new(); // println!("[ws/process_event] EVENT: {:?}", event); @@ -250,12 +259,57 @@ async fn process_event(event: &Event) { while let Some(_) = set.join_next().await {} } +async fn process_exp_event(event: &Event) { + let mut set = JoinSet::new(); + // println!("[ws/process_event] EVENT: {:?}", event); + + set.spawn(track_analytics(AnalyticsEvent { + world_id: event.world_id.clone(), + event_name: event.event_name.clone(), + })); + + set.spawn(track_class(ClassEvent { + world_id: event.world_id.clone(), + character_id: event.character_id.clone(), + loadout_id: event.loadout_id.clone(), + zone_id: event.zone_id.clone(), + team_id: event.team_id.clone(), + })); + + // Vehicle EXP events + match event.experience_id { + 201 => { + // Galaxy Spawn Bonus + set.spawn(track_vehicle(VehicleEvent { + world_id: event.world_id.clone(), + vehicle_id: "11".to_string(), + character_id: event.character_id.clone(), + zone_id: event.zone_id.clone(), + team_id: event.team_id.clone(), + })); + } + 233 => { + // Sunderer Spawn Bonus + set.spawn(track_vehicle(VehicleEvent { + world_id: event.world_id.clone(), + vehicle_id: "2".to_string(), + character_id: event.character_id.clone(), + zone_id: event.zone_id.clone(), + team_id: event.team_id.clone(), + })); + } + _ => {} + } + + while let Some(_) = set.join_next().await {} +} #[derive(Deserialize, Debug, Clone, Default)] struct Event { event_name: String, #[serde(deserialize_with = "deserialize_number_from_string")] world_id: i32, character_id: String, + #[serde(default)] attacker_character_id: String, #[serde(default, deserialize_with = "deserialize_number_from_string")] attacker_team_id: i32, @@ -275,6 +329,11 @@ struct Event { vehicle_id: String, #[serde(default)] attacker_vehicle_id: String, + + #[serde(default, deserialize_with = "deserialize_number_from_string")] + experience_id: i32, + #[serde(default)] + other_id: String, } #[derive(Deserialize, Debug, Clone)] @@ -336,7 +395,15 @@ async fn main() { return; } - process_event(&data.payload).await; + if data.payload.event_name == "Death" || data.payload.event_name == "VehicleDestroy" { + process_death_event(&data.payload).await; + return; + } + + if data.payload.event_name == "GainExperience" { + process_exp_event(&data.payload).await; + return; + } }) .fuse(); From bf89c4aaf0c28dbe9f51deb9aa6fa67c93b9d26f Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Sun, 28 May 2023 13:20:54 -0400 Subject: [PATCH 34/57] add a bunch more exp events --- services/websocket/src/main.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/services/websocket/src/main.rs b/services/websocket/src/main.rs index 4fbd046..30aa9e8 100644 --- a/services/websocket/src/main.rs +++ b/services/websocket/src/main.rs @@ -26,7 +26,12 @@ async fn send_init(tx: futures::channel::mpsc::UnboundedSender) { let worlds_raw = env::var("WORLDS").unwrap_or("all".to_string()); let worlds: Vec<&str> = worlds_raw.split(',').collect(); - let experience_ids = vec![5, 6, 7, 36, 53, 54, 201, 233, 293, 294, 353, 354, 355]; + let experience_ids = vec![ + 2, 3, 4, 5, 6, 7, 34, 36, 51, 53, 54, 55, 57, 86, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 201, + 233, 293, 294, 302, 303, 353, 354, 355, 438, 439, 503, 505, 579, 581, 584, 653, 656, 674, + 675, + ]; let mut events = experience_ids .iter() .map(|id| format!("GainExperience_experience_id_{}", id)) @@ -298,6 +303,16 @@ async fn process_exp_event(event: &Event) { team_id: event.team_id.clone(), })); } + 674 | 675 => { + // ANT stuff + set.spawn(track_vehicle(VehicleEvent { + world_id: event.world_id.clone(), + vehicle_id: "160".to_string(), + character_id: event.character_id.clone(), + zone_id: event.zone_id.clone(), + team_id: event.team_id.clone(), + })); + } _ => {} } From 118f1b6b9953651e0e71db0996ad0086424b1bea Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Sun, 28 May 2023 13:39:08 -0400 Subject: [PATCH 35/57] add raw totals to ingest hovers --- services/api/src/html/ingest.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/api/src/html/ingest.html b/services/api/src/html/ingest.html index 5a68ff4..dc5c1f7 100644 --- a/services/api/src/html/ingest.html +++ b/services/api/src/html/ingest.html @@ -159,16 +159,16 @@ diff --git a/services/websocket/src/main.rs b/services/websocket/src/main.rs index 094d298..af8c413 100644 --- a/services/websocket/src/main.rs +++ b/services/websocket/src/main.rs @@ -66,6 +66,7 @@ struct PopEvent { vehicle_id: String, } +#[derive(Debug)] struct AnalyticsEvent { world_id: i32, event_name: String, @@ -150,7 +151,7 @@ async fn track_pop(pop_event: PopEvent) { } async fn track_analytics(analytics_event: AnalyticsEvent) { - // println!("[ws/track_analytics]"); + // println!("[ws/track_analytics] {:?}", analytics_event); let pool = PG.get().await; let AnalyticsEvent { @@ -158,12 +159,17 @@ async fn track_analytics(analytics_event: AnalyticsEvent) { event_name, } = analytics_event; - query("INSERT INTO analytics (time, world_id, event_name) VALUES (now(), $1, $2);") + match query("INSERT INTO analytics (time, world_id, event_name) VALUES (now(), $1, $2);") .bind(world_id) .bind(event_name) .execute(pool) .await - .unwrap(); + { + Ok(_) => {} + Err(e) => { + println!("[ws/track_analytics] ERR => {:?}", e); + } + } } async fn process_death_event(event: &Event) { @@ -209,7 +215,11 @@ async fn process_exp_event(event: &Event) { set.spawn(track_analytics(AnalyticsEvent { world_id: event.world_id.clone(), - event_name: event.event_name.clone(), + event_name: format!( + "{}_{}", + event.event_name.clone(), + event.experience_id.clone() + ), })); // Vehicle EXP events From f49a8a0fdac605a57b9388c6215a1fdbb9dafd4f Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Thu, 29 Jun 2023 15:46:45 -0400 Subject: [PATCH 48/57] add filter to exp by id --- services/api/src/html/ingest.html | 34 +++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/services/api/src/html/ingest.html b/services/api/src/html/ingest.html index 30178c5..d9e90a1 100644 --- a/services/api/src/html/ingest.html +++ b/services/api/src/html/ingest.html @@ -150,11 +150,25 @@

    Experience Events By ID

    -

    (0, 0, 0, 0)

    +

    (0, 0, 0, 0)

    +
    + Filter to World: + +

    @@ -383,6 +397,22 @@ let worldEvents = events.filter((ev) => ev.worldId === id); allEventsByType(world, worldEvents); }); - experienceEventsByID(events); + + const expFilter = document.getElementById("exp-filter"); + experienceEventsByID( + expFilter.value === "all" + ? events + : events.filter((ev) => ev.worldId === parseInt(expFilter.value)) + ); + + expFilter.addEventListener("change", () => { + document.getElementById("exp-by-id").outerHTML = + ""; + experienceEventsByID( + expFilter.value === "all" + ? events + : events.filter((ev) => ev.worldId === parseInt(expFilter.value)) + ); + }); })(); From 9ebeeb47f42cfd08d7c93e5d3d62812d04612a7b Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Thu, 29 Jun 2023 16:33:52 -0400 Subject: [PATCH 49/57] stacked exp bar chart correctly --- services/api/src/html/ingest.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/api/src/html/ingest.html b/services/api/src/html/ingest.html index d9e90a1..192cdb3 100644 --- a/services/api/src/html/ingest.html +++ b/services/api/src/html/ingest.html @@ -150,7 +150,7 @@

    Experience Events By ID

    -

    (0, 0, 0, 0)

    +

    (0, 0, 0, 0)

    @@ -280,7 +280,7 @@ type: "bar", options: { scales: { - y: { beginAtZero: true, suggestedMin: 0 }, + y: { stacked: true, beginAtZero: true, suggestedMin: 0 }, x: { stacked: true, type: "timeseries" }, }, }, From c58fdf06b79dbe0ba6cee395deed7d7826b82904 Mon Sep 17 00:00:00 2001 From: Noelle Calliope <1581674+mekanoe@users.noreply.github.com> Date: Mon, 4 Sep 2023 01:30:23 -0400 Subject: [PATCH 50/57] refactor to use default localhost IPs instead of localhost --- services/api/src/health.rs | 2 +- services/api/src/main.rs | 2 +- services/tasks/src/main.rs | 2 +- services/websocket/src/main.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/api/src/health.rs b/services/api/src/health.rs index 5f30492..8c43116 100644 --- a/services/api/src/health.rs +++ b/services/api/src/health.rs @@ -131,7 +131,7 @@ impl Health { async fn ingest_reachable(&self) -> UpDown { reqwest::get( std::env::var("WEBSOCKET_HEALTHCHECK") - .unwrap_or("http://localhost:8999/health".to_string()), + .unwrap_or("http://127.0.0.1:8999/healthz".to_string()), ) .await .map(|_| UpDown::Up) diff --git a/services/api/src/main.rs b/services/api/src/main.rs index 414b6fb..7c1aafa 100644 --- a/services/api/src/main.rs +++ b/services/api/src/main.rs @@ -67,7 +67,7 @@ async fn graphiql() -> impl IntoResponse { #[tokio::main] async fn main() { let db_url = std::env::var("DATABASE_URL") - .unwrap_or("postgres://saerrouser:saerro321@localhost:5432/data".to_string()); + .unwrap_or("postgres://saerrouser:saerro321@127.0.0.1:5432/data".to_string()); let db = sqlx::PgPool::connect(&db_url).await.unwrap(); let schema = Schema::build(query::Query::default(), EmptyMutation, EmptySubscription) diff --git a/services/tasks/src/main.rs b/services/tasks/src/main.rs index 420fc4f..01d2f4e 100644 --- a/services/tasks/src/main.rs +++ b/services/tasks/src/main.rs @@ -9,7 +9,7 @@ mod migrations; lazy_static! { pub static ref PG: AsyncOnce = AsyncOnce::new(async { let db_url = std::env::var("DATABASE_URL") - .unwrap_or("postgres://saerrouser:saerro321@localhost:5432/data".to_string()); + .unwrap_or("postgres://saerrouser:saerro321@127.0.0.1:5432/data".to_string()); sqlx::PgPool::connect(&db_url).await.unwrap() }); } diff --git a/services/websocket/src/main.rs b/services/websocket/src/main.rs index af8c413..8047d28 100644 --- a/services/websocket/src/main.rs +++ b/services/websocket/src/main.rs @@ -17,7 +17,7 @@ lazy_static! { static ref WS_ADDR: String = env::var("WS_ADDR").unwrap_or_default(); static ref PG: AsyncOnce = AsyncOnce::new(async { let db_url = std::env::var("DATABASE_URL") - .unwrap_or("postgres://saerrouser:saerro321@localhost:5432/data".to_string()); + .unwrap_or("postgres://saerrouser:saerro321@127.0.0.1:5432/data".to_string()); PgPoolOptions::new().connect(&db_url).await.unwrap() }); } From be38bb6b5f67b6d77ba561f3a25c946f520a8262 Mon Sep 17 00:00:00 2001 From: Noelle Calliope <1581674+mekanoe@users.noreply.github.com> Date: Mon, 4 Sep 2023 01:30:40 -0400 Subject: [PATCH 51/57] use nix --- .envrc | 3 +++ .gitignore | 3 ++- shell.nix | 12 ++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .envrc create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..41dc922 --- /dev/null +++ b/.envrc @@ -0,0 +1,3 @@ +use nix + +source .envrc-local \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7dc35cd..3c29b88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /target .DS_Store -*/.DS_Store \ No newline at end of file +*/.DS_Store +.envrc-local \ No newline at end of file diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..25e0f7a --- /dev/null +++ b/shell.nix @@ -0,0 +1,12 @@ +let + moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz); + nixpkgs = import { overlays = [ moz_overlay ]; }; +in + with nixpkgs; + stdenv.mkDerivation { + name = "moz_overlay_shell"; + buildInputs = [ + nixpkgs.latest.rustChannels.nightly.rust + nixpkgs.rust-analyzer + ]; + } \ No newline at end of file From e805a4ca5a49cc386cf0351a1bdc6246e9ef5e76 Mon Sep 17 00:00:00 2001 From: Noelle Calliope <1581674+mekanoe@users.noreply.github.com> Date: Mon, 4 Sep 2023 01:30:53 -0400 Subject: [PATCH 52/57] update all cargo packages' --- Cargo.lock | 1646 +++++++++++++++++++-------------- Cargo.toml | 9 +- services/api/Cargo.toml | 29 +- services/tasks/Cargo.toml | 9 +- services/websocket/Cargo.toml | 19 +- 5 files changed, 995 insertions(+), 717 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1a3f3ad..ae0f153 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,11 +13,27 @@ dependencies = [ ] [[package]] -name = "ahash" -version = "0.7.6" +name = "addr2line" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", "getrandom", "once_cell", "version_check", @@ -25,13 +41,25 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -66,9 +94,9 @@ checksum = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a" [[package]] name = "async-graphql" -version = "5.0.8" +version = "6.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ae09afb01514b3dbd6328547b2b11fcbcb0205d9c5e6f2e17e60cb166a82d7f" +checksum = "b5be1398e018b56697478e6917ef623faace61ab83489a124ed2b1f8430b5fd9" dependencies = [ "async-graphql-derive", "async-graphql-parser", @@ -83,7 +111,7 @@ dependencies = [ "futures-util", "handlebars", "http", - "indexmap", + "indexmap 2.0.0", "mime", "multer", "num-traits", @@ -100,9 +128,9 @@ dependencies = [ [[package]] name = "async-graphql-derive" -version = "5.0.8" +version = "6.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60ae62851dd3ff9a7550aee75e848e8834b75285b458753e98dd71d0733ad3f2" +checksum = "c7e6a70e1cec2c1b606f090b1c552a917a397155cf29e34a94a3fb2b25f517c9" dependencies = [ "Inflector", "async-graphql-parser", @@ -110,15 +138,16 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "strum", + "syn 2.0.31", "thiserror", ] [[package]] name = "async-graphql-parser" -version = "5.0.8" +version = "6.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e6ee332acd99d2c50c3443beae46e9ed784c205eead9a668b7b5118b4a60a8b" +checksum = "0d239d9131931629e5c9f93954ae2c29743c394a92f6163ea17b8e707a32108f" dependencies = [ "async-graphql-value", "pest", @@ -128,46 +157,47 @@ dependencies = [ [[package]] name = "async-graphql-value" -version = "5.0.8" +version = "6.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122da50452383410545b9428b579f4cda5616feb6aa0aff0003500c53fcff7b7" +checksum = "0489808318931e0570fede9a36cf621c6aff856aa5b97e9cdf6f5da3b5d98147" dependencies = [ "bytes", - "indexmap", + "indexmap 2.0.0", "serde", "serde_json", ] [[package]] name = "async-stream" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", + "pin-project-lite", ] [[package]] name = "async-stream-impl" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.31", ] [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.31", ] [[package]] @@ -178,9 +208,9 @@ checksum = "2ce4f10ea3abcd6617873bae9f91d1c5332b4a778bd9ce34d0cd517474c1de82" [[package]] name = "atoi" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" dependencies = [ "num-traits", ] @@ -193,13 +223,13 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", - "bitflags", + "bitflags 1.3.2", "bytes", "futures-util", "http", @@ -240,6 +270,21 @@ dependencies = [ "tower-service", ] +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.13.1" @@ -248,9 +293,15 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bitflags" @@ -259,19 +310,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "block-buffer" -version = "0.10.3" +name = "bitflags" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +dependencies = [ + "serde", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byteorder" @@ -281,18 +341,21 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.2.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" dependencies = [ "serde", ] [[package]] name = "cc" -version = "1.0.77" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -302,28 +365,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "time", "wasm-bindgen", - "winapi", + "windows-targets", ] [[package]] -name = "codespan-reporting" -version = "0.11.1" +name = "const-oid" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "core-foundation" @@ -337,19 +396,34 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" + [[package]] name = "crossbeam-queue" version = "0.3.8" @@ -362,9 +436,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -379,55 +453,11 @@ dependencies = [ "typenum", ] -[[package]] -name = "cxx" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf07d07d6531bfcdbe9b8b739b104610c6508dcc4d63b410585faf338241daf" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2eb5b96ecdc99f72657332953d4d9c50135af1bac34277801cc3937906ebd39" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 1.0.109", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac040a39517fd1674e0f32177648334b0f4074625b5588a64519804ba0553b12" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1362b0ddcfc4eb0a1f57b68bd77dd99f0e826958a96abd0ae9bd092e114ffed6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling" -version = "0.14.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ "darling_core", "darling_macro", @@ -435,27 +465,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 1.0.109", + "syn 2.0.31", ] [[package]] name = "darling_macro" -version = "0.14.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 1.0.109", + "syn 2.0.31", ] [[package]] @@ -465,57 +495,90 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] -name = "digest" -version = "0.10.6" +name = "der" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", "subtle", ] -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "dotenvy" -version = "0.15.6" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d8c417d7a8cb362e0c37e5d815f5eb7c37f79ff93707329d5a194e42e54ca0" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "either" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +dependencies = [ + "serde", +] [[package]] name = "encoding_rs" -version = "0.8.31" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -533,11 +596,20 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.8.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + +[[package]] +name = "flume" +version = "0.10.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" dependencies = [ - "instant", + "futures-core", + "futures-sink", + "pin-project", + "spin 0.9.8", ] [[package]] @@ -563,9 +635,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -614,9 +686,9 @@ dependencies = [ [[package]] name = "futures-intrusive" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", @@ -637,7 +709,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.31", ] [[package]] @@ -672,9 +744,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -682,9 +754,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -692,10 +764,16 @@ dependencies = [ ] [[package]] -name = "h2" -version = "0.3.19" +name = "gimli" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + +[[package]] +name = "h2" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -703,7 +781,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -712,9 +790,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.3.7" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +checksum = "c39b3bc2a8f715298032cf5087e58573809374b08160aa7d750582bdb82d2683" dependencies = [ "log", "pest", @@ -729,36 +807,40 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" dependencies = [ "ahash", + "allocator-api2", ] [[package]] name = "hashlink" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown", + "hashbrown 0.14.0", ] [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" dependencies = [ "unicode-segmentation", ] [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -784,6 +866,15 @@ dependencies = [ "digest", ] +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys", +] + [[package]] name = "http" version = "0.2.9" @@ -808,9 +899,9 @@ dependencies = [ [[package]] name = "http-range-header" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" @@ -820,15 +911,15 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -841,7 +932,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -850,15 +941,16 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ + "futures-util", "http", "hyper", - "rustls 0.21.1", + "rustls", "tokio", - "tokio-rustls 0.24.0", + "tokio-rustls", ] [[package]] @@ -876,26 +968,25 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -906,9 +997,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -916,29 +1007,30 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", "serde", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - [[package]] name = "ipnet" -version = "2.5.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "itertools" @@ -951,15 +1043,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -969,27 +1061,44 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - -[[package]] -name = "link-cplusplus" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" dependencies = [ - "cc", + "spin 0.5.2", ] [[package]] -name = "lock_api" -version = "0.4.9" +name = "libc" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +name = "libm" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" + +[[package]] +name = "libsqlite3-sys" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -997,18 +1106,15 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "matchit" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" +checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" [[package]] name = "md-5" @@ -1021,15 +1127,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minimal-lexical" @@ -1038,22 +1144,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] -name = "mio" -version = "0.8.5" +name = "miniz_oxide" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] name = "multer" -version = "2.0.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed4198ce7a4cbd2a57af78d28c6fbb57d81ac5f1d6ad79ac6c5587419cbdf22" +checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" dependencies = [ "bytes", "encoding_rs", @@ -1063,7 +1177,7 @@ dependencies = [ "log", "memchr", "mime", - "spin 0.9.4", + "spin 0.9.8", "version_check", ] @@ -1087,14 +1201,31 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", ] +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -1106,37 +1237,58 @@ dependencies = [ ] [[package]] -name = "num-traits" -version = "0.2.15" +name = "num-iter" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +dependencies = [ + "autocfg", + "libm", ] [[package]] name = "num_cpus" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ "hermit-abi", "libc", ] [[package]] -name = "once_cell" -version = "1.16.0" +name = "object" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" -version = "0.10.52" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags", + "bitflags 2.4.0", "cfg-if", "foreign-types", "libc", @@ -1147,13 +1299,13 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.31", ] [[package]] @@ -1164,18 +1316,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.25.0+1.1.1t" +version = "111.27.0+1.1.1v" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3173cd3626c43e3854b1b727422a276e568d9ec5fe8cec197822cf52cfb743d6" +checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.87" +version = "0.9.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" dependencies = [ "cc", "libc", @@ -1186,56 +1338,64 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", - "instant", "libc", "redox_syscall", "smallvec", - "winapi", + "windows-targets", ] [[package]] name = "paste" -version = "1.0.9" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.6.0" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" +checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33" dependencies = [ + "memchr", "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.6.0" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +checksum = "a2bee7be22ce7918f641a33f08e3f43388c7656772244e2bbb2477f44cc9021a" dependencies = [ "pest", "pest_generator", @@ -1243,22 +1403,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.6.0" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +checksum = "d1511785c5e98d79a05e8a6bc34b4ac2168a0e3e92161862030ad84daa223141" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.31", ] [[package]] name = "pest_meta" -version = "2.6.0" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +checksum = "b42f0394d3123e33353ca5e1e89092e533d2cc490389f2bd6131c43c634ebc5f" dependencies = [ "once_cell", "pest", @@ -1267,29 +1427,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.31", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1298,10 +1458,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "pkg-config" -version = "0.3.26" +name = "pkcs1" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "ppv-lite86" @@ -1311,29 +1492,28 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro-crate" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "thiserror", - "toml", + "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.27" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1370,29 +1550,30 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom", - "redox_syscall", - "thiserror", + "bitflags 1.3.2", ] [[package]] name = "regex" -version = "1.7.0" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", @@ -1401,26 +1582,17 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ - "base64 0.21.0", + "base64 0.21.3", "bytes", "encoding_rs", "futures-core", @@ -1439,20 +1611,20 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.1", + "rustls", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", - "tokio-rustls 0.24.0", + "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.22.6", + "webpki-roots 0.25.2", "winreg", ] @@ -1472,43 +1644,82 @@ dependencies = [ ] [[package]] -name = "rustls" -version = "0.20.7" +name = "rsa" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" +checksum = "6ab43bb47d23c1a631b4b680199a45255dce26fa9ab2fa902581f624ff13e6a8" dependencies = [ - "log", - "ring", - "sct", - "webpki", + "byteorder", + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-iter", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core", + "signature", + "spki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustix" +version = "0.38.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", ] [[package]] name = "rustls" -version = "0.21.1" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c911ba11bc8433e811ce56fde130ccf32f5127cab0e0194e9c68c5a5b671791e" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.4", "sct", ] [[package]] name = "rustls-pemfile" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.13.1", + "base64 0.21.3", ] [[package]] name = "rustls-webpki" -version = "0.100.1" +version = "0.100.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" dependencies = [ "ring", "untrusted", @@ -1516,37 +1727,30 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.9" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "lazy_static", - "windows-sys 0.36.1", + "windows-sys", ] [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -1560,11 +1764,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.7.0" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -1573,9 +1777,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -1583,9 +1787,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.163" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] @@ -1603,20 +1807,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.31", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -1625,10 +1829,11 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.8" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "184c643044780f7ceb59104cef98a5a6f12cb2288a7bc701ab93a362b49fd47d" +checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" dependencies = [ + "itoa", "serde", ] @@ -1657,9 +1862,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", @@ -1667,19 +1872,29 @@ dependencies = [ ] [[package]] -name = "slab" -version = "0.4.7" +name = "signature" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "socket2" @@ -1691,6 +1906,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys", +] + [[package]] name = "spin" version = "0.5.2" @@ -1699,15 +1924,28 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.4" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +dependencies = [ + "base64ct", + "der", +] [[package]] name = "sqlformat" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f87e292b4291f154971a43c3774364e2cbcaec599d3f5bf6fa9d122885dbc38a" +checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" dependencies = [ "itertools", "nom", @@ -1716,96 +1954,206 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.6.3" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8de3b03a925878ed54a954f621e64bf55a3c1bd29652d0d1a17830405350188" +checksum = "8e58421b6bc416714d5115a2ca953718f6c621a51b68e4f4922aea5a4391a721" dependencies = [ "sqlx-core", "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", ] [[package]] name = "sqlx-core" -version = "0.6.3" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" +checksum = "dd4cef4251aabbae751a3710927945901ee1d97ee96d757f6880ebb9a79bfd53" dependencies = [ "ahash", "atoi", - "base64 0.13.1", - "bitflags", "byteorder", "bytes", "chrono", + "crc", "crossbeam-queue", - "dirs", "dotenvy", "either", "event-listener", "futures-channel", "futures-core", "futures-intrusive", + "futures-io", "futures-util", "hashlink", "hex", - "hkdf", - "hmac", - "indexmap", - "itoa", - "libc", + "indexmap 2.0.0", "log", - "md-5", "memchr", "once_cell", "paste", "percent-encoding", - "rand", - "rustls 0.20.7", + "rustls", "rustls-pemfile", "serde", "serde_json", + "sha2", + "smallvec", + "sqlformat", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "url", + "webpki-roots 0.24.0", +] + +[[package]] +name = "sqlx-macros" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "208e3165167afd7f3881b16c1ef3f2af69fa75980897aac8874a0696516d12c2" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 1.0.109", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a4a8336d278c62231d87f24e8a7a74898156e34c1c18942857be2acb29c7dfc" +dependencies = [ + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2", + "sqlx-core", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn 1.0.109", + "tempfile", + "tokio", + "url", +] + +[[package]] +name = "sqlx-mysql" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca69bf415b93b60b80dc8fda3cb4ef52b2336614d8da2de5456cc942a110482" +dependencies = [ + "atoi", + "base64 0.21.3", + "bitflags 2.4.0", + "byteorder", + "bytes", + "chrono", + "crc", + "digest", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "percent-encoding", + "rand", + "rsa", + "serde", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-postgres" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0db2df1b8731c3651e204629dd55e52adbae0462fa1bdcbed56a2302c18181e" +dependencies = [ + "atoi", + "base64 0.21.3", + "bitflags 2.4.0", + "byteorder", + "chrono", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand", + "serde", + "serde_json", "sha1", "sha2", "smallvec", - "sqlformat", - "sqlx-rt", + "sqlx-core", "stringprep", "thiserror", - "tokio-stream", - "url", - "webpki-roots 0.22.6", + "tracing", "whoami", ] [[package]] -name = "sqlx-macros" -version = "0.6.3" +name = "sqlx-sqlite" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9966e64ae989e7e575b19d7265cb79d7fc3cbbdf179835cb0d716f294c2049c9" +checksum = "be4c21bf34c7cae5b283efb3ac1bcc7670df7561124dc2f8bdc0b59be40f79a2" dependencies = [ - "dotenvy", - "either", - "heck", - "once_cell", - "proc-macro2", - "quote", + "atoi", + "chrono", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", "sqlx-core", - "sqlx-rt", - "syn 1.0.109", + "tracing", "url", ] -[[package]] -name = "sqlx-rt" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804d3f245f894e61b1e6263c84b23ca675d96753b5abfd5cc8597d86806e8024" -dependencies = [ - "once_cell", - "tokio", - "tokio-rustls 0.23.4", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -1814,9 +2162,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stringprep" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1829,10 +2177,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] -name = "subtle" -version = "2.4.1" +name = "strum" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.31", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" @@ -1847,9 +2217,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" dependencies = [ "proc-macro2", "quote", @@ -1858,9 +2228,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "tasks" @@ -1874,45 +2244,35 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.3.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", "fastrand", - "libc", "redox_syscall", - "remove_dir_all", - "winapi", -] - -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", + "rustix", + "windows-sys", ] [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.31", ] [[package]] @@ -1937,25 +2297,25 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", "num_cpus", "pin-project-lite", - "socket2", + "socket2 0.5.3", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -1966,14 +2326,14 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.31", ] [[package]] name = "tokio-native-tls" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", "tokio", @@ -1981,30 +2341,19 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.23.4" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.20.7", - "tokio", - "webpki", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" -dependencies = [ - "rustls 0.21.1", + "rustls", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -2013,24 +2362,24 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c" +checksum = "2b2dbec703c26b00d74844519606ef15d09a7d6857860f84ad223dec002ddea2" dependencies = [ "futures-util", "log", - "rustls 0.21.1", + "rustls", "tokio", - "tokio-rustls 0.24.0", + "tokio-rustls", "tungstenite", - "webpki-roots 0.23.0", + "webpki-roots 0.23.1", ] [[package]] name = "tokio-util" -version = "0.7.4" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -2041,12 +2390,20 @@ dependencies = [ ] [[package]] -name = "toml" -version = "0.5.9" +name = "toml_datetime" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "serde", + "indexmap 2.0.0", + "toml_datetime", + "winnow", ] [[package]] @@ -2067,11 +2424,11 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1d42a9b3f3ec46ba828e8d376aec14592ea199f70a06a548587ecd1c4ab658" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags", + "bitflags 2.4.0", "bytes", "futures-core", "futures-util", @@ -2104,29 +2461,41 @@ dependencies = [ "cfg-if", "log", "pin-project-lite", + "tracing-attributes", "tracing-core", ] [[package]] -name = "tracing-core" -version = "0.1.30" +name = "tracing-attributes" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.31", +] + +[[package]] +name = "tracing-core" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", ] [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "tungstenite" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67" +checksum = "e862a1c4128df0112ab625f55cd5c934bcb4312ba80b39ae4b4835a3fd58e649" dependencies = [ "byteorder", "bytes", @@ -2135,37 +2504,36 @@ dependencies = [ "httparse", "log", "rand", - "rustls 0.21.1", + "rustls", "sha1", "thiserror", "url", "utf-8", - "webpki", ] [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -2178,15 +2546,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" - -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode_categories" @@ -2202,9 +2564,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -2231,11 +2593,10 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -2253,9 +2614,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2263,24 +2624,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.31", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.33" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -2290,9 +2651,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2300,60 +2661,56 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.31", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] -name = "webpki" -version = "0.22.0" +name = "webpki-roots" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "ring", - "untrusted", + "rustls-webpki 0.100.2", ] [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" dependencies = [ - "webpki", + "rustls-webpki 0.101.4", ] [[package]] name = "webpki-roots" -version = "0.23.0" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa54963694b65584e170cf5dc46aeb4dcaa5584e652ff5f3952e56d66aff0125" -dependencies = [ - "rustls-webpki", -] +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" [[package]] name = "websocket" @@ -2375,14 +2732,9 @@ dependencies = [ [[package]] name = "whoami" -version = "1.2.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6631b6a2fd59b1841b622e8f1a7ad241ef0a46f2d580464ce8140ac94cbd571" -dependencies = [ - "bumpalo", - "wasm-bindgen", - "web-sys", -] +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" [[package]] name = "winapi" @@ -2400,15 +2752,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -2416,31 +2759,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-sys" -version = "0.36.1" +name = "windows" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets", ] [[package]] @@ -2454,138 +2778,82 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" +name = "winnow" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +dependencies = [ + "memchr", +] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys", ] + +[[package]] +name = "zeroize" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" diff --git a/Cargo.toml b/Cargo.toml index 26b2493..49091a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,4 @@ [workspace] -members = [ - "services/*", -] -exclude = [ - "hack/codegen", -] \ No newline at end of file +members = ["services/*"] +exclude = ["hack/codegen"] +resolver = "2" diff --git a/services/api/Cargo.toml b/services/api/Cargo.toml index bd57873..c489303 100644 --- a/services/api/Cargo.toml +++ b/services/api/Cargo.toml @@ -6,19 +6,24 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde_json = "1.0.96" -serde = "1.0.163" -async-graphql = { version = "5.0.8", features = ["chrono"] } -axum = "0.6.18" -sqlx = { version = "0.6.3", default_features = false, features = [ "runtime-tokio-rustls", "postgres", "chrono" ] } +serde_json = "1.0.105" +serde = "1.0.188" +async-graphql = { version = "6.0.5", features = ["chrono"] } +axum = "0.6.20" +sqlx = { version = "0.7.1", default_features = false, features = [ + "runtime-tokio-rustls", + "postgres", + "chrono", +] } tokio = { version = "1.28.1", features = ["macros", "rt-multi-thread"] } -tower-http = { version = "0.4.0", features = ["cors"] } +tower-http = { version = "0.4.4", features = ["cors"] } lazy_static = "1.4.0" -reqwest = { version = "0.11.18", features = ["rustls-tls-webpki-roots", "rustls"] } -chrono = "0.4.24" +reqwest = { version = "0.11.20", features = [ + "rustls-tls-webpki-roots", + "rustls", +] } +chrono = "0.4.28" [dependencies.openssl] -version = "0.10.52" -features = [ - "vendored" -] \ No newline at end of file +version = "0.10.57" +features = ["vendored"] diff --git a/services/tasks/Cargo.toml b/services/tasks/Cargo.toml index 042665f..0a45178 100644 --- a/services/tasks/Cargo.toml +++ b/services/tasks/Cargo.toml @@ -6,7 +6,10 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tokio = { version = "1.28.1", features = ["macros", "rt-multi-thread"] } -sqlx = { version = "0.6.3", default_features = false, features = [ "runtime-tokio-rustls" , "postgres" ] } +tokio = { version = "1.32.0", features = ["macros", "rt-multi-thread"] } +sqlx = { version = "0.7.1", default_features = false, features = [ + "runtime-tokio-rustls", + "postgres", +] } lazy_static = "1.4.0" -async_once = "0.2.6" \ No newline at end of file +async_once = "0.2.6" diff --git a/services/websocket/Cargo.toml b/services/websocket/Cargo.toml index df8a5c0..6884295 100644 --- a/services/websocket/Cargo.toml +++ b/services/websocket/Cargo.toml @@ -7,14 +7,19 @@ edition = "2021" [dependencies] lazy_static = "1.4.0" -tokio-tungstenite = { version = "0.19.0", features=["rustls-tls-webpki-roots"] } -serde = { version = "1.0.163", features = ["derive"] } -serde_json = "1.0.96" -tokio = { version = "1.28.1", features = ["macros", "rt-multi-thread"] } -sqlx = { version = "0.6.3", default_features = false, features = [ "runtime-tokio-rustls" , "postgres" ] } -url = "2.3.1" +tokio-tungstenite = { version = "0.20.0", features = [ + "rustls-tls-webpki-roots", +] } +serde = { version = "1.0.188", features = ["derive"] } +serde_json = "1.0.105" +tokio = { version = "1.32.0", features = ["macros", "rt-multi-thread"] } +sqlx = { version = "0.7.1", default_features = false, features = [ + "runtime-tokio-rustls", + "postgres", +] } +url = "2.4.1" futures-util = "0.3.28" futures = "0.3.28" async_once = "0.2.6" serde-aux = "4.2.0" -axum = "0.6.18" \ No newline at end of file +axum = "0.6.20" From ad8105ca944bbcdc0cd5919a36636b8da990de4f Mon Sep 17 00:00:00 2001 From: Noelle Calliope <1581674+mekanoe@users.noreply.github.com> Date: Mon, 4 Sep 2023 02:45:29 -0400 Subject: [PATCH 53/57] add tasks print-env --- services/tasks/src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/tasks/src/main.rs b/services/tasks/src/main.rs index 01d2f4e..1c5b8fe 100644 --- a/services/tasks/src/main.rs +++ b/services/tasks/src/main.rs @@ -72,6 +72,9 @@ async fn main() { println!("Done!"); } "migrate" => cmd_migrate().await, + "print-env" => { + std::env::vars().for_each(|(key, value)| println!("{}={}", key, value)); + } _ => { println!("Unknown command: {}", command); cmd_help(); From 96cb2c80d889c28491d5f7f26ebabba854b98b45 Mon Sep 17 00:00:00 2001 From: Noelle Calliope <1581674+mekanoe@users.noreply.github.com> Date: Mon, 4 Sep 2023 14:06:04 -0400 Subject: [PATCH 54/57] add auto-maint --- services/tasks/src/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/tasks/src/main.rs b/services/tasks/src/main.rs index 1c5b8fe..261ab95 100644 --- a/services/tasks/src/main.rs +++ b/services/tasks/src/main.rs @@ -71,6 +71,16 @@ async fn main() { cmd_prune().await; println!("Done!"); } + "auto-maintenance" => loop { + println!("Running maintenance tasks..."); + if !migrations::is_migrated().await { + println!("DB is not migrated, running migrations..."); + cmd_migrate().await; + } + + cmd_prune().await; + tokio::time::sleep(tokio::time::Duration::from_secs(60 * 5)).await; + }, "migrate" => cmd_migrate().await, "print-env" => { std::env::vars().for_each(|(key, value)| println!("{}={}", key, value)); From 7ab5893f67be0d615c5a490a36e17438cf55593e Mon Sep 17 00:00:00 2001 From: noe Date: Sat, 17 Feb 2024 03:32:13 -0500 Subject: [PATCH 55/57] nix --- .envrc | 2 +- .gitignore | 5 ++++- flake.nix | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ shell.nix | 12 ------------ 4 files changed, 59 insertions(+), 14 deletions(-) create mode 100644 flake.nix delete mode 100644 shell.nix diff --git a/.envrc b/.envrc index 41dc922..0557568 100644 --- a/.envrc +++ b/.envrc @@ -1,3 +1,3 @@ -use nix +use flake . --accept-flake-config; source .envrc-local \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3c29b88..8e2b7b7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ /target .DS_Store */.DS_Store -.envrc-local \ No newline at end of file +.envrc-local +/.vscode +/.direnv +/result \ No newline at end of file diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..960ffe0 --- /dev/null +++ b/flake.nix @@ -0,0 +1,54 @@ +{ + description = "PlanetSide 2 Metagame Harvesting Service"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + nixConfig = { + extra-substituters = [ + "https://nix-community.cachix.org" + ]; + + extra-trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; + + outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ "x86_64-linux" "aarch64-linux" ]; + perSystem = { config, self', pkgs, lib, system, ... }: let + fenix = inputs.fenix.packages.${system}.minimal; + cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml); + + buildDeps = [ + pkgs.openssl + ]; + + devDeps = [ + fenix.toolchain + ]; + PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; + in { + packages.default = (pkgs.makeRustPlatform { + cargo = fenix.toolchain; + rustc = fenix.toolchain; + }).buildRustPackage { + inherit (cargoToml.package) name version; + cargoLock.lockFile = ./Cargo.lock; + src = ./.; + nativeBuildInputs = [ pkgs.pkg-config ]; + buildInputs = buildDeps ++ devDeps; + }; + + devShells.default = pkgs.mkShell { + nativeBuildInputs = buildDeps ++ devDeps; + }; + }; + }; +} \ No newline at end of file diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 25e0f7a..0000000 --- a/shell.nix +++ /dev/null @@ -1,12 +0,0 @@ -let - moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz); - nixpkgs = import { overlays = [ moz_overlay ]; }; -in - with nixpkgs; - stdenv.mkDerivation { - name = "moz_overlay_shell"; - buildInputs = [ - nixpkgs.latest.rustChannels.nightly.rust - nixpkgs.rust-analyzer - ]; - } \ No newline at end of file From 3a422b8f6f832ba0a59fc51b19fc27f289f1cb9e Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 18 Feb 2024 00:51:24 -0500 Subject: [PATCH 56/57] add prometheus to api and ws --- .envrc | 2 +- Cargo.lock | 1048 ++++++++++++++------------- Dockerfile | 2 +- docker-compose.yaml | 2 +- flake.lock | 103 +++ flake.nix | 2 + services/api/Cargo.toml | 1 + services/api/src/analytics.rs | 3 + services/api/src/classes.rs | 14 + services/api/src/health.rs | 16 +- services/api/src/main.rs | 10 + services/api/src/population.rs | 11 +- services/api/src/telemetry.rs | 138 ++++ services/api/src/vehicles.rs | 49 ++ services/api/src/world.rs | 13 + services/api/src/zone.rs | 11 + services/websocket/Cargo.toml | 2 + services/websocket/src/main.rs | 21 +- services/websocket/src/telemetry.rs | 75 ++ 19 files changed, 1026 insertions(+), 497 deletions(-) create mode 100644 flake.lock create mode 100644 services/api/src/telemetry.rs create mode 100644 services/websocket/src/telemetry.rs diff --git a/.envrc b/.envrc index 0557568..eca1fc7 100644 --- a/.envrc +++ b/.envrc @@ -1,3 +1,3 @@ use flake . --accept-flake-config; -source .envrc-local \ No newline at end of file +# source .envrc-local \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index ae0f153..602ef43 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,21 +29,22 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" dependencies = [ "cfg-if", "getrandom", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -78,6 +79,7 @@ dependencies = [ "chrono", "lazy_static", "openssl", + "prometheus", "reqwest", "serde", "serde_json", @@ -94,9 +96,9 @@ checksum = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a" [[package]] name = "async-graphql" -version = "6.0.5" +version = "6.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5be1398e018b56697478e6917ef623faace61ab83489a124ed2b1f8430b5fd9" +checksum = "298a5d587d6e6fdb271bf56af2dc325a80eb291fd0fc979146584b9a05494a8c" dependencies = [ "async-graphql-derive", "async-graphql-parser", @@ -111,7 +113,7 @@ dependencies = [ "futures-util", "handlebars", "http", - "indexmap 2.0.0", + "indexmap", "mime", "multer", "num-traits", @@ -128,9 +130,9 @@ dependencies = [ [[package]] name = "async-graphql-derive" -version = "6.0.5" +version = "6.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e6a70e1cec2c1b606f090b1c552a917a397155cf29e34a94a3fb2b25f517c9" +checksum = "c7f329c7eb9b646a72f70c9c4b516c70867d356ec46cb00dcac8ad343fd006b0" dependencies = [ "Inflector", "async-graphql-parser", @@ -139,15 +141,15 @@ dependencies = [ "proc-macro2", "quote", "strum", - "syn 2.0.31", + "syn 2.0.49", "thiserror", ] [[package]] name = "async-graphql-parser" -version = "6.0.5" +version = "6.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d239d9131931629e5c9f93954ae2c29743c394a92f6163ea17b8e707a32108f" +checksum = "6139181845757fd6a73fbb8839f3d036d7150b798db0e9bb3c6e83cdd65bd53b" dependencies = [ "async-graphql-value", "pest", @@ -157,12 +159,12 @@ dependencies = [ [[package]] name = "async-graphql-value" -version = "6.0.5" +version = "6.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0489808318931e0570fede9a36cf621c6aff856aa5b97e9cdf6f5da3b5d98147" +checksum = "323a5143f5bdd2030f45e3f2e0c821c9b1d36e79cf382129c64299c50a7f3750" dependencies = [ "bytes", - "indexmap 2.0.0", + "indexmap", "serde", "serde_json", ] @@ -186,18 +188,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.49", ] [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.49", ] [[package]] @@ -215,6 +217,16 @@ dependencies = [ "num-traits", ] +[[package]] +name = "atomic-write-file" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" +dependencies = [ + "nix", + "rand", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -293,9 +305,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.3" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -311,9 +323,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" dependencies = [ "serde", ] @@ -329,21 +341,21 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ "serde", ] @@ -365,30 +377,29 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.28" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", - "time", "wasm-bindgen", - "windows-targets", + "windows-targets 0.52.0", ] [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -396,15 +407,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -420,28 +431,24 @@ dependencies = [ [[package]] name = "crc-catalog" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crossbeam-queue" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crypto-common" @@ -455,9 +462,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955" dependencies = [ "darling_core", "darling_macro", @@ -465,34 +472,34 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.31", + "syn 2.0.49", ] [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be" dependencies = [ "darling_core", "quote", - "syn 2.0.31", + "syn 2.0.49", ] [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "der" @@ -525,9 +532,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" dependencies = [ "serde", ] @@ -549,23 +556,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.3" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", "libc", + "windows-sys 0.52.0", ] [[package]] @@ -576,7 +572,7 @@ checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" dependencies = [ "cfg-if", "home", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -596,19 +592,24 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" [[package]] name = "flume" -version = "0.10.14" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ "futures-core", "futures-sink", - "pin-project", "spin 0.9.8", ] @@ -635,18 +636,18 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "futures" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -659,9 +660,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -669,15 +670,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -697,38 +698,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.49", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -754,26 +755,26 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "h2" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -781,7 +782,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap", "slab", "tokio", "tokio-util", @@ -790,9 +791,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.4.0" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39b3bc2a8f715298032cf5087e58573809374b08160aa7d750582bdb82d2683" +checksum = "faa67bab9ff362228eb3d00bd024a4965d8231bbb7921167f0cfa66c6626b225" dependencies = [ "log", "pest", @@ -804,15 +805,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", "allocator-api2", @@ -824,7 +819,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.0", + "hashbrown", ] [[package]] @@ -838,9 +833,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" [[package]] name = "hex" @@ -850,9 +845,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac", ] @@ -868,18 +863,18 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -888,9 +883,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -917,9 +912,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -932,7 +927,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.9", + "socket2", "tokio", "tower-service", "tracing", @@ -941,9 +936,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http", @@ -968,16 +963,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -997,9 +992,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1007,51 +1002,41 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.3" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown", "serde", ] [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "itertools" -version = "0.10.5" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -1067,21 +1052,21 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.147" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libsqlite3-sys" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" +checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" dependencies = [ "cc", "pkg-config", @@ -1090,15 +1075,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1112,24 +1097,25 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "matchit" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "md-5" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ + "cfg-if", "digest", ] [[package]] name = "memchr" -version = "2.6.3" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "mime" @@ -1145,22 +1131,22 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "wasi", + "windows-sys 0.48.0", ] [[package]] @@ -1199,6 +1185,17 @@ dependencies = [ "tempfile", ] +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.4.2", + "cfg-if", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -1228,19 +1225,18 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" dependencies = [ "autocfg", "num-integer", @@ -1249,9 +1245,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", "libm", @@ -1269,26 +1265,26 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.2", "cfg-if", "foreign-types", "libc", @@ -1305,7 +1301,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.49", ] [[package]] @@ -1316,18 +1312,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.27.0+1.1.1v" +version = "300.2.3+3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02" +checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.92" +version = "0.9.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", @@ -1348,15 +1344,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -1376,15 +1372,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.3" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33" +checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" dependencies = [ "memchr", "thiserror", @@ -1393,9 +1389,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.3" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bee7be22ce7918f641a33f08e3f43388c7656772244e2bbb2477f44cc9021a" +checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809" dependencies = [ "pest", "pest_generator", @@ -1403,22 +1399,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.3" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1511785c5e98d79a05e8a6bc34b4ac2168a0e3e92161862030ad84daa223141" +checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.49", ] [[package]] name = "pest_meta" -version = "2.7.3" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42f0394d3123e33353ca5e1e89092e533d2cc490389f2bd6131c43c634ebc5f" +checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a" dependencies = [ "once_cell", "pest", @@ -1427,22 +1423,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.49", ] [[package]] @@ -1480,9 +1476,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "ppv-lite86" @@ -1502,18 +1498,51 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] [[package]] -name = "quote" -version = "1.0.33" +name = "prometheus" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot", + "protobuf", + "thiserror", +] + +[[package]] +name = "prometheus-static-metric" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8f30cdb09c39930b8fa5e0f23cbb895ab3f766b187403a0ba0956fc1ef4f0e5" +dependencies = [ + "lazy_static", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "protobuf" +version = "2.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -1550,18 +1579,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "regex" -version = "1.9.5" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -1571,9 +1600,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -1582,17 +1611,17 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.20" +version = "0.11.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" +checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" dependencies = [ - "base64 0.21.3", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", @@ -1616,6 +1645,8 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", + "system-configuration", "tokio", "tokio-native-tls", "tokio-rustls", @@ -1624,37 +1655,35 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.2", + "webpki-roots", "winreg", ] [[package]] name = "ring" -version = "0.16.20" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", + "getrandom", "libc", - "once_cell", - "spin 0.5.2", + "spin 0.9.8", "untrusted", - "web-sys", - "winapi", + "windows-sys 0.52.0", ] [[package]] name = "rsa" -version = "0.9.2" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab43bb47d23c1a631b4b680199a45255dce26fa9ab2fa902581f624ff13e6a8" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" dependencies = [ - "byteorder", "const-oid", "digest", "num-bigint-dig", "num-integer", - "num-iter", "num-traits", "pkcs1", "pkcs8", @@ -1673,53 +1702,43 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.38.11" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.7" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring", - "rustls-webpki 0.101.4", + "rustls-webpki", "sct", ] [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.3", + "base64 0.21.7", ] [[package]] name = "rustls-webpki" -version = "0.100.2" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ "ring", "untrusted", @@ -1733,17 +1752,17 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -1754,9 +1773,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ "ring", "untrusted", @@ -1787,18 +1806,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.188" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde-aux" -version = "4.2.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3dfe1b7eb6f9dcf011bd6fad169cdeaae75eda0d61b1a99a3f015b41b0cae39" +checksum = "a86348501c129f3ad50c2f4635a01971f76974cd8a3f335988a0f1581c082765" dependencies = [ "chrono", "serde", @@ -1807,20 +1826,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.49", ] [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -1829,9 +1848,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" +checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" dependencies = [ "itoa", "serde", @@ -1851,9 +1870,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -1862,9 +1881,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -1873,9 +1892,9 @@ dependencies = [ [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest", "rand_core", @@ -1892,28 +1911,18 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "socket2" -version = "0.4.9" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" -dependencies = [ - "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1933,9 +1942,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der", @@ -1943,9 +1952,9 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" +checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" dependencies = [ "itertools", "nom", @@ -1954,9 +1963,9 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e58421b6bc416714d5115a2ca953718f6c621a51b68e4f4922aea5a4391a721" +checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" dependencies = [ "sqlx-core", "sqlx-macros", @@ -1967,9 +1976,9 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4cef4251aabbae751a3710927945901ee1d97ee96d757f6880ebb9a79bfd53" +checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" dependencies = [ "ahash", "atoi", @@ -1988,7 +1997,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.0.0", + "indexmap", "log", "memchr", "once_cell", @@ -2006,14 +2015,14 @@ dependencies = [ "tokio-stream", "tracing", "url", - "webpki-roots 0.24.0", + "webpki-roots", ] [[package]] name = "sqlx-macros" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "208e3165167afd7f3881b16c1ef3f2af69fa75980897aac8874a0696516d12c2" +checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" dependencies = [ "proc-macro2", "quote", @@ -2024,10 +2033,11 @@ dependencies = [ [[package]] name = "sqlx-macros-core" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a4a8336d278c62231d87f24e8a7a74898156e34c1c18942857be2acb29c7dfc" +checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" dependencies = [ + "atomic-write-file", "dotenvy", "either", "heck", @@ -2050,13 +2060,13 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca69bf415b93b60b80dc8fda3cb4ef52b2336614d8da2de5456cc942a110482" +checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" dependencies = [ "atoi", - "base64 0.21.3", - "bitflags 2.4.0", + "base64 0.21.7", + "bitflags 2.4.2", "byteorder", "bytes", "chrono", @@ -2093,13 +2103,13 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0db2df1b8731c3651e204629dd55e52adbae0462fa1bdcbed56a2302c18181e" +checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" dependencies = [ "atoi", - "base64 0.21.3", - "bitflags 2.4.0", + "base64 0.21.7", + "bitflags 2.4.2", "byteorder", "chrono", "crc", @@ -2133,9 +2143,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4c21bf34c7cae5b283efb3ac1bcc7670df7561124dc2f8bdc0b59be40f79a2" +checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" dependencies = [ "atoi", "chrono", @@ -2152,6 +2162,7 @@ dependencies = [ "sqlx-core", "tracing", "url", + "urlencoding", ] [[package]] @@ -2162,10 +2173,11 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stringprep" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" dependencies = [ + "finl_unicode", "unicode-bidi", "unicode-normalization", ] @@ -2187,15 +2199,15 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.25.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.31", + "syn 2.0.49", ] [[package]] @@ -2217,9 +2229,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.31" +version = "2.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" +checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" dependencies = [ "proc-macro2", "quote", @@ -2232,6 +2244,27 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tasks" version = "0.1.0" @@ -2244,46 +2277,34 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", -] - -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "syn 2.0.49", ] [[package]] @@ -2303,9 +2324,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -2313,20 +2334,20 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "socket2 0.5.3", + "socket2", "tokio-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.49", ] [[package]] @@ -2362,9 +2383,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2dbec703c26b00d74844519606ef15d09a7d6857860f84ad223dec002ddea2" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", @@ -2372,14 +2393,14 @@ dependencies = [ "tokio", "tokio-rustls", "tungstenite", - "webpki-roots 0.23.1", + "webpki-roots", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -2391,17 +2412,17 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap", "toml_datetime", "winnow", ] @@ -2428,7 +2449,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.2", "bytes", "futures-core", "futures-util", @@ -2454,11 +2475,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -2467,35 +2487,35 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.49", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e862a1c4128df0112ab625f55cd5c934bcb4312ba80b39ae4b4835a3fd58e649" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" dependencies = [ "byteorder", "bytes", @@ -2513,9 +2533,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" @@ -2525,15 +2545,15 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -2546,9 +2566,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode_categories" @@ -2558,21 +2578,27 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "utf-8" version = "0.7.6" @@ -2600,12 +2626,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2614,9 +2634,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2624,24 +2644,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.49", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" dependencies = [ "cfg-if", "js-sys", @@ -2651,9 +2671,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2661,28 +2681,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.49", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" dependencies = [ "js-sys", "wasm-bindgen", @@ -2690,27 +2710,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.23.1" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" -dependencies = [ - "rustls-webpki 0.100.2", -] - -[[package]] -name = "webpki-roots" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" -dependencies = [ - "rustls-webpki 0.101.4", -] - -[[package]] -name = "webpki-roots" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "websocket" @@ -2721,6 +2723,8 @@ dependencies = [ "futures", "futures-util", "lazy_static", + "prometheus", + "prometheus-static-metric", "serde", "serde-aux", "serde_json", @@ -2737,34 +2741,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" [[package]] -name = "winapi" -version = "0.3.9" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets", + "windows-targets 0.52.0", ] [[package]] @@ -2773,7 +2755,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", ] [[package]] @@ -2782,13 +2773,28 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -2797,36 +2803,72 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -2834,10 +2876,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] -name = "winnow" -version = "0.5.15" +name = "windows_x86_64_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] @@ -2849,11 +2897,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", - "windows-sys", + "windows-sys 0.48.0", +] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", ] [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/Dockerfile b/Dockerfile index 5facf52..32381dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.69.0-bullseye as rust-base +FROM rust:1.78.0-bullseye as rust-base WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends curl clang ARG MOLD_VERSION=1.11.0 diff --git a/docker-compose.yaml b/docker-compose.yaml index a75f49f..e88dfb1 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -2,7 +2,7 @@ version: "3" services: tsdb: - image: timescale/timescaledb:latest-pg14 + image: docker.io/timescale/timescaledb:latest-pg14 environment: POSTGRES_PASSWORD: saerro321 POSTGRES_USER: saerrouser diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..fdcaef8 --- /dev/null +++ b/flake.lock @@ -0,0 +1,103 @@ +{ + "nodes": { + "fenix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1708150887, + "narHash": "sha256-lyEaeShLZqQtFO+ULLfxF9fYaYpTal0Ck1B+iKYBOMs=", + "owner": "nix-community", + "repo": "fenix", + "rev": "761431323e30846bae160e15682cfa687c200606", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1706830856, + "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1707956935, + "narHash": "sha256-ZL2TrjVsiFNKOYwYQozpbvQSwvtV/3Me7Zwhmdsfyu4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a4d4fe8c5002202493e87ec8dbc91335ff55552c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1706550542, + "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "fenix": "fenix", + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1708018577, + "narHash": "sha256-B75VUqKvQeIqAUnYw4bGjY3xxrCqzRBJHLbmD0MAWEw=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "b9b0d29b8e69b02457cfabe20c4c69cdb45f3cc5", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 960ffe0..ad5728a 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,8 @@ devDeps = [ fenix.toolchain + pkgs.docker-compose + pkgs.cargo-watch ]; PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; in { diff --git a/services/api/Cargo.toml b/services/api/Cargo.toml index c489303..a5ae404 100644 --- a/services/api/Cargo.toml +++ b/services/api/Cargo.toml @@ -23,6 +23,7 @@ reqwest = { version = "0.11.20", features = [ "rustls", ] } chrono = "0.4.28" +prometheus = "0.13.3" [dependencies.openssl] version = "0.10.57" diff --git a/services/api/src/analytics.rs b/services/api/src/analytics.rs index 3e30c50..859fbd5 100644 --- a/services/api/src/analytics.rs +++ b/services/api/src/analytics.rs @@ -1,6 +1,7 @@ use async_graphql::{futures_util::TryStreamExt, Context, Object, SimpleObject}; use chrono::{DateTime, Utc}; use sqlx::{query, Pool, Postgres, Row}; +use crate::telemetry; pub struct Analytics {} @@ -22,8 +23,10 @@ impl Analytics { world_id: Option, #[graphql(default = false)] hi_precision: bool, ) -> Vec { + telemetry::graphql_query("Analytics", "events"); let pool = ctx.data::>().unwrap(); + telemetry::db_read("analytics", "events"); let sql = format!(" SELECT time_bucket_gapfill('{} seconds', time, start => now() - '{}'::interval, finish => now()) AS bucket, diff --git a/services/api/src/classes.rs b/services/api/src/classes.rs index f278c1b..987e147 100644 --- a/services/api/src/classes.rs +++ b/services/api/src/classes.rs @@ -1,6 +1,7 @@ use crate::{ factions::{NC, TR, VS}, utils::{Filters, IdOrNameBy}, + telemetry }; use async_graphql::{Context, Object}; use sqlx::{Pool, Postgres, Row}; @@ -13,6 +14,7 @@ pub struct Class { impl Class { async fn fetch<'ctx>(&self, ctx: &Context<'ctx>, filters: Filters) -> i64 { + telemetry::db_read("players", "fetch"); let pool = ctx.data::>().unwrap(); let sql = format!( @@ -36,9 +38,12 @@ impl Class { #[Object] impl Class { async fn total<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Class", "total"); + self.fetch(ctx, self.filters.clone()).await } async fn nc<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Class", "nc"); self.fetch( ctx, Filters { @@ -49,6 +54,7 @@ impl Class { .await } async fn tr<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Class", "tr"); self.fetch( ctx, Filters { @@ -59,6 +65,7 @@ impl Class { .await } async fn vs<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Class", "vs"); self.fetch( ctx, Filters { @@ -86,36 +93,42 @@ impl Classes { #[Object] impl Classes { async fn infiltrator(&self) -> Class { + telemetry::graphql_query("Classes", "infiltrator"); Class { filters: self.filters.clone(), class_name: "infiltrator".to_string(), } } async fn light_assault(&self) -> Class { + telemetry::graphql_query("Classes", "light_assault"); Class { filters: self.filters.clone(), class_name: "light_assault".to_string(), } } async fn combat_medic(&self) -> Class { + telemetry::graphql_query("Classes", "combat_medic"); Class { filters: self.filters.clone(), class_name: "combat_medic".to_string(), } } async fn engineer(&self) -> Class { + telemetry::graphql_query("Classes", "engineer"); Class { filters: self.filters.clone(), class_name: "engineer".to_string(), } } async fn heavy_assault(&self) -> Class { + telemetry::graphql_query("Classes", "heavy_assault"); Class { filters: self.filters.clone(), class_name: "heavy_assault".to_string(), } } async fn max(&self) -> Class { + telemetry::graphql_query("Classes", "max"); Class { filters: self.filters.clone(), class_name: "max".to_string(), @@ -135,6 +148,7 @@ impl ClassesQuery { /// Get a specific class pub async fn class(&self, filter: Option, class_name: String) -> Class { + telemetry::graphql_query("Classes", ""); Class { filters: filter.unwrap_or_default(), class_name, diff --git a/services/api/src/health.rs b/services/api/src/health.rs index 8c43116..79cc45a 100644 --- a/services/api/src/health.rs +++ b/services/api/src/health.rs @@ -1,10 +1,13 @@ -use crate::utils::ID_TO_WORLD; +use crate::{telemetry, utils::ID_TO_WORLD}; use async_graphql::{Context, Enum, Object, SimpleObject}; use axum::{http::StatusCode, response::IntoResponse, Extension, Json}; use chrono::{DateTime, Utc}; use sqlx::{query, Pool, Postgres, Row}; pub async fn get_health(Extension(pool): Extension>) -> impl IntoResponse { + telemetry::http_request("/health", "GET"); + + telemetry::db_read("analytics", "get_health"); let events_resp = query("SELECT count(*) FROM analytics WHERE time > now() - interval '5 minutes'") .fetch_one(&pool) @@ -63,6 +66,7 @@ impl Health { ) -> (UpDown, Option>) { let pool = ctx.data::>().unwrap(); + telemetry::db_read("analytics", "most_recent_event_time"); let events_resp = query("SELECT time FROM analytics WHERE world_id = $1 ORDER BY time DESC LIMIT 1") .bind(world_id) @@ -91,8 +95,11 @@ impl Health { impl Health { /// Did a ping to Postgres (our main datastore) succeed? async fn database<'ctx>(&self, ctx: &Context<'ctx>) -> UpDown { + telemetry::graphql_query("Health", "database"); + let pool = ctx.data::>().unwrap(); + telemetry::db_read("analytics", "database_health"); let events_resp = query("SELECT count(*) FROM analytics WHERE time > now() - interval '5 minutes'") .fetch_one(pool) @@ -106,8 +113,11 @@ impl Health { /// Is the websocket processing jobs? async fn ingest<'ctx>(&self, ctx: &Context<'ctx>) -> UpDown { + telemetry::graphql_query("Health", "ingest"); + let pool = ctx.data::>().unwrap(); + telemetry::db_read("analytics", "ingest_health"); let events_resp = query("SELECT count(*) FROM analytics WHERE time > now() - interval '5 minutes'") .fetch_one(pool) @@ -129,6 +139,8 @@ impl Health { /// Is the websocket actually turned on? async fn ingest_reachable(&self) -> UpDown { + telemetry::graphql_query("Health", "ingest_reachable"); + reqwest::get( std::env::var("WEBSOCKET_HEALTHCHECK") .unwrap_or("http://127.0.0.1:8999/healthz".to_string()), @@ -145,6 +157,8 @@ impl Health { /// Checks if a world has had any events for the last 5 minutes async fn worlds<'ctx>(&self, ctx: &Context<'ctx>) -> Vec { + telemetry::graphql_query("Health", "worlds"); + let mut worlds = Vec::new(); for (id, name) in ID_TO_WORLD.iter() { let (status, last_event) = self.most_recent_event_time(ctx, *id).await; diff --git a/services/api/src/main.rs b/services/api/src/main.rs index 7c1aafa..2f1aa65 100644 --- a/services/api/src/main.rs +++ b/services/api/src/main.rs @@ -4,6 +4,7 @@ mod factions; mod health; mod population; mod query; +mod telemetry; mod utils; mod vehicles; mod world; @@ -26,10 +27,12 @@ use tower_http::cors::{Any, CorsLayer}; extern crate serde_json; async fn index() -> Html<&'static str> { + telemetry::http_request("/", "GET"); Html(include_str!("html/index.html")) } async fn ingest() -> Html<&'static str> { + telemetry::http_request("/ingest", "GET"); Html(include_str!("html/ingest.html")) } @@ -41,6 +44,7 @@ async fn graphql_handler_post( Extension(schema): Extension>, Json(query): Json, ) -> Json { + telemetry::http_request("/graphql", "POST"); Json(schema.execute(query).await) } @@ -48,6 +52,8 @@ async fn graphql_handler_get( Extension(schema): Extension>, query: Query, ) -> axum::response::Response { + telemetry::http_request("/graphql", "GET"); + if query.query == "" { return Redirect::to("/graphiql").into_response(); } @@ -56,6 +62,8 @@ async fn graphql_handler_get( } async fn graphiql() -> impl IntoResponse { + telemetry::http_request("/graphiql", "GET"); + Html( GraphiQLSource::build() .endpoint("/graphql") @@ -83,6 +91,8 @@ async fn main() { post(graphql_handler_post).get(graphql_handler_get), ) .route("/graphiql", get(graphiql)) + .route("/metrics", get(telemetry::handler)) + .route("/metrics/combined", get(telemetry::handler_combined)) .fallback(handle_404) .layer(Extension(db)) .layer(Extension(schema)) diff --git a/services/api/src/population.rs b/services/api/src/population.rs index 237e93b..ca9a2b1 100644 --- a/services/api/src/population.rs +++ b/services/api/src/population.rs @@ -1,6 +1,7 @@ use crate::{ factions::{NC, NSO, TR, VS}, utils::Filters, + telemetry, }; use async_graphql::{Context, Object}; use sqlx::{Pool, Postgres, Row}; @@ -22,6 +23,7 @@ impl Population { async fn by_faction<'ctx>(&self, ctx: &Context<'ctx>, faction: i32) -> i64 { let pool = ctx.data::>().unwrap(); + telemetry::db_read("players", "population_by_faction"); let sql = format!( "SELECT count(*) FROM players WHERE last_updated > now() - interval '15 minutes' AND faction_id = $1 {};", self.filters.sql(), @@ -43,8 +45,11 @@ impl Population { #[Object] impl Population { async fn total<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Population", "total"); + let pool = ctx.data::>().unwrap(); + telemetry::db_read("players", "population_total"); let sql = format!( "SELECT count(*) FROM players WHERE last_updated > now() - interval '15 minutes' {};", self.filters.sql(), @@ -57,19 +62,23 @@ impl Population { .await .unwrap() .get(0); - + query } async fn nc<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Population", "nc"); self.by_faction(ctx, NC).await } async fn vs<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Population", "vs"); self.by_faction(ctx, VS).await } async fn tr<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Population", "tr"); self.by_faction(ctx, TR).await } async fn ns<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Population", "ns"); self.by_faction(ctx, NSO).await } } diff --git a/services/api/src/telemetry.rs b/services/api/src/telemetry.rs new file mode 100644 index 0000000..f02479b --- /dev/null +++ b/services/api/src/telemetry.rs @@ -0,0 +1,138 @@ +use lazy_static::lazy_static; +use prometheus::{ + IntGauge, + IntGaugeVec, + register_int_gauge_vec, + register_int_gauge, + TextEncoder, + gather +}; +use sqlx::{Pool, Postgres, Row}; +use axum::Extension; +use chrono::{DateTime, Utc}; + +lazy_static! { + // http + pub static ref HTTP_REQUEST: IntGaugeVec = register_int_gauge_vec!("saerro_api_http_requests", "HTTP requests", &[ + "route", "method" + ]).unwrap(); + pub static ref GRAPHQL_QUERY: IntGaugeVec = register_int_gauge_vec!("saerro_api_graphql_query", "GraphQL queries", &[ + "major", "minor" + ]).unwrap(); + + // counters + pub static ref PLAYERS_TRACKED: IntGauge = register_int_gauge!("saerro_players_tracked", "All players tracked by Saerro right now").unwrap(); + pub static ref VEHICLES_TRACKED: IntGauge = register_int_gauge!("saerro_vehicles_tracked", "All vehicles tracked by Saerro right now").unwrap(); + pub static ref OLDEST_PLAYER: IntGauge = register_int_gauge!("saerro_oldest_player", "Oldest player tracked").unwrap(); + pub static ref NEWEST_PLAYER: IntGauge = register_int_gauge!("saerro_newest_player", "Newest player tracked").unwrap(); + pub static ref OLDEST_VEHICLE: IntGauge = register_int_gauge!("saerro_oldest_vehicle", "Oldest vehicle tracked").unwrap(); + pub static ref NEWEST_VEHICLE: IntGauge = register_int_gauge!("saerro_newest_vehicle", "Newest vehicle tracked").unwrap(); + + // database stuff + pub static ref DB_WRITES: IntGaugeVec = register_int_gauge_vec!("saerro_api_db_writes", "Writes to Postgres", &[ + "table", "op" + ]).unwrap(); + pub static ref DB_READS: IntGaugeVec = register_int_gauge_vec!("saerro_api_db_reads", "Reads from Postgres", &[ + "table", "op" + ]).unwrap(); + // static ref DB_WTIME: HistogramVec = register_histogram_vec!("saerro_ws_db_write_time", &[ + // "table", "op" + // ]).unwrap(); + // static ref DB_RTIME: HistogramVec = register_histogram_vec!("saerro_ws_db_read_time", &[ + // "table", "op" + // ]).unwrap(); +} + +pub async fn handler(Extension(pool): Extension>) -> String { + update_data_gauges(pool).await; + + // Final output + let encoder = TextEncoder::new(); + let mut buffer = String::new(); + + let metrics = gather(); + encoder.encode_utf8(&metrics, &mut buffer).expect("prometheus metrics failed to render"); + + buffer +} + +pub async fn handler_combined(Extension(pool): Extension>) -> String { + let url = std::env::var("WEBSOCKET_HEALTHCHECK") + .unwrap_or("http://127.0.0.1:8999/healthz".to_string()).replace("/healthz", "/metrics"); + + let local = handler(Extension(pool)).await; + let remote = match reqwest::get(url).await { + Ok(r) => r.text().await.expect("failed to text lol"), + Err(_) => String::from("") + }; + + + format!("{}{}", local, remote) +} + +// pub fn db_write(table: &str, op: &str) { +// DB_WRITES.with_label_values(&[table, op]).inc(); +// } + +pub fn db_read(table: &str, op: &str) { + DB_READS.with_label_values(&[table, op]).inc(); +} + +pub fn http_request(route: &str, method: &str) { + HTTP_REQUEST.with_label_values(&[route, method]).inc(); +} + +pub fn graphql_query(major: &str, minor: &str) { + GRAPHQL_QUERY.with_label_values(&[major, minor]).inc(); +} + +async fn update_data_gauges(pool: Pool) { + // Do some easy queries to fill our non-cumulative gauges + db_read("players", "count_all"); + let player_count: i64 = sqlx::query("SELECT count(*) FROM players") + .fetch_one(&pool) + .await + .unwrap() + .get(0); + PLAYERS_TRACKED.set(player_count); + + db_read("players", "get_newest"); + let player_newest: DateTime = sqlx::query("SELECT last_updated FROM players ORDER BY last_updated DESC LIMIT 1") + .fetch_one(&pool) + .await + .unwrap() + .get(0); + NEWEST_PLAYER.set(player_newest.timestamp()); + + db_read("players", "get_oldest"); + let player_oldest: DateTime = sqlx::query("SELECT last_updated FROM players ORDER BY last_updated ASC LIMIT 1") + .fetch_one(&pool) + .await + .unwrap() + .get(0); + OLDEST_PLAYER.set(player_oldest.timestamp()); + + db_read("vehicles", "count_all"); + let vehicle_count: i64 = sqlx::query("SELECT count(*) FROM vehicles") + .fetch_one(&pool) + .await + .unwrap() + .get(0); + VEHICLES_TRACKED.set(vehicle_count); + + db_read("vehicles", "get_newest"); + let vehicle_newest: DateTime = sqlx::query("SELECT last_updated FROM vehicles ORDER BY last_updated DESC LIMIT 1") + .fetch_one(&pool) + .await + .unwrap() + .get(0); + NEWEST_VEHICLE.set(vehicle_newest.timestamp()); + + db_read("vehicles", "get_oldest"); + let vehicle_oldest: DateTime = sqlx::query("SELECT last_updated FROM vehicles ORDER BY last_updated ASC LIMIT 1") + .fetch_one(&pool) + .await + .unwrap() + .get(0); + OLDEST_VEHICLE.set(vehicle_oldest.timestamp()); +} \ No newline at end of file diff --git a/services/api/src/vehicles.rs b/services/api/src/vehicles.rs index 601e30f..ab541e2 100644 --- a/services/api/src/vehicles.rs +++ b/services/api/src/vehicles.rs @@ -1,6 +1,7 @@ use crate::{ factions::{NC, TR, VS}, utils::{Filters, IdOrNameBy}, + telemetry, }; use async_graphql::{Context, Object}; use sqlx::{Pool, Postgres, Row}; @@ -15,6 +16,7 @@ impl Vehicle { async fn fetch<'ctx>(&self, ctx: &Context<'ctx>, filters: Filters) -> i64 { let pool = ctx.data::>().unwrap(); + telemetry::db_read("vehicles", "fetch"); let sql = format!( "SELECT count(*) FROM vehicles WHERE last_updated > now() - interval '15 minutes' AND vehicle_name = $1 {};", filters.sql(), @@ -36,9 +38,13 @@ impl Vehicle { #[Object] impl Vehicle { async fn total<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Vehicle", "total"); + self.fetch(ctx, self.filters.clone()).await } async fn nc<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Vehicle", "nc"); + self.fetch( ctx, Filters { @@ -49,6 +55,8 @@ impl Vehicle { .await } async fn tr<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Vehicle", "tr"); + self.fetch( ctx, Filters { @@ -59,6 +67,8 @@ impl Vehicle { .await } async fn vs<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Vehicle", "vs"); + self.fetch( ctx, Filters { @@ -86,8 +96,11 @@ impl Vehicles { #[Object] impl Vehicles { async fn total<'ctx>(&self, ctx: &Context<'ctx>) -> i64 { + telemetry::graphql_query("Vehicles", "total"); + let pool = ctx.data::>().unwrap(); + telemetry::db_read("players", "vehicles_total"); let sql = format!( "SELECT count(*) FROM vehicles WHERE last_updated > now() - interval '15 minutes' {};", self.filters.sql(), @@ -106,36 +119,48 @@ impl Vehicles { // Transport async fn flash(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "flash"); + Vehicle { filters: self.filters.clone(), vehicle_name: "flash".to_string(), } } async fn sunderer(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "sunderer"); + Vehicle { filters: self.filters.clone(), vehicle_name: "sunderer".to_string(), } } async fn ant(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "ant"); + Vehicle { filters: self.filters.clone(), vehicle_name: "ant".to_string(), } } async fn harasser(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "harasser"); + Vehicle { filters: self.filters.clone(), vehicle_name: "harasser".to_string(), } } async fn javelin(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "javelin"); + Vehicle { filters: self.filters.clone(), vehicle_name: "javelin".to_string(), } } async fn corsair(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "corsair"); + Vehicle { filters: self.filters.clone(), vehicle_name: "corsair".to_string(), @@ -144,30 +169,40 @@ impl Vehicles { // Tanks async fn lightning(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "lightning"); + Vehicle { filters: self.filters.clone(), vehicle_name: "lightning".to_string(), } } async fn prowler(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "prowler"); + Vehicle { filters: self.filters.clone(), vehicle_name: "prowler".to_string(), } } async fn vanguard(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "vanguard"); + Vehicle { filters: self.filters.clone(), vehicle_name: "vanguard".to_string(), } } async fn magrider(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "magrider"); + Vehicle { filters: self.filters.clone(), vehicle_name: "magrider".to_string(), } } async fn chimera(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "chimera"); + Vehicle { filters: self.filters.clone(), vehicle_name: "chimera".to_string(), @@ -176,42 +211,56 @@ impl Vehicles { // Air async fn mosquito(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "mosquito"); + Vehicle { filters: self.filters.clone(), vehicle_name: "mosquito".to_string(), } } async fn liberator(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "liberator"); + Vehicle { filters: self.filters.clone(), vehicle_name: "liberator".to_string(), } } async fn galaxy(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "galaxy"); + Vehicle { filters: self.filters.clone(), vehicle_name: "galaxy".to_string(), } } async fn valkyrie(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "valkyrie"); + Vehicle { filters: self.filters.clone(), vehicle_name: "valkyrie".to_string(), } } async fn reaver(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "reaver"); + Vehicle { filters: self.filters.clone(), vehicle_name: "reaver".to_string(), } } async fn scythe(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "scythe"); + Vehicle { filters: self.filters.clone(), vehicle_name: "scythe".to_string(), } } async fn dervish(&self) -> Vehicle { + telemetry::graphql_query("Vehicle", "dervish"); + Vehicle { filters: self.filters.clone(), vehicle_name: "dervish".to_string(), diff --git a/services/api/src/world.rs b/services/api/src/world.rs index fe38378..4d436ff 100644 --- a/services/api/src/world.rs +++ b/services/api/src/world.rs @@ -4,6 +4,7 @@ use crate::{ utils::{id_or_name_to_id, id_or_name_to_name, Filters, IdOrNameBy, ID_TO_WORLD, WORLD_IDS}, vehicles::Vehicles, zone::Zones, + telemetry, }; use async_graphql::Object; @@ -33,11 +34,15 @@ impl World { impl World { /// The ID of the world. async fn id(&self) -> i32 { + telemetry::graphql_query("World", "id"); + id_or_name_to_id(&WORLD_IDS, self.filter.world.as_ref().unwrap()).unwrap() } /// The name of the world, in official game capitalization. async fn name(&self) -> String { + telemetry::graphql_query("World", "name"); + let name = id_or_name_to_name(&ID_TO_WORLD, self.filter.world.as_ref().unwrap()).unwrap(); // Special case for SolTech, lol. @@ -51,6 +56,8 @@ impl World { /// Population filtered to this world. async fn population(&self) -> Population { + telemetry::graphql_query("World", "population"); + Population::new(Some(Filters { world: self.filter.world.clone(), faction: None, @@ -60,6 +67,8 @@ impl World { /// Vehicles filtered to this world. async fn vehicles(&self) -> Vehicles { + telemetry::graphql_query("World", "vehicles"); + Vehicles::new(Some(Filters { world: self.filter.world.clone(), faction: None, @@ -69,6 +78,8 @@ impl World { /// Classes filtered to this world. async fn classes(&self) -> Classes { + telemetry::graphql_query("World", "classes"); + Classes::new(Some(Filters { world: self.filter.world.clone(), faction: None, @@ -78,6 +89,8 @@ impl World { /// Get a specific zone/continent on this world. async fn zones(&self) -> Zones { + telemetry::graphql_query("World", "zones"); + Zones::new(Some(self.filter.clone())) } } diff --git a/services/api/src/zone.rs b/services/api/src/zone.rs index 8c2be9c..be1fefa 100644 --- a/services/api/src/zone.rs +++ b/services/api/src/zone.rs @@ -3,6 +3,7 @@ use crate::{ population::Population, utils::{id_or_name_to_id, id_or_name_to_name, Filters, IdOrNameBy, ID_TO_ZONE, ZONE_IDS}, vehicles::Vehicles, + telemetry, }; use async_graphql::Object; @@ -23,11 +24,15 @@ impl Zone { impl Zone { /// The ID of the zone/continent. async fn id(&self) -> i32 { + telemetry::graphql_query("Zone", "id"); + id_or_name_to_id(&ZONE_IDS, self.filters.zone.as_ref().unwrap()).unwrap() } /// The name of the continent, in official game capitalization. async fn name(&self) -> String { + telemetry::graphql_query("Zone", "name"); + let name = id_or_name_to_name(&ID_TO_ZONE, self.filters.zone.as_ref().unwrap()).unwrap(); // Capitalize the first letter @@ -35,14 +40,20 @@ impl Zone { } async fn population(&self) -> Population { + telemetry::graphql_query("Zone", "population"); + Population::new(Some(self.filters.clone())) } async fn vehicles(&self) -> Vehicles { + telemetry::graphql_query("Zone", "vehicles"); + Vehicles::new(Some(self.filters.clone())) } async fn classes(&self) -> Classes { + telemetry::graphql_query("Zone", "classes"); + Classes::new(Some(self.filters.clone())) } } diff --git a/services/websocket/Cargo.toml b/services/websocket/Cargo.toml index 6884295..6c25075 100644 --- a/services/websocket/Cargo.toml +++ b/services/websocket/Cargo.toml @@ -23,3 +23,5 @@ futures = "0.3.28" async_once = "0.2.6" serde-aux = "4.2.0" axum = "0.6.20" +prometheus = "0.13.3" +prometheus-static-metric = "0.5.1" diff --git a/services/websocket/src/main.rs b/services/websocket/src/main.rs index 8047d28..c839d4e 100644 --- a/services/websocket/src/main.rs +++ b/services/websocket/src/main.rs @@ -12,6 +12,7 @@ use tokio::task::JoinSet; use tokio_tungstenite::{connect_async, tungstenite::Message}; mod translators; +mod telemetry; lazy_static! { static ref WS_ADDR: String = env::var("WS_ADDR").unwrap_or_default(); @@ -75,6 +76,7 @@ struct AnalyticsEvent { async fn get_team_id(character_id: String) -> Result { let pool = PG.get().await; + telemetry::db_read("players", "get_team_id"); let team_id: i32 = query("SELECT faction_id FROM players WHERE character_id = $1 LIMIT 1;") .bind(character_id.clone()) .fetch_one(pool) @@ -108,6 +110,7 @@ async fn track_pop(pop_event: PopEvent) { translators::vehicle_to_name(vehicle_id.as_str()) }; + telemetry::db_write("players", "track_pop"); query( " INSERT INTO players (last_updated, character_id, world_id, faction_id, zone_id, class_name) @@ -130,6 +133,7 @@ async fn track_pop(pop_event: PopEvent) { .unwrap(); if vehicle_name != "unknown" { + telemetry::db_write("vehicles", "track_pop"); query("INSERT INTO vehicles (last_updated, character_id, world_id, faction_id, zone_id, vehicle_name) VALUES (now(), $1, $2, $3, $4, $5) ON CONFLICT (character_id) DO UPDATE SET @@ -159,6 +163,7 @@ async fn track_analytics(analytics_event: AnalyticsEvent) { event_name, } = analytics_event; + telemetry::db_write("analytics", "track_analytics"); match query("INSERT INTO analytics (time, world_id, event_name) VALUES (now(), $1, $2);") .bind(world_id) .bind(event_name) @@ -210,6 +215,7 @@ async fn process_death_event(event: &Event) { } async fn process_exp_event(event: &Event) { + telemetry::experience_event(&event.world_id, &event.experience_id); let mut set = JoinSet::new(); // println!("[ws/process_event] EVENT: {:?}", event); @@ -287,6 +293,9 @@ async fn healthz() { "status": "ok", })) }), + ).route( + "/metrics", + get(telemetry::handler) ); let port: u16 = std::env::var("PORT") @@ -325,16 +334,20 @@ async fn main() { let mut data: Payload = match serde_json::from_str(body) { Ok(data) => data, - Err(_) => { + Err(_e) => { // println!("Error: {}; body: {}", e, body.clone()); + telemetry::event_dropped(&0, &"".to_string(), "decoding failure"); return; } }; if data.payload.event_name == "" { + telemetry::event_dropped(&data.payload.world_id, &data.payload.event_name, "not event"); return; } + telemetry::event(&data.payload.world_id, &data.payload.event_name); + if data.payload.event_name == "Death" || data.payload.event_name == "VehicleDestroy" { process_death_event(&data.payload).await; return; @@ -346,12 +359,16 @@ async fn main() { Ok(team_id) => { data.payload.team_id = team_id; } - Err(_) => {} + Err(_) => { + telemetry::event_dropped(&data.payload.world_id, &data.payload.event_name, "team_id missing"); + } } } process_exp_event(&data.payload).await; return; } + + telemetry::event_dropped(&data.payload.world_id, &data.payload.event_name, "unprocessable"); }) .fuse(); diff --git a/services/websocket/src/telemetry.rs b/services/websocket/src/telemetry.rs new file mode 100644 index 0000000..4d4baf2 --- /dev/null +++ b/services/websocket/src/telemetry.rs @@ -0,0 +1,75 @@ +use lazy_static::lazy_static; +use prometheus::{ + IntGaugeVec, + register_int_gauge_vec, + TextEncoder, + gather +}; + +lazy_static! { + // incoming events + pub static ref EVENTS: IntGaugeVec = register_int_gauge_vec!("saerro_ws_events_count", "Events processed", &[ + "world_id", "event_name" + ]).unwrap(); + pub static ref EVENTS_DROPPED: IntGaugeVec = register_int_gauge_vec!("saerro_ws_events_dropped_count", "Events dropped", &[ + "world_id", "event_name", "reason" + ]).unwrap(); + + pub static ref EXPERIENCE_EVENTS: IntGaugeVec = register_int_gauge_vec!("saerro_ws_experience_events_count", "Experience Events processed by Exp ID", &[ + "world_id", "experience_id" + ]).unwrap(); + + // database stuff + pub static ref DB_WRITES: IntGaugeVec = register_int_gauge_vec!("saerro_ws_db_writes", "Writes to Postgres", &[ + "table", "op" + ]).unwrap(); + pub static ref DB_READS: IntGaugeVec = register_int_gauge_vec!("saerro_ws_db_reads", "Reads from Postgres", &[ + "table", "op" + ]).unwrap(); + // static ref DB_WTIME: HistogramVec = register_histogram_vec!("saerro_ws_db_write_time", &[ + // "table", "op" + // ]).unwrap(); + // static ref DB_RTIME: HistogramVec = register_histogram_vec!("saerro_ws_db_read_time", &[ + // "table", "op" + // ]).unwrap(); +} + +pub async fn handler() -> String { + let encoder = TextEncoder::new(); + let mut buffer = String::new(); + + let metrics = gather(); + encoder.encode_utf8(&metrics, &mut buffer).expect("prometheus metrics failed to render"); + + buffer +} + +pub fn event(world_id: &i32, event_name: &String) { + EVENTS.with_label_values(&[ + &world_id.to_string(), + &event_name, + ]).inc(); +} + +pub fn event_dropped(world_id: &i32, event_name: &String, reason: &str) { + EVENTS_DROPPED.with_label_values(&[ + &world_id.to_string(), + &event_name, + reason, + ]).inc(); +} + +pub fn experience_event(world_id: &i32, experience_id: &i32) { + EXPERIENCE_EVENTS.with_label_values(&[ + &world_id.to_string(), + &experience_id.to_string(), + ]).inc(); +} + +pub fn db_write(table: &str, op: &str) { + DB_WRITES.with_label_values(&[table, op]).inc(); +} + +pub fn db_read(table: &str, op: &str) { + DB_READS.with_label_values(&[table, op]).inc(); +} \ No newline at end of file From 3c0ab61695a4f63bc6ca1d6798066754f840ef32 Mon Sep 17 00:00:00 2001 From: noe Date: Sun, 18 Feb 2024 00:54:54 -0500 Subject: [PATCH 57/57] fix docker image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 32381dd..a5397a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.78.0-bullseye as rust-base +FROM rust:1.76.0-bullseye as rust-base WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends curl clang ARG MOLD_VERSION=1.11.0