Răsfoiți Sursa

fix cli tests

Evan Almloff 1 an în urmă
părinte
comite
9bb464dd7d

+ 1 - 1
packages/cli/Cargo.toml

@@ -37,7 +37,7 @@ hyper-rustls = "0.23.2"
 indicatif = "0.17.5"
 indicatif = "0.17.5"
 subprocess = "0.2.9"
 subprocess = "0.2.9"
 
 
-axum = { version = "0.6.20", features = ["ws", "headers"] }
+axum = { version = "0.5.1", features = ["ws", "headers"] }
 axum-server = { version = "0.5.1", features = ["tls-rustls"] }
 axum-server = { version = "0.5.1", features = ["tls-rustls"] }
 tower-http = { version = "0.2.2", features = ["full"] }
 tower-http = { version = "0.2.2", features = ["full"] }
 headers = "0.3.7"
 headers = "0.3.7"

+ 4 - 4
packages/cli/README.md

@@ -10,7 +10,7 @@ It handles building, bundling, development and publishing to simplify developmen
 
 
 ### Install the stable version (recommended)
 ### Install the stable version (recommended)
 
 
-```
+```sh
 cargo install dioxus-cli
 cargo install dioxus-cli
 ```
 ```
 
 
@@ -20,7 +20,7 @@ To get the latest bug fixes and features, you can install the development versio
 However, this is not fully tested.
 However, this is not fully tested.
 That means you're probably going to have more bugs despite having the latest bug fixes.
 That means you're probably going to have more bugs despite having the latest bug fixes.
 
 
-```
+```sh
 cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli
 cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli
 ```
 ```
 
 
@@ -29,7 +29,7 @@ and install it in Cargo's global binary directory (`~/.cargo/bin/` by default).
 
 
 ### Install from local folder
 ### Install from local folder
 
 
-```
+```sh
 cargo install --path . --debug
 cargo install --path . --debug
 ```
 ```
 
 
@@ -40,7 +40,7 @@ It will be cloned from the [dioxus-template](https://github.com/DioxusLabs/dioxu
 
 
 Alternatively, you can specify the template path:
 Alternatively, you can specify the template path:
 
 
-```
+```sh
 dx create hello --template gh:dioxuslabs/dioxus-template
 dx create hello --template gh:dioxuslabs/dioxus-template
 ```
 ```
 
 

+ 2 - 2
packages/cli/src/server/web/mod.rs

@@ -313,9 +313,9 @@ async fn setup_router(
     router = if let Some(base_path) = config.dioxus_config.web.app.base_path.clone() {
     router = if let Some(base_path) = config.dioxus_config.web.app.base_path.clone() {
         let base_path = format!("/{}", base_path.trim_matches('/'));
         let base_path = format!("/{}", base_path.trim_matches('/'));
         Router::new()
         Router::new()
-            .nest_service(
+            .nest(
                 &base_path,
                 &base_path,
-                axum::routing::method_routing::any_service(router),
+                axum::routing::any_service(router),
             )
             )
             .fallback(get(move || {
             .fallback(get(move || {
                 let base_path = base_path.clone();
                 let base_path = base_path.clone();

+ 2 - 2
packages/cli/src/server/web/proxy.rs

@@ -1,6 +1,6 @@
-use crate::Result;
+use crate::{Result,};
 use dioxus_cli_config::WebProxyConfig;
 use dioxus_cli_config::WebProxyConfig;
-
+   
 use anyhow::Context;
 use anyhow::Context;
 use axum::{http::StatusCode, routing::any, Router};
 use axum::{http::StatusCode, routing::any, Router};
 use hyper::{Request, Response, Uri};
 use hyper::{Request, Response, Uri};