feat(dashboard): extract inline script to standalone dashboard.ts/js, add UI build/check recipes, and add route unit tests
This commit is contained in:
1 parent
4b307b55b9
commit
19f9c7ace7
24 files changed
+2343
-1819
No files matched your search
@@ -16,7 +16,7 @@ deploy-all: deploy-win deploy-wsl
|
||||
@Write-Host "Deployment complete across both OS boundaries." -ForegroundColor Green
|
||||
|
||||
# Build Windows-native binaries
|
||||
build-win: build-server build-stub-win build-nvim-win
|
||||
build-win: build-ui build-server build-stub-win build-nvim-win
|
||||
|
||||
# Deploy Windows-native binaries and rules
|
||||
deploy-win: deploy-server deploy-stub-win deploy-nvim-win deploy-rules-win
|
||||
@@ -57,8 +57,18 @@ run-server:
|
||||
# 2. BUILD (Compile Binaries)
|
||||
# =========================================================
|
||||
|
||||
# Build Windows-native server binary in release mode
|
||||
build-server:
|
||||
# Transpile Dashboard TypeScript (server/src/dashboard.ts) into JavaScript
|
||||
build-ui:
|
||||
@Write-Host "Building Dashboard JavaScript from server/src/dashboard.ts..." -ForegroundColor Cyan
|
||||
bun build server/src/dashboard.ts --outfile=server/src/dashboard.js --target=browser
|
||||
|
||||
# Type-check Dashboard TypeScript source code
|
||||
check-ui:
|
||||
@Write-Host "Type-checking Dashboard TypeScript..." -ForegroundColor Cyan
|
||||
deno check server/src/dashboard.ts
|
||||
|
||||
# Build Windows-native server binary in release mode (ensuring fresh UI build)
|
||||
build-server: build-ui
|
||||
@Write-Host "Building Windows Server..." -ForegroundColor Cyan
|
||||
cargo build --release -p mcp-memory-server
|
||||
|
||||
@@ -138,11 +148,16 @@ deploy-rules-wsl:
|
||||
# 4. TESTING & COVERAGE
|
||||
# =========================================================
|
||||
|
||||
# Run fast parallel unit tests via cargo-nextest
|
||||
test:
|
||||
# Run fast parallel unit tests via cargo-nextest (and type-check UI)
|
||||
test: check-ui
|
||||
@Write-Host "Running fast parallel tests via cargo-nextest..." -ForegroundColor Cyan
|
||||
cargo nextest run --workspace
|
||||
|
||||
# Run dashboard UI endpoint and integrity unit tests
|
||||
test-ui:
|
||||
@Write-Host "Running dashboard UI endpoint and integrity unit tests..." -ForegroundColor Cyan
|
||||
cargo test -p mcp-memory-server --lib api::setup::tests::test_dashboard_endpoint_and_html_integrity -- --nocapture
|
||||
|
||||
# Run standard sequential cargo unit tests
|
||||
test-cargo:
|
||||
@Write-Host "Running standard unit tests across workspace..." -ForegroundColor Cyan
|
||||
|
||||
Reference in new issue
Block a user