diff --git a/backend/public/src/datasources/mod.rs b/backend/public/src/datasources/mod.rs index 7865007..6b7a5f7 100644 --- a/backend/public/src/datasources/mod.rs +++ b/backend/public/src/datasources/mod.rs @@ -1,3 +1,4 @@ pub mod authors; pub mod comments; pub mod posts; +pub mod projects; diff --git a/backend/public/src/datasources/projects.rs b/backend/public/src/datasources/projects.rs new file mode 100644 index 0000000..ca9a0b0 --- /dev/null +++ b/backend/public/src/datasources/projects.rs @@ -0,0 +1,15 @@ +use sqlx::{FromRow, Pool, Postgres, Row}; + +use crate::routes::projects::Project; + +pub struct ProjectsDatasource; +impl ProjectsDatasource { + pub async fn get_all(pool: &Pool) -> Result, sqlx::Error> { + sqlx::query_as!( + Project, + "SELECT project_id, title, repo, summary, tech, wip, created_at FROM projects p WHERE deleted_at IS NULL ORDER BY p.created_at DESC" + ) + .fetch_all(pool) + .await + } +} diff --git a/backend/public/src/main.rs b/backend/public/src/main.rs index 7f1451a..694a68c 100644 --- a/backend/public/src/main.rs +++ b/backend/public/src/main.rs @@ -131,6 +131,10 @@ async fn main() { "/authors", routes::authors::AuthorsRoute::routes(&app_state), ) + .nest( + "/projects", + routes::projects::ProjectsRoute::routes(&app_state), + ) .layer(CorsLayer::permissive()) .layer( TraceLayer::new_for_http() diff --git a/backend/public/src/routes/mod.rs b/backend/public/src/routes/mod.rs index a185d7c..45aeb35 100644 --- a/backend/public/src/routes/mod.rs +++ b/backend/public/src/routes/mod.rs @@ -1,4 +1,5 @@ pub mod authors; pub mod comments; pub mod posts; +pub mod projects; pub mod root; diff --git a/backend/public/src/routes/posts.rs b/backend/public/src/routes/posts.rs index 70ec8d6..30c1e83 100644 --- a/backend/public/src/routes/posts.rs +++ b/backend/public/src/routes/posts.rs @@ -1,7 +1,11 @@ use crate::{ datasources::posts::PostsDatasource, state::AppState, - utils::{datetime::*, rss}, + utils::{ + datetime::*, + rss, + sitemap::{self, SitemapEntry}, + }, }; use axum::http::{HeaderMap, HeaderValue}; use axum::{ @@ -60,6 +64,7 @@ impl PostsRoute { .route("/hot", get(PostsRoute::get_hot_posts)) .route("/featured", get(PostsRoute::get_featured_posts)) .route("/rss", get(PostsRoute::get_rss_posts)) + .route("/sitemap", get(PostsRoute::get_sitemap)) .with_state(app_state.clone()) } @@ -330,7 +335,8 @@ impl PostsRoute { match PostsDatasource::get_all(&state.database).await { Ok(posts) => { - let web_url = std::env::var("BASE_URI_WEB").expect("No environment variable found"); + let web_url = + std::env::var("BASE_URI_WEB").expect("Environment BASE_URI_WEB variable found"); let mapped_posts: HashMap = posts .into_iter() .map(|post| (post.post_id.to_string(), post)) @@ -343,9 +349,42 @@ impl PostsRoute { ); let mut headers = HeaderMap::new(); headers.insert( - header::CONTENT_DISPOSITION, - HeaderValue::from_str(r#"attachment; filename="posts.xml""#).unwrap(), + header::CONTENT_TYPE, + HeaderValue::from_static("application/xml"), ); + (headers, xml) + } + Err(e) => { + let mut headers = HeaderMap::new(); + headers.insert("Content-Type", HeaderValue::from_static("text/plain")); + (headers, e.to_string()) + } + } + } + + async fn get_sitemap(State(app_state): State) -> impl IntoResponse { + let state = app_state.lock().await; + // let cached: Option> = None; // TODO: maybe implement cache, later?? + + match PostsDatasource::get_all(&state.database).await { + Ok(posts) => { + let web_url = + std::env::var("BASE_URI_WEB").expect("Environment BASE_URI_WEB variable found"); + let mut entries: HashMap = posts + .into_iter() + .map(|p| { + ( + p.post_id.to_string(), + SitemapEntry { + location: format!("{}/posts/{}", web_url, p.post_id.to_string()), + lastmod: p.created_at.unwrap_or_else(|| chrono::Utc::now()), + }, + ) + }) + .collect(); + sitemap::get_static_pages(&mut entries, &web_url); + let xml: String = sitemap::generate_sitemap(&entries); + let mut headers = HeaderMap::new(); headers.insert( header::CONTENT_TYPE, HeaderValue::from_static("application/xml"), diff --git a/backend/public/src/routes/projects.rs b/backend/public/src/routes/projects.rs new file mode 100644 index 0000000..74dbcd6 --- /dev/null +++ b/backend/public/src/routes/projects.rs @@ -0,0 +1,69 @@ +use crate::{datasources::projects::ProjectsDatasource, state::AppState, utils::datetime::*}; +use axum::http::{HeaderMap, HeaderValue}; +use axum::{extract::State, http::StatusCode, response::IntoResponse, routing::get, Json, Router}; +use fred::types::Expiration; +use serde::{Deserialize, Serialize}; + +#[derive(sqlx::FromRow, Deserialize, Serialize, Debug, Clone)] +pub struct Project { + pub project_id: i32, + pub title: String, + pub repo: Option, + pub summary: String, + pub tech: String, + pub wip: Option, + #[serde(serialize_with = "serialize_datetime")] + #[serde(deserialize_with = "deserialize_datetime")] + pub created_at: Option>, +} + +pub struct ProjectsRoute; +impl ProjectsRoute { + pub fn routes(app_state: &AppState) -> Router { + Router::new() + .route("/", get(ProjectsRoute::get_all)) + .with_state(app_state.clone()) + } + + async fn get_all(State(app_state): State) -> impl IntoResponse { + let mut state = app_state.lock().await; + let cached: Option> = state + .cache + .get(String::from("projects:all")) + .await + .unwrap_or(None); + + if let Some(projects) = cached { + tracing::info!("grabbing all projects from cache"); + return Ok(Json(projects)); + }; + + match ProjectsDatasource::get_all(&state.database).await { + Ok(projects) => { + tracing::info!("grabbing all projects from database"); + if let p = &projects { + let projects = p.clone(); + let state = app_state.clone(); + + tracing::info!("storing database data in cache"); + tokio::spawn(async move { + let mut s = state.lock().await; + let _ = s + .cache + .set( + String::from("projects:all"), + &projects, + Some(Expiration::EX(10)), + None, + false, + ) + .await; + }); + }; + + Ok(Json(projects)) + } + Err(e) => Err((StatusCode::INTERNAL_SERVER_ERROR, e.to_string())), + } + } +} diff --git a/backend/public/src/routes/root.rs b/backend/public/src/routes/root.rs index 643e359..21ae726 100644 --- a/backend/public/src/routes/root.rs +++ b/backend/public/src/routes/root.rs @@ -1,10 +1,15 @@ use axum::{ + extract::State, http::StatusCode, response::{Html, IntoResponse}, routing::get, Router, }; +use crate::{datasources::posts::PostsDatasource, state::AppState}; + +use super::posts::Post; + pub struct RootRoute; impl RootRoute { pub fn routes() -> Router { diff --git a/backend/public/src/state.rs b/backend/public/src/state.rs index 9f7d25d..751bfc6 100644 --- a/backend/public/src/state.rs +++ b/backend/public/src/state.rs @@ -27,13 +27,7 @@ impl Cache { where T: for<'de> serde::Deserialize<'de>, { - if !self.inmem.is_connected() { - return Err(Box::new(std::io::Error::new( - std::io::ErrorKind::Other, - "Not connected to cache".to_string(), - ))); - } - + self.is_connected()?; let value: Option = self.inmem.get(&key).await?; match value { @@ -56,23 +50,34 @@ impl Cache { where T: for<'de> serde::Deserialize<'de> + serde::Serialize, { - if !self.inmem.is_connected() { - return Err(Box::new(std::io::Error::new( - std::io::ErrorKind::Other, - "Not connected to cache".to_string(), - ))); - } + self.is_connected()?; + let json_string = match serde_json::to_string::(contents) { + Ok(s) => s, + Err(_) => { + return Err(Box::new(std::io::Error::new( + std::io::ErrorKind::Other, + "Unable to deserialize contents passed to cache".to_string(), + ))) + } + }; - let json_string = serde_json::to_string(contents)?; - self.inmem + Ok(self + .inmem .set(key, json_string, expiration, set_opts, get) - .await?; - - Ok(()) + .await?) } pub async fn del(&mut self, key: String) -> Result<(), Box> { - self.inmem.del(key).await?; - Ok(()) + Ok(self.inmem.del(key).await?) + } + + fn is_connected(&mut self) -> Result<(), Box> { + match self.inmem.is_connected() { + true => Ok(()), + false => Err(Box::new(std::io::Error::new( + std::io::ErrorKind::Other, + "Not connected to cache".to_string(), + ))), + } } } diff --git a/backend/public/src/utils/mod.rs b/backend/public/src/utils/mod.rs index a0a3bf5..3600b8e 100644 --- a/backend/public/src/utils/mod.rs +++ b/backend/public/src/utils/mod.rs @@ -1,2 +1,3 @@ pub mod datetime; pub mod rss; +pub mod sitemap; diff --git a/backend/public/src/utils/rss.rs b/backend/public/src/utils/rss.rs index 6d09d32..851e100 100644 --- a/backend/public/src/utils/rss.rs +++ b/backend/public/src/utils/rss.rs @@ -13,7 +13,8 @@ pub struct RssEntry { impl From for RssEntry { fn from(post: posts::Post) -> Self { - let web_url = std::env::var("BASE_URI_WEB").expect("Environment variable not found"); + let web_url = + std::env::var("BASE_URI_WEB").expect("Environment variable BASE_URI_WEB not found"); let post_url = format!("{}{}{}", web_url, "/posts/", post.post_id.to_string()); let author_full_name = format!("{} {}", post.first_name.unwrap(), post.last_name.unwrap()); @@ -58,10 +59,7 @@ pub fn generate_rss( link: &str, posts: &HashMap, ) -> String { - println!("{:?}", posts); let values = posts.clone().into_values(); - println!("{:?}", values); - let rss_entries = values .map(|p| p.into()) .map(|r: RssEntry| r.to_item()) @@ -69,8 +67,9 @@ pub fn generate_rss( let safe_title = escape_str_pcdata(title); let safe_description = escape_str_pcdata(description); - println!("{:?}", rss_entries); + // TODO: change the atom link in this string - it's not correct + // change it when we know the URL format!( r#" diff --git a/backend/public/src/utils/sitemap.rs b/backend/public/src/utils/sitemap.rs new file mode 100644 index 0000000..00f735a --- /dev/null +++ b/backend/public/src/utils/sitemap.rs @@ -0,0 +1,62 @@ +use std::collections::HashMap; + +pub struct SitemapEntry { + pub location: String, + pub lastmod: chrono::DateTime, +} + +impl SitemapEntry { + fn to_item(&self) -> String { + format!( + r#" + + {} + {} + + "#, + self.location, + self.lastmod.to_rfc3339(), + ) + } +} + +pub fn generate_sitemap(entries: &HashMap) -> String { + let urls = entries + .values() + .into_iter() + .map(|entry| entry.to_item()) + .collect::(); + format!( + r#" + + + {} + + "#, + urls + ) +} + +pub fn get_static_pages(entries: &mut HashMap, web_url: &String) { + entries.insert( + (entries.len() + 1).to_string(), + SitemapEntry { + location: web_url.clone(), + lastmod: chrono::Utc::now(), + }, + ); + entries.insert( + (entries.len() + 1).to_string(), + SitemapEntry { + location: format!("{}/posts", web_url), + lastmod: chrono::Utc::now(), + }, + ); + entries.insert( + (entries.len() + 1).to_string(), + SitemapEntry { + location: format!("{}/projects", web_url), + lastmod: chrono::Utc::now(), + }, + ); +} diff --git a/backend/task/Cargo.lock b/backend/task/Cargo.lock index 18ce756..592b337 100644 --- a/backend/task/Cargo.lock +++ b/backend/task/Cargo.lock @@ -74,6 +74,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.3.0" @@ -81,10 +87,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] -name = "aws-credential-types" -version = "1.2.1" +name = "aws-config" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" +checksum = "455e9fb7743c6f6267eb2830ccc08686fbb3d13c9a689369562fd4d4ef9ea462" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-sdk-sso", + "aws-sdk-ssooidc", + "aws-sdk-sts", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "hex", + "http 1.2.0", + "ring", + "time", + "tokio", + "tracing", + "url", + "zeroize", +] + +[[package]] +name = "aws-credential-types" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687bc16bc431a8533fe0097c7f0182874767f920989d7260950172ae8e3c4465" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -93,10 +129,33 @@ dependencies = [ ] [[package]] -name = "aws-runtime" -version = "1.5.5" +name = "aws-lc-rs" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76dd04d39cc12844c0994f2c9c5a6f5184c22e9188ec1ff723de41910a21dcad" +checksum = "93fcc8f365936c834db5514fc45aee5b1202d677e6b40e48468aaaa8183ca8c7" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61b1d86e7705efe1be1b569bab41d4fa1e14e220b60a160f78de2db687add079" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", +] + +[[package]] +name = "aws-runtime" +version = "1.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f6c68419d8ba16d9a7463671593c54f81ba58cab466e9b759418da606dcc2e2" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -111,7 +170,6 @@ dependencies = [ "fastrand", "http 0.2.12", "http-body 0.4.6", - "once_cell", "percent-encoding", "pin-project-lite", "tracing", @@ -120,9 +178,9 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.77.0" +version = "1.94.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e87342432a3de0e94e82c99a7cbd9042f99de029ae1f4e368160f9e9929264" +checksum = "cc24d9d761bd464534d9e477a9f724c118ca2557a95444097cf6ce71f3229a72" dependencies = [ "aws-credential-types", "aws-runtime", @@ -142,9 +200,9 @@ dependencies = [ "hex", "hmac", "http 0.2.12", + "http 1.2.0", "http-body 0.4.6", "lru", - "once_cell", "percent-encoding", "regex-lite", "sha2", @@ -153,10 +211,77 @@ dependencies = [ ] [[package]] -name = "aws-sigv4" -version = "1.2.9" +name = "aws-sdk-sso" +version = "1.73.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bfe75fad52793ce6dec0dc3d4b1f388f038b5eb866c8d4d7f3a8e21b5ea5051" +checksum = "b2ac1674cba7872061a29baaf02209fefe499ff034dfd91bd4cc59e4d7741489" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-ssooidc" +version = "1.74.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a6a22f077f5fd3e3c0270d4e1a110346cddf6769e9433eb9e6daceb4ca3b149" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-sts" +version = "1.75.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3258fa707f2f585ee3049d9550954b959002abd59176975150a01d5cf38ae3f" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-query", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", + "fastrand", + "http 0.2.12", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sigv4" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfb9021f581b71870a17eac25b52335b82211cdc092e02b6876b2bcefa61666" dependencies = [ "aws-credential-types", "aws-smithy-eventstream", @@ -170,7 +295,6 @@ dependencies = [ "hmac", "http 0.2.12", "http 1.2.0", - "once_cell", "p256", "percent-encoding", "ring", @@ -183,9 +307,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.2.4" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa59d1327d8b5053c54bf2eaae63bf629ba9e904434d0835a28ed3c0ed0a614e" +checksum = "1e190749ea56f8c42bf15dd76c65e14f8f765233e6df9b0506d9d934ebef867c" dependencies = [ "futures-util", "pin-project-lite", @@ -194,16 +318,14 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.63.0" +version = "0.63.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2dc8d842d872529355c72632de49ef8c5a2949a4472f10e802f28cf925770c" +checksum = "244f00666380d35c1c76b90f7b88a11935d11b84076ac22a4c014ea0939627af" dependencies = [ "aws-smithy-http", "aws-smithy-types", "bytes", - "crc32c", - "crc32fast", - "crc64fast-nvme", + "crc-fast", "hex", "http 0.2.12", "http-body 0.4.6", @@ -216,9 +338,9 @@ dependencies = [ [[package]] name = "aws-smithy-eventstream" -version = "0.60.6" +version = "0.60.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b18559a41e0c909b77625adf2b8c50de480a8041e5e4a3f5f7d177db70abc5a" +checksum = "338a3642c399c0a5d157648426110e199ca7fd1c689cc395676b81aa563700c4" dependencies = [ "aws-smithy-types", "bytes", @@ -227,9 +349,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.60.12" +version = "0.62.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7809c27ad8da6a6a68c454e651d4962479e81472aa19ae99e59f9aba1f9713cc" +checksum = "99335bec6cdc50a346fda1437f9fefe33abf8c99060739a546a16457f2862ca9" dependencies = [ "aws-smithy-eventstream", "aws-smithy-runtime-api", @@ -238,8 +360,8 @@ dependencies = [ "bytes-utils", "futures-core", "http 0.2.12", + "http 1.2.0", "http-body 0.4.6", - "once_cell", "percent-encoding", "pin-project-lite", "pin-utils", @@ -247,46 +369,91 @@ dependencies = [ ] [[package]] -name = "aws-smithy-json" -version = "0.61.2" +name = "aws-smithy-http-client" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "623a51127f24c30776c8b374295f2df78d92517386f77ba30773f15a30ce1422" +checksum = "7f491388e741b7ca73b24130ff464c1478acc34d5b331b7dd0a2ee4643595a15" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "h2 0.3.26", + "h2 0.4.10", + "http 0.2.12", + "http 1.2.0", + "http-body 0.4.6", + "hyper 0.14.32", + "hyper 1.6.0", + "hyper-rustls 0.24.2", + "hyper-rustls 0.27.7", + "hyper-util", + "pin-project-lite", + "rustls 0.21.12", + "rustls 0.23.28", + "rustls-native-certs 0.8.1", + "rustls-pki-types", + "tokio", + "tower", + "tracing", +] + +[[package]] +name = "aws-smithy-json" +version = "0.61.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a16e040799d29c17412943bdbf488fd75db04112d0c0d4b9290bacf5ae0014b9" dependencies = [ "aws-smithy-types", ] [[package]] -name = "aws-smithy-runtime" -version = "1.7.8" +name = "aws-smithy-observability" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d526a12d9ed61fadefda24abe2e682892ba288c2018bcb38b1b4c111d13f6d92" +checksum = "9364d5989ac4dd918e5cc4c4bdcc61c9be17dcd2586ea7f69e348fc7c6cab393" +dependencies = [ + "aws-smithy-runtime-api", +] + +[[package]] +name = "aws-smithy-query" +version = "0.60.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fbd61ceb3fe8a1cb7352e42689cec5335833cd9f94103a61e98f9bb61c64bb" +dependencies = [ + "aws-smithy-types", + "urlencoding", +] + +[[package]] +name = "aws-smithy-runtime" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14302f06d1d5b7d333fd819943075b13d27c7700b414f574c3c35859bfb55d5e" dependencies = [ "aws-smithy-async", "aws-smithy-http", + "aws-smithy-http-client", + "aws-smithy-observability", "aws-smithy-runtime-api", "aws-smithy-types", "bytes", "fastrand", - "h2", "http 0.2.12", + "http 1.2.0", "http-body 0.4.6", "http-body 1.0.1", - "httparse", - "hyper", - "hyper-rustls", - "once_cell", "pin-project-lite", "pin-utils", - "rustls 0.21.12", "tokio", "tracing", ] [[package]] name = "aws-smithy-runtime-api" -version = "1.7.3" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92165296a47a812b267b4f41032ff8069ab7ff783696d217f0994a0d7ab585cd" +checksum = "bd8531b6d8882fd8f48f82a9754e682e29dd44cff27154af51fa3eb730f59efb" dependencies = [ "aws-smithy-async", "aws-smithy-types", @@ -301,9 +468,9 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.13" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7b8a53819e42f10d0821f56da995e1470b199686a1809168db6ca485665f042" +checksum = "d498595448e43de7f4296b7b7a18a8a02c61ec9349128c80a368f7c3b4ab11a8" dependencies = [ "base64-simd", "bytes", @@ -327,18 +494,18 @@ dependencies = [ [[package]] name = "aws-smithy-xml" -version = "0.60.9" +version = "0.60.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab0b0166827aa700d3dc519f72f8b3a91c35d0b8d042dc5d643a91e6f80648fc" +checksum = "3db87b96cb1b16c024980f133968d52882ca0daaee3a086c6decc500f6c99728" dependencies = [ "xmlparser", ] [[package]] name = "aws-types" -version = "1.3.5" +version = "1.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbd0a668309ec1f66c0f6bda4840dd6d4796ae26d699ebc266d7cc95c6d040f" +checksum = "8a322fec39e4df22777ed3ad8ea868ac2f94cd15e1a55f6ee8d8d6305057689a" dependencies = [ "aws-credential-types", "aws-smithy-async", @@ -397,6 +564,29 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn", + "which", +] + [[package]] name = "bitflags" version = "2.6.0" @@ -429,9 +619,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "bytes-utils" @@ -449,15 +639,32 @@ version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" dependencies = [ + "jobserver", + "libc", "shlex", ] +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom 7.1.3", +] + [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.38" @@ -472,6 +679,26 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "cmake" +version = "0.1.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +dependencies = [ + "cc", +] + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -497,6 +724,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -528,12 +765,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] -name = "crc32c" -version = "0.6.8" +name = "crc-fast" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a47af21622d091a8f0fb295b88bc886ac74efcc613efc19f5d0b21de5c89e47" +checksum = "6bf62af4cc77d8fe1c22dde4e721d87f2f54056139d8c412e1366b740305f56f" dependencies = [ - "rustc_version", + "crc", + "digest", + "libc", + "rand 0.9.1", + "regex", ] [[package]] @@ -545,15 +786,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crc64fast-nvme" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4955638f00a809894c947f85a024020a20815b65a5eea633798ea7924edab2b3" -dependencies = [ - "crc", -] - [[package]] name = "cron" version = "0.6.1" @@ -587,7 +819,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -598,7 +830,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -654,12 +886,29 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "dotenvy" version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "ecdsa" version = "0.14.8" @@ -695,12 +944,21 @@ dependencies = [ "generic-array", "group", "pkcs8 0.9.0", - "rand_core", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", ] +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -760,7 +1018,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -787,6 +1045,21 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" +[[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.2.1" @@ -796,6 +1069,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "futures" version = "0.3.30" @@ -823,9 +1102,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" @@ -913,8 +1192,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", + "wasm-bindgen", ] [[package]] @@ -923,6 +1218,12 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + [[package]] name = "group" version = "0.12.1" @@ -930,7 +1231,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -953,6 +1254,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "h2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.2.0", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hashbrown" version = "0.14.5" @@ -1106,7 +1426,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -1120,6 +1440,26 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.10", + "http 1.2.0", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -1128,12 +1468,72 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper", + "hyper 0.14.32", "log", "rustls 0.21.12", - "rustls-native-certs", + "rustls-native-certs 0.6.3", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http 1.2.0", + "hyper 1.6.0", + "hyper-util", + "rustls 0.23.28", + "rustls-native-certs 0.8.1", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.2", + "tower-service", + "webpki-roots 1.0.1", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.6.0", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc2fdfdbff08affe55bb779f33b053aa1fe5dd5b54c257343c17edfa55711bdb" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http 1.2.0", + "http-body 1.0.1", + "hyper 1.6.0", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "system-configuration", + "tokio", + "tower-service", + "tracing", + "windows-registry", ] [[package]] @@ -1160,13 +1560,110 @@ dependencies = [ ] [[package]] -name = "idna" -version = "0.5.0" +name = "icu_collections" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1179,6 +1676,31 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -1197,11 +1719,22 @@ dependencies = [ ] [[package]] -name = "js-sys" -version = "0.3.70" +name = "jobserver" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ + "getrandom 0.3.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1215,10 +1748,26 @@ dependencies = [ ] [[package]] -name = "libc" -version = "0.2.158" +name = "lazycell" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.174" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" + +[[package]] +name = "libloading" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] [[package]] name = "libm" @@ -1253,6 +1802,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" + [[package]] name = "lock_api" version = "0.4.12" @@ -1278,6 +1833,12 @@ dependencies = [ "hashbrown 0.15.2", ] +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + [[package]] name = "markdown" version = "1.0.0-alpha.20" @@ -1312,6 +1873,12 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1335,10 +1902,27 @@ checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework 2.11.1", + "security-framework-sys", + "tempfile", +] + [[package]] name = "nom" version = "4.1.1" @@ -1380,7 +1964,7 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand", + "rand 0.8.5", "smallvec", "zeroize", ] @@ -1436,12 +2020,50 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "openssl" +version = "0.10.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "openssl-probe" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +[[package]] +name = "openssl-sys" +version = "0.9.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "outref" version = "0.5.2" @@ -1564,6 +2186,15 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -1579,6 +2210,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -1588,6 +2229,61 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "quinn" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.1.1", + "rustls 0.23.28", + "socket2", + "thiserror 2.0.12", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" +dependencies = [ + "bytes", + "getrandom 0.3.3", + "lru-slab", + "rand 0.9.1", + "ring", + "rustc-hash 2.1.1", + "rustls 0.23.28", + "rustls-pki-types", + "slab", + "thiserror 2.0.12", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcebb1209ee276352ef14ff8732e24cc2b02bbac986cd74a4c81bcb2f9881970" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" version = "1.0.37" @@ -1597,6 +2293,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "rand" version = "0.8.5" @@ -1604,8 +2306,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", ] [[package]] @@ -1615,7 +2327,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -1624,7 +2346,16 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", ] [[package]] @@ -1686,6 +2417,50 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +[[package]] +name = "reqwest" +version = "0.12.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabf4c97d9130e2bf606614eb937e86edac8292eaa6f422f995d7e8de1eb1813" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "h2 0.4.10", + "http 1.2.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.6.0", + "hyper-rustls 0.27.7", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls 0.23.28", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tokio-rustls 0.26.2", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 1.0.1", +] + [[package]] name = "rfc6979" version = "0.3.1" @@ -1705,7 +2480,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin", "untrusted", @@ -1725,7 +2500,7 @@ dependencies = [ "num-traits", "pkcs1", "pkcs8 0.10.2", - "rand_core", + "rand_core 0.6.4", "signature 2.2.0", "spki 0.7.3", "subtle", @@ -1738,6 +2513,18 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + [[package]] name = "rustc_version" version = "0.4.1" @@ -1774,14 +2561,15 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "7160e3e10bf4535308537f3c4e1641468cd0e485175d6163087c0393c7d46643" dependencies = [ + "aws-lc-rs", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki 0.103.3", "subtle", "zeroize", ] @@ -1795,7 +2583,19 @@ dependencies = [ "openssl-probe", "rustls-pemfile 1.0.4", "schannel", - "security-framework", + "security-framework 2.11.1", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework 3.2.0", ] [[package]] @@ -1819,9 +2619,13 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "web-time", + "zeroize", +] [[package]] name = "rustls-webpki" @@ -1835,15 +2639,22 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.8" +version = "0.103.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" + [[package]] name = "ryu" version = "1.0.18" @@ -1896,7 +2707,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags", - "core-foundation", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +dependencies = [ + "bitflags", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", @@ -2030,7 +2854,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ "digest", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -2040,7 +2864,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -2063,9 +2887,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2151,19 +2975,19 @@ dependencies = [ "once_cell", "paste", "percent-encoding", - "rustls 0.23.13", + "rustls 0.23.28", "rustls-pemfile 2.1.3", "serde", "serde_json", "sha2", "smallvec", "sqlformat", - "thiserror", + "thiserror 1.0.63", "tokio", "tokio-stream", "tracing", "url", - "webpki-roots", + "webpki-roots 0.26.6", ] [[package]] @@ -2235,7 +3059,7 @@ dependencies = [ "memchr", "once_cell", "percent-encoding", - "rand", + "rand 0.8.5", "rsa", "serde", "sha1", @@ -2243,7 +3067,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.63", "tracing", "whoami", ] @@ -2275,14 +3099,14 @@ dependencies = [ "md-5", "memchr", "once_cell", - "rand", + "rand 0.8.5", "serde", "serde_json", "sha2", "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.63", "tracing", "whoami", ] @@ -2311,6 +3135,12 @@ dependencies = [ "url", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "stringprep" version = "0.1.5" @@ -2330,19 +3160,61 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.77" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags", + "core-foundation 0.9.4", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "task" version = "0.1.0" dependencies = [ + "aws-config", "aws-sdk-s3", "chrono", "dotenvy", @@ -2350,6 +3222,7 @@ dependencies = [ "job_scheduler", "markdown", "once_cell", + "reqwest", "serde", "serde_yml", "sqlx", @@ -2377,7 +3250,16 @@ version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.63", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", ] [[package]] @@ -2391,6 +3273,17 @@ dependencies = [ "syn", ] +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "thread_local" version = "1.1.8" @@ -2431,6 +3324,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -2475,6 +3378,16 @@ dependencies = [ "syn", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.24.1" @@ -2485,6 +3398,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" +dependencies = [ + "rustls 0.23.28", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.16" @@ -2509,6 +3432,45 @@ dependencies = [ "tokio", ] +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http 1.2.0", + "http-body 1.0.1", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + [[package]] name = "tower-service" version = "0.3.3" @@ -2636,22 +3598,34 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" 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 = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom", + "getrandom 0.2.15", ] [[package]] @@ -2699,6 +3673,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasite" version = "0.1.0" @@ -2707,24 +3690,24 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -2732,10 +3715,23 @@ dependencies = [ ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.93" +name = "wasm-bindgen-futures" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2743,9 +3739,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -2756,9 +3752,32 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] [[package]] name = "webpki-roots" @@ -2769,6 +3788,27 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "webpki-roots" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8782dd5a41a24eed3a4f40b606249b3e236ca61adf1f25ea4d45c73de122b502" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + [[package]] name = "whoami" version = "1.5.2" @@ -2810,6 +3850,41 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-registry" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" +dependencies = [ + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -2958,12 +4033,51 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + [[package]] name = "xmlparser" version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -2985,8 +4099,62 @@ dependencies = [ "syn", ] +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/backend/task/Cargo.toml b/backend/task/Cargo.toml index 1a3bf45..71e253e 100644 --- a/backend/task/Cargo.toml +++ b/backend/task/Cargo.toml @@ -7,6 +7,7 @@ edition = "2021" [dependencies] tokio = { version = "1.19.2", features = ["full"] } +reqwest = { version = "0.12.20", features = ["json", "rustls-tls"] } job_scheduler = "1.2.1" sqlx = { version = "0.8.2", features = [ "postgres", @@ -20,6 +21,7 @@ futures = "0.3.30" markdown = "1.0.0-alpha.20" serde = { version = "*", features = ["derive"] } serde_yml = "*" -aws-sdk-s3 = "1.77.0" +aws-sdk-s3 = "1.94.0" +aws-config = "1.8" tracing = "0.1" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } diff --git a/backend/task/README.md b/backend/task/README.md index e8e215c..dd34a6e 100644 --- a/backend/task/README.md +++ b/backend/task/README.md @@ -4,4 +4,12 @@ also known as `task` ## What is this? -I don't know yet - hopefully this will be filled out soon. +This is a task runner/scheduler programs that will fire off various tasks. These tasks can be anything from an blog post import task to a RSS generator task. Additionally, there is task logs inside the database so that you can keep track of tasks when something goes wrong. + +## Things you should know + +`task` uses a `.env` file at the root of the project. The file takes standard environment variables (like enviroment variables you would put into a `.bashrc` or ad-hoc into your shell). + +For `task` to work properly, please make sure to first create the `.env` file, then fill out the following environment variables: + +- `DATABASE_URL` - needed for communicating to Postgres diff --git a/backend/task/src/main.rs b/backend/task/src/main.rs index baa71af..f96f0cb 100644 --- a/backend/task/src/main.rs +++ b/backend/task/src/main.rs @@ -3,7 +3,7 @@ use sqlx::{postgres::PgPoolOptions, Pool, Postgres}; use std::env; use std::sync::Arc; use std::time::Duration; -use tasks::import_posts; +use tasks::*; //mod config; mod tasks; @@ -87,14 +87,24 @@ impl<'a> TaskManager<'a> { for job in &results { tracing::info!("Registering job: {}", job.task_name); - let pool = Arc::new(self.pool.clone()); let schedule = job .schedule .parse() .map_err(|e| format!("Failed to parse schedule '{}': {}", job.schedule, e))?; - let task = match job.task_id { - 1 => Box::new(move || import_posts::register(&pool)), + let task: Box = match job.task_id { + 1 => { + let pool = Arc::new(self.pool.clone()); + Box::new(move || import_posts::register(&pool)) + } + 2 => { + let pool = Arc::new(self.pool.clone()); + Box::new(move || upload_rss::register(&pool)) + } + 3 => { + let pool = Arc::new(self.pool.clone()); + Box::new(move || upload_sitemap::register(&pool)) + } id => return Err(format!("Unknown task_id: {}", id).into()), }; diff --git a/backend/task/src/tasks/import_posts.rs b/backend/task/src/tasks/import_posts.rs index dbbfcfb..4610706 100644 --- a/backend/task/src/tasks/import_posts.rs +++ b/backend/task/src/tasks/import_posts.rs @@ -64,7 +64,6 @@ async fn import_posts( // Process file contents let file_md_contents = process_read_file(&file_path)?; - // println!("{:?}", file_md_contents); // Extract metadata let document = crate::utils::front_matter::YamlFrontMatter::parse::( &file_md_contents, @@ -74,10 +73,8 @@ async fn import_posts( markdown::to_html_with_options(&document.content, &markdown::Options::default()); println!("{:?}", content); - // println!("{:?}", document); let title = document.metadata.title; let content_final = content.unwrap(); - // println!("{:?}", title); // Insert into database let results = sqlx::query_as::<_, InsertPosts>( diff --git a/backend/task/src/tasks/mod.rs b/backend/task/src/tasks/mod.rs index 5b96f31..88a4645 100644 --- a/backend/task/src/tasks/mod.rs +++ b/backend/task/src/tasks/mod.rs @@ -1 +1,3 @@ pub mod import_posts; +pub mod upload_rss; +pub mod upload_sitemap; diff --git a/backend/task/src/tasks/upload_rss.rs b/backend/task/src/tasks/upload_rss.rs new file mode 100644 index 0000000..de67439 --- /dev/null +++ b/backend/task/src/tasks/upload_rss.rs @@ -0,0 +1,40 @@ +use sqlx::{Pool, Postgres}; + +use crate::utils::{ + request::{Request, Response}, + task_log, + {upload::S3ClientConfig, *}, +}; + +pub fn register(pool: &sqlx::Pool) { + let p = pool.clone(); + tokio::spawn(async move { + let _ = upload_rss(&p).await; + }); +} + +async fn upload_rss(pool: &sqlx::Pool) -> Result<(), Box> { + // start task logging + task_log::start(2, pool).await?; + + // get request and request the things + let request = Request::new(); + let rss_url = format!("{}/posts/rss", request.base_url); + let rss_result = request.request_url::(&rss_url).await.unwrap(); + + // upload the sucker to obj storage + if let Response::Xml(rss) = rss_result { + let client_config = S3ClientConfig::from_env().unwrap(); + let s3_client = upload::create_s3_client(&client_config).await.unwrap(); + let _ = upload::upload( + &s3_client, + client_config.bucket.as_str(), + "feed.xml", + rss.as_str(), + ) + .await; + println!("Finished uploading RSS feed"); + } + + Ok(()) +} diff --git a/backend/task/src/tasks/upload_sitemap.rs b/backend/task/src/tasks/upload_sitemap.rs new file mode 100644 index 0000000..b0d8519 --- /dev/null +++ b/backend/task/src/tasks/upload_sitemap.rs @@ -0,0 +1,40 @@ +use crate::utils::{ + request::{Request, Response}, + task_log, + {upload::S3ClientConfig, *}, +}; + +pub fn register(pool: &sqlx::Pool) { + let p = pool.clone(); + tokio::spawn(async move { + let _ = upload_sitemap(&p).await; + }); +} + +async fn upload_sitemap( + pool: &sqlx::Pool, +) -> Result<(), Box> { + // TODO:: get sitemap and upload it to bucket?? + task_log::start(3, pool).await?; + + // get request and request the things + let request = Request::new(); + let sitemap_url = format!("{}/posts/sitemap", request.base_url); + let sitemap_result = request.request_url::(&sitemap_url).await; + + // upload the sucker to obj storage + if let Response::Xml(sitemap) = sitemap_result { + let client_config = S3ClientConfig::from_env().unwrap(); + let s3_client = upload::create_s3_client(&client_config).await.unwrap(); + let _ = upload::upload( + &s3_client, + client_config.bucket.as_str(), + "sitemap.xml", + sitemap.as_str(), + ) + .await; + println!("Finished uploading sitemap!"); + } + + Ok(()) +} diff --git a/backend/task/src/utils/front_matter.rs b/backend/task/src/utils/front_matter.rs index 42491a7..1bfdd50 100644 --- a/backend/task/src/utils/front_matter.rs +++ b/backend/task/src/utils/front_matter.rs @@ -21,10 +21,7 @@ impl YamlFrontMatter { markdown: &str, ) -> Result> { let yaml = YamlFrontMatter::extract(markdown)?; - println!("File front matter metadata (raw): {:?}", yaml.0); - // println!("File content: {:?}", yaml.1); let clean_yaml = YamlFrontMatter::unescape_str(&yaml.0); - println!("File front matter metadata (clean): {:?}", clean_yaml); let metadata = match YamlFrontMatter::from_yaml_str(clean_yaml.as_str()) { Ok(m) => m, Err(e) => { diff --git a/backend/task/src/utils/mod.rs b/backend/task/src/utils/mod.rs index a545f3c..ffb29ed 100644 --- a/backend/task/src/utils/mod.rs +++ b/backend/task/src/utils/mod.rs @@ -1,2 +1,4 @@ pub mod front_matter; +pub mod request; pub mod task_log; +pub mod upload; diff --git a/backend/task/src/utils/request.rs b/backend/task/src/utils/request.rs new file mode 100644 index 0000000..004960c --- /dev/null +++ b/backend/task/src/utils/request.rs @@ -0,0 +1,85 @@ +use reqwest::StatusCode; +use std::env; +use std::time::Duration; + +#[derive(Debug)] +pub struct Request<'a> { + pub client: reqwest::Client, + pub base_url: Box, + pub full_url: Option<&'a str>, +} + +#[derive(Debug)] +pub enum Response { + Json(T), + Xml(String), + Text(String), + Bytes(Vec), +} + +impl<'a> Request<'a> { + pub fn new() -> Self { + Request { + client: reqwest::ClientBuilder::new() + .use_rustls_tls() + .timeout(Duration::from_secs(30)) + .build() + .unwrap(), + base_url: env::var("BASE_URI_API") + .expect("Environment variable BASE_URI_API is not found") + .into_boxed_str(), + full_url: None, + } + } + + pub async fn request_url( + &self, + url: &String, + ) -> Result, Box> + where + T: for<'de> serde::Deserialize<'de>, + { + println!("{}", url); + let api_result = match self.client.get(url).send().await { + Ok(r) => r, + Err(e) => return Err(Box::new(e)), + }; + + match api_result.status() { + StatusCode::OK => { + // TODO: handle errors here + let content_type = api_result + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap(); + + if content_type.contains("application/json") { + match api_result.json::().await { + Ok(j) => Ok(Response::Json(j)), + Err(e) => return Err(Box::new(e)), + } + } else if content_type.contains("application/xml") { + match api_result.text().await { + Ok(x) => Ok(Response::Xml(x)), + Err(e) => return Err(Box::new(e)), + } + } else if content_type.starts_with("text/") { + match api_result.text().await { + Ok(t) => Ok(Response::Text(t)), + Err(e) => return Err(Box::new(e)), + } + } else { + match api_result.bytes().await { + Ok(b) => Ok(Response::Bytes(b.to_vec())), + Err(e) => Err(Box::new(e)), + } + } + } + status => Err(Box::new(std::io::Error::new( + std::io::ErrorKind::Other, + format!("Unexpected status code: {}", status), + ))), + } + } +} diff --git a/backend/task/src/utils/upload.rs b/backend/task/src/utils/upload.rs new file mode 100644 index 0000000..ccb1d92 --- /dev/null +++ b/backend/task/src/utils/upload.rs @@ -0,0 +1,73 @@ +use aws_config::{BehaviorVersion, Region}; +use aws_sdk_s3::{config::Credentials, Client, Config}; +use std::env; + +#[derive(Debug)] +pub struct S3ClientConfig { + pub access_key: String, + secret_key: String, + endpoint: String, + pub bucket: String, + region: String, +} + +impl S3ClientConfig { + pub fn from_env() -> Result> { + Ok(S3ClientConfig { + access_key: env::var("LINODE_ACCESS_KEY") + .map_err(|_| "LINODE_ACCESS_KEY environment variable not set")?, + secret_key: env::var("LINODE_SECRET_KEY") + .map_err(|_| "LINODE_SECRET_KEY environment variable not set")?, + endpoint: env::var("LINODE_ENDPOINT") + .unwrap_or_else(|_| "us-ord-1.linodeobjects.com".to_string()), + bucket: env::var("LINODE_BUCKET") + .map_err(|_| "LINODE_BUCKET environment variable not set")?, + region: env::var("LINODE_REGION").unwrap_or_else(|_| "us-ord".to_string()), + }) + } +} + +pub async fn create_s3_client( + config: &S3ClientConfig, +) -> Result> { + let credentials = Credentials::new( + &config.access_key, + &config.secret_key, + None, + None, + "linode-object-storage", + ); + + let s3_config = Config::builder() + .behavior_version(BehaviorVersion::latest()) + .region(Region::new(config.region.clone())) + .endpoint_url(format!("https://{}", config.endpoint)) + .credentials_provider(credentials) + .force_path_style(false) + .build(); + + Ok(Client::from_conf(s3_config)) +} + +pub async fn upload( + client: &Client, + bucket: &str, + key: &str, + content: &str, +) -> Result<(), Box> { + println!("Uploading to Linode Object Storage..."); + println!("Bucket: {}", bucket); + + let put_object_req = client + .put_object() + .bucket(bucket) + .key(key) + .body(content.as_bytes().to_vec().into()) + .acl(aws_sdk_s3::types::ObjectCannedAcl::PublicRead) + .content_type("application/rss+xml") + .send() + .await?; + + println!("Upload successful! ETag: {:?}", put_object_req.e_tag()); + Ok(()) +} diff --git a/config.kdl b/config.kdl deleted file mode 100644 index aba3156..0000000 --- a/config.kdl +++ /dev/null @@ -1,16 +0,0 @@ -layout { - pane { - pane - pane split_direction="horizontal" { - pane - pane - } - } -} - -keybinds { - unbind "Ctrl s" -} - -theme "catppuccin-mocha" - diff --git a/flake.nix b/flake.nix index d3002c1..b09c882 100644 --- a/flake.nix +++ b/flake.nix @@ -61,19 +61,22 @@ wget nixpkgs-fmt openssl + openssl.dev patchelf deno sqlx-cli cargo-watch cargo-chef valkey + pkg-config-unwrapped ]; # Environment variables env = { RUST_BACKTRACE = "1"; RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library"; - ZELLIJ_CONFIG_FILE = "config.kdl"; + PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; + # ZELLIJ_CONFIG_FILE = "config.kdl"; # PATH = "$PATH:$HOME/.local/share/nvim/mason/bin/deno"; }; }; diff --git a/frontend/components/PostBody.tsx b/frontend/components/PostBody.tsx index 0af0797..a8c9635 100644 --- a/frontend/components/PostBody.tsx +++ b/frontend/components/PostBody.tsx @@ -3,7 +3,7 @@ import { Post } from "../types/index.ts"; export const PostBody = function PostBody({ post }: PostBodyOpts) { return (
); diff --git a/frontend/components/PostHeader.tsx b/frontend/components/PostHeader.tsx index e37afbe..cb34986 100644 --- a/frontend/components/PostHeader.tsx +++ b/frontend/components/PostHeader.tsx @@ -1,23 +1,29 @@ +import { Head } from "$fresh/runtime.ts"; import { Post } from "../types/index.ts"; import { convertUtc } from "../lib/convertUtc.ts"; export const PostHeader = function PostHeader({ post }: PostHeaderOpts) { return ( -
-
-
-
-

- {post.title} -

-

- by {post.first_name} {post.last_name} posted on{" "} - {convertUtc(post.created_at)} -

+ <> + + Wyatt J. Miller | {post.title} + +
+
+
+
+

+ {post.title} +

+

+ by {post.first_name} {post.last_name} posted on{" "} + {convertUtc(post.created_at)} +

+
-
+ ); }; diff --git a/frontend/components/ShareLinkButton.tsx b/frontend/components/ShareLinkButton.tsx new file mode 100644 index 0000000..08da64b --- /dev/null +++ b/frontend/components/ShareLinkButton.tsx @@ -0,0 +1,14 @@ +export const ShareLinkButton = function ShareLinkButton({props}) { + const [text. setText] = useState("Share"); + + const onClickHandler = () => { + navigator.clipboard.writeText(location.href); + setText("Copied to clipboard!"); + }; + + return ( + + ) +} diff --git a/frontend/deno.json b/frontend/deno.json index a0e2d8c..4ac0e6a 100644 --- a/frontend/deno.json +++ b/frontend/deno.json @@ -11,15 +11,10 @@ }, "lint": { "rules": { - "tags": [ - "fresh", - "recommended" - ] + "tags": ["fresh", "recommended"] } }, - "exclude": [ - "**/_fresh/*" - ], + "exclude": ["**/_fresh/*"], "imports": { "$fresh/": "https://deno.land/x/fresh@1.6.8/", "$std/": "https://deno.land/std@0.216.0/", @@ -33,7 +28,8 @@ "preact/jsx-runtime": "npm:preact@10.22.1/jsx-runtime", "tailwindcss": "npm:tailwindcss@3.4.1", "tailwindcss/": "npm:/tailwindcss@3.4.1/", - "tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js" + "tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js", + "tailwind-highlightjs": "npm:tailwind-highlightjs" }, "compilerOptions": { "jsx": "react-jsx", diff --git a/frontend/routes/posts/[id].tsx b/frontend/routes/posts/[id].tsx index 390663c..daf079b 100644 --- a/frontend/routes/posts/[id].tsx +++ b/frontend/routes/posts/[id].tsx @@ -27,7 +27,6 @@ export const handler: Handlers = { export default function PostIdentifier({ data }: PageProps) { const { postData } = data; - console.log(postData); return (
diff --git a/frontend/routes/projects/index.tsx b/frontend/routes/projects/index.tsx index 19b4c69..89ae701 100644 --- a/frontend/routes/projects/index.tsx +++ b/frontend/routes/projects/index.tsx @@ -1,6 +1,32 @@ +import { FreshContext, Handlers, PageProps } from "$fresh/server.ts"; import { ProjectCard } from "../../islands/ProjectCard.tsx"; -export default function Projects() { +interface ProjectData { + project_id: number; + title: string; + repo?: string; + summary: string; + tech: string; + wip?: boolean; + created_at: string; +} + +export const handler: Handlers = { + async GET(_req: Request, ctx: FreshContext) { + const projectResult = await fetch( + `${Deno.env.get("BASE_URI_API")}/projects`, + ); + + const projectData = await projectResult.json(); + return ctx.render({ + projectData, + }); + }, +}; + +export default function Projects({ data }: PageProps) { + const { projectData: projects } = data; + return (
Projects -
- - - - - - - - +
+ {projects.map((project: any) => { + return ( + + ); + })}
diff --git a/frontend/static/robots.txt b/frontend/static/robots.txt new file mode 100644 index 0000000..a0ed5af --- /dev/null +++ b/frontend/static/robots.txt @@ -0,0 +1 @@ +Sitemap: https://wyattjmiller.us-ord-1.linodeobjects.com/feed.xml diff --git a/frontend/static/styles.css b/frontend/static/styles.css index b5c61c9..4ba68ab 100644 --- a/frontend/static/styles.css +++ b/frontend/static/styles.css @@ -1,3 +1,31 @@ @tailwind base; @tailwind components; @tailwind utilities; + +.post-content h1 { + @apply text-3xl font-bold text-[#f5e0dc] mb-4 mt-6; +} + +.post-content h2 { + @apply text-2xl font-semibold text-[#f5e0dc] mb-3 mt-5; +} + +.post-content h3 { + @apply text-xl font-medium text-[#f5e0dc] mb-2 mt-4; +} + +.post-content h4 { + @apply text-lg font-medium text-[#f5e0dc] mb-2 mt-3; +} + +.post-content p { + @apply mb-3 text-[#f5e0dc]; +} + +.post-content pre { + @apply overflow-x-scroll bg-[#454656] p-2 mb-4 rounded-lg; +} + +.post-content code { + @apply text-[#DCC9C6]; +} diff --git a/frontend/tailwind.config.ts b/frontend/tailwind.config.ts index 8f725d8..5eaaf23 100644 --- a/frontend/tailwind.config.ts +++ b/frontend/tailwind.config.ts @@ -1,5 +1,7 @@ import { type Config } from "tailwindcss"; +import twHLJS from "tailwind-highlightjs"; export default { content: ["{routes,islands,components}/**/*.{ts,tsx}"], + // plugins: [twHLJS], } satisfies Config;