mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 12:14:34 -05:00
3
.github/workflows/run-cargo-make-task.yml
vendored
3
.github/workflows/run-cargo-make-task.yml
vendored
@@ -48,9 +48,6 @@ jobs:
|
||||
- name: Install wasm-bindgen
|
||||
run: cargo binstall wasm-bindgen-cli --no-confirm
|
||||
|
||||
- name: Install wasm-pack
|
||||
run: cargo binstall wasm-pack --no-confirm
|
||||
|
||||
- name: Install cargo-leptos
|
||||
run: cargo binstall cargo-leptos --no-confirm
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
[tasks.build]
|
||||
install_crate = { crate_name = "wasm-pack", binary = "wasm-pack", test_arg = "--help" }
|
||||
clear = true
|
||||
command = "deno"
|
||||
args = ["task", "build"]
|
||||
|
||||
[tasks.start-client]
|
||||
install_crate = { crate_name = "wasm-pack", binary = "wasm-pack", test_arg = "--help" }
|
||||
command = "deno"
|
||||
args = ["task", "start"]
|
||||
|
||||
|
||||
@@ -14,17 +14,17 @@ lto = true
|
||||
console_log = "1.0.0"
|
||||
console_error_panic_hook = "0.1.7"
|
||||
cfg-if = "1.0.0"
|
||||
leptos = { version = "0.5" }
|
||||
leptos_axum = { version = "0.5", default-features = false, optional = true }
|
||||
leptos_meta = { version = "0.5" }
|
||||
leptos_router = { version = "0.5" }
|
||||
leptos = { path = "../../leptos" }
|
||||
leptos_axum = { path = "../../integrations/axum", default-features = false, optional = true }
|
||||
leptos_meta = { path = "../../meta" }
|
||||
leptos_router = { path = "../../router" }
|
||||
log = "0.4.17"
|
||||
simple_logger = "4.0.0"
|
||||
serde = { version = "1.0.148", features = ["derive"] }
|
||||
tracing = "0.1"
|
||||
gloo-net = { version = "0.4.0", features = ["http"] }
|
||||
reqwest = { version = "0.11.13", features = ["json"] }
|
||||
axum = { version = "0.6", default-features = false, optional = true }
|
||||
axum = { version = "0.7", default-features = false, optional = true }
|
||||
tower = { version = "0.4.13", optional = true }
|
||||
http = { version = "0.2.11", optional = true }
|
||||
web-sys = { version = "0.3", features = [
|
||||
@@ -37,7 +37,7 @@ wasm-bindgen = "0.2"
|
||||
wasm-bindgen-futures = { version = "0.4.37", features = [
|
||||
"futures-core-03-stream",
|
||||
], optional = true }
|
||||
axum-js-fetch = { version = "0.2.1", optional = true }
|
||||
axum-js-fetch = { git = "https://github.com/seanaye/axum-js-fetch", optional = true }
|
||||
lazy_static = "1.4.0"
|
||||
|
||||
[features]
|
||||
|
||||
2
examples/hackernews_js_fetch/rust-toolchain.toml
Normal file
2
examples/hackernews_js_fetch/rust-toolchain.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
[toolchain]
|
||||
channel = "stable" # test change
|
||||
@@ -62,8 +62,8 @@ mod ssr_imports {
|
||||
let routes = generate_route_list(App);
|
||||
|
||||
// build our application with a route
|
||||
let app: axum::Router<(), axum::body::Body> = Router::new()
|
||||
.leptos_routes(&leptos_options, routes, || view! { <App/> })
|
||||
let app: axum::Router<()> = Router::new()
|
||||
.leptos_routes(&leptos_options, routes, App)
|
||||
.route("/api/*fn_name", post(leptos_axum::handle_server_fns))
|
||||
.with_state(leptos_options);
|
||||
|
||||
@@ -73,7 +73,7 @@ mod ssr_imports {
|
||||
}
|
||||
|
||||
pub async fn serve(&self, req: web_sys::Request) -> web_sys::Response {
|
||||
self.0.serve(req).await
|
||||
self.0.oneshot(req).await
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,10 +68,7 @@ impl Matcher {
|
||||
self.segments.iter().zip(loc_segments.iter())
|
||||
{
|
||||
if let Some(param_name) = segment.strip_prefix(':') {
|
||||
params.insert(
|
||||
param_name.into(),
|
||||
unescape(*loc_segment).into(),
|
||||
);
|
||||
params.insert(param_name.into(), unescape(loc_segment));
|
||||
} else if segment != loc_segment {
|
||||
// if any segment doesn't match and isn't a param, there's no path match
|
||||
return None;
|
||||
|
||||
Reference in New Issue
Block a user