-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
80 additions
and
61 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]>"] | ||
|
@@ -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", | ||
] } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]>"] | ||
|
@@ -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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]>" ] | ||
authors = ["Paul Makles <[email protected]>"] | ||
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 } | ||
schemars = { version = "0.8.8", optional = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]>" ] | ||
authors = ["Paul Makles <[email protected]>"] | ||
description = "Revolt Backend: User Presence" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]>" ] | ||
authors = ["Paul Makles <[email protected]>"] | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]>"] | ||
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<sentry::ClientInitGuard> { | ||
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://[email protected]/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] | ||
|