From 110b4b317308d2ae3e44ab1084a7225607f97eb8 Mon Sep 17 00:00:00 2001 From: aumetra Date: Sat, 11 Nov 2023 11:23:11 +0100 Subject: [PATCH] Make account names case-insensitive (#407) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * make names insensitive * add dev dependency * make users table case-insensitive * use unicode collation * always use username from database * adjust regex * add validator test * up cargo deps * up yarn deps * flake.lock: Update Flake lock file updates: • Updated input 'rust-overlay': 'github:oxalica/rust-overlay/603e4962d7d2225ba2caf66b0eabfcaa9a93c490' (2023-11-09) → 'github:oxalica/rust-overlay/41f7b0618052430d3a050e8f937030d00a2fcced' (2023-11-10) * add accounts table tests * add users table tests --- Cargo.lock | 33 +- crates/kitsune-blocking/Cargo.toml | 2 +- crates/kitsune-cache/Cargo.toml | 2 +- crates/kitsune-captcha/Cargo.toml | 2 +- crates/kitsune-config/Cargo.toml | 2 +- crates/kitsune-core/Cargo.toml | 4 +- crates/kitsune-core/src/service/account.rs | 4 + crates/kitsune-core/src/service/attachment.rs | 2 +- crates/kitsune-core/src/service/user.rs | 48 +- crates/kitsune-db/Cargo.toml | 5 + .../2023-05-19-192931_initial_tables/up.sql | 12 +- crates/kitsune-db/tests/unicode_collation.rs | 127 +++++ crates/kitsune-embed/Cargo.toml | 2 +- crates/kitsune-http-client/Cargo.toml | 2 +- crates/kitsune-http-signatures/Cargo.toml | 4 +- crates/kitsune-messaging/Cargo.toml | 2 +- crates/kitsune-oidc/Cargo.toml | 2 +- crates/kitsune-storage/Cargo.toml | 6 +- crates/kitsune-test/Cargo.toml | 2 +- flake.lock | 6 +- kitsune-cli/Cargo.toml | 2 +- kitsune-fe/package.json | 12 +- kitsune-fe/yarn.lock | 432 +++++++++--------- kitsune-job-runner/Cargo.toml | 2 +- kitsune/Cargo.toml | 6 +- .../src/http/handler/well_known/webfinger.rs | 335 ++++++++------ lib/athena/Cargo.toml | 2 +- lib/tower-x-clacks-overhead/Cargo.toml | 2 +- 28 files changed, 677 insertions(+), 385 deletions(-) create mode 100644 crates/kitsune-db/tests/unicode_collation.rs diff --git a/Cargo.lock b/Cargo.lock index e789c24c6..33af59346 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -811,9 +811,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019" +checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" dependencies = [ "memchr", "serde", @@ -1953,9 +1953,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7" +checksum = "f69037fe1b785e84986b4f2cbcf647381876a00671d25ceef715d7812dd7e1dd" [[package]] name = "finl_unicode" @@ -2398,9 +2398,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "f95b9abcae896730d42b78e09c155ed4ddf82c07b4de772c64aee5b2d8b7c150" dependencies = [ "bytes", "fnv", @@ -2758,6 +2758,7 @@ dependencies = [ "clap", "color-eyre", "const-oid", + "deadpool-redis", "der", "diesel", "diesel-async", @@ -2775,6 +2776,7 @@ dependencies = [ "kitsune-core", "kitsune-db", "kitsune-embed", + "kitsune-http-client", "kitsune-http-signatures", "kitsune-job-runner", "kitsune-language", @@ -2971,13 +2973,16 @@ dependencies = [ "iso8601-timestamp", "kitsune-blocking", "kitsune-language", + "kitsune-test", "kitsune-type", "num-derive", "num-traits 0.2.17", "serde", + "serial_test", "simd-json", "speedy-uuid", "thiserror", + "tokio", "tracing-log 0.2.0", "typed-builder", ] @@ -5108,9 +5113,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ "base64 0.21.5", ] @@ -5595,9 +5600,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "smol_str" @@ -5926,9 +5931,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.33.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ "backtrace", "bytes", @@ -5955,9 +5960,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", diff --git a/crates/kitsune-blocking/Cargo.toml b/crates/kitsune-blocking/Cargo.toml index 3ff25df85..db72813a9 100644 --- a/crates/kitsune-blocking/Cargo.toml +++ b/crates/kitsune-blocking/Cargo.toml @@ -7,5 +7,5 @@ version.workspace = true once_cell = "1.18.0" rayon = "1.8.0" thiserror = "1.0.50" -tokio = { version = "1.33.0", features = ["rt", "sync"] } +tokio = { version = "1.34.0", features = ["rt", "sync"] } tracing = "0.1.40" diff --git a/crates/kitsune-cache/Cargo.toml b/crates/kitsune-cache/Cargo.toml index 18088d46b..0756fe13a 100644 --- a/crates/kitsune-cache/Cargo.toml +++ b/crates/kitsune-cache/Cargo.toml @@ -15,4 +15,4 @@ tracing = "0.1.40" typed-builder = "0.18.0" [dev-dependencies] -tokio = { version = "1.33.0", features = ["macros", "rt"] } +tokio = { version = "1.34.0", features = ["macros", "rt"] } diff --git a/crates/kitsune-captcha/Cargo.toml b/crates/kitsune-captcha/Cargo.toml index ca22c76d7..f3152f890 100644 --- a/crates/kitsune-captcha/Cargo.toml +++ b/crates/kitsune-captcha/Cargo.toml @@ -5,7 +5,7 @@ edition.workspace = true [dependencies] enum_dispatch = "0.3.12" -http = "0.2.9" +http = "0.2.10" kitsune-http-client = { path = "../kitsune-http-client" } serde = { version = "1.0.192", features = ["derive"] } serde_urlencoded = "0.7.1" diff --git a/crates/kitsune-config/Cargo.toml b/crates/kitsune-config/Cargo.toml index b4f13ada4..1c48d73f1 100644 --- a/crates/kitsune-config/Cargo.toml +++ b/crates/kitsune-config/Cargo.toml @@ -7,5 +7,5 @@ version.workspace = true eyre = "0.6.8" serde = { version = "1.0.192", features = ["derive"] } smol_str = { version = "0.2.0", features = ["serde"] } -tokio = { version = "1.33.0", features = ["fs"] } +tokio = { version = "1.34.0", features = ["fs"] } toml = { version = "0.8.8", default-features = false, features = ["parse"] } diff --git a/crates/kitsune-core/Cargo.toml b/crates/kitsune-core/Cargo.toml index cd0d9d5b0..123d433ff 100644 --- a/crates/kitsune-core/Cargo.toml +++ b/crates/kitsune-core/Cargo.toml @@ -32,7 +32,7 @@ garde = { version = "0.16.2", default-features = false, features = [ globset = "0.4.13" headers = "0.3.9" hex-simd = { version = "0.8.0", features = ["unstable"] } -http = "0.2.9" +http = "0.2.10" img-parts = "0.3.0" iso8601-timestamp = "0.2.12" kitsune-blocking = { path = "../kitsune-blocking" } @@ -69,7 +69,7 @@ smol_str = "0.2.0" speedy-uuid = { path = "../../lib/speedy-uuid", features = ["diesel"] } thiserror = "1.0.50" time = "0.3.30" -tokio = { version = "1.33.0", features = ["macros", "rt"] } +tokio = { version = "1.34.0", features = ["macros", "rt"] } tracing = "0.1.40" typed-builder = "0.18.0" url = "2.4.1" diff --git a/crates/kitsune-core/src/service/account.rs b/crates/kitsune-core/src/service/account.rs index 81838650c..6e27e20bb 100644 --- a/crates/kitsune-core/src/service/account.rs +++ b/crates/kitsune-core/src/service/account.rs @@ -674,6 +674,7 @@ impl AccountService { ..changeset }; } + if let Some(ref mut note) = update.note { note.clean_html(); changeset = UpdateAccount { @@ -681,6 +682,7 @@ impl AccountService { ..changeset }; } + if let Some(avatar) = update.avatar { let media_attachment = self.attachment_service.upload(avatar).await?; changeset = UpdateAccount { @@ -688,6 +690,7 @@ impl AccountService { ..changeset }; } + if let Some(header) = update.header { let media_attachment = self.attachment_service.upload(header).await?; changeset = UpdateAccount { @@ -695,6 +698,7 @@ impl AccountService { ..changeset }; } + if let Some(locked) = update.locked { changeset = UpdateAccount { locked: Some(locked), diff --git a/crates/kitsune-core/src/service/attachment.rs b/crates/kitsune-core/src/service/attachment.rs index 668242326..2842caf3e 100644 --- a/crates/kitsune-core/src/service/attachment.rs +++ b/crates/kitsune-core/src/service/attachment.rs @@ -350,7 +350,7 @@ mod test { } async fn handle(_req: Request) -> Result, Infallible> { - Ok::<_, Infallible>(Response::new(Body::from(""))) + Ok::<_, Infallible>(Response::new(Body::empty())) } async fn prepare_db(db_conn: &mut AsyncPgConnection) -> Uuid { diff --git a/crates/kitsune-core/src/service/user.rs b/crates/kitsune-core/src/service/user.rs index 496197eba..be2292746 100644 --- a/crates/kitsune-core/src/service/user.rs +++ b/crates/kitsune-core/src/service/user.rs @@ -73,7 +73,7 @@ fn is_strong_password(value: &Option, _context: &()) -> garde::Result { #[derive(Clone, TypedBuilder, Validate)] pub struct Register { /// Username of the new user - #[garde(length(min = 1, max = 64), pattern(r"[\w\.]+"))] + #[garde(length(min = 1, max = 64), pattern(r"^[\p{L}\p{N}\.]+$"))] username: String, /// Email address of the new user @@ -261,3 +261,49 @@ impl UserService { self.registrations_open } } + +#[cfg(test)] +mod test { + use super::Register; + use garde::Validate; + + #[test] + fn alphanumeric_username() { + let valid_usernames = [ + "aumetra", + "AUMETRA", + "aum3tr4", + "äumäträ", + "아우멭라", + "あうめtら", + ]; + + for username in valid_usernames { + let register = Register::builder() + .email("whatever@kitsune.example".into()) + .password("verysecurepassword123".into()) + .username(username.into()) + .build(); + + assert!( + register.validate(&()).is_ok(), + "{username} is considered invalid", + ); + } + + let invalid_usernames = [",,,", "🎃spooky", "weewoo 🚨"]; + + for username in invalid_usernames { + let register = Register::builder() + .email("whatever@kitsune.example".into()) + .password("verysecurepassword123".into()) + .username(username.into()) + .build(); + + assert!( + register.validate(&()).is_err(), + "{username} is considered valid", + ); + } + } +} diff --git a/crates/kitsune-db/Cargo.toml b/crates/kitsune-db/Cargo.toml index 2cc78c7cf..3cf98fe24 100644 --- a/crates/kitsune-db/Cargo.toml +++ b/crates/kitsune-db/Cargo.toml @@ -26,3 +26,8 @@ speedy-uuid = { path = "../../lib/speedy-uuid", features = ["diesel"] } thiserror = "1.0.50" tracing-log = "0.2.0" typed-builder = "0.18.0" + +[dev-dependencies] +kitsune-test = { path = "../kitsune-test" } +serial_test = "2.0.0" +tokio = { version = "1.34.0", features = ["macros"] } diff --git a/crates/kitsune-db/migrations/2023-05-19-192931_initial_tables/up.sql b/crates/kitsune-db/migrations/2023-05-19-192931_initial_tables/up.sql index 28efd230f..db69d6a1a 100644 --- a/crates/kitsune-db/migrations/2023-05-19-192931_initial_tables/up.sql +++ b/crates/kitsune-db/migrations/2023-05-19-192931_initial_tables/up.sql @@ -1,8 +1,15 @@ +CREATE COLLATION ignore_accent_case ( + provider = icu, + deterministic = false, + locale = 'und-u-ks-level1' +); + CREATE TABLE accounts ( id UUID PRIMARY KEY, display_name TEXT, note TEXT, - username TEXT NOT NULL, + -- Use special collation to ignore case and accent differences + username TEXT NOT NULL COLLATE ignore_accent_case, locked BOOLEAN NOT NULL, local BOOLEAN NOT NULL, domain TEXT NOT NULL, @@ -74,7 +81,8 @@ CREATE TABLE users ( id UUID PRIMARY KEY, account_id UUID NOT NULL UNIQUE, oidc_id TEXT UNIQUE, - username TEXT NOT NULL, + -- Use special collation to ignore case and accent differences + username TEXT NOT NULL COLLATE ignore_accent_case, email TEXT NOT NULL UNIQUE, password TEXT UNIQUE, domain TEXT NOT NULL, diff --git a/crates/kitsune-db/tests/unicode_collation.rs b/crates/kitsune-db/tests/unicode_collation.rs new file mode 100644 index 000000000..08aac0ffc --- /dev/null +++ b/crates/kitsune-db/tests/unicode_collation.rs @@ -0,0 +1,127 @@ +use diesel::SelectableHelper; +use diesel_async::{scoped_futures::ScopedFutureExt, AsyncPgConnection, RunQueryDsl}; +use kitsune_db::{ + model::{ + account::{Account, ActorType, NewAccount}, + user::{NewUser, User}, + }, + schema::{accounts, users}, +}; +use kitsune_test::database_test; +use speedy_uuid::Uuid; +use std::error::Error; + +type Result = std::result::Result>; + +async fn create_account(conn: &mut AsyncPgConnection, username: &str) -> Result { + diesel::insert_into(accounts::table) + .values(NewAccount { + id: Uuid::now_v7(), + actor_type: ActorType::Person, + display_name: None, + note: None, + username, + locked: false, + local: true, + domain: "kitsune.example", + url: format!("https://kitsune.example/users/{username}").as_str(), + featured_collection_url: None, + followers_url: None, + following_url: None, + inbox_url: None, + outbox_url: None, + shared_inbox_url: None, + public_key: "---WHATEVER---", + public_key_id: format!("can we abandon rsa already? ({username}'s key)").as_str(), + created_at: None, + }) + .returning(Account::as_returning()) + .get_result(conn) + .await + .map_err(Into::into) +} + +async fn create_user(conn: &mut AsyncPgConnection, username: &str) -> Result { + let account = create_account(conn, Uuid::now_v7().to_string().as_str()).await?; + + diesel::insert_into(users::table) + .values(NewUser { + id: Uuid::now_v7(), + account_id: account.id, + oidc_id: None, + username, + email: format!("{username}@kitsune.example").as_str(), + password: None, + domain: "kitsune.example", + private_key: "---WHATEVER---", + confirmation_token: Uuid::now_v7().to_string().as_str(), + }) + .returning(User::as_returning()) + .get_result(conn) + .await + .map_err(Into::into) +} + +#[tokio::test] +#[serial_test::serial] +async fn accounts_username() { + database_test(|db_pool| async move { + db_pool + .with_connection(|conn| { + async move { + let initial_insert = create_account(conn, "aumetra").await; + assert!(initial_insert.is_ok()); + + let case_mutation = create_account(conn, "AuMeTrA").await; + assert!(case_mutation.is_err()); + + let unicode_mutation_1 = create_account(conn, "äumeträ").await; + assert!(unicode_mutation_1.is_err()); + + let unicode_mutation_2 = create_account(conn, "🅰umetr🅰").await; + assert!(unicode_mutation_2.is_err()); + + let unicode_case_mutation = create_account(conn, "🅰UMETR🅰").await; + assert!(unicode_case_mutation.is_err()); + + Result::Ok(()) + } + .scoped() + }) + .await + .unwrap(); + }) + .await; +} + +#[tokio::test] +#[serial_test::serial] +async fn users_username() { + database_test(|db_pool| async move { + db_pool + .with_connection(|conn| { + async move { + let initial_insert = create_user(conn, "aumetra").await; + assert!(initial_insert.is_ok()); + + let case_mutation = create_user(conn, "AuMeTrA").await; + assert!(case_mutation.is_err()); + + let unicode_mutation_1 = create_user(conn, "äumeträ").await; + assert!(unicode_mutation_1.is_err()); + + let unicode_mutation_2 = create_user(conn, "🅰umetr🅰").await; + assert!(unicode_mutation_2.is_err()); + + let unicode_case_mutation = create_user(conn, "🅰UMETR🅰").await; + assert!(unicode_case_mutation.is_err()); + + Result::Ok(()) + } + .scoped() + }) + .await + .unwrap(); + }) + .await; +} diff --git a/crates/kitsune-embed/Cargo.toml b/crates/kitsune-embed/Cargo.toml index 50c0391c6..842817379 100644 --- a/crates/kitsune-embed/Cargo.toml +++ b/crates/kitsune-embed/Cargo.toml @@ -7,7 +7,7 @@ version.workspace = true diesel = "2.1.3" diesel-async = "0.4.1" embed-sdk = { git = "https://github.com/Lantern-chat/embed-service.git", rev = "bad5d4024502e361e0e899f0f59d2e246ff3ef61" } -http = "0.2.9" +http = "0.2.10" iso8601-timestamp = "0.2.12" kitsune-db = { path = "../kitsune-db" } kitsune-http-client = { path = "../kitsune-http-client" } diff --git a/crates/kitsune-http-client/Cargo.toml b/crates/kitsune-http-client/Cargo.toml index 32b3250cb..5bf8bd67b 100644 --- a/crates/kitsune-http-client/Cargo.toml +++ b/crates/kitsune-http-client/Cargo.toml @@ -35,4 +35,4 @@ tower-http = { version = "0.4.4", features = [ ] } [dev-dependencies] -tokio = { version = "1.33.0", features = ["macros", "rt"] } +tokio = { version = "1.34.0", features = ["macros", "rt"] } diff --git a/crates/kitsune-http-signatures/Cargo.toml b/crates/kitsune-http-signatures/Cargo.toml index ea7410e80..b3230a74a 100644 --- a/crates/kitsune-http-signatures/Cargo.toml +++ b/crates/kitsune-http-signatures/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true [dependencies] base64-simd = { version = "0.8.0", features = ["unstable"] } derive_builder = "0.12.0" -http = "0.2.9" +http = "0.2.10" kitsune-blocking = { path = "../kitsune-blocking" } ring = { version = "0.17.5", features = ["std"] } time = { version = "0.3.30", default-features = false, features = [ @@ -19,4 +19,4 @@ typed-builder = "0.18.0" [dev-dependencies] pem = "3.0.2" pkcs8 = { version = "0.10.2", features = ["alloc"] } -tokio = { version = "1.33.0", features = ["macros", "rt"] } +tokio = { version = "1.34.0", features = ["macros", "rt"] } diff --git a/crates/kitsune-messaging/Cargo.toml b/crates/kitsune-messaging/Cargo.toml index 914a546dc..a7f4cbd91 100644 --- a/crates/kitsune-messaging/Cargo.toml +++ b/crates/kitsune-messaging/Cargo.toml @@ -16,6 +16,6 @@ redis = { version = "0.23.3", features = [ ] } serde = "1.0.192" simd-json = "0.13.4" -tokio = { version = "1.33.0", features = ["macros", "rt", "sync"] } +tokio = { version = "1.34.0", features = ["macros", "rt", "sync"] } tokio-stream = { version = "0.1.14", features = ["sync"] } tracing = "0.1.40" diff --git a/crates/kitsune-oidc/Cargo.toml b/crates/kitsune-oidc/Cargo.toml index 37111f14e..de2b696f7 100644 --- a/crates/kitsune-oidc/Cargo.toml +++ b/crates/kitsune-oidc/Cargo.toml @@ -6,7 +6,7 @@ version.workspace = true [dependencies] deadpool-redis = "0.13.0" enum_dispatch = "0.3.12" -http = "0.2.9" +http = "0.2.10" hyper = "0.14.27" kitsune-config = { path = "../kitsune-config" } kitsune-http-client = { path = "../kitsune-http-client" } diff --git a/crates/kitsune-storage/Cargo.toml b/crates/kitsune-storage/Cargo.toml index da06ffad6..3dce7a5c2 100644 --- a/crates/kitsune-storage/Cargo.toml +++ b/crates/kitsune-storage/Cargo.toml @@ -6,14 +6,14 @@ edition.workspace = true [dependencies] bytes = "1.5.0" futures-util = "0.3.29" -http = "0.2.9" +http = "0.2.10" hyper = { version = "0.14.27", features = ["stream"] } kitsune-http-client = { path = "../kitsune-http-client" } kitsune-util = { path = "../kitsune-util" } rusty-s3 = { version = "0.5.0", default-features = false } -tokio = { version = "1.33.0", features = ["fs", "io-util"] } +tokio = { version = "1.34.0", features = ["fs", "io-util"] } tokio-util = { version = "0.7.10", features = ["io"] } [dev-dependencies] tempfile = "3.8.1" -tokio = { version = "1.33.0", features = ["macros", "rt"] } +tokio = { version = "1.34.0", features = ["macros", "rt"] } diff --git a/crates/kitsune-test/Cargo.toml b/crates/kitsune-test/Cargo.toml index bfa0e547b..0940a06ec 100644 --- a/crates/kitsune-test/Cargo.toml +++ b/crates/kitsune-test/Cargo.toml @@ -8,7 +8,7 @@ deadpool-redis = "0.13.0" diesel = "2.1.3" diesel-async = "0.4.1" futures-util = "0.3.29" -http = "0.2.9" +http = "0.2.10" hyper = "0.14.27" kitsune-db = { path = "../kitsune-db" } pin-project-lite = "0.2.13" diff --git a/flake.lock b/flake.lock index 7075f1e8f..e993bdb12 100644 --- a/flake.lock +++ b/flake.lock @@ -232,11 +232,11 @@ ] }, "locked": { - "lastModified": 1699495996, - "narHash": "sha256-m0LWmnEJhHTY4gJX9HPsQ8voZptvr1Sx6dXkk9Xp0sI=", + "lastModified": 1699582387, + "narHash": "sha256-sPmUXPDl+cEi+zFtM5lnAs7dWOdRn0ptZ4a/qHwvNDk=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "603e4962d7d2225ba2caf66b0eabfcaa9a93c490", + "rev": "41f7b0618052430d3a050e8f937030d00a2fcced", "type": "github" }, "original": { diff --git a/kitsune-cli/Cargo.toml b/kitsune-cli/Cargo.toml index f692c154b..e5c1580ae 100644 --- a/kitsune-cli/Cargo.toml +++ b/kitsune-cli/Cargo.toml @@ -14,7 +14,7 @@ envy = "0.4.2" kitsune-db = { path = "../crates/kitsune-db" } serde = { version = "1.0.192", features = ["derive"] } speedy-uuid = { path = "../lib/speedy-uuid" } -tokio = { version = "1.33.0", features = ["full"] } +tokio = { version = "1.34.0", features = ["full"] } tracing-subscriber = "0.3.17" [build-dependencies] diff --git a/kitsune-fe/package.json b/kitsune-fe/package.json index 2b1db533c..0ed1c3487 100644 --- a/kitsune-fe/package.json +++ b/kitsune-fe/package.json @@ -11,9 +11,9 @@ "format": "prettier . --write" }, "dependencies": { - "@formkit/core": "^1.2.2", - "@formkit/validation": "^1.2.2", - "@formkit/vue": "^1.2.2", + "@formkit/core": "^1.3.0", + "@formkit/validation": "^1.3.0", + "@formkit/vue": "^1.3.0", "@fortawesome/fontawesome-svg-core": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.2", "@fortawesome/vue-fontawesome": "^3.0.5", @@ -24,7 +24,7 @@ "@tiptap/vue-3": "^2.1.12", "@urql/exchange-graphcache": "^6.3.3", "@urql/vue": "^1.1.2", - "@vueuse/core": "^10.5.0", + "@vueuse/core": "^10.6.0", "@zxcvbn-ts/core": "^3.0.4", "@zxcvbn-ts/language-common": "^3.0.4", "@zxcvbn-ts/language-en": "^3.0.2", @@ -45,11 +45,11 @@ "@graphql-codegen/cli": "^5.0.0", "@graphql-codegen/client-preset": "^4.1.0", "@parcel/watcher": "^2.3.0", - "@trivago/prettier-plugin-sort-imports": "^4.2.1", + "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/lodash": "^4.14.201", "@typescript-eslint/eslint-plugin": "^6.10.0", "@typescript-eslint/parser": "^6.10.0", - "@vitejs/plugin-vue": "^4.4.0", + "@vitejs/plugin-vue": "^4.4.1", "@vue/eslint-config-prettier": "^8.0.0", "@vue/eslint-config-typescript": "^12.0.0", "eslint": "^8.53.0", diff --git a/kitsune-fe/yarn.lock b/kitsune-fe/yarn.lock index 51a74c871..15a0c1812 100644 --- a/kitsune-fe/yarn.lock +++ b/kitsune-fe/yarn.lock @@ -59,25 +59,25 @@ chalk "^2.4.2" "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.9": - version "7.23.2" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.2.tgz#6a12ced93455827037bfb5ed8492820d60fc32cc" - integrity sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.3.tgz#3febd552541e62b5e883a25eb3effd7c7379db11" + integrity sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ== "@babel/core@^7.14.0", "@babel/core@^7.22.9": - version "7.23.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.2.tgz#ed10df0d580fff67c5f3ee70fd22e2e4c90a9f94" - integrity sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.3.tgz#5ec09c8803b91f51cc887dedc2654a35852849c9" + integrity sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.22.13" - "@babel/generator" "^7.23.0" + "@babel/generator" "^7.23.3" "@babel/helper-compilation-targets" "^7.22.15" - "@babel/helper-module-transforms" "^7.23.0" + "@babel/helper-module-transforms" "^7.23.3" "@babel/helpers" "^7.23.2" - "@babel/parser" "^7.23.0" + "@babel/parser" "^7.23.3" "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.2" - "@babel/types" "^7.23.0" + "@babel/traverse" "^7.23.3" + "@babel/types" "^7.23.3" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -93,12 +93,12 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.14.0", "@babel/generator@^7.18.13", "@babel/generator@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" - integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== +"@babel/generator@^7.14.0", "@babel/generator@^7.18.13", "@babel/generator@^7.23.0", "@babel/generator@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.3.tgz#86e6e83d95903fbe7613f448613b8b319f330a8e" + integrity sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg== dependencies: - "@babel/types" "^7.23.0" + "@babel/types" "^7.23.3" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" @@ -110,7 +110,7 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.22.15", "@babel/helper-compilation-targets@^7.22.5": +"@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz#0698fc44551a26cf29f18d4662d5bf545a6cfc52" integrity sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw== @@ -170,10 +170,10 @@ dependencies: "@babel/types" "^7.22.15" -"@babel/helper-module-transforms@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz#3ec246457f6c842c0aee62a01f60739906f7047e" - integrity sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw== +"@babel/helper-module-transforms@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1" + integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== dependencies: "@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-module-imports" "^7.22.15" @@ -193,7 +193,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== -"@babel/helper-replace-supers@^7.22.5", "@babel/helper-replace-supers@^7.22.9": +"@babel/helper-replace-supers@^7.22.20", "@babel/helper-replace-supers@^7.22.9": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz#e37d367123ca98fe455a9887734ed2e16eb7a793" integrity sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw== @@ -256,10 +256,10 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.14.0", "@babel/parser@^7.16.8", "@babel/parser@^7.20.5", "@babel/parser@^7.22.15", "@babel/parser@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" - integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== +"@babel/parser@^7.14.0", "@babel/parser@^7.16.8", "@babel/parser@^7.20.5", "@babel/parser@^7.22.15", "@babel/parser@^7.23.0", "@babel/parser@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.3.tgz#0ce0be31a4ca4f1884b5786057cadcb6c3be58f9" + integrity sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw== "@babel/plugin-proposal-class-properties@^7.0.0": version "7.18.6" @@ -287,24 +287,24 @@ dependencies: "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.22.5.tgz#163b820b9e7696ce134df3ee716d9c0c98035859" - integrity sha512-9RdCl0i+q0QExayk2nOS7853w08yLucnnPML6EN9S8fgMPVtdLDCdx/cOQ/i44Lb9UeQX9A35yaqBBOMMZxPxQ== +"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.23.3.tgz#084564e0f3cc21ea6c70c44cff984a1c0509729a" + integrity sha512-YZiAIpkJAwQXBJLIQbRFayR5c+gJ35Vcz3bg954k7cd73zqjvhacJuL9RbrzPz8qPmZdgqP6EUKwy0PCNhaaPA== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-import-assertions@^7.20.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz#07d252e2aa0bc6125567f742cd58619cb14dce98" - integrity sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.23.3.tgz#9c05a7f592982aff1a2768260ad84bcd3f0c77fc" + integrity sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-jsx@^7.0.0", "@babel/plugin-syntax-jsx@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz#a6b68e84fb76e759fc3b93e901876ffabbe1d918" - integrity sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz#8f2e4f8a9b5f9aa16067e142c1ac9cd9f810f473" + integrity sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg== dependencies: "@babel/helper-plugin-utils" "^7.22.5" @@ -316,129 +316,129 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-transform-arrow-functions@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz#e5ba566d0c58a5b2ba2a8b795450641950b71958" - integrity sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.23.3.tgz#94c6dcfd731af90f27a79509f9ab7fb2120fc38b" + integrity sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-block-scoped-functions@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz#27978075bfaeb9fa586d3cb63a3d30c1de580024" - integrity sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz#fe1177d715fb569663095e04f3598525d98e8c77" + integrity sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-block-scoping@^7.0.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.0.tgz#8744d02c6c264d82e1a4bc5d2d501fd8aff6f022" - integrity sha512-cOsrbmIOXmf+5YbL99/S49Y3j46k/T16b9ml8bm9lP6N9US5iQ2yBK7gpui1pg0V/WMcXdkfKbTb7HXq9u+v4g== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.3.tgz#e99a3ff08f58edd28a8ed82481df76925a4ffca7" + integrity sha512-QPZxHrThbQia7UdvfpaRRlq/J9ciz1J4go0k+lPBXbgaNeY7IQrBj/9ceWjvMMI07/ZBzHl/F0R/2K0qH7jCVw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-classes@^7.0.0": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.15.tgz#aaf4753aee262a232bbc95451b4bdf9599c65a0b" - integrity sha512-VbbC3PGjBdE0wAWDdHM9G8Gm977pnYI0XpqMd6LrKISj8/DJXEsWqgRuTYaNE9Bv0JGhTZUzHDlMk18IpOuoqw== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.3.tgz#73380c632c095b03e8503c24fd38f95ad41ffacb" + integrity sha512-FGEQmugvAEu2QtgtU0uTASXevfLMFfBeVCIIdcQhn/uBQsMTjBajdnAtanQlOcuihWh10PZ7+HWvc7NtBwP74w== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" "@babel/helper-compilation-targets" "^7.22.15" - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-function-name" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" "@babel/helper-optimise-call-expression" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-replace-supers" "^7.22.9" + "@babel/helper-replace-supers" "^7.22.20" "@babel/helper-split-export-declaration" "^7.22.6" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz#cd1e994bf9f316bd1c2dafcd02063ec261bb3869" - integrity sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.23.3.tgz#652e69561fcc9d2b50ba4f7ac7f60dcf65e86474" + integrity sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" - "@babel/template" "^7.22.5" + "@babel/template" "^7.22.15" "@babel/plugin-transform-destructuring@^7.0.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.0.tgz#6447aa686be48b32eaf65a73e0e2c0bd010a266c" - integrity sha512-vaMdgNXFkYrB+8lbgniSYWHsgqK5gjaMNcc84bMIOMRLH0L9AqYq3hwMdvnyqj1OPqea8UtjPEuS/DCenah1wg== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz#8c9ee68228b12ae3dff986e56ed1ba4f3c446311" + integrity sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-flow-strip-types@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.22.5.tgz#0bb17110c7bf5b35a60754b2f00c58302381dee2" - integrity sha512-tujNbZdxdG0/54g/oua8ISToaXTFBf8EnSb5PgQSciIXWOWKX3S4+JR7ZE9ol8FZwf9kxitzkGQ+QWeov/mCiA== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.23.3.tgz#cfa7ca159cc3306fab526fc67091556b51af26ff" + integrity sha512-26/pQTf9nQSNVJCrLB1IkHUKyPxR+lMrH2QDPG89+Znu9rAMbtrybdbWeE9bb7gzjmE5iXHEY+e0HUwM6Co93Q== dependencies: "@babel/helper-plugin-utils" "^7.22.5" - "@babel/plugin-syntax-flow" "^7.22.5" + "@babel/plugin-syntax-flow" "^7.23.3" "@babel/plugin-transform-for-of@^7.0.0": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.15.tgz#f64b4ccc3a4f131a996388fae7680b472b306b29" - integrity sha512-me6VGeHsx30+xh9fbDLLPi0J1HzmeIIyenoOQHuw2D4m2SAU3NrspX5XxJLBpqn5yrLzrlw2Iy3RA//Bx27iOA== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.3.tgz#afe115ff0fbce735e02868d41489093c63e15559" + integrity sha512-X8jSm8X1CMwxmK878qsUGJRmbysKNbdpTv/O1/v0LuY/ZkZrng5WYiekYSdg9m09OTmDDUWeEDsTE+17WYbAZw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-function-name@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz#935189af68b01898e0d6d99658db6b164205c143" - integrity sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.23.3.tgz#8f424fcd862bf84cb9a1a6b42bc2f47ed630f8dc" + integrity sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw== dependencies: - "@babel/helper-compilation-targets" "^7.22.5" - "@babel/helper-function-name" "^7.22.5" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-function-name" "^7.23.0" "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-literals@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz#e9341f4b5a167952576e23db8d435849b1dd7920" - integrity sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.23.3.tgz#8214665f00506ead73de157eba233e7381f3beb4" + integrity sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-member-expression-literals@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz#4fcc9050eded981a468347dd374539ed3e058def" - integrity sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz#e37b3f0502289f477ac0e776b05a833d853cabcc" + integrity sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-modules-commonjs@^7.0.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.0.tgz#b3dba4757133b2762c00f4f94590cf6d52602481" - integrity sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz#661ae831b9577e52be57dd8356b734f9700b53b4" + integrity sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA== dependencies: - "@babel/helper-module-transforms" "^7.23.0" + "@babel/helper-module-transforms" "^7.23.3" "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-simple-access" "^7.22.5" "@babel/plugin-transform-object-super@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz#794a8d2fcb5d0835af722173c1a9d704f44e218c" - integrity sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz#81fdb636dcb306dd2e4e8fd80db5b2362ed2ebcd" + integrity sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA== dependencies: "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-replace-supers" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.20" "@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.20.7": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.15.tgz#719ca82a01d177af358df64a514d64c2e3edb114" - integrity sha512-hjk7qKIqhyzhhUvRT683TYQOFa/4cQKwQy7ALvTpODswN40MljzNDa0YldevS6tGbxwaEKVn502JmY0dP7qEtQ== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.23.3.tgz#83ef5d1baf4b1072fa6e54b2b0999a7b2527e2af" + integrity sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-property-literals@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz#b5ddabd73a4f7f26cd0e20f5db48290b88732766" - integrity sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz#54518f14ac4755d22b92162e4a852d308a560875" + integrity sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-react-display-name@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.22.5.tgz#3c4326f9fce31c7968d6cb9debcaf32d9e279a2b" - integrity sha512-PVk3WPYudRF5z4GKMEYUrLjPl38fJSKNaEOkFuoprioowGuWN6w2RKznuFNSlJx7pzzXXStPUnNSOEO0jL5EVw== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.23.3.tgz#70529f034dd1e561045ad3c8152a267f0d7b6200" + integrity sha512-GnvhtVfA2OAtzdX58FJxU19rhoGeQzyVndw3GgtdECQvQFXPEZIOVULHVZGAYmOgmqjXpVpfocAbSjh99V/Fqw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" @@ -454,24 +454,24 @@ "@babel/types" "^7.22.15" "@babel/plugin-transform-shorthand-properties@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz#6e277654be82b5559fc4b9f58088507c24f0c624" - integrity sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz#97d82a39b0e0c24f8a981568a8ed851745f59210" + integrity sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-spread@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz#6487fd29f229c95e284ba6c98d65eafb893fea6b" - integrity sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.23.3.tgz#41d17aacb12bde55168403c6f2d6bdca563d362c" + integrity sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" "@babel/plugin-transform-template-literals@^7.0.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz#8f38cf291e5f7a8e60e9f733193f0bcc10909bff" - integrity sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz#5f0f028eb14e50b5d0f76be57f90045757539d07" + integrity sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg== dependencies: "@babel/helper-plugin-utils" "^7.22.5" @@ -482,7 +482,7 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.22.15", "@babel/template@^7.22.5": +"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== @@ -491,7 +491,7 @@ "@babel/parser" "^7.22.15" "@babel/types" "^7.22.15" -"@babel/traverse@7.23.2", "@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.23.2": +"@babel/traverse@7.23.2": version "7.23.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== @@ -507,6 +507,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.23.2", "@babel/traverse@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.3.tgz#26ee5f252e725aa7aca3474aa5b324eaf7908b5b" + integrity sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ== + dependencies: + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.3" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.3" + "@babel/types" "^7.23.3" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@7.17.0": version "7.17.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b" @@ -515,10 +531,10 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" -"@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.18.13", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" - integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== +"@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.18.13", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.3.tgz#d5ea892c07f2ec371ac704420f4dcdb07b5f9598" + integrity sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw== dependencies: "@babel/helper-string-parser" "^7.22.5" "@babel/helper-validator-identifier" "^7.22.20" @@ -685,90 +701,90 @@ resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.1.6.tgz#22958c042e10b67463997bd6ea7115fe28cbcaf9" integrity sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A== -"@formkit/core@1.2.2", "@formkit/core@^1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@formkit/core/-/core-1.2.2.tgz#4461b416a678b32ccc37e2f2268615460850ad6a" - integrity sha512-aJoZW7ZWXdwVBdw2acv62aPaecZ44PnK9eyp/hdMrMxT9xW3I84MytCdII8DYpxLmloaE+NoUANZIvlkTRGlHg== +"@formkit/core@1.3.0", "@formkit/core@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@formkit/core/-/core-1.3.0.tgz#bf4a7241959660921a699d1a1524e6a8b8ac0315" + integrity sha512-g1Cx5US+uYai7PpixGSkJuFgKSEK++7R2xw6im8NuD9YaDQl7jg93yjJoRSHFS+I61xaEstViCrmquNFIcUYBA== dependencies: - "@formkit/utils" "1.2.2" + "@formkit/utils" "1.3.0" -"@formkit/dev@1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@formkit/dev/-/dev-1.2.2.tgz#43ad81a0096d0e9e4c39b3c61c58277756de4444" - integrity sha512-C3KzolVAQE732W2aCKgLDXyhnxCNFtWQEPvs677ZAEciMBrZEgU6ZDleb8XTX7FIF4m4PWszfheQIbdy4p0K+Q== +"@formkit/dev@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@formkit/dev/-/dev-1.3.0.tgz#197da544bfe27c223ff0709bbaea942e78ed9496" + integrity sha512-Q/MBTGG8Jd5ZlqnQq02EdvH5UIVWPxzJTep+IzqLkPUFspZhMtCU8YV/kEm1QxXntLdFxjQtmjzYHrsuul0dPA== dependencies: - "@formkit/core" "1.2.2" - "@formkit/utils" "1.2.2" + "@formkit/core" "1.3.0" + "@formkit/utils" "1.3.0" -"@formkit/i18n@1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@formkit/i18n/-/i18n-1.2.2.tgz#29aede7d91b2a1ccc6fdcc716aee431fb98de694" - integrity sha512-HABPlja6xQk0JztvQnbnhVzFqhgM6XqlqOzGNOtCOcOpMUSY3okT7NSMPTK/Zq4Yq4XQmbJgi/toGfYakqLfhA== +"@formkit/i18n@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@formkit/i18n/-/i18n-1.3.0.tgz#25a4220a6fa44c1d2113fa998e5fd76daa0d1ca2" + integrity sha512-nHMLIWxM9J9o3p94wQwhvWOqz/JtNCxErpuD2bKTxQP5DTwHkYfF0ajHclT/8FdHXx5a9+VhiI7mD9rVCtcdBA== dependencies: - "@formkit/core" "1.2.2" - "@formkit/utils" "1.2.2" - "@formkit/validation" "1.2.2" + "@formkit/core" "1.3.0" + "@formkit/utils" "1.3.0" + "@formkit/validation" "1.3.0" -"@formkit/inputs@1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@formkit/inputs/-/inputs-1.2.2.tgz#5515c149969412f3472b6977b8d4e5b6447c5f1f" - integrity sha512-apVGQ+9eHRD8qi9h0LRvaI9UrumDUwXQSw3gMQfDvfCjkqZXY4+m/WS3FraqHH4Mqs7cjryYRYrHYpAaVQtqKQ== +"@formkit/inputs@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@formkit/inputs/-/inputs-1.3.0.tgz#9f504eda7c843c14d7905599e8158b9ebea06416" + integrity sha512-LlaBjbBCKLt3S1LtalU+j45LWm+y5uy3uwgC+lH5iBosmPfqm5b7Hzok82QyTvaSBIx8CyYIunVlGKK++mmtlg== dependencies: - "@formkit/core" "1.2.2" - "@formkit/utils" "1.2.2" + "@formkit/core" "1.3.0" + "@formkit/utils" "1.3.0" -"@formkit/observer@1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@formkit/observer/-/observer-1.2.2.tgz#dd1ef35cb5a01a04cb86cec32e0218688a4acc3b" - integrity sha512-D9bVRfs2FEuzuIdC2BFSpayV4xyIexbRc2JTLkdwgsx9rROz9bh67M+VZ7zmrONuikgrD+dfaopIXK5sRZPGSQ== +"@formkit/observer@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@formkit/observer/-/observer-1.3.0.tgz#6383dac9c2ac81127e7e7b463939cff37c0c7dfe" + integrity sha512-u85sIeacLlqiOFYwgozRADd5QCmj6+wuh1wPDPIfdi1+dSWQR1y0RmSRgOUXxRfz0xA/hQK15zr80s8jRpcqxA== dependencies: - "@formkit/core" "1.2.2" - "@formkit/utils" "1.2.2" + "@formkit/core" "1.3.0" + "@formkit/utils" "1.3.0" -"@formkit/rules@1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@formkit/rules/-/rules-1.2.2.tgz#0778c856aae5397a1ae3fad27f5862cdf7ae7ee3" - integrity sha512-WfDZfDDuX9lAyvCvxLwTeszQNd59Ztnyxx6zjRvzF6zHMD4g5swb3Jv6jy0Jwic0nl4+04IEhpBM4Cl5kQuAvA== +"@formkit/rules@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@formkit/rules/-/rules-1.3.0.tgz#0d947270b2883ebebe187478300d73e144ebbe62" + integrity sha512-dWMLnSRK5+ffRkLIWGDojM7eXT6rheI41lVWukcJXhr5avG4AMih0tCLjhLJkVrLERRbnkAD403FGg8JVzPMtw== dependencies: - "@formkit/core" "1.2.2" - "@formkit/utils" "1.2.2" - "@formkit/validation" "1.2.2" + "@formkit/core" "1.3.0" + "@formkit/utils" "1.3.0" + "@formkit/validation" "1.3.0" -"@formkit/themes@1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@formkit/themes/-/themes-1.2.2.tgz#9a4e7f6a6c9efbddc035cd8ea72a377f276dcb22" - integrity sha512-YxNmReXkvuF9OP6wAHVyJvTZ+hd+zRfOyTjie75fQ1EkWCjcn2jk+DCY4U+IkgOnq6A/vcKjP5vyuQqsglUgAA== +"@formkit/themes@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@formkit/themes/-/themes-1.3.0.tgz#d127e38b6cedb547483ae665b2bddf133b80d682" + integrity sha512-y9YRhCjYbsgs1piuGaZYgcbXtcsfZqvdeMVM2vypppNdFskx1dhFdaXNDLZf1K2HL6vvx8cJ3AAxay35SAZmtQ== dependencies: - "@formkit/core" "1.2.2" + "@formkit/core" "1.3.0" -"@formkit/utils@1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@formkit/utils/-/utils-1.2.2.tgz#67687119ec747077890b399541058388cd5f3098" - integrity sha512-4EGm4nfZGSJik0QRAEybxO52F3QhbOfX/KgtWfB3/dDUEOCx5RWDxIs/CU2yI4bceDl2aK8l/yDYwCYK9SO5MA== +"@formkit/utils@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@formkit/utils/-/utils-1.3.0.tgz#2f61f5a7137da8ceeb26b4a06f2565a57df6610b" + integrity sha512-0r6/7q40FqHj7800xCVqLvcssGxXDPzgSXrSTRH6XV9tZcycZDvF5Wy+8sJtK6ZgjgOWB2gg86x+8WlZvYv7lg== -"@formkit/validation@1.2.2", "@formkit/validation@^1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@formkit/validation/-/validation-1.2.2.tgz#e9c2a07ae0e76c14a1b276b30d61bbf62a41ede7" - integrity sha512-jUfEjh3HAWlPmcuI+c7ullWKbm3oIRlQvbqN1r2GDqMWWLZ47+k6PVELV/eU7gxrF0mpQcQY5r8zvA1IFocCGA== +"@formkit/validation@1.3.0", "@formkit/validation@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@formkit/validation/-/validation-1.3.0.tgz#07082b1337d707768aed1d904a5db287109f74ca" + integrity sha512-U3R1HbF7BEvTlzZxQhNu14Q8DEh9WT9QazSuq9qJNFibB9TmWDy7OT7u5CD69ZrQFedg6NCJU3DRgS9IKuYyiQ== dependencies: - "@formkit/core" "1.2.2" - "@formkit/observer" "1.2.2" - "@formkit/utils" "1.2.2" + "@formkit/core" "1.3.0" + "@formkit/observer" "1.3.0" + "@formkit/utils" "1.3.0" -"@formkit/vue@^1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@formkit/vue/-/vue-1.2.2.tgz#be4ba201307e7d4e7e68dffa554031f3307cb720" - integrity sha512-UH7CrEfsj1otO+EMgLYFWsLp1A8s3GYiRik3YPII6sVuImXYuLCtz++oT3JrnM5hmUJWmEjxZoi5gRYJzxa0ow== - dependencies: - "@formkit/core" "1.2.2" - "@formkit/dev" "1.2.2" - "@formkit/i18n" "1.2.2" - "@formkit/inputs" "1.2.2" - "@formkit/observer" "1.2.2" - "@formkit/rules" "1.2.2" - "@formkit/themes" "1.2.2" - "@formkit/utils" "1.2.2" - "@formkit/validation" "1.2.2" +"@formkit/vue@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@formkit/vue/-/vue-1.3.0.tgz#1da79d87fc729dd1f4eb6cd9738d8fb7745224fb" + integrity sha512-4MM5qhFlOktJWta7cTG2H+PI8Z8Fm2YH+R3tcPnNEXM+KLLig5Xiy99Aaf3Xef5lR/ZXQdoSCJyT3OUd6V4eTA== + dependencies: + "@formkit/core" "1.3.0" + "@formkit/dev" "1.3.0" + "@formkit/i18n" "1.3.0" + "@formkit/inputs" "1.3.0" + "@formkit/observer" "1.3.0" + "@formkit/rules" "1.3.0" + "@formkit/themes" "1.3.0" + "@formkit/utils" "1.3.0" + "@formkit/validation" "1.3.0" vue "^3.3.4" "@fortawesome/fontawesome-common-types@6.4.2": @@ -1673,10 +1689,10 @@ "@tiptap/extension-bubble-menu" "^2.1.12" "@tiptap/extension-floating-menu" "^2.1.12" -"@trivago/prettier-plugin-sort-imports@^4.2.1": - version "4.2.1" - resolved "https://registry.yarnpkg.com/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.2.1.tgz#a4f57df41a46803a75bd8e8ce371b29e78a27eb4" - integrity sha512-iuy2MPVURGdxILTchHr15VAioItuYBejKfcTmQFlxIuqA7jeaT6ngr5aUIG6S6U096d6a6lJCgaOwlRrPLlOPg== +"@trivago/prettier-plugin-sort-imports@^4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz#725f411646b3942193a37041c84e0b2116339789" + integrity sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ== dependencies: "@babel/generator" "7.17.7" "@babel/parser" "^7.20.5" @@ -1750,10 +1766,10 @@ resolved "https://registry.yarnpkg.com/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz#1c3df624bfc4b62f992d3012b84c56d41eab3776" integrity sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ== -"@types/web-bluetooth@^0.0.18": - version "0.0.18" - resolved "https://registry.yarnpkg.com/@types/web-bluetooth/-/web-bluetooth-0.0.18.tgz#74bd1c8fd3a2058cb6fc76b188fcded50a83d866" - integrity sha512-v/ZHEj9xh82usl8LMR3GarzFY1IrbXJw5L4QfQhokjRV91q+SelFqxQWSep1ucXEZ22+dSTwLFkXeur25sPIbw== +"@types/web-bluetooth@^0.0.20": + version "0.0.20" + resolved "https://registry.yarnpkg.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz#f066abfcd1cbe66267cdbbf0de010d8a41b41597" + integrity sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow== "@types/ws@^8.0.0": version "8.5.9" @@ -1900,10 +1916,10 @@ "@urql/core" "^4.0.0" wonka "^6.3.2" -"@vitejs/plugin-vue@^4.4.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-4.4.0.tgz#8ae96573236cdb12de6850a6d929b5537ec85390" - integrity sha512-xdguqb+VUwiRpSg+nsc2HtbAUSGak25DXYvpQQi4RVU1Xq1uworyoH/md9Rfd8zMmPR/pSghr309QNcftUVseg== +"@vitejs/plugin-vue@^4.4.1": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-4.4.1.tgz#5050895fb8b2258d2f228110849df4a8a94b9038" + integrity sha512-HCQG8VDFDM7YDAdcj5QI5DvUi+r6xvo9LgvYdk7LSkUNwdpempdB5horkMSZsbdey9Ywsf5aaU8kEPw9M5kREA== "@volar/language-core@1.10.10", "@volar/language-core@~1.10.5": version "1.10.10" @@ -2053,25 +2069,25 @@ resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.3.8.tgz#f044942142e1d3a395f24132e6203a784838542d" integrity sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw== -"@vueuse/core@^10.5.0": - version "10.5.0" - resolved "https://registry.yarnpkg.com/@vueuse/core/-/core-10.5.0.tgz#04d1e6d26592bb997bb755a4830ea7583c3e8612" - integrity sha512-z/tI2eSvxwLRjOhDm0h/SXAjNm8N5ld6/SC/JQs6o6kpJ6Ya50LnEL8g5hoYu005i28L0zqB5L5yAl8Jl26K3A== +"@vueuse/core@^10.6.0": + version "10.6.0" + resolved "https://registry.yarnpkg.com/@vueuse/core/-/core-10.6.0.tgz#de4113cc63680d04a0c3e1e156992ca3e0d52115" + integrity sha512-+Yee+g9+9BEbvkyGdn4Bf4yZx9EfocAytpV2ZlrlP7xcz+qznLmZIDqDroTvc5vtMkWZicisgEv8dt3+jL+HQg== dependencies: - "@types/web-bluetooth" "^0.0.18" - "@vueuse/metadata" "10.5.0" - "@vueuse/shared" "10.5.0" + "@types/web-bluetooth" "^0.0.20" + "@vueuse/metadata" "10.6.0" + "@vueuse/shared" "10.6.0" vue-demi ">=0.14.6" -"@vueuse/metadata@10.5.0": - version "10.5.0" - resolved "https://registry.yarnpkg.com/@vueuse/metadata/-/metadata-10.5.0.tgz#7501a88cf5cbf7a515a03f0b8bbe3cecf30cad11" - integrity sha512-fEbElR+MaIYyCkeM0SzWkdoMtOpIwO72x8WsZHRE7IggiOlILttqttM69AS13nrDxosnDBYdyy3C5mR1LCxHsw== +"@vueuse/metadata@10.6.0": + version "10.6.0" + resolved "https://registry.yarnpkg.com/@vueuse/metadata/-/metadata-10.6.0.tgz#f652829668ba4146ab0f79d52ea26b5544f12fe8" + integrity sha512-mzKHkHoiK6xVz01VzQjM2l6ofUanEaofgEGPgDHcAzlvOTccPRTIdEuzneOUTYxgfm1vkDikS6rtrEw/NYlaTQ== -"@vueuse/shared@10.5.0": - version "10.5.0" - resolved "https://registry.yarnpkg.com/@vueuse/shared/-/shared-10.5.0.tgz#b3ac8c190a5dae41db5e1b60fe304a9b4247393c" - integrity sha512-18iyxbbHYLst9MqU1X1QNdMHIjks6wC7XTVf0KNOv5es/Ms6gjVFCAAWTVP2JStuGqydg3DT+ExpFORUEi9yhg== +"@vueuse/shared@10.6.0": + version "10.6.0" + resolved "https://registry.yarnpkg.com/@vueuse/shared/-/shared-10.6.0.tgz#e13f3b0f642db6467bd8aadf9693409f33f45fc4" + integrity sha512-0t4MVE18sO+/4Gh0jfeOXBTjKeV4606N9kIrDOLPjFl8Rwnlodn+QC5A4LfJuysK7aOsTMjF3KnzNeueaI0xlQ== dependencies: vue-demi ">=0.14.6" @@ -2778,9 +2794,9 @@ dset@^3.1.2: integrity sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ== electron-to-chromium@^1.4.535: - version "1.4.578" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.578.tgz#7a3510f333bcd55e87882799ebeb7518d6ab4d95" - integrity sha512-V0ZhSu1BQZKfG0yNEL6Dadzik8E1vAzfpVOapdSiT9F6yapEJ3Bk+4tZ4SMPdWiUchCgnM/ByYtBzp5ntzDMIA== + version "1.4.581" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.581.tgz#23b684c67bf56d4284e95598c05a5d266653b6d8" + integrity sha512-6uhqWBIapTJUxgPTCHH9sqdbxIMPt7oXl0VcAL1kOtlU6aECdcMncCrX5Z7sHQ/invtrC9jUQUef7+HhO8vVFw== emoji-regex@^8.0.0: version "8.0.0" @@ -4421,9 +4437,9 @@ prosemirror-transform@^1.0.0, prosemirror-transform@^1.1.0, prosemirror-transfor prosemirror-model "^1.0.0" prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3, prosemirror-view@^1.27.0, prosemirror-view@^1.28.2, prosemirror-view@^1.31.0: - version "1.32.3" - resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.32.3.tgz#9019151211f685e553f681837435cae4885beece" - integrity sha512-tP7AUTxisM0m3PDxs6vDWgTjgcbFo4fnwg2M/5NHlgMqUJgBNOqSUZETBZKmLD7AxGN3GZ5yqEzQv9r9VCZKrg== + version "1.32.4" + resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.32.4.tgz#c8f24bab3bcc8b57bcfb62490fc468180559f51b" + integrity sha512-WoT+ZYePp0WQvp5coABAysheZg9WttW3TSEUNgsfDQXmVOJlnjkbFbXicKPvWFLiC0ZjKt1ykbyoVKqhVnCiSQ== dependencies: prosemirror-model "^1.16.0" prosemirror-state "^1.0.0" diff --git a/kitsune-job-runner/Cargo.toml b/kitsune-job-runner/Cargo.toml index f5364c5ae..386d0ee71 100644 --- a/kitsune-job-runner/Cargo.toml +++ b/kitsune-job-runner/Cargo.toml @@ -14,7 +14,7 @@ kitsune-db = { path = "../crates/kitsune-db" } kitsune-observability = { path = "../crates/kitsune-observability" } kitsune-retry-policies = { path = "../crates/kitsune-retry-policies" } mimalloc = "0.1.39" -tokio = { version = "1.33.0", features = ["full"] } +tokio = { version = "1.34.0", features = ["full"] } toml = "0.8.8" tracing = "0.1.40" diff --git a/kitsune/Cargo.toml b/kitsune/Cargo.toml index 9dd47b344..c1fc3cb18 100644 --- a/kitsune/Cargo.toml +++ b/kitsune/Cargo.toml @@ -32,7 +32,7 @@ diesel-async = "0.4.1" eyre = "0.6.8" futures-util = "0.3.29" headers = "0.3.9" -http = "0.2.9" +http = "0.2.10" human-panic = "1.2.2" hyper = { version = "0.14.27", features = ["deprecated"] } iso8601-timestamp = "0.2.12" @@ -67,7 +67,7 @@ strum = { version = "0.25.0", features = ["derive", "phf"] } tempfile = "3.8.1" thiserror = "1.0.50" time = "0.3.30" -tokio = { version = "1.33.0", features = ["full"] } +tokio = { version = "1.34.0", features = ["full"] } tokio-util = { version = "0.7.10", features = ["compat"] } tower-x-clacks-overhead = { path = "../lib/tower-x-clacks-overhead" } tower-http = { version = "0.4.4", features = [ @@ -100,6 +100,8 @@ async-graphql-axum = { version = "6.0.10", optional = true } kitsune-oidc = { path = "../crates/kitsune-oidc", optional = true } [dev-dependencies] +deadpool-redis = "0.13.0" +kitsune-http-client = { path = "../crates/kitsune-http-client" } kitsune-test = { path = "../crates/kitsune-test" } pretty_assertions = "1.4.0" serial_test = "2.0.0" diff --git a/kitsune/src/http/handler/well_known/webfinger.rs b/kitsune/src/http/handler/well_known/webfinger.rs index c0afee050..b6d48266a 100644 --- a/kitsune/src/http/handler/well_known/webfinger.rs +++ b/kitsune/src/http/handler/well_known/webfinger.rs @@ -4,13 +4,12 @@ use axum::{ routing, Json, Router, }; use axum_extra::either::Either; -use diesel::{BoolExpressionMethods, ExpressionMethods, QueryDsl, SelectableHelper}; -use diesel_async::RunQueryDsl; use http::StatusCode; -use kitsune_core::service::url::UrlService; -use kitsune_db::{model::account::Account, schema::accounts, PgPool}; +use kitsune_core::service::{ + account::{AccountService, GetUser}, + url::UrlService, +}; use kitsune_type::webfinger::{Link, Resource}; -use scoped_futures::ScopedFutureExt; use serde::Deserialize; use utoipa::IntoParams; @@ -29,7 +28,7 @@ struct WebfingerQuery { ) )] async fn get( - State(db_pool): State, + State(account_service): State, State(url_service): State, Query(query): Query, ) -> Result, StatusCode>> { @@ -38,30 +37,19 @@ async fn get( return Ok(Either::E2(StatusCode::BAD_REQUEST)); }; - let subject = if instance == url_service.webfinger_domain() { - query.resource.clone() - } else if instance == url_service.domain() { - // Canonicalize the domain - url_service.acct_uri(username) - } else { + let get_user = GetUser::builder().username(username).build(); + let Some(account) = account_service.get(get_user).await? else { return Ok(Either::E2(StatusCode::NOT_FOUND)); }; - - let account = db_pool - .with_connection(|db_conn| { - accounts::table - .filter( - accounts::username - .eq(username) - .and(accounts::local.eq(true)), - ) - .select(Account::as_select()) - .first::(db_conn) - .scoped() - }) - .await?; let account_url = url_service.user_url(account.id); + let subject = if instance == url_service.webfinger_domain() || instance == url_service.domain() + { + url_service.acct_uri(&account.username) + } else { + return Ok(Either::E2(StatusCode::NOT_FOUND)); + }; + Ok(Either::E1(Json(Resource { subject, aliases: vec![account_url.clone()], @@ -81,80 +69,164 @@ pub fn routes() -> Router { mod tests { use super::{get, WebfingerQuery}; use crate::error::Error; + use athena::JobQueue; use axum::{ extract::{Query, State}, Json, }; use axum_extra::either::Either; use diesel_async::{AsyncConnection, AsyncPgConnection, RunQueryDsl}; - use http::StatusCode; - use kitsune_core::service::url::UrlService; + use http::{Request, Response, StatusCode}; + use hyper::Body; + use kitsune_cache::NoopCache; + use kitsune_config::FederationFilterConfiguration; + use kitsune_core::{ + activitypub::Fetcher, + job::KitsuneContextRepo, + service::{ + account::AccountService, attachment::AttachmentService, + federation_filter::FederationFilterService, job::JobService, url::UrlService, + }, + webfinger::Webfinger, + }; use kitsune_db::{ model::account::{ActorType, NewAccount}, schema::accounts, + PgPool, }; - use kitsune_test::database_test; + use kitsune_http_client::Client; + use kitsune_search::NoopSearchService; + use kitsune_storage::fs::Storage; + use kitsune_test::{database_test, redis_test}; use kitsune_type::webfinger::Link; use scoped_futures::ScopedFutureExt; use speedy_uuid::Uuid; + use std::{convert::Infallible, sync::Arc}; + use tempfile::TempDir; + use tower::service_fn; + + async fn handle(_req: Request) -> Result, Infallible> { + Ok::<_, Infallible>(Response::new(Body::empty())) + } + + fn build_account_service( + db_pool: PgPool, + redis_pool: deadpool_redis::Pool, + url_service: UrlService, + ) -> AccountService { + let temp_dir = TempDir::new().unwrap(); + let storage = Storage::new(temp_dir.path().to_owned()); + let client = Client::builder().service(service_fn(handle)); + + let attachment_service = AttachmentService::builder() + .client(client.clone()) + .db_pool(db_pool.clone()) + .url_service(url_service.clone()) + .storage_backend(storage) + .media_proxy_enabled(false) + .build(); + + let fetcher = Fetcher::builder() + .client(client) + .db_pool(db_pool.clone()) + .embed_client(None) + .federation_filter( + FederationFilterService::new(&FederationFilterConfiguration::Deny { + domains: Vec::new(), + }) + .unwrap(), + ) + .search_backend(NoopSearchService) + .post_cache(Arc::new(NoopCache.into())) + .user_cache(Arc::new(NoopCache.into())) + .webfinger(Webfinger::new(Arc::new(NoopCache.into()))) + .build(); + + let context_repo = KitsuneContextRepo::builder() + .db_pool(db_pool.clone()) + .build(); + let job_queue = JobQueue::builder() + .context_repository(context_repo) + .queue_name("webfinger_test") + .redis_pool(redis_pool) + .build(); + + let job_service = JobService::builder().job_queue(job_queue).build(); + + AccountService::builder() + .attachment_service(attachment_service) + .db_pool(db_pool) + .fetcher(fetcher) + .job_service(job_service) + .url_service(url_service) + .webfinger(Webfinger::new(Arc::new(NoopCache.into()))) + .build() + } #[tokio::test] #[serial_test::serial] async fn basic() { - database_test(|db_pool| async move { - let account_id = db_pool - .with_connection(|db_conn| { - async move { Ok::<_, eyre::Report>(prepare_db(db_conn).await) }.scoped() - }) - .await - .unwrap(); - let account_url = format!("https://example.com/users/{account_id}"); - - let db_conn = State(db_pool); - let url_service = UrlService::builder() - .scheme("https") - .domain("example.com") - .build(); - let url_service = State(url_service); - - // Should resolve a local user - let query = WebfingerQuery { - resource: "acct:alice@example.com".into(), - }; - let response = get(db_conn.clone(), url_service.clone(), Query(query)) - .await - .unwrap(); - let resource = match response { - Either::E1(Json(resource)) => resource, - Either::E2(status) => panic!("Unexpected status code: {status}"), - }; - - assert_eq!(resource.subject, "acct:alice@example.com"); - assert_eq!(resource.aliases, [account_url.clone()]); - - let [Link { rel, r#type, href }] = <[_; 1]>::try_from(resource.links).unwrap(); - - assert_eq!(rel, "self"); - assert_eq!(r#type.unwrap(), "application/activity+json"); - assert_eq!(href.unwrap(), account_url); - - // Should respond with 404 for an unknown user - let query = WebfingerQuery { - resource: "acct:alice@example.net".into(), - }; - let response = get(db_conn.clone(), url_service.clone(), Query(query)) - .await - .unwrap(); - - assert!(matches!(response, Either::E2(StatusCode::NOT_FOUND))); - - // Should not resolve a remote account - let query = WebfingerQuery { - resource: "acct:bob@example.net".into(), - }; - let response = get(db_conn, url_service, Query(query)).await.unwrap(); - - assert!(matches!(response, Either::E2(StatusCode::NOT_FOUND))); + database_test(|db_pool| { + redis_test(|redis_pool| async move { + let account_id = db_pool + .with_connection(|db_conn| { + async move { Ok::<_, eyre::Report>(prepare_db(db_conn).await) }.scoped() + }) + .await + .unwrap(); + let account_url = format!("https://example.com/users/{account_id}"); + + let url_service = UrlService::builder() + .scheme("https") + .domain("example.com") + .build(); + let account_service = + build_account_service(db_pool, redis_pool, url_service.clone()); + + let account_service = State(account_service); + let url_service = State(url_service); + + // Should resolve a local user + let query = WebfingerQuery { + resource: "acct:alice@example.com".into(), + }; + let response = get(account_service.clone(), url_service.clone(), Query(query)) + .await + .unwrap(); + let resource = match response { + Either::E1(Json(resource)) => resource, + Either::E2(status) => panic!("Unexpected status code: {status}"), + }; + + assert_eq!(resource.subject, "acct:alice@example.com"); + assert_eq!(resource.aliases, [account_url.clone()]); + + let [Link { rel, r#type, href }] = <[_; 1]>::try_from(resource.links).unwrap(); + + assert_eq!(rel, "self"); + assert_eq!(r#type.unwrap(), "application/activity+json"); + assert_eq!(href.unwrap(), account_url); + + // Should respond with 404 for an unknown user + let query = WebfingerQuery { + resource: "acct:alice@example.net".into(), + }; + let response = get(account_service.clone(), url_service.clone(), Query(query)) + .await + .unwrap(); + + assert!(matches!(response, Either::E2(StatusCode::NOT_FOUND))); + + // Should not resolve a remote account + let query = WebfingerQuery { + resource: "acct:bob@example.net".into(), + }; + let response = get(account_service, url_service, Query(query)) + .await + .unwrap(); + + assert!(matches!(response, Either::E2(StatusCode::NOT_FOUND))); + }) }) .await; } @@ -162,51 +234,58 @@ mod tests { #[tokio::test] #[serial_test::serial] async fn custom_domain() { - database_test(|db_pool| async move { - db_pool - .with_connection(|db_conn| { - async move { - prepare_db(db_conn).await; - Ok::<_, eyre::Report>(()) - } - .scoped() - }) - .await - .unwrap(); - - let db_pool = State(db_pool); - let url_service = UrlService::builder() - .scheme("https") - .domain("example.com") - .webfinger_domain(Some("alice.example".into())) - .build(); - let url_service = State(url_service); - - // Should canonicalize the domain - let query = WebfingerQuery { - resource: "acct:alice@example.com".into(), - }; - let response = get(db_pool.clone(), url_service.clone(), Query(query)) - .await - .unwrap(); - let resource = match response { - Either::E1(Json(resource)) => resource, - Either::E2(status) => panic!("Unexpected status code: {status}"), - }; - - assert_eq!(resource.subject, "acct:alice@alice.example"); - - // Should return the canonical domain as-is - let query = WebfingerQuery { - resource: "acct:alice@alice.example".into(), - }; - let response = get(db_pool, url_service, Query(query)).await.unwrap(); - let resource = match response { - Either::E1(Json(resource)) => resource, - Either::E2(status) => panic!("Unexpected status code: {status}"), - }; - - assert_eq!(resource.subject, "acct:alice@alice.example"); + database_test(|db_pool| { + redis_test(|redis_pool| async move { + db_pool + .with_connection(|db_conn| { + async move { + prepare_db(db_conn).await; + Ok::<_, eyre::Report>(()) + } + .scoped() + }) + .await + .unwrap(); + + let url_service = UrlService::builder() + .scheme("https") + .domain("example.com") + .webfinger_domain(Some("alice.example".into())) + .build(); + let account_service = + build_account_service(db_pool, redis_pool, url_service.clone()); + + let account_service = State(account_service); + let url_service = State(url_service); + + // Should canonicalize the domain + let query = WebfingerQuery { + resource: "acct:alice@example.com".into(), + }; + let response = get(account_service.clone(), url_service.clone(), Query(query)) + .await + .unwrap(); + let resource = match response { + Either::E1(Json(resource)) => resource, + Either::E2(status) => panic!("Unexpected status code: {status}"), + }; + + assert_eq!(resource.subject, "acct:alice@alice.example"); + + // Should return the canonical domain as-is + let query = WebfingerQuery { + resource: "acct:alice@alice.example".into(), + }; + let response = get(account_service, url_service, Query(query)) + .await + .unwrap(); + let resource = match response { + Either::E1(Json(resource)) => resource, + Either::E2(status) => panic!("Unexpected status code: {status}"), + }; + + assert_eq!(resource.subject, "acct:alice@alice.example"); + }) }) .await; } diff --git a/lib/athena/Cargo.toml b/lib/athena/Cargo.toml index 3b7dd53b9..c20b90a12 100644 --- a/lib/athena/Cargo.toml +++ b/lib/athena/Cargo.toml @@ -26,7 +26,7 @@ simd-json = "0.13.4" smol_str = "0.2.0" speedy-uuid = { path = "../speedy-uuid", features = ["redis", "serde"] } thiserror = "1.0.50" -tokio = { version = "1.33.0", features = ["macros", "rt", "sync"] } +tokio = { version = "1.34.0", features = ["macros", "rt", "sync"] } tracing = "0.1.40" typed-builder = "0.18.0" diff --git a/lib/tower-x-clacks-overhead/Cargo.toml b/lib/tower-x-clacks-overhead/Cargo.toml index 0b78b10a1..699d07bff 100644 --- a/lib/tower-x-clacks-overhead/Cargo.toml +++ b/lib/tower-x-clacks-overhead/Cargo.toml @@ -4,7 +4,7 @@ edition.workspace = true version.workspace = true [dependencies] -http = "0.2.9" +http = "0.2.10" pin-project-lite = "0.2.13" tower-layer = "0.3.2" tower-service = "0.3.2"