cli json output, dx bundle fix, dx serve --platform android, race condition, drop ssg platform (#3186)
* clean up logging to avoid random extra trace * fix race condition with updates * properly wire up verbose * fix bundling (macos) and logging * Add structured output * clean up clap names * extract out wire format * switch structured key to json * fix random println, fallback to `dioxus/platform` * clean up logging for run/build * clean up logging around project * remove manual exits * fix tokio runtime for mobile * rework dog app * rip out ssg * Switch dioxus/axum to dioxus/server * add android template inline * pre restructure for bundle prep * add the whole res directory * Better theme for the app * remove mobile demo now that most apps work natively * self-referential android * only use deep linking for assets * fix imports for android * clippy, fixup ios and android * I'm not boxing compiler message you can't make me * fix clippy on unix
This commit is contained in:
1 parent
8a998e7d49
commit
ac3e33af46
116 files changed
+2367
-6091
No files matched your search
@@ -37,26 +37,13 @@ pub fn connect(endpoint: String, mut callback: impl FnMut(DevserverMsg) + Send +
|
||||
std::thread::spawn(move || {
|
||||
let (mut websocket, _req) = match tungstenite::connect(endpoint.clone()) {
|
||||
Ok((websocket, req)) => (websocket, req),
|
||||
Err(err) => {
|
||||
eprintln!(
|
||||
"Failed to connect to devserver at {} because {}",
|
||||
endpoint, err
|
||||
);
|
||||
return;
|
||||
}
|
||||
Err(_) => return,
|
||||
};
|
||||
|
||||
while let Ok(msg) = websocket.read() {
|
||||
match msg {
|
||||
tungstenite::Message::Text(text) => {
|
||||
if let Ok(msg) = serde_json::from_str(&text) {
|
||||
callback(msg);
|
||||
} else {
|
||||
eprintln!("Failed to parse message from devserver: {:?}", text);
|
||||
}
|
||||
}
|
||||
msg => {
|
||||
println!("Received a non-text message: {:?}", msg);
|
||||
if let tungstenite::Message::Text(text) = msg {
|
||||
if let Ok(msg) = serde_json::from_str(&text) {
|
||||
callback(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user