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"),