Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix: ensure deps installed before prettier, add tygo check to local dev

Bosch515560393a10
diff --git a/scripts/build-dashboard.sh b/scripts/build-dashboard.sh
index 7a5ba003..318ff8a9 100755
--- a/scripts/build-dashboard.sh
+++ b/scripts/build-dashboard.sh
@@ -4,10 +4,17 @@ set -e
cd "$(dirname "$0")/.."
+echo "📦 Building React dashboard..."
+cd dashboard
+
+# Install deps if needed (must happen before prettier)
+if [ ! -d "node_modules" ]; then
+ echo "📥 Installing dependencies..."
+ bun install --frozen-lockfile
+fi
+
# Generate TypeScript types from Go structs (ensures types are in sync)
-# tygo.yaml lives in dashboard/, so run from there
TYGO="${GOPATH:-$HOME/go}/bin/tygo"
-cd dashboard
if [ -x "$TYGO" ]; then
echo "🔄 Generating TypeScript types..."
"$TYGO" generate
@@ -26,16 +33,6 @@ fi
if [ -f "src/generated/types.ts" ]; then
npx prettier --write src/generated/types.ts 2>/dev/null || true
fi
-cd ..
-
-echo "📦 Building React dashboard..."
-cd dashboard
-
-# Install deps if needed
-if [ ! -d "node_modules" ]; then
- echo "📥 Installing dependencies..."
- bun install --frozen-lockfile
-fi
bun run build
diff --git a/scripts/check-dashboard.sh b/scripts/check-dashboard.sh
index d9951c77..a8030866 100755
--- a/scripts/check-dashboard.sh
+++ b/scripts/check-dashboard.sh
@@ -46,6 +46,22 @@ if [ ! -d "node_modules" ]; then
$RUN install 2>&1 | tail -1
fi
+# Check tygo types are in sync (if tygo is installed)
+TYGO="${GOPATH:-$HOME/go}/bin/tygo"
+if [ -x "$TYGO" ] || command -v tygo &>/dev/null; then
+ section "Types (tygo)"
+ TYGO_CMD="${TYGO:-tygo}"
+ if [ -x "$TYGO" ]; then TYGO_CMD="$TYGO"; fi
+ $TYGO_CMD generate 2>/dev/null
+ npx prettier --write src/generated/types.ts 2>/dev/null || true
+ if git diff --quiet -- src/generated/types.ts 2>/dev/null; then
+ ok "Types in sync"
+ else
+ fail "Types out of sync" "Run: cd dashboard && tygo generate && npx prettier --write src/generated/types.ts"
+ exit 1
+ fi
+fi
+
section "TypeScript"
if $RUN run typecheck 2>&1; then
ok "Type check"