Build pipeline hardening: ErrorBoundary, no PHP copies, TS pre-flight

- ErrorBoundary.tsx wraps widget — crashes show fallback, not blank void
- build.sh v1.1.0: removed ALL PHP file copies (Chronicler deploys manually)
- Added set -e / set -u for fail-fast
- Added TypeScript pre-flight check (yarn tsc --noEmit) before build
- Added dynamic Blueprint controller detection via find
- Widget injection now wrapped in <ModpackErrorBoundary>
- Pre-commit PHP lint hook at scripts/pre-commit-hook.sh

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude (Chronicler #83 - The Compiler)
2026-04-13 00:17:30 -05:00
parent 7b2f3f810b
commit 28608e9fa8
6 changed files with 267 additions and 56 deletions

View File

@@ -0,0 +1,9 @@
#!/bin/bash
# Pre-commit hook: PHP syntax check
# Install: cp scripts/pre-commit-hook.sh .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep ".php$")
for FILE in $FILES; do
php -l "$FILE" || { echo "Aborting commit: PHP syntax error in $FILE"; exit 1; }
done
exit 0