High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
feat: pdev check dashboard matches CI, rename dev→build
Dataea05bd29df09
diff --git a/pdev b/pdevindex 76f66114..765948ad 100755--- a/pdev+++ b/pdev@@ -17,12 +17,11 @@ NC=$'\033[0m'# ── Commands ─────────────────────────────────────────────────────────# name:emoji:descriptionCOMMANDS=(- "check:🧪:Go + Dashboard checks"+ "check:🧪:All checks (Go + Dashboard)"" check go:🧪:Go only"" check dashboard:🧪:Dashboard only"- "dev:🚀:Build & run with dashboard"+ "build:🚀:Build & run server + dashboard""doctor:🩺:Setup dev environment"- "dashboard:📦:Build dashboard""security:🔒:Gosec security scan""docs:📖:Validate docs JSON""hooks:🪝:Install git hooks"@@ -77,9 +76,8 @@ run_command() {echo ""exec bash scripts/check-dashboard.sh;;- "dev") exec bash scripts/dev.sh ;;+ "build") exec bash scripts/dev.sh ;;"doctor") exec bash scripts/doctor.sh ;;- "dashboard") exec bash scripts/build-dashboard.sh ;;"security") exec bash scripts/check-gosec.sh ;;"docs") exec bash scripts/check-docs-json.sh ;;"hooks") exec bash scripts/install-hooks.sh ;;diff --git a/scripts/check-dashboard.sh b/scripts/check-dashboard.shindex 7df83728..c7e0b2b3 100755--- a/scripts/check-dashboard.sh+++ b/scripts/check-dashboard.sh@@ -1,13 +1,13 @@#!/bin/bashset -e-# check-dashboard.sh — Dashboard quality checks (prettier, typecheck, tests)+# check-dashboard.sh — Dashboard quality checks (matches CI: dashboard.yml)+# Runs: typecheck → eslint → prettier → vitestcd "$(dirname "$0")/.."BOLD=$'\033[1m'ACCENT=$'\033[38;2;251;191;36m'-INFO=$'\033[38;2;136;146;176m'SUCCESS=$'\033[38;2;0;229;204m'ERROR=$'\033[38;2;230;57;70m'MUTED=$'\033[38;2;90;100;128m'@@ -15,7 +15,6 @@ NC=$'\033[0m'ok() { echo -e " ${SUCCESS}✓${NC} $1"; }fail() { echo -e " ${ERROR}✗${NC} $1"; [ -n "${2:-}" ] && echo -e " ${MUTED}$2${NC}"; }-hint() { echo -e " ${MUTED}$1${NC}"; }section() {echo ""@@ -29,53 +28,57 @@ ficd dashboard-# Detect package runner-RUN=""-if command -v bun &>/dev/null; then- RUN="bun"-elif command -v npx &>/dev/null; then- RUN="npx"-else- fail "Neither bun nor npx found"- exit 1+# Detect runner+RUN="bun"+if ! command -v bun &>/dev/null; then+ if command -v npx &>/dev/null; then+ RUN="npx"+ else+ fail "Neither bun nor npx found"+ exit 1+ fifi-# ── Prettier ─────────────────────────────────────────────────────────--section "Prettier"+# Install deps if needed+if [ ! -d "node_modules" ]; then+ section "Dependencies"+ echo -e " ${MUTED}Installing...${NC}"+ $RUN install 2>&1 | tail -1+fi-if $RUN prettier --check "src/**/*.{ts,tsx,css}" 2>&1 | tail -1 | grep -q "All matched files"; then- ok "All files formatted"+section "TypeScript"+if $RUN run typecheck 2>&1; then+ ok "Type check"else- fail "Files not formatted"- hint "Run: cd dashboard && $RUN prettier --write src/"+ fail "Type errors"exit 1fi-# ── TypeScript ───────────────────────────────────────────────────────--section "TypeScript"--if $RUN tsc --noEmit 2>&1; then- ok "Type check passed"+section "ESLint"+if $RUN run lint 2>&1; then+ ok "ESLint"else- fail "Type errors found"+ fail "Lint errors"exit 1fi-# ── Tests ────────────────────────────────────────────────────────────+section "Prettier"+if $RUN run format:check 2>&1; then+ ok "Formatting"+else+ fail "Files not formatted"+ echo -e " ${MUTED}Run: cd dashboard && $RUN run format${NC}"+ exit 1+fisection "Tests"--if $RUN vitest run 2>&1; then+if $RUN run test:run 2>&1; thenok "All tests passed"elsefail "Test failures"exit 1fi-# ── Summary ──────────────────────────────────────────────────────────-section "Summary"echo ""echo -e " ${SUCCESS}${BOLD}Dashboard checks passed!${NC}"