Oauth tests (#13)

* Moving the non-authed cfagents tests to /public

* Added OAuth CF Agents tests

---------

Co-authored-by: Glen Maddern <glen@glenmaddern.com>
This commit is contained in:
Glen Maddern 2025-07-01 13:26:26 +10:00 • committed by GitHub
commit 0ea0bc48c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

24
scripts/pre-commit Executable file
View file

@ -0,0 +1,24 @@
#!/bin/sh
# Pre-commit hook to run prettier on staged files
# This hook is called by "git commit" and formats only the files being committed.
echo "Running prettier on staged files..."
# Get list of staged files that prettier can handle
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(js|jsx|ts|tsx|json|css|scss|md)$' | tr '\n' ' ')
if [ -z "$STAGED_FILES" ]; then
echo "No staged files need formatting."
exit 0
fi
echo "Formatting files: $STAGED_FILES"
# Run prettier on staged files
pnpm prettier --write $STAGED_FILES
# Add the formatted files back to staging
git add $STAGED_FILES
echo "Prettier formatting completed."