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 <valerioageno@yahoo.it>
This commit is contained in:
renovate[bot]
2024-10-12 12:45:23 +02:00
committed by GitHub
parent 6c7cc62371
commit 23d84b25be
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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"] }
+3 -3
View File
@@ -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<String, &'static str> {
pub fn render_to_string(payload: Option<&str>) -> Result<String, SsrError> {
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<String, &'static str> {
pub fn render_to_string(params: Option<&str>) -> Result<String, SsrError> {
Ssr::from(
read_to_string(PathBuf::from("./.tuono/server/dev-server.js"))
.expect("Server bundle not found"),