mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
missing makefiles
This commit is contained in:
parent
2af0d3d781
commit
81fb5160e5
6 changed files with 17 additions and 2 deletions
|
@ -50,6 +50,7 @@ rkyv = { version = "0.7", features = [
|
||||||
# client
|
# client
|
||||||
gloo-net = { version = "0.5", optional = true }
|
gloo-net = { version = "0.5", optional = true }
|
||||||
js-sys = { version = "0.3", optional = true }
|
js-sys = { version = "0.3", optional = true }
|
||||||
|
wasm-bindgen = { version = "0.2", optional = true }
|
||||||
wasm-bindgen-futures = { version = "0.4", optional = true }
|
wasm-bindgen-futures = { version = "0.4", optional = true }
|
||||||
wasm-streams = { version = "0.4", optional = true }
|
wasm-streams = { version = "0.4", optional = true }
|
||||||
web-sys = { version = "0.3", optional = true, features = [
|
web-sys = { version = "0.3", optional = true, features = [
|
||||||
|
@ -79,6 +80,7 @@ browser = [
|
||||||
"dep:gloo-net",
|
"dep:gloo-net",
|
||||||
"dep:js-sys",
|
"dep:js-sys",
|
||||||
"dep:send_wrapper",
|
"dep:send_wrapper",
|
||||||
|
"dep:wasm-bindgen",
|
||||||
"dep:web-sys",
|
"dep:web-sys",
|
||||||
"dep:wasm-streams",
|
"dep:wasm-streams",
|
||||||
"dep:wasm-bindgen-futures",
|
"dep:wasm-bindgen-futures",
|
||||||
|
|
1
server_fn/Makefile.toml
Normal file
1
server_fn/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
extend = { path = "../cargo-make/main.toml" }
|
4
server_fn/server_fn_macro_default/Makfile.toml
Normal file
4
server_fn/server_fn_macro_default/Makfile.toml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
extend = { path = "../../cargo-make/main.toml" }
|
||||||
|
|
||||||
|
[tasks.check-format]
|
||||||
|
env = { LEPTOS_PROJECT_DIRECTORY = "../../" }
|
|
@ -134,7 +134,7 @@ impl<E: std::error::Error + Clone> ViaError<E> for &&WrapError<E> {
|
||||||
// we can still wrap it in String form
|
// we can still wrap it in String form
|
||||||
impl<E: Display + Clone> ViaError<E> for &WrapError<E> {
|
impl<E: Display + Clone> ViaError<E> for &WrapError<E> {
|
||||||
fn to_server_error(&self) -> ServerFnError<E> {
|
fn to_server_error(&self) -> ServerFnError<E> {
|
||||||
ServerFnError::WrappedServerError(self.0.clone())
|
ServerFnError::ServerError(self.0.to_string())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,6 +179,12 @@ pub enum ServerFnError<E = NoCustomError> {
|
||||||
MissingArg(String),
|
MissingArg(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl ServerFnError<NoCustomError> {
|
||||||
|
pub fn new(msg: impl ToString) -> Self {
|
||||||
|
Self::ServerError(msg.to_string())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<CustErr> From<CustErr> for ServerFnError<CustErr> {
|
impl<CustErr> From<CustErr> for ServerFnError<CustErr> {
|
||||||
fn from(value: CustErr) -> Self {
|
fn from(value: CustErr) -> Self {
|
||||||
ServerFnError::WrappedServerError(value)
|
ServerFnError::WrappedServerError(value)
|
||||||
|
|
|
@ -3,9 +3,10 @@ use crate::{error::ServerFnError, redirect::REDIRECT_HEADER};
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use futures::{Stream, StreamExt};
|
use futures::{Stream, StreamExt};
|
||||||
pub use gloo_net::http::Response;
|
pub use gloo_net::http::Response;
|
||||||
use js_sys::{wasm_bindgen::JsCast, Uint8Array};
|
use js_sys::Uint8Array;
|
||||||
use send_wrapper::SendWrapper;
|
use send_wrapper::SendWrapper;
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
|
use wasm_bindgen::JsCast;
|
||||||
use wasm_streams::ReadableStream;
|
use wasm_streams::ReadableStream;
|
||||||
|
|
||||||
pub struct BrowserResponse(pub(crate) SendWrapper<Response>);
|
pub struct BrowserResponse(pub(crate) SendWrapper<Response>);
|
||||||
|
|
1
server_fn_macro/Makefile.toml
Normal file
1
server_fn_macro/Makefile.toml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
extend = { path = "../cargo-make/main.toml" }
|
Loading…
Reference in a new issue