From 73b8398f4afc39660139efafb303d6115c915a55 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Sun, 27 Oct 2024 05:40:11 -0500 Subject: [PATCH 1/7] Reworked database to store things smarter --- Cargo.lock | 1 + Cargo.toml | 1 + src/database.rs | 219 ++++++++++++++++++++++++++++++++------------- src/endpoints.rs | 29 +++--- src/file_server.rs | 14 +++ src/main.rs | 63 +++++-------- src/utils.rs | 5 -- web/request.js | 12 +-- 8 files changed, 215 insertions(+), 129 deletions(-) create mode 100644 src/file_server.rs diff --git a/Cargo.lock b/Cargo.lock index 8320264..bcf02d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -238,6 +238,7 @@ dependencies = [ "chrono", "log", "maud", + "rand", "rocket", "serde", "serde_with", diff --git a/Cargo.toml b/Cargo.toml index c6c9828..4002a73 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ blake3 = { version = "1.5.4", features = ["mmap", "rayon", "serde"] } chrono = { version = "0.4.38", features = ["serde"] } log = "0.4" maud = { version = "0.26", features = ["rocket"] } +rand = "0.8.5" rocket = { version = "0.5", features = ["json"] } serde = { version = "1.0.213", features = ["derive"] } serde_with = { version = "3.11.0", features = ["chrono_0_4"] } diff --git a/src/database.rs b/src/database.rs index ff94105..1408e8a 100644 --- a/src/database.rs +++ b/src/database.rs @@ -1,26 +1,32 @@ use std::{ - collections::HashMap, - fs::{self, File}, - path::{Path, PathBuf}, - sync::{Arc, RwLock}, + collections::{hash_map::Values, HashMap, HashSet}, fs::{self, File}, path::{Path, PathBuf}, sync::{Arc, RwLock} }; use bincode::{config::Configuration, decode_from_std_read, encode_into_std_write, Decode, Encode}; use blake3::Hash; use chrono::{DateTime, TimeDelta, Utc}; use log::{info, warn}; +use rand::distributions::{Alphanumeric, DistString}; use rocket::{ serde::{Deserialize, Serialize}, tokio::{select, sync::mpsc::Receiver, time}, }; +use crate::settings::Settings; + const BINCODE_CFG: Configuration = bincode::config::standard(); #[derive(Debug, Clone, Decode, Encode)] pub struct Database { path: PathBuf, + + /// Every hash in the database along with the [`Mmid`]s associated with them #[bincode(with_serde)] - pub files: HashMap, + hashes: HashMap>, + + /// All entries in the database + #[bincode(with_serde)] + entries: HashMap, } impl Database { @@ -29,7 +35,8 @@ impl Database { let output = Self { path: path.as_ref().to_path_buf(), - files: HashMap::new(), + entries: HashMap::new(), + hashes: HashMap::new(), }; encode_into_std_write(&output, &mut file, BINCODE_CFG).expect("Could not write database!"); @@ -37,6 +44,7 @@ impl Database { output } + /// Open the database from a path, **or create it if it does not exist** pub fn open>(path: &P) -> Self { if !path.as_ref().exists() { Self::new(path) @@ -46,6 +54,7 @@ impl Database { } } + /// Save the database to its file pub fn save(&self) { let mut out_path = self.path.clone(); out_path.set_extension(".bkp"); @@ -54,18 +63,90 @@ impl Database { fs::rename(out_path, &self.path).unwrap(); } + + /// Insert a [`MochiFile`] into the database. + /// + /// If the database already contained this value, then `false` is returned. + pub fn insert(&mut self, entry: MochiFile) -> bool { + if let Some(s) = self.hashes.get_mut(&entry.hash) { + // If the database already contains the hash, make sure the file is unique + if !s.insert(entry.mmid.clone()) { + return false; + } + } else { + // If the database does not contain the hash, create a new set for it + self.hashes.insert(entry.hash, HashSet::from([entry.mmid.clone()])); + } + + self.entries.insert(entry.mmid.clone(), entry.clone()); + + true + } + + /// Remove an [`Mmid`] from the database entirely. + /// + /// If the database did not contain this value, then `false` is returned. + pub fn remove_mmid(&mut self, mmid: &Mmid) -> bool { + let hash = if let Some(h) = self.entries.get(mmid).and_then(|e| Some(e.hash)) { + self.entries.remove(mmid); + h + } else { + return false + }; + + if let Some(s) = self.hashes.get_mut(&hash) { + s.remove(mmid); + } + + true + } + + /// Remove a hash from the database entirely. + /// + /// Will not remove (returns [`Some(false)`] if hash contains references. + pub fn remove_hash(&mut self, hash: &Hash) -> Option { + if let Some(s) = self.hashes.get(hash) { + if s.is_empty() { + self.hashes.remove(hash); + return Some(true) + } else { + return Some(false) + } + } else { + return None + } + } + + /// Checks if a hash contained in the database contains no more [`Mmid`]s. + pub fn is_hash_empty(&self, hash: &Hash) -> Option { + if let Some(s) = self.hashes.get(hash) { + Some(s.is_empty()) + } else { + None + } + } + + /// Get an entry by its [`Mmid`]. Returns [`None`] if the value does not exist. + pub fn get(&self, mmid: &Mmid) -> Option<&MochiFile> { + self.entries.get(mmid) + } + + pub fn entries(&self) -> Values<'_, Mmid, MochiFile> { + self.entries.values() + } } +/// An entry in the database storing metadata about a file #[derive(Debug, Clone, Decode, Encode, Deserialize, Serialize)] #[serde(crate = "rocket::serde")] pub struct MochiFile { + /// A unique identifier describing this file + mmid: Mmid, + /// The original name of the file name: String, - /// The location on disk (for deletion and management) - filename: PathBuf, - - /// The hashed contents of the file as a Blake3 hash + /// The Blake3 hash of the file #[bincode(with_serde)] hash: Hash, @@ -81,17 +162,17 @@ pub struct MochiFile { impl MochiFile { /// Create a new file that expires in `expiry`. pub fn new_with_expiry( - name: &str, + mmid: Mmid, + name: String, hash: Hash, - filename: PathBuf, expire_duration: TimeDelta, ) -> Self { let current = Utc::now(); let expiry = current + expire_duration; Self { - name: name.to_string(), - filename, + mmid, + name, hash, upload_datetime: current, expiry_datetime: expiry, @@ -102,22 +183,11 @@ impl MochiFile { &self.name } - pub fn path(&self) -> &PathBuf { - &self.filename - } - - pub fn get_key(&self) -> MochiKey { - MochiKey { - name: self.name.clone(), - hash: self.hash, - } - } - - pub fn get_expiry(&self) -> DateTime { + pub fn expiry(&self) -> DateTime { self.expiry_datetime } - pub fn expired(&self) -> bool { + pub fn is_expired(&self) -> bool { let datetime = Utc::now(); datetime > self.expiry_datetime } @@ -125,64 +195,58 @@ impl MochiFile { pub fn hash(&self) -> &Hash { &self.hash } -} -#[derive(Debug, Clone, PartialEq, Eq, Hash, Decode, Encode, Deserialize, Serialize)] -#[serde(crate = "rocket::serde")] -pub struct MochiKey { - name: String, - #[bincode(with_serde)] - hash: Hash, + pub fn mmid(&self) -> &Mmid { + &self.mmid + } } /// Clean the database. Removes files which are past their expiry /// [`chrono::DateTime`]. Also removes files which no longer exist on the disk. -fn clean_database(db: &Arc>) { +fn clean_database( + db: &Arc>, + file_path: &PathBuf, +) { let mut database = db.write().unwrap(); + + // Add expired entries to the removal list let files_to_remove: Vec<_> = database - .files - .iter() + .entries() .filter_map(|e| { - if e.1.expired() { - // Check if the entry has expired - Some((e.0.clone(), e.1.clone())) - } else if !e.1.path().try_exists().is_ok_and(|r| r) { - // Check if the entry exists - Some((e.0.clone(), e.1.clone())) + if e.is_expired() { + Some((e.mmid().clone(), e.hash().clone())) } else { None } }) .collect(); - let mut expired = 0; - let mut missing = 0; - for file in &files_to_remove { - let path = file.1.path(); - // If the path does not exist, there's no reason to try to remove it. - if path.try_exists().is_ok_and(|r| r) { - match fs::remove_file(path) { - Ok(_) => (), - Err(e) => warn!("Failed to delete path at {:?}: {e}", path), - } - expired += 1; - } else { - missing += 1 - } + let mut removed_files = 0; + let mut removed_entries = 0; + for e in &files_to_remove { - database.files.remove(&file.0); + if database.remove_mmid(&e.0) { + removed_entries += 1; + } + if database.is_hash_empty(&e.1).is_some_and(|b| b) { + database.remove_hash(&e.1); + if let Err(e) = fs::remove_file(file_path.join(e.1.to_string())) { + warn!("Failed to remove expired hash: {}", e); + } else { + removed_files += 1; + } + } } - info!( - "{} expired and {} missing items cleared from database", - expired, missing - ); + info!("Cleaned database. Removed {removed_entries} expired entries. Removed {removed_files} no longer referenced files."); + database.save(); } /// A loop to clean the database periodically. pub async fn clean_loop( db: Arc>, + file_path: PathBuf, mut shutdown_signal: Receiver<()>, interval: TimeDelta, ) { @@ -190,8 +254,37 @@ pub async fn clean_loop( loop { select! { - _ = interval.tick() => clean_database(&db), + _ = interval.tick() => clean_database(&db, &file_path), _ = shutdown_signal.recv() => break, }; } } + +/// A unique identifier for an entry in the database, 8 characters long, +/// consists of ASCII alphanumeric characters (`a-z`, `A-Z`, and `0-9`). +#[derive(Debug, PartialEq, Eq, Clone, Decode, Encode, Hash)] +#[derive(Deserialize, Serialize)] +pub struct Mmid(String); + +impl Mmid { + /// Create a new random MMID + pub fn new() -> Self { + let string = Alphanumeric.sample_string(&mut rand::thread_rng(), 8); + + Self(string) + } + + pub fn as_str(&self) -> &str { + &self.0 + } + + pub fn to_string(&self) -> String { + self.0.to_owned() + } +} + +impl From<&str> for Mmid { + fn from(value: &str) -> Self { + Self(value.to_owned()) + } +} diff --git a/src/endpoints.rs b/src/endpoints.rs index 54293e0..572bb44 100644 --- a/src/endpoints.rs +++ b/src/endpoints.rs @@ -1,15 +1,11 @@ use std::sync::{Arc, RwLock}; use rocket::{ - get, - http::RawStr, - response::{status::NotFound, Redirect}, - serde::{self, json::Json}, - State, + fs::NamedFile, get, serde::{self, json::Json}, State }; use serde::Serialize; -use crate::{database::Database, get_id, settings::Settings}; +use crate::{database::Database, settings::Settings}; /// An endpoint to obtain information about the server's capabilities #[get("/info")] @@ -41,14 +37,17 @@ pub struct ServerInfo { /// Look up the hash of a file to find it. This only returns the first /// hit for a hash, so different filenames may not be found. #[get("/f/")] -pub fn lookup(db: &State>>, id: &str) -> Result> { - for file in db.read().unwrap().files.values() { - if file.hash().to_hex()[0..10].to_string() == id { - let filename = get_id(file.name(), *file.hash()); - let filename = RawStr::new(&filename).percent_encode().to_string(); - return Ok(Redirect::to(format!("/files/{}", filename))); - } - } +pub async fn lookup( + db: &State>>, + settings: &State, + id: &str +) -> Option { + dbg!(db.read().unwrap()); + let entry = if let Some(e) = db.read().unwrap().get(&id.into()).cloned() { + e + } else { + return None + }; - Err(NotFound(())) + NamedFile::open(settings.file_dir.join(entry.hash().to_string())).await.ok() } diff --git a/src/file_server.rs b/src/file_server.rs new file mode 100644 index 0000000..b7a28f3 --- /dev/null +++ b/src/file_server.rs @@ -0,0 +1,14 @@ +use std::{path::PathBuf, sync::{Arc, RwLock}}; +use rocket::{fs::NamedFile, get, State}; + +use crate::database::Database; + +#[get("/")] +async fn files( + db: &State>>, + ident: PathBuf +) -> Option { + //let file = NamedFile::open(Path::new("static/").join(file)).await.ok(); + + todo!() +} diff --git a/src/main.rs b/src/main.rs index a60aeba..78b7322 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,7 @@ mod endpoints; mod settings; mod strings; mod utils; +mod file_server; use std::{ fs, @@ -10,7 +11,7 @@ use std::{ }; use chrono::{DateTime, TimeDelta, Utc}; -use database::{clean_loop, Database, MochiFile}; +use database::{clean_loop, Database, Mmid, MochiFile}; use endpoints::{lookup, server_info}; use log::info; use maud::{html, Markup, PreEscaped, DOCTYPE}; @@ -28,7 +29,7 @@ use rocket::{ }; use settings::Settings; use strings::{parse_time_string, to_pretty_time}; -use utils::{get_id, hash_file}; +use utils::hash_file; use uuid::Uuid; fn head(page_title: &str) -> Markup { @@ -86,9 +87,9 @@ fn home(settings: &State) -> Markup { } form #uploadForm { // It's stupid how these can't be styled so they're just hidden here... - input id="fileInput" type="file" name="fileUpload" multiple + input #fileInput type="file" name="fileUpload" multiple onchange="formSubmit(this.parentNode)" data-max-filesize=(settings.max_filesize) style="display:none;"; - input id="fileDuration" type="text" name="duration" minlength="2" + input #fileDuration type="text" name="duration" minlength="2" maxlength="7" value=(settings.duration.default.num_seconds().to_string() + "s") style="display:none;"; } hr; @@ -130,23 +131,21 @@ async fn handle_upload( let mut out_path = settings.file_dir.clone(); let expire_time = if let Ok(t) = parse_time_string(&file_data.expire_time) { - if t > settings.duration.maximum { - return Ok(Json(ClientResponse::failure( - "Duration larger than maximum", - ))); - } - if settings.duration.restrict_to_allowed && !settings.duration.allowed.contains(&t) { return Ok(Json(ClientResponse::failure("Duration not allowed"))); } + if t > settings.duration.maximum { + return Ok(Json(ClientResponse::failure("Duration larger than max"))); + } + t } else { return Ok(Json(ClientResponse::failure("Duration invalid"))); }; // TODO: Properly sanitize this... - let raw_name = &*file_data + let raw_name = file_data .file .raw_name() .unwrap() @@ -158,47 +157,28 @@ async fn handle_upload( temp_dir.push(Uuid::new_v4().to_string()); let temp_filename = temp_dir; file_data.file.persist_to(&temp_filename).await?; - let hash = hash_file(&temp_filename).await?; + let file_hash = hash_file(&temp_filename).await?; - let filename = get_id(raw_name, hash); - out_path.push(filename.clone()); + let file_mmid = Mmid::new(); + out_path.push(file_hash.to_string()); let constructed_file = - MochiFile::new_with_expiry(raw_name, hash, out_path.clone(), expire_time); - - if !settings.overwrite - && db - .read() - .unwrap() - .files - .contains_key(&constructed_file.get_key()) - { - info!("Key already in DB, NOT ADDING"); - return Ok(Json(ClientResponse { - status: true, - response: "File already exists", - name: constructed_file.name().clone(), - url: filename, - hash: hash.to_hex()[0..10].to_string(), - expires: Some(constructed_file.get_expiry()), - })); - } + MochiFile::new_with_expiry(file_mmid.clone(), raw_name, file_hash, expire_time); // Move it to the new proper place std::fs::rename(temp_filename, out_path)?; db.write() .unwrap() - .files - .insert(constructed_file.get_key(), constructed_file.clone()); + .insert(constructed_file.clone()); db.write().unwrap().save(); Ok(Json(ClientResponse { status: true, name: constructed_file.name().clone(), - url: filename, - hash: hash.to_hex()[0..10].to_string(), - expires: Some(constructed_file.get_expiry()), + mmid: Some(file_mmid), + hash: file_hash.to_hex()[0..10].to_string(), + expires: Some(constructed_file.expiry()), ..Default::default() })) } @@ -214,8 +194,8 @@ struct ClientResponse { #[serde(skip_serializing_if = "str::is_empty")] pub name: String, - #[serde(skip_serializing_if = "str::is_empty")] - pub url: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub mmid: Option, #[serde(skip_serializing_if = "str::is_empty")] pub hash: String, #[serde(skip_serializing_if = "Option::is_none")] @@ -263,7 +243,8 @@ async fn main() { let (shutdown, rx) = tokio::sync::mpsc::channel(1); tokio::spawn({ let cleaner_db = database.clone(); - async move { clean_loop(cleaner_db, rx, TimeDelta::minutes(2)).await } + let file_path = config.file_dir.clone(); + async move { clean_loop(cleaner_db, file_path, rx, TimeDelta::seconds(10)).await } }); let rocket = rocket::build() diff --git a/src/utils.rs b/src/utils.rs index 4d2cf65..dfb202b 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,11 +1,6 @@ use blake3::Hash; use std::path::Path; -/// Get a filename based on the file's hashed name -pub fn get_id(name: &str, hash: Hash) -> String { - hash.to_hex()[0..10].to_string() + "_" + name -} - /// Get the Blake3 hash of a file, without reading it all into memory, and also get the size pub async fn hash_file>(input: &P) -> Result { let mut hasher = blake3::Hasher::new(); diff --git a/web/request.js b/web/request.js index 59a898b..c931545 100644 --- a/web/request.js +++ b/web/request.js @@ -90,11 +90,11 @@ function makeErrored(progressBar, progressText, linkRow, errorMessage) { linkRow.style.background = "#ffb2ae"; } -function makeFinished(progressBar, progressText, linkRow, linkAddress, hash) { +function makeFinished(progressBar, progressText, linkRow, MMID, _hash) { progressText.textContent = ""; const link = progressText.appendChild(document.createElement("a")); - link.textContent = hash; - link.href = "/files/" + linkAddress; + link.textContent = MMID; + link.href = "/f/" + MMID; link.target = "_blank"; let button = linkRow.appendChild(document.createElement("button")); @@ -105,7 +105,7 @@ function makeFinished(progressBar, progressText, linkRow, linkAddress, hash) { clearTimeout(buttonTimeout) } navigator.clipboard.writeText( - encodeURI(window.location.protocol + "//" + window.location.host + "/files/" + linkAddress) + encodeURI(window.location.protocol + "//" + window.location.host + "/f/" + MMID) ) button.textContent = "✅"; buttonTimeout = setTimeout(function() { @@ -143,7 +143,7 @@ function uploadComplete(response, progressBar, progressText, linkRow) { if (response.status) { console.log("Successfully uploaded file", response); - makeFinished(progressBar, progressText, linkRow, response.url, response.hash); + makeFinished(progressBar, progressText, linkRow, response.mmid, response.hash); } else { console.error("Error uploading", response); makeErrored(progressBar, progressText, linkRow, response.response); @@ -179,6 +179,8 @@ async function initEverything() { if (this.classList.contains("selected")) { return } + document.getElementById("uploadForm").elements["duration"].value + = this.dataset.durationSeconds + "s"; let selected = this.parentNode.getElementsByClassName("selected"); selected[0].classList.remove("selected"); this.classList.add("selected"); From ebada71e7a70e0ef836aa4f77e6e1254855d4787 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Sun, 27 Oct 2024 05:40:43 -0500 Subject: [PATCH 2/7] Removed unecessary file --- src/file_server.rs | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 src/file_server.rs diff --git a/src/file_server.rs b/src/file_server.rs deleted file mode 100644 index b7a28f3..0000000 --- a/src/file_server.rs +++ /dev/null @@ -1,14 +0,0 @@ -use std::{path::PathBuf, sync::{Arc, RwLock}}; -use rocket::{fs::NamedFile, get, State}; - -use crate::database::Database; - -#[get("/")] -async fn files( - db: &State>>, - ident: PathBuf -) -> Option { - //let file = NamedFile::open(Path::new("static/").join(file)).await.ok(); - - todo!() -} From aaaea89502f67a29e0beb08ef72bc2878c2a9ede Mon Sep 17 00:00:00 2001 From: G2-Games Date: Sun, 27 Oct 2024 06:31:00 -0500 Subject: [PATCH 3/7] Switched to better database lookup system --- Cargo.lock | 19 +++++++++++++------ Cargo.toml | 1 + src/database.rs | 26 +++++++++++++++++++++++--- src/endpoints.rs | 28 ++++++++++++++++++---------- src/main.rs | 35 +++++++++++++++++++++-------------- web/request.js | 2 -- 6 files changed, 76 insertions(+), 35 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bcf02d6..ddc10fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,6 +236,7 @@ dependencies = [ "bincode", "blake3", "chrono", + "file-format", "log", "maud", "rand", @@ -380,9 +381,9 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -423,6 +424,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "file-format" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ffe3a660c3a1b10e96f304a9413d673b2118d62e4520f7ddf4a4faccfe8b9b9" + [[package]] name = "fnv" version = "1.0.7" @@ -983,9 +990,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1133,9 +1140,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", diff --git a/Cargo.toml b/Cargo.toml index 4002a73..dfdcb2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ edition = "2021" bincode = { version = "2.0.0-rc.3", features = ["serde"] } blake3 = { version = "1.5.4", features = ["mmap", "rayon", "serde"] } chrono = { version = "0.4.38", features = ["serde"] } +file-format = { version = "0.25.0", features = ["reader"] } log = "0.4" maud = { version = "0.26", features = ["rocket"] } rand = "0.8.5" diff --git a/src/database.rs b/src/database.rs index 1408e8a..84f13dd 100644 --- a/src/database.rs +++ b/src/database.rs @@ -5,6 +5,7 @@ use std::{ use bincode::{config::Configuration, decode_from_std_read, encode_into_std_write, Decode, Encode}; use blake3::Hash; use chrono::{DateTime, TimeDelta, Utc}; +use file_format::FileFormat; use log::{info, warn}; use rand::distributions::{Alphanumeric, DistString}; use rocket::{ @@ -146,6 +147,9 @@ pub struct MochiFile { /// The original name of the file name: String, + /// The format the file is, for serving + extension: String, + /// The Blake3 hash of the file #[bincode(with_serde)] hash: Hash, @@ -164,6 +168,7 @@ impl MochiFile { pub fn new_with_expiry( mmid: Mmid, name: String, + extension: &str, hash: Hash, expire_duration: TimeDelta, ) -> Self { @@ -173,6 +178,7 @@ impl MochiFile { Self { mmid, name, + extension: extension.to_string(), hash, upload_datetime: current, expiry_datetime: expiry, @@ -199,6 +205,10 @@ impl MochiFile { pub fn mmid(&self) -> &Mmid { &self.mmid } + + pub fn extension(&self) -> &String { + &self.extension + } } /// Clean the database. Removes files which are past their expiry @@ -283,8 +293,18 @@ impl Mmid { } } -impl From<&str> for Mmid { - fn from(value: &str) -> Self { - Self(value.to_owned()) +impl TryFrom<&str> for Mmid { + type Error = (); + + fn try_from(value: &str) -> Result { + if value.len() != 8 { + return Err(()) + } + + if value.chars().any(|c| !c.is_ascii_alphanumeric()) { + return Err(()) + } + + Ok(Self(value.to_owned())) } } diff --git a/src/endpoints.rs b/src/endpoints.rs index 572bb44..0ae142f 100644 --- a/src/endpoints.rs +++ b/src/endpoints.rs @@ -1,11 +1,11 @@ use std::sync::{Arc, RwLock}; use rocket::{ - fs::NamedFile, get, serde::{self, json::Json}, State + fs::NamedFile, get, http::ContentType, serde::{self, json::Json}, tokio::fs::File, State }; use serde::Serialize; -use crate::{database::Database, settings::Settings}; +use crate::{database::{Database, Mmid}, settings::Settings}; /// An endpoint to obtain information about the server's capabilities #[get("/info")] @@ -34,20 +34,28 @@ pub struct ServerInfo { allowed_durations: Vec, } -/// Look up the hash of a file to find it. This only returns the first -/// hit for a hash, so different filenames may not be found. -#[get("/f/")] +/// Look up the [`Mmid`] of a file to find it. +#[get("/f/")] pub async fn lookup( db: &State>>, settings: &State, - id: &str -) -> Option { - dbg!(db.read().unwrap()); - let entry = if let Some(e) = db.read().unwrap().get(&id.into()).cloned() { + mmid: &str +) -> Option<(ContentType, NamedFile)> { + let mmid: Mmid = match mmid.try_into() { + Ok(v) => v, + Err(_) => return None, + }; + + let entry = if let Some(e) = db.read().unwrap().get(&mmid).cloned() { e } else { return None }; - NamedFile::open(settings.file_dir.join(entry.hash().to_string())).await.ok() + let file = NamedFile::open(settings.file_dir.join(entry.hash().to_string())).await.ok()?; + + Some(( + ContentType::from_extension(entry.extension()).unwrap_or(ContentType::Binary), + file + )) } diff --git a/src/main.rs b/src/main.rs index 78b7322..8165d2e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,6 @@ mod endpoints; mod settings; mod strings; mod utils; -mod file_server; use std::{ fs, @@ -127,9 +126,7 @@ async fn handle_upload( db: &State>>, settings: &State, ) -> Result, std::io::Error> { - let mut temp_dir = settings.temp_dir.clone(); - let mut out_path = settings.file_dir.clone(); - + // Ensure the expiry time is valid, if not return an error let expire_time = if let Ok(t) = parse_time_string(&file_data.expire_time) { if settings.duration.restrict_to_allowed && !settings.duration.allowed.contains(&t) { return Ok(Json(ClientResponse::failure("Duration not allowed"))); @@ -144,7 +141,6 @@ async fn handle_upload( return Ok(Json(ClientResponse::failure("Duration invalid"))); }; - // TODO: Properly sanitize this... let raw_name = file_data .file .raw_name() @@ -153,20 +149,31 @@ async fn handle_upload( .as_str() .to_string(); - // Get temp path and hash it - temp_dir.push(Uuid::new_v4().to_string()); - let temp_filename = temp_dir; + // Get temp path for the file + let temp_filename = settings.temp_dir.join(Uuid::new_v4().to_string()); file_data.file.persist_to(&temp_filename).await?; + + // Get hash and random identifier + let file_mmid = Mmid::new(); let file_hash = hash_file(&temp_filename).await?; - let file_mmid = Mmid::new(); - out_path.push(file_hash.to_string()); + // Process filetype + let file_type = file_format::FileFormat::from_file(&temp_filename)?; let constructed_file = - MochiFile::new_with_expiry(file_mmid.clone(), raw_name, file_hash, expire_time); + MochiFile::new_with_expiry( + file_mmid.clone(), + raw_name, + file_type.extension(), + file_hash, + expire_time + ); // Move it to the new proper place - std::fs::rename(temp_filename, out_path)?; + std::fs::rename( + temp_filename, + settings.file_dir.join(file_hash.to_string()) + )?; db.write() .unwrap() @@ -177,7 +184,7 @@ async fn handle_upload( status: true, name: constructed_file.name().clone(), mmid: Some(file_mmid), - hash: file_hash.to_hex()[0..10].to_string(), + hash: file_hash.to_string(), expires: Some(constructed_file.expiry()), ..Default::default() })) @@ -244,7 +251,7 @@ async fn main() { tokio::spawn({ let cleaner_db = database.clone(); let file_path = config.file_dir.clone(); - async move { clean_loop(cleaner_db, file_path, rx, TimeDelta::seconds(10)).await } + async move { clean_loop(cleaner_db, file_path, rx, TimeDelta::minutes(2)).await } }); let rocket = rocket::build() diff --git a/web/request.js b/web/request.js index c931545..8618f13 100644 --- a/web/request.js +++ b/web/request.js @@ -42,13 +42,11 @@ function getDroppedFiles(evt) { }); } - console.log(files); return files; } async function fileSend(files, duration, maxSize) { for (const file of files) { - console.log(file); const [linkRow, progressBar, progressText] = addNewToList(file.name); if (file.size > maxSize) { makeErrored(progressBar, progressText, linkRow, TOO_LARGE_TEXT); From 769bd725420771c9535a28a482ffc6334da72cf4 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Sun, 27 Oct 2024 06:53:04 -0500 Subject: [PATCH 4/7] Improved URL lookup handling --- src/endpoints.rs | 33 +++++++++++++++++++++++++++++++++ src/main.rs | 5 +++-- web/request.js | 12 +++++++----- 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/src/endpoints.rs b/src/endpoints.rs index 0ae142f..df08227 100644 --- a/src/endpoints.rs +++ b/src/endpoints.rs @@ -59,3 +59,36 @@ pub async fn lookup( file )) } + + +#[get("/f//")] +pub async fn lookup_filename( + db: &State>>, + settings: &State, + mmid: &str, + filename: &str, +) -> Option<(ContentType, NamedFile)> { + let mmid: Mmid = match mmid.try_into() { + Ok(v) => v, + Err(_) => return None, + }; + + let entry = if let Some(e) = db.read().unwrap().get(&mmid).cloned() { + e + } else { + return None + }; + + dbg!(entry.name()); + dbg!(filename); + if entry.name() != filename { + return None + } + + let file = NamedFile::open(settings.file_dir.join(entry.hash().to_string())).await.ok()?; + + Some(( + ContentType::from_extension(entry.extension()).unwrap_or(ContentType::Binary), + file + )) +} diff --git a/src/main.rs b/src/main.rs index 8165d2e..be756d0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ use std::{ use chrono::{DateTime, TimeDelta, Utc}; use database::{clean_loop, Database, Mmid, MochiFile}; -use endpoints::{lookup, server_info}; +use endpoints::{lookup, lookup_filename, server_info}; use log::info; use maud::{html, Markup, PreEscaped, DOCTYPE}; use rocket::{ @@ -264,7 +264,8 @@ async fn main() { stylesheet, server_info, favicon, - lookup + lookup, + lookup_filename, ], ) .mount( diff --git a/web/request.js b/web/request.js index 8618f13..5619fd5 100644 --- a/web/request.js +++ b/web/request.js @@ -88,22 +88,24 @@ function makeErrored(progressBar, progressText, linkRow, errorMessage) { linkRow.style.background = "#ffb2ae"; } -function makeFinished(progressBar, progressText, linkRow, MMID, _hash) { +function makeFinished(progressBar, progressText, linkRow, response) { progressText.textContent = ""; + const name = encodeURIComponent(response.name); const link = progressText.appendChild(document.createElement("a")); - link.textContent = MMID; - link.href = "/f/" + MMID; + link.textContent = response.mmid; + link.href = "/f/" + response.mmid; link.target = "_blank"; let button = linkRow.appendChild(document.createElement("button")); button.textContent = "📝"; let buttonTimeout = null; button.addEventListener('click', function(_e) { + const mmid = response.mmid; if (buttonTimeout) { clearTimeout(buttonTimeout) } navigator.clipboard.writeText( - encodeURI(window.location.protocol + "//" + window.location.host + "/f/" + MMID) + window.location.protocol + "//" + window.location.host + "/f/" + mmid ) button.textContent = "✅"; buttonTimeout = setTimeout(function() { @@ -141,7 +143,7 @@ function uploadComplete(response, progressBar, progressText, linkRow) { if (response.status) { console.log("Successfully uploaded file", response); - makeFinished(progressBar, progressText, linkRow, response.mmid, response.hash); + makeFinished(progressBar, progressText, linkRow, response); } else { console.error("Error uploading", response); makeErrored(progressBar, progressText, linkRow, response.response); From ac41059f0ba4ed38e40c489fbf26d16505b5d342 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Sun, 27 Oct 2024 17:33:43 -0500 Subject: [PATCH 5/7] Improve shortlink behavior --- src/database.rs | 37 ++++++++++++++++++++++++++++- src/endpoints.rs | 60 ++++++++++++++++-------------------------------- src/main.rs | 14 ++++++----- 3 files changed, 64 insertions(+), 47 deletions(-) diff --git a/src/database.rs b/src/database.rs index 84f13dd..cda2927 100644 --- a/src/database.rs +++ b/src/database.rs @@ -1,5 +1,5 @@ use std::{ - collections::{hash_map::Values, HashMap, HashSet}, fs::{self, File}, path::{Path, PathBuf}, sync::{Arc, RwLock} + collections::{hash_map::Values, HashMap, HashSet}, ffi::OsStr, fs::{self, File}, path::{Path, PathBuf}, sync::{Arc, RwLock} }; use bincode::{config::Configuration, decode_from_std_read, encode_into_std_write, Decode, Encode}; @@ -308,3 +308,38 @@ impl TryFrom<&str> for Mmid { Ok(Self(value.to_owned())) } } + +impl TryFrom<&Path> for Mmid { + type Error = (); + + fn try_from(value: &Path) -> Result { + value.as_os_str().try_into() + } +} + +impl TryFrom<&OsStr> for Mmid { + type Error = (); + + fn try_from(value: &OsStr) -> Result { + let string = match value.to_str() { + Some(p) => p, + None => return Err(()), + }; + + if string.len() != 8 { + return Err(()) + } + + if string.chars().any(|c| !c.is_ascii_alphanumeric()) { + return Err(()) + } + + Ok(Self(string.to_owned())) + } +} + +impl std::fmt::Display for Mmid { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.0) + } +} diff --git a/src/endpoints.rs b/src/endpoints.rs index df08227..9641128 100644 --- a/src/endpoints.rs +++ b/src/endpoints.rs @@ -1,7 +1,7 @@ -use std::sync::{Arc, RwLock}; +use std::{path::PathBuf, sync::{Arc, RwLock}}; use rocket::{ - fs::NamedFile, get, http::ContentType, serde::{self, json::Json}, tokio::fs::File, State + get, http::ContentType, response::Redirect, serde::{self, json::Json}, tokio::fs::File, uri, State }; use serde::Serialize; @@ -36,56 +36,36 @@ pub struct ServerInfo { /// Look up the [`Mmid`] of a file to find it. #[get("/f/")] -pub async fn lookup( +pub async fn lookup_mmid( db: &State>>, - settings: &State, - mmid: &str -) -> Option<(ContentType, NamedFile)> { - let mmid: Mmid = match mmid.try_into() { - Ok(v) => v, - Err(_) => return None, - }; + mmid: &str, +) -> Option { + let mmid: Mmid = mmid.try_into().ok()?; + let entry = db.read().unwrap().get(&mmid).cloned()?; - let entry = if let Some(e) = db.read().unwrap().get(&mmid).cloned() { - e - } else { - return None - }; - - let file = NamedFile::open(settings.file_dir.join(entry.hash().to_string())).await.ok()?; - - Some(( - ContentType::from_extension(entry.extension()).unwrap_or(ContentType::Binary), - file - )) + Some( + Redirect::to(uri!(lookup_mmid_name(mmid.to_string(), entry.name()))) + ) } - -#[get("/f//")] -pub async fn lookup_filename( +/// Look up the [`Mmid`] of a file to find it. +#[get("/f//")] +pub async fn lookup_mmid_name( db: &State>>, settings: &State, mmid: &str, - filename: &str, -) -> Option<(ContentType, NamedFile)> { - let mmid: Mmid = match mmid.try_into() { - Ok(v) => v, - Err(_) => return None, - }; + name: &str, +) -> Option<(ContentType, File)> { + let mmid: Mmid = mmid.try_into().ok()?; - let entry = if let Some(e) = db.read().unwrap().get(&mmid).cloned() { - e - } else { - return None - }; + let entry = db.read().unwrap().get(&mmid).cloned()?; - dbg!(entry.name()); - dbg!(filename); - if entry.name() != filename { + // If the name does not match, then this is invalid + if name != entry.name() { return None } - let file = NamedFile::open(settings.file_dir.join(entry.hash().to_string())).await.ok()?; + let file = File::open(settings.file_dir.join(entry.hash().to_string())).await.ok()?; Some(( ContentType::from_extension(entry.extension()).unwrap_or(ContentType::Binary), diff --git a/src/main.rs b/src/main.rs index be756d0..f4f7538 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ use std::{ use chrono::{DateTime, TimeDelta, Utc}; use database::{clean_loop, Database, Mmid, MochiFile}; -use endpoints::{lookup, lookup_filename, server_info}; +use endpoints::{lookup_mmid, lookup_mmid_name, server_info}; use log::info; use maud::{html, Markup, PreEscaped, DOCTYPE}; use rocket::{ @@ -102,7 +102,7 @@ fn home(settings: &State) -> Markup { footer { p {a href="https://github.com/G2-Games/confetti-box" {"Source"}} p {a href="https://g2games.dev/" {"My Website"}} - p {a href="#" {"Links"}} + p {a href="api" {"API Info"}} p {a href="#" {"Go"}} p {a href="#" {"Here"}} } @@ -264,8 +264,8 @@ async fn main() { stylesheet, server_info, favicon, - lookup, - lookup_filename, + lookup_mmid, + lookup_mmid_name, ], ) .mount( @@ -284,12 +284,14 @@ async fn main() { // Ensure the server gracefully shuts down rocket.expect("Server failed to shutdown gracefully"); - info!("Stopping database cleaning thread"); + info!("Stopping database cleaning thread..."); shutdown .send(()) .await - .expect("Failed to stop cleaner thread"); + .expect("Failed to stop cleaner thread."); + info!("Stopping database cleaning thread completed successfully."); info!("Saving database on shutdown..."); local_db.write().unwrap().save(); + info!("Saving database completed successfully."); } From d0761d9e693424f21ca56bfd1e693796e8d3f259 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Sun, 27 Oct 2024 17:38:45 -0500 Subject: [PATCH 6/7] Cleaned up clippy suggestions, ran `cargo fmt` --- src/database.rs | 55 ++++++++++++++++++------------------------------ src/endpoints.rs | 34 ++++++++++++++++++------------ src/main.rs | 26 +++++++++-------------- 3 files changed, 51 insertions(+), 64 deletions(-) diff --git a/src/database.rs b/src/database.rs index cda2927..968903f 100644 --- a/src/database.rs +++ b/src/database.rs @@ -1,11 +1,14 @@ use std::{ - collections::{hash_map::Values, HashMap, HashSet}, ffi::OsStr, fs::{self, File}, path::{Path, PathBuf}, sync::{Arc, RwLock} + collections::{hash_map::Values, HashMap, HashSet}, + ffi::OsStr, + fs::{self, File}, + path::{Path, PathBuf}, + sync::{Arc, RwLock}, }; use bincode::{config::Configuration, decode_from_std_read, encode_into_std_write, Decode, Encode}; use blake3::Hash; use chrono::{DateTime, TimeDelta, Utc}; -use file_format::FileFormat; use log::{info, warn}; use rand::distributions::{Alphanumeric, DistString}; use rocket::{ @@ -13,8 +16,6 @@ use rocket::{ tokio::{select, sync::mpsc::Receiver, time}, }; -use crate::settings::Settings; - const BINCODE_CFG: Configuration = bincode::config::standard(); #[derive(Debug, Clone, Decode, Encode)] @@ -76,7 +77,8 @@ impl Database { } } else { // If the database does not contain the hash, create a new set for it - self.hashes.insert(entry.hash, HashSet::from([entry.mmid.clone()])); + self.hashes + .insert(entry.hash, HashSet::from([entry.mmid.clone()])); } self.entries.insert(entry.mmid.clone(), entry.clone()); @@ -88,11 +90,11 @@ impl Database { /// /// If the database did not contain this value, then `false` is returned. pub fn remove_mmid(&mut self, mmid: &Mmid) -> bool { - let hash = if let Some(h) = self.entries.get(mmid).and_then(|e| Some(e.hash)) { + let hash = if let Some(h) = self.entries.get(mmid).map(|e| e.hash) { self.entries.remove(mmid); h } else { - return false + return false; }; if let Some(s) = self.hashes.get_mut(&hash) { @@ -109,22 +111,18 @@ impl Database { if let Some(s) = self.hashes.get(hash) { if s.is_empty() { self.hashes.remove(hash); - return Some(true) + Some(true) } else { - return Some(false) + Some(false) } } else { - return None + None } } /// Checks if a hash contained in the database contains no more [`Mmid`]s. pub fn is_hash_empty(&self, hash: &Hash) -> Option { - if let Some(s) = self.hashes.get(hash) { - Some(s.is_empty()) - } else { - None - } + self.hashes.get(hash).map(|s| s.is_empty()) } /// Get an entry by its [`Mmid`]. Returns [`None`] if the value does not exist. @@ -213,10 +211,7 @@ impl MochiFile { /// Clean the database. Removes files which are past their expiry /// [`chrono::DateTime`]. Also removes files which no longer exist on the disk. -fn clean_database( - db: &Arc>, - file_path: &PathBuf, -) { +fn clean_database(db: &Arc>, file_path: &Path) { let mut database = db.write().unwrap(); // Add expired entries to the removal list @@ -224,7 +219,7 @@ fn clean_database( .entries() .filter_map(|e| { if e.is_expired() { - Some((e.mmid().clone(), e.hash().clone())) + Some((e.mmid().clone(), *e.hash())) } else { None } @@ -234,7 +229,6 @@ fn clean_database( let mut removed_files = 0; let mut removed_entries = 0; for e in &files_to_remove { - if database.remove_mmid(&e.0) { removed_entries += 1; } @@ -272,8 +266,7 @@ pub async fn clean_loop( /// A unique identifier for an entry in the database, 8 characters long, /// consists of ASCII alphanumeric characters (`a-z`, `A-Z`, and `0-9`). -#[derive(Debug, PartialEq, Eq, Clone, Decode, Encode, Hash)] -#[derive(Deserialize, Serialize)] +#[derive(Debug, PartialEq, Eq, Clone, Decode, Encode, Hash, Deserialize, Serialize)] pub struct Mmid(String); impl Mmid { @@ -283,14 +276,6 @@ impl Mmid { Self(string) } - - pub fn as_str(&self) -> &str { - &self.0 - } - - pub fn to_string(&self) -> String { - self.0.to_owned() - } } impl TryFrom<&str> for Mmid { @@ -298,11 +283,11 @@ impl TryFrom<&str> for Mmid { fn try_from(value: &str) -> Result { if value.len() != 8 { - return Err(()) + return Err(()); } if value.chars().any(|c| !c.is_ascii_alphanumeric()) { - return Err(()) + return Err(()); } Ok(Self(value.to_owned())) @@ -327,11 +312,11 @@ impl TryFrom<&OsStr> for Mmid { }; if string.len() != 8 { - return Err(()) + return Err(()); } if string.chars().any(|c| !c.is_ascii_alphanumeric()) { - return Err(()) + return Err(()); } Ok(Self(string.to_owned())) diff --git a/src/endpoints.rs b/src/endpoints.rs index 9641128..8133422 100644 --- a/src/endpoints.rs +++ b/src/endpoints.rs @@ -1,11 +1,19 @@ -use std::{path::PathBuf, sync::{Arc, RwLock}}; +use std::sync::{Arc, RwLock}; use rocket::{ - get, http::ContentType, response::Redirect, serde::{self, json::Json}, tokio::fs::File, uri, State + get, + http::ContentType, + response::Redirect, + serde::{self, json::Json}, + tokio::fs::File, + uri, State, }; use serde::Serialize; -use crate::{database::{Database, Mmid}, settings::Settings}; +use crate::{ + database::{Database, Mmid}, + settings::Settings, +}; /// An endpoint to obtain information about the server's capabilities #[get("/info")] @@ -36,16 +44,14 @@ pub struct ServerInfo { /// Look up the [`Mmid`] of a file to find it. #[get("/f/")] -pub async fn lookup_mmid( - db: &State>>, - mmid: &str, -) -> Option { +pub async fn lookup_mmid(db: &State>>, mmid: &str) -> Option { let mmid: Mmid = mmid.try_into().ok()?; let entry = db.read().unwrap().get(&mmid).cloned()?; - Some( - Redirect::to(uri!(lookup_mmid_name(mmid.to_string(), entry.name()))) - ) + Some(Redirect::to(uri!(lookup_mmid_name( + mmid.to_string(), + entry.name() + )))) } /// Look up the [`Mmid`] of a file to find it. @@ -62,13 +68,15 @@ pub async fn lookup_mmid_name( // If the name does not match, then this is invalid if name != entry.name() { - return None + return None; } - let file = File::open(settings.file_dir.join(entry.hash().to_string())).await.ok()?; + let file = File::open(settings.file_dir.join(entry.hash().to_string())) + .await + .ok()?; Some(( ContentType::from_extension(entry.extension()).unwrap_or(ContentType::Binary), - file + file, )) } diff --git a/src/main.rs b/src/main.rs index f4f7538..ef1af86 100644 --- a/src/main.rs +++ b/src/main.rs @@ -160,24 +160,18 @@ async fn handle_upload( // Process filetype let file_type = file_format::FileFormat::from_file(&temp_filename)?; - let constructed_file = - MochiFile::new_with_expiry( - file_mmid.clone(), - raw_name, - file_type.extension(), - file_hash, - expire_time - ); + let constructed_file = MochiFile::new_with_expiry( + file_mmid.clone(), + raw_name, + file_type.extension(), + file_hash, + expire_time, + ); // Move it to the new proper place - std::fs::rename( - temp_filename, - settings.file_dir.join(file_hash.to_string()) - )?; + std::fs::rename(temp_filename, settings.file_dir.join(file_hash.to_string()))?; - db.write() - .unwrap() - .insert(constructed_file.clone()); + db.write().unwrap().insert(constructed_file.clone()); db.write().unwrap().save(); Ok(Json(ClientResponse { @@ -251,7 +245,7 @@ async fn main() { tokio::spawn({ let cleaner_db = database.clone(); let file_path = config.file_dir.clone(); - async move { clean_loop(cleaner_db, file_path, rx, TimeDelta::minutes(2)).await } + async move { clean_loop(cleaner_db, file_path, rx, TimeDelta::minutes(2)).await } }); let rocket = rocket::build() From 043fbc7ded4ebd06fd33b5793ec81e91009ebad8 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Sun, 27 Oct 2024 17:40:59 -0500 Subject: [PATCH 7/7] Remove lockfile --- .gitignore | 2 + Cargo.lock | 2028 ---------------------------------------------------- 2 files changed, 2 insertions(+), 2028 deletions(-) delete mode 100644 Cargo.lock diff --git a/.gitignore b/.gitignore index 328d2b5..5704a20 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ temp_files *.mochi settings.toml + +Cargo.lock diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index ddc10fd..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,2028 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "async-trait" -version = "0.1.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "atomic" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" - -[[package]] -name = "atomic" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d818003e740b63afc82337e3160717f4f63078720a810b7b903e70a5d1d2994" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "binascii" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72" - -[[package]] -name = "bincode" -version = "2.0.0-rc.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" -dependencies = [ - "bincode_derive", - "serde", -] - -[[package]] -name = "bincode_derive" -version = "2.0.0-rc.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e30759b3b99a1b802a7a3aa21c85c3ded5c28e1c83170d82d70f08bbf7f3e4c" -dependencies = [ - "virtue", -] - -[[package]] -name = "bitflags" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" - -[[package]] -name = "blake3" -version = "1.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", - "memmap2", - "rayon-core", - "serde", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "bytemuck" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" - -[[package]] -name = "cc" -version = "1.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" -dependencies = [ - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-targets 0.52.6", -] - -[[package]] -name = "confetti_box" -version = "0.1.1" -dependencies = [ - "bincode", - "blake3", - "chrono", - "file-format", - "log", - "maud", - "rand", - "rocket", - "serde", - "serde_with", - "toml", - "uuid", -] - -[[package]] -name = "constant_time_eq" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" - -[[package]] -name = "cookie" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" -dependencies = [ - "percent-encoding", - "time", - "version_check", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "darling" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.20.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" -dependencies = [ - "darling_core", - "quote", - "syn", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", - "serde", -] - -[[package]] -name = "devise" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d90b0c4c777a2cad215e3c7be59ac7c15adf45cf76317009b7d096d46f651d" -dependencies = [ - "devise_codegen", - "devise_core", -] - -[[package]] -name = "devise_codegen" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b28680d8be17a570a2334922518be6adc3f58ecc880cbb404eaeb8624fd867" -dependencies = [ - "devise_core", - "quote", -] - -[[package]] -name = "devise_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b035a542cf7abf01f2e3c4d5a7acbaebfefe120ae4efc7bde3df98186e4b8af7" -dependencies = [ - "bitflags", - "proc-macro2", - "proc-macro2-diagnostics", - "quote", - "syn", -] - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "fastrand" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" - -[[package]] -name = "figment" -version = "0.10.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cb01cd46b0cf372153850f4c6c272d9cbea2da513e07538405148f95bd789f3" -dependencies = [ - "atomic 0.6.0", - "pear", - "serde", - "toml", - "uncased", - "version_check", -] - -[[package]] -name = "file-format" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ffe3a660c3a1b10e96f304a9413d673b2118d62e4520f7ddf4a4faccfe8b9b9" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generator" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" -dependencies = [ - "cc", - "libc", - "log", - "rustversion", - "windows", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.6.0", - "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 = "hashbrown" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http 0.2.12", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" -dependencies = [ - "equivalent", - "hashbrown 0.15.0", - "serde", -] - -[[package]] -name = "inlinable_string" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" - -[[package]] -name = "is-terminal" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" -dependencies = [ - "hermit-abi 0.4.0", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "js-sys" -version = "0.3.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "libc" -version = "0.2.161" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "loom" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" -dependencies = [ - "cfg-if", - "generator", - "scoped-tls", - "serde", - "serde_json", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "maud" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df518b75016b4289cdddffa1b01f2122f4a49802c93191f3133f6dc2472ebcaa" -dependencies = [ - "itoa", - "maud_macros", - "rocket", -] - -[[package]] -name = "maud_macros" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa453238ec218da0af6b11fc5978d3b5c3a45ed97b722391a2a11f3306274e18" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "memmap2" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" -dependencies = [ - "libc", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "wasi", - "windows-sys 0.52.0", -] - -[[package]] -name = "multer" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" -dependencies = [ - "bytes", - "encoding_rs", - "futures-util", - "http 1.1.0", - "httparse", - "memchr", - "mime", - "spin", - "tokio", - "tokio-util", - "version_check", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - -[[package]] -name = "object" -version = "0.36.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.52.6", -] - -[[package]] -name = "pear" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdeeaa00ce488657faba8ebf44ab9361f9365a97bd39ffb8a60663f57ff4b467" -dependencies = [ - "inlinable_string", - "pear_codegen", - "yansi", -] - -[[package]] -name = "pear_codegen" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bab5b985dc082b345f812b7df84e1bef27e7207b39e448439ba8bd69c93f147" -dependencies = [ - "proc-macro2", - "proc-macro2-diagnostics", - "quote", - "syn", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project-lite" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proc-macro2-diagnostics" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "version_check", - "yansi", -] - -[[package]] -name = "quote" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "redox_syscall" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" -dependencies = [ - "bitflags", -] - -[[package]] -name = "ref-cast" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.8", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rocket" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a516907296a31df7dc04310e7043b61d71954d703b603cc6867a026d7e72d73f" -dependencies = [ - "async-stream", - "async-trait", - "atomic 0.5.3", - "binascii", - "bytes", - "either", - "figment", - "futures", - "indexmap 2.6.0", - "log", - "memchr", - "multer", - "num_cpus", - "parking_lot", - "pin-project-lite", - "rand", - "ref-cast", - "rocket_codegen", - "rocket_http", - "serde", - "serde_json", - "state", - "tempfile", - "time", - "tokio", - "tokio-stream", - "tokio-util", - "ubyte", - "version_check", - "yansi", -] - -[[package]] -name = "rocket_codegen" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575d32d7ec1a9770108c879fc7c47815a80073f96ca07ff9525a94fcede1dd46" -dependencies = [ - "devise", - "glob", - "indexmap 2.6.0", - "proc-macro2", - "quote", - "rocket_http", - "syn", - "unicode-xid", - "version_check", -] - -[[package]] -name = "rocket_http" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e274915a20ee3065f611c044bd63c40757396b6dbc057d6046aec27f14f882b9" -dependencies = [ - "cookie", - "either", - "futures", - "http 0.2.12", - "hyper", - "indexmap 2.6.0", - "log", - "memchr", - "pear", - "percent-encoding", - "pin-project-lite", - "ref-cast", - "serde", - "smallvec", - "stable-pattern", - "state", - "time", - "tokio", - "uncased", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustix" -version = "0.38.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustversion" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.213" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.213" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.132" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_with" -version = "3.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" -dependencies = [ - "base64", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.6.0", - "serde", - "serde_derive", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" -dependencies = [ - "libc", -] - -[[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.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "stable-pattern" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4564168c00635f88eaed410d5efa8131afa8d8699a612c80c455a0ba05c21045" -dependencies = [ - "memchr", -] - -[[package]] -name = "state" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b8c4a4445d81357df8b1a650d0d0d6fbbbfe99d064aa5e02f3e4022061476d8" -dependencies = [ - "loom", -] - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "syn" -version = "2.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" -dependencies = [ - "cfg-if", - "fastrand", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tokio" -version = "1.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-stream" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" -dependencies = [ - "indexmap 2.6.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "ubyte" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f720def6ce1ee2fc44d40ac9ed6d3a59c361c80a75a7aa8e75bb9baed31cf2ea" -dependencies = [ - "serde", -] - -[[package]] -name = "uncased" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" -dependencies = [ - "serde", - "version_check", -] - -[[package]] -name = "unicode-ident" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "uuid" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" -dependencies = [ - "getrandom", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "virtue" -version = "0.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314" - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "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.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" -dependencies = [ - "cfg-if", - "once_cell", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" - -[[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-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 0.48.5", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.6", -] - -[[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.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" -dependencies = [ - "memchr", -] - -[[package]] -name = "yansi" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" -dependencies = [ - "is-terminal", -] - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -]