mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 08:03:39 +00:00
- add browser smoke bundling check to root check + pre-commit - lazy-load Bedrock provider registration to avoid browser graph traversal - remove top-level OAuth runtime exports from @mariozechner/pi-ai - add @mariozechner/pi-ai/oauth subpath export and update coding-agent imports - move proxy dispatcher init to coding-agent CLI (Node-only) - document Bedrock/OAuth browser limitations closes #1814
40 lines
949 B
Bash
Executable file
40 lines
949 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Get list of staged files before running check
|
|
STAGED_FILES=$(git diff --cached --name-only)
|
|
|
|
# Run the check script (formatting, linting, and type checking)
|
|
echo "Running formatting, linting, and type checking..."
|
|
npm run check
|
|
if [ $? -ne 0 ]; then
|
|
echo "❌ Checks failed. Please fix the errors before committing."
|
|
exit 1
|
|
fi
|
|
|
|
RUN_BROWSER_SMOKE=0
|
|
for file in $STAGED_FILES; do
|
|
case "$file" in
|
|
packages/ai/*|packages/web-ui/*|package.json|package-lock.json)
|
|
RUN_BROWSER_SMOKE=1
|
|
break
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if [ $RUN_BROWSER_SMOKE -eq 1 ]; then
|
|
echo "Running browser smoke check..."
|
|
npm run check:browser-smoke
|
|
if [ $? -ne 0 ]; then
|
|
echo "❌ Browser smoke check failed."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Restage files that were previously staged and may have been modified by formatting
|
|
for file in $STAGED_FILES; do
|
|
if [ -f "$file" ]; then
|
|
git add "$file"
|
|
fi
|
|
done
|
|
|
|
echo "✅ All pre-commit checks passed!"
|