bump further

This commit is contained in:
slonkazoid 2024-12-28 18:45:52 +03:00
parent bf6a7ade5a
commit f7ac4995ef
Signed by: slonk
SSH key fingerprint: SHA256:tbZfJX4IOvZ0LGWOWu5Ijo8jfMPi78TU7x1VoEeCIjM
6 changed files with 231 additions and 476 deletions

673
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -33,25 +33,24 @@ chrono = { version = "0.4.37", features = [
"serde", "serde",
], default-features = false } ], default-features = false }
color-eyre = "0.6.3" color-eyre = "0.6.3"
comrak = { version = "0.22.0", features = [ comrak = { version = "0.32.0", features = [
"syntect", "syntect",
], default-features = false } ], default-features = false }
console-subscriber = { version = "0.2.0", optional = true } console-subscriber = { version = "0.4.1", optional = true }
derive_more = "0.99.17"
fronma = "0.2.0" fronma = "0.2.0"
futures = "0.3.31" futures = "0.3.31"
handlebars = "6.0.0" handlebars = "6.0.0"
include_dir = "0.7.4" include_dir = "0.7.4"
indexmap = { version = "2.7.0", features = ["serde"] } indexmap = { version = "2.7.0", features = ["serde"] }
mime_guess = "2.0.5" mime_guess = "2.0.5"
notify-debouncer-full = { version = "0.3.1", default-features = false } notify-debouncer-full = { version = "0.4.0", default-features = false }
rss = "2.0.7" rss = "2.0.7"
scc = { version = "2.1.0", features = ["serde"] } scc = { version = "2.1.0", features = ["serde"] }
serde = { version = "1.0.197", features = ["derive", "rc"] } serde = { version = "1.0.197", features = ["derive", "rc"] }
serde-value = "0.7.0" serde-value = "0.7.0"
serde_json = { version = "1.0.124", features = ["preserve_order"] } serde_json = { version = "1.0.124", features = ["preserve_order"] }
syntect = "5.2.0" syntect = "5.2.0"
thiserror = "1.0.58" thiserror = "2.0.9"
tokio = { version = "1.37.0", features = [ tokio = { version = "1.37.0", features = [
"fs", "fs",
"macros", "macros",
@ -61,8 +60,8 @@ tokio = { version = "1.37.0", features = [
] } ] }
tokio-util = { version = "0.7.10", default-features = false } tokio-util = { version = "0.7.10", default-features = false }
toml = "0.8.12" toml = "0.8.12"
tower = "0.4.13" tower = { version = "0.5.2", features = ["util"] }
tower-http = { version = "0.5.2", features = [ tower-http = { version = "0.6.2", features = [
"compression-gzip", "compression-gzip",
"fs", "fs",
"trace", "trace",

View file

@ -39,10 +39,7 @@ pub fn render(markdown: &str, syntect: Option<&dyn SyntaxHighlighterAdapter>) ->
let mut render_plugins = RenderPlugins::default(); let mut render_plugins = RenderPlugins::default();
render_plugins.codefence_syntax_highlighter = syntect; render_plugins.codefence_syntax_highlighter = syntect;
let plugins = comrak::PluginsBuilder::default() let plugins = comrak::Plugins::builder().render(render_plugins).build();
.render(render_plugins)
.build()
.unwrap();
markdown_to_html_with_plugins(markdown, &options, &plugins) markdown_to_html_with_plugins(markdown, &options, &plugins)
} }

View file

@ -16,7 +16,7 @@ use serde_value::Value;
use tokio::fs::OpenOptions; use tokio::fs::OpenOptions;
use tokio::io::{AsyncBufReadExt, AsyncReadExt, BufReader}; use tokio::io::{AsyncBufReadExt, AsyncReadExt, BufReader};
use tokio::time::Instant; use tokio::time::Instant;
use tracing::{debug, error, info, instrument, warn}; use tracing::{debug, error, info, instrument};
use crate::error::PostError; use crate::error::PostError;
use crate::post::Filter; use crate::post::Filter;
@ -281,8 +281,7 @@ impl PostManager for Blag {
if !dont_cache && let Some(cache) = &self.cache { if !dont_cache && let Some(cache) = &self.cache {
cache cache
.insert(name, meta.clone(), mtime, Arc::clone(&body), query_hash) .insert(name, meta.clone(), mtime, Arc::clone(&body), query_hash)
.await .await;
.unwrap_or_else(|err| warn!("failed to insert {:?} into cache", err.0));
} }
let total = start.elapsed(); let total = start.elapsed();

View file

@ -129,9 +129,8 @@ impl MarkdownPosts {
Arc::clone(&post), Arc::clone(&post),
self.render_hash, self.render_hash,
) )
.await .await;
.unwrap_or_else(|err| warn!("failed to insert {:?} into cache", err.0)) }
};
Ok((metadata, post, (parsing, rendering))) Ok((metadata, post, (parsing, rendering)))
} }

View file

@ -3,7 +3,7 @@ use std::sync::Arc;
use std::time::Duration; use std::time::Duration;
use handlebars::{Handlebars, Template}; use handlebars::{Handlebars, Template};
use notify_debouncer_full::notify::{self, Watcher}; use notify_debouncer_full::notify::{self};
use notify_debouncer_full::{new_debouncer, DebouncedEvent}; use notify_debouncer_full::{new_debouncer, DebouncedEvent};
use tokio::select; use tokio::select;
use tokio::sync::RwLock; use tokio::sync::RwLock;
@ -85,9 +85,7 @@ pub async fn watch_templates<'a>(
.expect("failed to send message over channel") .expect("failed to send message over channel")
})?; })?;
debouncer debouncer.watch(path, notify::RecursiveMode::NonRecursive)?;
.watcher()
.watch(path, notify::RecursiveMode::NonRecursive)?;
'event_loop: while let Some(events) = select! { 'event_loop: while let Some(events) = select! {
_ = watcher_token.cancelled() => { _ = watcher_token.cancelled() => {