#!/usr/bin/env bash set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" ensure_node_deps() { local dir="$1" if [[ ! -d "$dir/node_modules" ]]; then (cd "$dir" && npm ci) fi } "$ROOT_DIR/scripts/check-structure.sh" (cd "$ROOT_DIR/platform" && go test ./...) (cd "$ROOT_DIR/run" && go test ./...) ensure_node_deps "$ROOT_DIR/platform_web" (cd "$ROOT_DIR/platform_web" && npm run typecheck && npm run test && npm run build) ensure_node_deps "$ROOT_DIR/plugins" (cd "$ROOT_DIR/plugins" && npm run typecheck && npm run test && npm run validate:manifest) printf 'full check passed\n'