From 23d84b25be32240c9f956807ae6a92a30fd953c8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2024 12:45:23 +0200 Subject: [PATCH] fix(deps): update rust crate ssr_rs to 0.7.0 (#35) * fix(deps): update rust crate ssr_rs to 0.7.0 * chore: update ssr error --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Valerio Ageno --- crates/tuono_lib/Cargo.toml | 2 +- crates/tuono_lib/src/ssr.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/tuono_lib/Cargo.toml b/crates/tuono_lib/Cargo.toml index cff06cb3..c9a216d9 100644 --- a/crates/tuono_lib/Cargo.toml +++ b/crates/tuono_lib/Cargo.toml @@ -19,7 +19,7 @@ name = "tuono_lib" path = "src/lib.rs" [dependencies] -ssr_rs = "0.5.5" +ssr_rs = "0.7.0" axum = {version = "0.7.5", features = ["json", "ws"]} tokio = { version = "1.37.0", features = ["full"] } serde = { version = "1.0.202", features = ["derive"] } diff --git a/crates/tuono_lib/src/ssr.rs b/crates/tuono_lib/src/ssr.rs index 89910b73..2c89ff97 100644 --- a/crates/tuono_lib/src/ssr.rs +++ b/crates/tuono_lib/src/ssr.rs @@ -1,5 +1,5 @@ use crate::mode::{Mode, GLOBAL_MODE}; -use ssr_rs::Ssr; +use ssr_rs::{Ssr, SsrError}; use std::cell::RefCell; use std::fs::read_to_string; use std::path::PathBuf; @@ -10,7 +10,7 @@ use std::path::PathBuf; pub struct Js; impl Js { - pub fn render_to_string(payload: Option<&str>) -> Result { + pub fn render_to_string(payload: Option<&str>) -> Result { let mode = GLOBAL_MODE.get().expect("Failed to get GLOBAL_MODE"); if *mode == Mode::Dev { @@ -36,7 +36,7 @@ impl ProdJs { struct DevJs; impl DevJs { - pub fn render_to_string(params: Option<&str>) -> Result { + pub fn render_to_string(params: Option<&str>) -> Result { Ssr::from( read_to_string(PathBuf::from("./.tuono/server/dev-server.js")) .expect("Server bundle not found"),