From c0c12752267586ba61fdb423a9644a2dbb8ba04c Mon Sep 17 00:00:00 2001 From: Stijnus Date: Fri, 13 Dec 2024 11:33:29 +0100 Subject: [PATCH] minor bug fixes --- .husky/pre-commit | 36 +- app/commit.json | 2 +- app/components/settings/debug/DebugTab.tsx | 6 +- package-lock.json | 26039 +++++++++++++++++++ package.json | 13 +- pnpm-lock.yaml | 681 +- 6 files changed, 26419 insertions(+), 358 deletions(-) create mode 100644 package-lock.json diff --git a/.husky/pre-commit b/.husky/pre-commit index 45ed10d..b95e00d 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,30 +2,42 @@ echo "🔍 Running pre-commit hook to check the code looks good... 🔍" +# Load NVM if available (useful for managing Node.js versions) export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # Load nvm if you're using i +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" -echo "Running typecheck..." -which pnpm - -if ! pnpm typecheck; then - echo "❌ Type checking failed! Please review TypeScript types." - echo "Once you're done, don't forget to add your changes to the commit! 🚀" - echo "Typecheck exit code: $?" - exit 1 +# Ensure `pnpm` is available +echo "Checking if pnpm is available..." +if ! command -v pnpm >/dev/null 2>&1; then + echo "❌ pnpm not found! Please ensure pnpm is installed and available in PATH." + exit 1 fi +# Run typecheck +echo "Running typecheck..." +if ! pnpm typecheck; then + echo "❌ Type checking failed! Please review TypeScript types." + echo "Once you're done, don't forget to add your changes to the commit! 🚀" + exit 1 +fi + +# Run lint echo "Running lint..." if ! pnpm lint; then - echo "❌ Linting failed! 'pnpm lint:fix' will help you fix the easy ones." + echo "❌ Linting failed! Run 'pnpm lint:fix' to fix the easy issues." echo "Once you're done, don't forget to add your beautification to the commit! 🤩" - echo "lint exit code: $?" exit 1 fi # Update commit.json with the latest commit hash +echo "Updating commit.json with the latest commit hash..." COMMIT_HASH=$(git rev-parse HEAD) +if [ $? -ne 0 ]; then + echo "❌ Failed to get commit hash. Ensure you are in a git repository." + exit 1 +fi + echo "{ \"commit\": \"$COMMIT_HASH\" }" > app/commit.json git add app/commit.json -echo "👍 All good! Committing changes..." +echo "👍 All checks passed! Committing changes..." diff --git a/app/commit.json b/app/commit.json index 45cf76f..696f6c0 100644 --- a/app/commit.json +++ b/app/commit.json @@ -1 +1 @@ -{ "commit": "b16aab1f167d91903592e33357ae38e304ca7f65" } +{ "commit": "b1a3e3993ee013b58cee6f02f2e05429d3b3a592" } diff --git a/app/components/settings/debug/DebugTab.tsx b/app/components/settings/debug/DebugTab.tsx index f37d1d4..e18607d 100644 --- a/app/components/settings/debug/DebugTab.tsx +++ b/app/components/settings/debug/DebugTab.tsx @@ -33,7 +33,7 @@ interface IProviderConfig { const LOCAL_PROVIDERS = ['Ollama', 'LMStudio', 'OpenAILike']; const versionHash = commit.commit; const GITHUB_URLS = { - original: 'https://api.github.com/repos/Stijnus/bolt.new-any-llm/commits/main', + original: 'https://api.github.com/repos/stackblitz-labs/bolt.diy/commits/main', fork: 'https://api.github.com/repos/Stijnus/bolt.new-any-llm/commits/main', }; @@ -327,7 +327,7 @@ export default function DebugTab() {