New crate crates/maestro-web/: axum server that * embeds the web/dist SPA bundle via include_dir! (graceful placeholder when pnpm build hasn't run yet — keeps fresh checkouts compiling) * reverse-proxies /api/* HTTP to a co-located daemon (default http://127.0.0.1:7070) via reqwest, stripping hop-by-hop headers * reverse-proxies /api/attach/:id and /api/events WebSockets via tokio_tungstenite::connect_async + a tokio task pumping both directions * reads bind_addr / daemon_url / dev_proxy_target from the new [web] config section; env-var overrides MAESTRO_WEB_BIND_ADDR / _DAEMON_URL / _DEV_PROXY_TARGET Integration tests spin up a mock daemon + maestro-web pair on random ports and verify HTTP forward, SPA fallback, WS echo, and 502 on unreachable daemon. Adds a top-level Justfile (`just web` = pnpm install + pnpm build + cargo build), crates/maestro-web/README.md (config + trust model + dev workflow), and a docs/INSTALL.md section on optional web UI install. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
37 lines
887 B
TOML
37 lines
887 B
TOML
[package]
|
|
name = "maestro-web"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
publish.workspace = true
|
|
description = "Standalone Maestro web UI: serves the SPA bundle and reverse-proxies to a co-located maestrod"
|
|
|
|
[lib]
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "maestro-web"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
axum.workspace = true
|
|
bytes.workspace = true
|
|
clap.workspace = true
|
|
dirs.workspace = true
|
|
futures-util.workspace = true
|
|
include_dir.workspace = true
|
|
maestro-config.workspace = true
|
|
mime_guess.workspace = true
|
|
reqwest.workspace = true
|
|
thiserror.workspace = true
|
|
tokio.workspace = true
|
|
tokio-tungstenite = { workspace = true, features = ["rustls-tls-webpki-roots"] }
|
|
tracing.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
|
|
[dev-dependencies]
|
|
reqwest.workspace = true
|
|
serde_json.workspace = true
|
|
tempfile.workspace = true
|