# Common dev / build entry points. Run `just` with no args to list.

# Build the maestro-web binary together with the SPA bundle it embeds.
web:
    pnpm -C web install --frozen-lockfile
    pnpm -C web build
    cargo build -p maestro-web --release

# Run the web bundle in dev mode against a local daemon — Vite serves the
# frontend with HMR, and `/api/*` is proxied directly to the daemon at
# 127.0.0.1:7070 (or wherever $MAESTRO_REGISTRY points; see vite.config.ts).
web-dev:
    pnpm -C web install
    pnpm -C web dev

# Typecheck the frontend without building.
web-typecheck:
    pnpm -C web install --frozen-lockfile
    pnpm -C web typecheck

# Full workspace build + tests.
test:
    cargo fmt --all -- --check
    cargo clippy --all-targets -- -D warnings
    cargo test --all

# Format every Rust source.
fmt:
    cargo fmt --all
