Skip to content

Commit

Permalink
Update Backend Dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wyatt-herkamp committed Oct 23, 2023
1 parent d57f209 commit 9954195
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
21 changes: 11 additions & 10 deletions backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,22 @@ required-features = ["clap"]
actix-web = { version = "4.3", features = ["cookies"] }
actix-cors = "0.6"
actix-service = "2"
openssl = { version = "0.10", features = ["v110"], optional = true }
rustls = { version = "0.21.7" ,optional = true}
rustls-pemfile = { version = "1" ,optional = true}
actix-files = "0.6"
# Partly Web
handlebars = "4"
# Database
sea-orm = { version = "0.11", features = ["runtime-actix-native-tls", "macros"] }
sqlx = "0.6"
sea-orm = { version = "0.12.4", features = ["runtime-actix-rustls", "macros"] }
sqlx = "0.7.2"
# Serde
serde = { version = "1", features = ["derive"] }
serde_json = "1"
futures = "0.3"
toml = "0.7"
toml = "0.8.2"
# utils
rand = "0.8.5"
rust-embed = { version = "6.4.0", features = ["interpolate-folder-path"] }
rust-embed = { version = "8.0.0", features = ["interpolate-folder-path"] }
argon2 = "0.5.0"
chrono = { version = "0.4", features = ["serde"] }
regex = "1.6.0"
Expand All @@ -57,8 +58,8 @@ parking_lot = { version = "0.12", features = [] }
nitro_log = { git = "https://github.com/wyatt-herkamp/nitro_log", features = ["chrono", "style-term"] }
log = { version = "0.4.17", features = ["kv_unstable", "kv_unstable_std", "kv_unstable_serde"] }
# Rust Internal
strum = { version = "0.24", features = ["derive"] }
strum_macros = "0.24"
strum = { version = "0.25.0", features = ["derive"] }
strum_macros = "0.25.3"
async-trait = "0.1"
thiserror = "1"
# Badge Stuff
Expand All @@ -68,10 +69,10 @@ badge-maker = "0.3"
clap = { version = "4", features = ["derive"], optional = true }
semver = { version = "1", features = ["std", "serde"] }
# Cache
comrak = "0.18.0"
comrak = "0.19.0"
# Staging
tempfile = "3.3.0"
git2 = "0.17.0"
git2 = "0.18.1"
schemars = "0.8.10"
# Maven Stuff
maven-rs = { git = "https://github.com/wyatt-herkamp/maven-rs.git" }
Expand All @@ -84,7 +85,7 @@ vergen = { version = "8.1.1",features = ["build", "cargo", "git", "gitcl", "rust
[features]
# The latest Updaters will always be under default features
default = ["multi_storage", "postgres", "sqlite", "mysql"]
ssl = ["openssl", "actix-web/openssl"]
ssl = ["rustls","rustls-pemfile", "actix-web/rustls-0_21"]
mysql = ["sea-orm/sqlx-mysql"]
sqlite = ["sea-orm/sqlx-sqlite"]
postgres = ["sea-orm/sqlx-postgres"]
Expand Down
27 changes: 15 additions & 12 deletions backend/src/generators/markdown.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::error::internal_error::InternalError;
use crate::generators::GeneratorCache;
use comrak::{parse_document, Arena, ComrakExtensionOptions, ComrakOptions, ComrakRenderOptions};
use comrak::{parse_document, Arena};
use log::error;
use std::path::PathBuf;
use std::sync::Arc;
Expand All @@ -10,17 +10,20 @@ pub fn parse_to_html(
path: PathBuf,
cache: Arc<GeneratorCache>,
) -> Result<Vec<u8>, InternalError> {
let options = ComrakOptions {
render: ComrakRenderOptions::default(),
extension: ComrakExtensionOptions {
autolink: true,
strikethrough: true,
table: true,
tagfilter: true,
tasklist: true,
..ComrakExtensionOptions::default()
},
..ComrakOptions::default()
let options = comrak::ExtensionOptionsBuilder::default()
.strikethrough(true)
.table(true)
.tagfilter(true)
.tasklist(true)
.autolink(true)
.build()
.unwrap();
let render_options = comrak::RenderOptions::default();
let parse_options = comrak::ParseOptions::default();
let options = comrak::Options {
extension: options,
render: render_options,
parse: parse_options,
};
let arena = Arena::new();
let html = parse_document(&arena, markdown.as_ref(), &options);
Expand Down
7 changes: 6 additions & 1 deletion backend/src/time_fix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ impl<'de> Visitor<'de> for DateTimeVisitor {
E: Error,
{
Ok(NaiveDateTime::from_timestamp_millis(v)
.map(|v| DateTime::<FixedOffset>::from_utc(v, FixedOffset::east_opt(0).unwrap()))
.map(|v| {
DateTime::<FixedOffset>::from_naive_utc_and_offset(
v,
FixedOffset::east_opt(0).unwrap(),
)
})
.unwrap_or_default())
}
#[inline]
Expand Down

0 comments on commit 9954195

Please sign in to comment.