update the server function crate to 0.7 (#3560)
This commit is contained in:
1 parent
bcd34e9a98
commit
8dbb652628
4 files changed
+46
-20
No files matched your search
Generated
+42
-17
@@ -1463,7 +1463,7 @@ dependencies = [
|
|||||||
"bytes",
|
"bytes",
|
||||||
"chrono",
|
"chrono",
|
||||||
"cookie",
|
"cookie",
|
||||||
"dashmap",
|
"dashmap 5.5.3",
|
||||||
"forwarded-header-value",
|
"forwarded-header-value",
|
||||||
"futures",
|
"futures",
|
||||||
"hmac",
|
"hmac",
|
||||||
@@ -1495,7 +1495,7 @@ dependencies = [
|
|||||||
"axum_session",
|
"axum_session",
|
||||||
"bytes",
|
"bytes",
|
||||||
"chrono",
|
"chrono",
|
||||||
"dashmap",
|
"dashmap 5.5.3",
|
||||||
"futures",
|
"futures",
|
||||||
"http 1.2.0",
|
"http 1.2.0",
|
||||||
"http-body 1.0.1",
|
"http-body 1.0.1",
|
||||||
@@ -3256,6 +3256,20 @@ dependencies = [
|
|||||||
"parking_lot_core",
|
"parking_lot_core",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dashmap"
|
||||||
|
version = "6.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"crossbeam-utils",
|
||||||
|
"hashbrown 0.14.5",
|
||||||
|
"lock_api",
|
||||||
|
"once_cell",
|
||||||
|
"parking_lot_core",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "data-encoding"
|
name = "data-encoding"
|
||||||
version = "2.6.0"
|
version = "2.6.0"
|
||||||
@@ -7697,7 +7711,7 @@ dependencies = [
|
|||||||
"const-str",
|
"const-str",
|
||||||
"cssparser 0.33.0",
|
"cssparser 0.33.0",
|
||||||
"cssparser-color",
|
"cssparser-color",
|
||||||
"dashmap",
|
"dashmap 5.5.3",
|
||||||
"data-encoding",
|
"data-encoding",
|
||||||
"getrandom 0.2.15",
|
"getrandom 0.2.15",
|
||||||
"indexmap 2.7.0",
|
"indexmap 2.7.0",
|
||||||
@@ -11202,9 +11216,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_qs"
|
name = "serde_qs"
|
||||||
version = "0.12.0"
|
version = "0.13.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0431a35568651e363364210c91983c1da5eb29404d9f0928b67d4ebcfa7d330c"
|
checksum = "cd34f36fe4c5ba9654417139a9b3a20d2e1de6012ee678ad14d240c22c78d8d6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -11288,14 +11302,14 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "server_fn"
|
name = "server_fn"
|
||||||
version = "0.6.15"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4fae7a3038a32e5a34ba32c6c45eb4852f8affaf8b794ebfcd4b1099e2d62ebe"
|
checksum = "d0b9f0d2eecb2bf4f909661acc731009e3657574dec93a0ec9f114e250f74bc4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum 0.7.9",
|
"axum 0.7.9",
|
||||||
"bytes",
|
"bytes",
|
||||||
"const_format",
|
"const_format",
|
||||||
"dashmap",
|
"dashmap 6.1.0",
|
||||||
"futures",
|
"futures",
|
||||||
"gloo-net",
|
"gloo-net",
|
||||||
"http 1.2.0",
|
"http 1.2.0",
|
||||||
@@ -11304,14 +11318,16 @@ dependencies = [
|
|||||||
"inventory",
|
"inventory",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
|
"pin-project-lite",
|
||||||
"reqwest 0.12.9",
|
"reqwest 0.12.9",
|
||||||
"send_wrapper",
|
"send_wrapper",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_qs",
|
"serde_qs",
|
||||||
"server_fn_macro_default",
|
"server_fn_macro_default",
|
||||||
"thiserror 1.0.69",
|
"thiserror 2.0.6",
|
||||||
"tower 0.4.13",
|
"throw_error",
|
||||||
|
"tower 0.5.1",
|
||||||
"tower-layer",
|
"tower-layer",
|
||||||
"url",
|
"url",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
@@ -11323,9 +11339,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "server_fn_macro"
|
name = "server_fn_macro"
|
||||||
version = "0.6.15"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "faaaf648c6967aef78177c0610478abb5a3455811f401f3c62d10ae9bd3901a1"
|
checksum = "ee7723bef57b4353cd9939e280d3b5b2ebe45b4a4630c9e9e97a6fa4b84e8b1c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"const_format",
|
"const_format",
|
||||||
"convert_case 0.6.0",
|
"convert_case 0.6.0",
|
||||||
@@ -11337,9 +11353,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "server_fn_macro_default"
|
name = "server_fn_macro_default"
|
||||||
version = "0.6.15"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7f2aa8119b558a17992e0ac1fd07f080099564f24532858811ce04f742542440"
|
checksum = "87663ec10f17fbe8f6c53adc2d038df3304bfd17aaaab22f777810a9e6e05fff"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"server_fn_macro",
|
"server_fn_macro",
|
||||||
"syn 2.0.98",
|
"syn 2.0.98",
|
||||||
@@ -12205,7 +12221,7 @@ checksum = "96b6a5ef4cfec51d3fa30b73600f206453a37fc30cf1141e4644a57b1ed88616"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.11",
|
"ahash 0.8.11",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"dashmap",
|
"dashmap 5.5.3",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"regex",
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -12323,7 +12339,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "1a19b132079bfcd19d6fdabce7e55ece93a30787f3b8684c8646ddaf2237812d"
|
checksum = "1a19b132079bfcd19d6fdabce7e55ece93a30787f3b8684c8646ddaf2237812d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"dashmap",
|
"dashmap 5.5.3",
|
||||||
"lru 0.10.1",
|
"lru 0.10.1",
|
||||||
"normpath 0.2.0",
|
"normpath 0.2.0",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
@@ -12437,7 +12453,7 @@ version = "7.0.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5e4232534b28fc57b745e8c709723544e5548af29abaa62281eab427099f611d"
|
checksum = "5e4232534b28fc57b745e8c709723544e5548af29abaa62281eab427099f611d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dashmap",
|
"dashmap 5.5.3",
|
||||||
"indexmap 2.7.0",
|
"indexmap 2.7.0",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"petgraph",
|
"petgraph",
|
||||||
@@ -13036,6 +13052,15 @@ dependencies = [
|
|||||||
"ratatui",
|
"ratatui",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "throw_error"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e4ef8bf264c6ae02a065a4a16553283f0656bd6266fc1fcb09fd2e6b5e91427b"
|
||||||
|
dependencies = [
|
||||||
|
"pin-project-lite",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tiff"
|
name = "tiff"
|
||||||
version = "0.9.1"
|
version = "0.9.1"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ resolver = "2"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# server functions
|
# server functions
|
||||||
server_fn = { version = "0.6.5", features = ["json", "url", "browser"], default-features = false }
|
server_fn = { version = "0.7.3", features = ["json", "url", "browser"], default-features = false }
|
||||||
dioxus_server_macro = { workspace = true }
|
dioxus_server_macro = { workspace = true }
|
||||||
|
|
||||||
# axum
|
# axum
|
||||||
|
|||||||
@@ -449,9 +449,10 @@ async fn handle_server_fns_inner(
|
|||||||
let future = move || async move {
|
let future = move || async move {
|
||||||
let (parts, body) = req.into_parts();
|
let (parts, body) = req.into_parts();
|
||||||
let req = Request::from_parts(parts.clone(), body);
|
let req = Request::from_parts(parts.clone(), body);
|
||||||
|
let method = req.method().clone();
|
||||||
|
|
||||||
if let Some(mut service) =
|
if let Some(mut service) =
|
||||||
server_fn::axum::get_server_fn_service(&path_string)
|
server_fn::axum::get_server_fn_service(&path_string, method)
|
||||||
{
|
{
|
||||||
// Create the server context with info from the request
|
// Create the server context with info from the request
|
||||||
let server_context = DioxusServerContext::new(parts);
|
let server_context = DioxusServerContext::new(parts);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ description = "Server function macros for Dioxus"
|
|||||||
proc-macro2 = "^1.0.63"
|
proc-macro2 = "^1.0.63"
|
||||||
quote = "^1.0.26"
|
quote = "^1.0.26"
|
||||||
syn = { workspace = true, features = ["full"] }
|
syn = { workspace = true, features = ["full"] }
|
||||||
server_fn_macro = "0.6.11"
|
server_fn_macro = { version = "0.7.3" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
dioxus = { workspace = true, features = ["fullstack"] }
|
dioxus = { workspace = true, features = ["fullstack"] }
|
||||||
|
|||||||
Reference in new issue
Block a user