diff --git a/Cargo.lock b/Cargo.lock index 9d23d0565..9a91f0476 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2858,7 +2858,7 @@ dependencies = [ [[package]] name = "revolt-bonfire" -version = "0.6.5" +version = "0.6.6" dependencies = [ "async-std", "async-tungstenite", @@ -2875,7 +2875,7 @@ dependencies = [ [[package]] name = "revolt-database" -version = "0.6.5" +version = "0.6.6" dependencies = [ "async-recursion", "async-std", @@ -2907,7 +2907,7 @@ dependencies = [ [[package]] name = "revolt-delta" -version = "0.6.5" +version = "0.6.6" dependencies = [ "async-channel", "async-std", @@ -2948,7 +2948,7 @@ dependencies = [ [[package]] name = "revolt-models" -version = "0.6.5" +version = "0.6.6" dependencies = [ "indexmap", "iso8601-timestamp 0.2.11", @@ -2961,7 +2961,7 @@ dependencies = [ [[package]] name = "revolt-permissions" -version = "0.6.5" +version = "0.6.6" dependencies = [ "async-std", "async-trait", @@ -2975,7 +2975,7 @@ dependencies = [ [[package]] name = "revolt-presence" -version = "0.6.5" +version = "0.6.6" dependencies = [ "async-std", "log", @@ -2986,7 +2986,7 @@ dependencies = [ [[package]] name = "revolt-quark" -version = "0.6.5" +version = "0.6.6" dependencies = [ "async-lock", "async-recursion", @@ -3039,7 +3039,7 @@ dependencies = [ [[package]] name = "revolt-result" -version = "0.6.5" +version = "0.6.6" dependencies = [ "revolt_okapi", "revolt_rocket_okapi", diff --git a/crates/bonfire/Cargo.toml b/crates/bonfire/Cargo.toml index baff48b83..f787b9794 100644 --- a/crates/bonfire/Cargo.toml +++ b/crates/bonfire/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "revolt-bonfire" -version = "0.6.5" +version = "0.6.6" license = "AGPL-3.0-or-later" edition = "2021" @@ -25,7 +25,11 @@ serde = "1.0.136" # async futures = "0.3.21" async-tungstenite = { version = "0.17.0", features = ["async-std-runtime"] } -async-std = { version = "1.8.0", features = ["tokio1", "tokio02", "attributes"] } +async-std = { version = "1.8.0", features = [ + "tokio1", + "tokio02", + "attributes", +] } # core -revolt-presence = { path = "../core/presence", features = [ "redis-is-patched" ] } +revolt-presence = { path = "../core/presence", features = ["redis-is-patched"] } diff --git a/crates/core/database/Cargo.toml b/crates/core/database/Cargo.toml index f4880144f..0546d1bb9 100644 --- a/crates/core/database/Cargo.toml +++ b/crates/core/database/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "revolt-database" -version = "0.6.5" +version = "0.6.6" edition = "2021" license = "AGPL-3.0-or-later" authors = ["Paul Makles "] @@ -22,10 +22,10 @@ default = ["mongodb", "async-std-runtime"] [dependencies] # Core -revolt-result = { version = "0.6.5", path = "../result" } -revolt-models = { version = "0.6.5", path = "../models" } -revolt-presence = { version = "0.6.5", path = "../presence" } -revolt-permissions = { version = "0.6.5", path = "../permissions", features = [ +revolt-result = { version = "0.6.6", path = "../result" } +revolt-models = { version = "0.6.6", path = "../models" } +revolt-presence = { version = "0.6.6", path = "../presence" } +revolt-permissions = { version = "0.6.6", path = "../permissions", features = [ "serde", "bson", ] } diff --git a/crates/core/models/Cargo.toml b/crates/core/models/Cargo.toml index 992f524f1..113e29bba 100644 --- a/crates/core/models/Cargo.toml +++ b/crates/core/models/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "revolt-models" -version = "0.6.5" +version = "0.6.6" edition = "2021" license = "AGPL-3.0-or-later" authors = ["Paul Makles "] @@ -18,7 +18,7 @@ default = ["serde", "partials"] [dependencies] # Core -revolt-permissions = { version = "0.6.5", path = "../permissions" } +revolt-permissions = { version = "0.6.6", path = "../permissions" } # Serialisation indexmap = "1.9.3" diff --git a/crates/core/permissions/Cargo.toml b/crates/core/permissions/Cargo.toml index 637fb0528..4fa89fedc 100644 --- a/crates/core/permissions/Cargo.toml +++ b/crates/core/permissions/Cargo.toml @@ -1,18 +1,18 @@ [package] name = "revolt-permissions" -version = "0.6.5" +version = "0.6.6" edition = "2021" license = "AGPL-3.0-or-later" -authors = [ "Paul Makles " ] +authors = ["Paul Makles "] description = "Revolt Backend: Permission Logic" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] bson = ["dep:bson"] -serde = [ "dep:serde" ] -schemas = [ "dep:schemars" ] -try-from-primitive = [ "dep:num_enum" ] +serde = ["dep:serde"] +schemas = ["dep:schemars"] +try-from-primitive = ["dep:num_enum"] [dev-dependencies] @@ -30,7 +30,7 @@ async-trait = "0.1.51" # Serialisation serde = { version = "1", features = ["derive"], optional = true } -bson = { version = "2.1.0", optional = true} +bson = { version = "2.1.0", optional = true } # Spec Generation -schemars = { version = "0.8.8", optional = true } \ No newline at end of file +schemars = { version = "0.8.8", optional = true } diff --git a/crates/core/presence/Cargo.toml b/crates/core/presence/Cargo.toml index a85425c26..67bc9f05d 100644 --- a/crates/core/presence/Cargo.toml +++ b/crates/core/presence/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "revolt-presence" -version = "0.6.5" +version = "0.6.6" edition = "2021" license = "AGPL-3.0-or-later" -authors = [ "Paul Makles " ] +authors = ["Paul Makles "] description = "Revolt Backend: User Presence" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/core/result/Cargo.toml b/crates/core/result/Cargo.toml index cf99e30e0..9907aad34 100644 --- a/crates/core/result/Cargo.toml +++ b/crates/core/result/Cargo.toml @@ -1,20 +1,20 @@ [package] name = "revolt-result" -version = "0.6.5" +version = "0.6.6" edition = "2021" license = "AGPL-3.0-or-later" -authors = [ "Paul Makles " ] +authors = ["Paul Makles "] description = "Revolt Backend: Result and Error types" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -serde = [ "dep:serde" ] -schemas = [ "dep:schemars" ] -rocket = [ "dep:rocket", "dep:serde_json" ] -okapi = [ "dep:revolt_rocket_okapi", "dep:revolt_okapi" ] +serde = ["dep:serde"] +schemas = ["dep:schemars"] +rocket = ["dep:rocket", "dep:serde_json"] +okapi = ["dep:revolt_rocket_okapi", "dep:revolt_okapi"] -default = [ "serde" ] +default = ["serde"] [dependencies] # Serialisation diff --git a/crates/delta/Cargo.toml b/crates/delta/Cargo.toml index 668cba53e..e7466efa2 100644 --- a/crates/delta/Cargo.toml +++ b/crates/delta/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "revolt-delta" -version = "0.6.5" +version = "0.6.6" license = "AGPL-3.0-or-later" authors = ["Paul Makles "] edition = "2018" @@ -38,29 +38,38 @@ futures = "0.3.8" chrono = "0.4.15" async-channel = "1.6.1" reqwest = { version = "0.11.4", features = ["json"] } -async-std = { version = "1.8.0", features = ["tokio1", "tokio02", "attributes"] } +async-std = { version = "1.8.0", features = [ + "tokio1", + "tokio02", + "attributes", +] } # internal util lettre = "0.10.0-alpha.4" # web -rocket = { version = "0.5.0-rc.2", default-features = false, features = ["json"] } +rocket = { version = "0.5.0-rc.2", default-features = false, features = [ + "json", +] } rocket_empty = { version = "0.1.1", features = ["schema"] } rocket_authifier = { version = "1.0.7" } rocket_prometheus = "0.10.0-rc.3" # spec generation schemars = "0.8.8" -revolt_rocket_okapi = { version = "0.9.1", features = [ "swagger" ] } +revolt_rocket_okapi = { version = "0.9.1", features = ["swagger"] } # quark revolt-quark = { path = "../quark" } # core -revolt-database = { path = "../core/database", features = [ "rocket-impl", "redis-is-patched" ] } -revolt-models = { path = "../core/models", features = [ "schemas", "validator" ] } -revolt-result = { path = "../core/result", features = [ "rocket", "okapi" ] } -revolt-permissions = { path = "../core/permissions", features = [ "schemas" ] } +revolt-database = { path = "../core/database", features = [ + "rocket-impl", + "redis-is-patched", +] } +revolt-models = { path = "../core/models", features = ["schemas", "validator"] } +revolt-result = { path = "../core/result", features = ["rocket", "okapi"] } +revolt-permissions = { path = "../core/permissions", features = ["schemas"] } [build-dependencies] vergen = "7.5.0" diff --git a/crates/quark/Cargo.toml b/crates/quark/Cargo.toml index 3efde8e6b..c9fbc49c8 100644 --- a/crates/quark/Cargo.toml +++ b/crates/quark/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "revolt-quark" -version = "0.6.5" +version = "0.6.6" edition = "2021" license = "AGPL-3.0-or-later" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -mongo = [ "mongodb" ] +mongo = ["mongodb"] rocket_impl = [ "rocket", "rocket_empty", @@ -18,11 +18,11 @@ rocket_impl = [ "authifier/database-mongodb", "authifier/rocket_impl", - "authifier/okapi_impl" + "authifier/okapi_impl", ] -test = [ "async-std", "mongo", "mongodb/async-std-runtime", "rocket_impl" ] -default = [ "test" ] +test = ["async-std", "mongo", "mongodb/async-std-runtime", "rocket_impl"] +default = ["test"] [dependencies] # Serialisation @@ -39,7 +39,7 @@ bson = { version = "2.1.0", features = ["chrono-0_4"] } # Spec Generation schemars = "0.8.8" revolt_okapi = "0.9.1" -revolt_rocket_okapi = { version = "0.9.1", features = [ "swagger" ] } +revolt_rocket_okapi = { version = "0.9.1", features = ["swagger"] } # Databases redis-kiss = { version = "0.1.4" } @@ -81,18 +81,20 @@ web-push = "0.7.2" # Implementations rocket_http = { optional = true, version = "0.5.0-rc.2" } -rocket = { optional = true, version = "0.5.0-rc.2", default-features = false, features = ["json"] } -rocket_empty = { version = "0.1.1", optional = true, features = [ "schema" ] } +rocket = { optional = true, version = "0.5.0-rc.2", default-features = false, features = [ + "json", +] } +rocket_empty = { version = "0.1.1", optional = true, features = ["schema"] } rocket_cors = { optional = true, git = "https://github.com/lawliet89/rocket_cors", rev = "c17e8145baa4790319fdb6a473e465b960f55e7c" } # Authifier -authifier = { version = "1.0.7", features = [ "async-std-runtime" ] } +authifier = { version = "1.0.7", features = ["async-std-runtime"] } # Sentry sentry = "0.25.0" # Core -revolt-result = { path = "../core/result", features = [ "serde", "schemas" ] } -revolt-presence = { path = "../core/presence", features = [ "redis-is-patched" ] } +revolt-result = { path = "../core/result", features = ["serde", "schemas"] } +revolt-presence = { path = "../core/presence", features = ["redis-is-patched"] } revolt-database = { path = "../core/database" } revolt-models = { path = "../core/models" } diff --git a/crates/quark/src/util/log.rs b/crates/quark/src/util/log.rs index 04964194b..fe4866659 100644 --- a/crates/quark/src/util/log.rs +++ b/crates/quark/src/util/log.rs @@ -1,5 +1,5 @@ /// Configure logging and common Rust variables -pub fn setup_logging(release: &'static str) -> sentry::ClientInitGuard { +pub fn setup_logging(release: &'static str) -> Option { dotenv::dotenv().ok(); if std::env::var("RUST_LOG").is_err() { @@ -13,13 +13,17 @@ pub fn setup_logging(release: &'static str) -> sentry::ClientInitGuard { pretty_env_logger::init(); info!("Starting {release}"); - sentry::init(( - "https://d1d2a6f15c6245a987c532bbbcb30a04@glitchtip.insert.moe/2", - sentry::ClientOptions { - release: Some(release.into()), - ..Default::default() - }, - )) + if let Ok(dsn) = std::env::var("SENTRY_DSN") { + Some(sentry::init(( + dsn, + sentry::ClientOptions { + release: Some(release.into()), + ..Default::default() + }, + ))) + } else { + None + } } #[macro_export]