generated from coulomb/repo-seed
fix: bootstrap dashboard dependencies
This commit is contained in:
@@ -45,11 +45,13 @@ make test
|
|||||||
make api
|
make api
|
||||||
make mcp-http
|
make mcp-http
|
||||||
make dashboard
|
make dashboard
|
||||||
|
make dashboard-check
|
||||||
```
|
```
|
||||||
|
|
||||||
When API routers, models, migrations, or consistency logic change, run the
|
When API routers, models, migrations, or consistency logic change, run the
|
||||||
relevant tests before closing the session. Prefer `make test` when the database
|
relevant tests before closing the session. Prefer `make test` when the database
|
||||||
test prerequisites are available.
|
test prerequisites are available. `make test` includes an Observable dashboard
|
||||||
|
build smoke check so dashboard startup regressions are not missed.
|
||||||
|
|
||||||
## Workplans
|
## Workplans
|
||||||
|
|
||||||
|
|||||||
15
Makefile
15
Makefile
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: install install-cli db db-tools migrate seed api dashboard check test clean register-project register-codex-project validate-adr add-domain rename-domain add-repo list-repos register-path cleanup-stale tunnels-up tunnels-status tunnels-check bridges install-hooks install-hooks-all gitea-inventory
|
.PHONY: install install-cli dashboard-install dashboard-check db db-tools migrate seed api dashboard check test test-python clean register-project register-codex-project validate-adr add-domain rename-domain add-repo list-repos register-path cleanup-stale tunnels-up tunnels-status tunnels-check bridges install-hooks install-hooks-all gitea-inventory
|
||||||
|
|
||||||
COMPOSE = docker compose -f infra/docker-compose.yml --env-file .env
|
COMPOSE = docker compose -f infra/docker-compose.yml --env-file .env
|
||||||
|
|
||||||
@@ -13,6 +13,14 @@ start:
|
|||||||
install:
|
install:
|
||||||
uv sync
|
uv sync
|
||||||
|
|
||||||
|
dashboard/node_modules/.bin/observable: dashboard/package.json dashboard/package-lock.json
|
||||||
|
cd dashboard && npm ci
|
||||||
|
|
||||||
|
dashboard-install: dashboard/node_modules/.bin/observable
|
||||||
|
|
||||||
|
dashboard-check: dashboard-install
|
||||||
|
cd dashboard && npm run build
|
||||||
|
|
||||||
## Symlink the custodian CLI into ~/.local/bin so it's on PATH system-wide
|
## Symlink the custodian CLI into ~/.local/bin so it's on PATH system-wide
|
||||||
install-cli: install
|
install-cli: install
|
||||||
mkdir -p ~/.local/bin
|
mkdir -p ~/.local/bin
|
||||||
@@ -42,12 +50,15 @@ mcp-http:
|
|||||||
|
|
||||||
dashboard:
|
dashboard:
|
||||||
@fuser -k 3000/tcp 2>/dev/null && echo "Stopped running dashboard" || true
|
@fuser -k 3000/tcp 2>/dev/null && echo "Stopped running dashboard" || true
|
||||||
|
$(MAKE) dashboard-install
|
||||||
cd dashboard && npm run dev
|
cd dashboard && npm run dev
|
||||||
|
|
||||||
check:
|
check:
|
||||||
curl -sf http://127.0.0.1:8000/state/health | python3 -m json.tool
|
curl -sf http://127.0.0.1:8000/state/health | python3 -m json.tool
|
||||||
|
|
||||||
test:
|
test: test-python dashboard-check
|
||||||
|
|
||||||
|
test-python:
|
||||||
TEST_DATABASE_URL=postgresql+asyncpg://custodian:changeme@127.0.0.1:5432/custodian_test \
|
TEST_DATABASE_URL=postgresql+asyncpg://custodian:changeme@127.0.0.1:5432/custodian_test \
|
||||||
uv run pytest -x -q
|
uv run pytest -x -q
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,8 @@ make api # db + migrate + uvicorn :8000 (restarts if runnin
|
|||||||
### Dashboard
|
### Dashboard
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make dashboard # Observable dev server on :3000
|
make dashboard # installs dashboard deps if needed, then Observable dev server on :3000
|
||||||
|
make dashboard-check # installs deps if needed, then runs Observable build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Start Everything
|
### Start Everything
|
||||||
@@ -111,8 +112,11 @@ custodian register-project # register cwd as a Custodian project
|
|||||||
| `make migrate` | `alembic upgrade head` |
|
| `make migrate` | `alembic upgrade head` |
|
||||||
| `make seed` | Insert 6 canonical topics |
|
| `make seed` | Insert 6 canonical topics |
|
||||||
| `make api` | `db` + wait + `migrate` + `uvicorn` (restarts if running) |
|
| `make api` | `db` + wait + `migrate` + `uvicorn` (restarts if running) |
|
||||||
| `make dashboard` | Observable dev server (restarts if running) |
|
| `make dashboard-install` | Install dashboard npm deps from `dashboard/package-lock.json` |
|
||||||
|
| `make dashboard-check` | Build the Observable dashboard as a smoke/regression check |
|
||||||
|
| `make dashboard` | Install deps if needed, then start Observable dev server (restarts if running) |
|
||||||
| `make check` | `curl /state/health` |
|
| `make check` | `curl /state/health` |
|
||||||
|
| `make test` | Python test suite plus `make dashboard-check` |
|
||||||
| `make register-project DOMAIN=x PROJECT_PATH=y` | Register a project |
|
| `make register-project DOMAIN=x PROJECT_PATH=y` | Register a project |
|
||||||
| `make clean` | `docker compose down -v` (destroys DB volume) |
|
| `make clean` | `docker compose down -v` (destroys DB volume) |
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user