diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml deleted file mode 100644 index d155ade..0000000 --- a/.github/workflows/nextjs.yml +++ /dev/null @@ -1,95 +0,0 @@ -# Sample workflow for building and deploying a Next.js site to GitHub Pages -# -# To get started with Next.js see: https://nextjs.org/docs/getting-started -# -name: Deploy Next.js site to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - # Build job - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Detect package manager - id: detect-package-manager - run: | - if [ -f "${{ github.workspace }}/yarn.lock" ]; then - echo "manager=yarn" >> $GITHUB_OUTPUT - echo "command=install" >> $GITHUB_OUTPUT - echo "runner=yarn" >> $GITHUB_OUTPUT - exit 0 - elif [ -f "${{ github.workspace }}/package.json" ]; then - echo "manager=npm" >> $GITHUB_OUTPUT - echo "command=ci" >> $GITHUB_OUTPUT - echo "runner=npx --no-install" >> $GITHUB_OUTPUT - exit 0 - else - echo "Unable to determine package manager" - exit 1 - fi - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: "20" - cache: ${{ steps.detect-package-manager.outputs.manager }} - - name: Setup Pages - uses: actions/configure-pages@v4 - with: - # Automatically inject basePath in your Next.js configuration file and disable - # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). - # - # You may remove this line if you want to manage the configuration yourself. - static_site_generator: next - - name: Restore cache - uses: actions/cache@v4 - with: - path: | - .next/cache - # Generate a new cache whenever packages or source files change. - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - # If source files changed but packages didn't, rebuild from a prior cache. - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- - - name: Install dependencies - run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - - name: Build with Next.js - run: ${{ steps.detect-package-manager.outputs.runner }} next build - - name: Static HTML export with Next.js - run: ${{ steps.detect-package-manager.outputs.runner }} next export - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: ./out - - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/app/page.tsx b/app/page.tsx index 4cf7280..0d598bf 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -16,6 +16,7 @@ import { cn } from "@/lib/utils"; import { withAuth } from "@/protectedRouter"; import Image from "next/image"; import Link from "next/link"; +import { redirect } from "next/navigation"; import React from "react"; const Page = () => { @@ -114,7 +115,9 @@ const Page = () => {

Top Repositories

- + + +
diff --git a/components/Loader2.tsx b/components/Loader2.tsx index 9cc6157..0d778c8 100644 --- a/components/Loader2.tsx +++ b/components/Loader2.tsx @@ -10,7 +10,7 @@ const Loader2 = ({ size }: { size?: number }) => { viewBox="0 0 24 24" fill="none" stroke="currentColor" - stroke-width="2" + strokeWidth="2" stroke-linecap="round" stroke-linejoin="round" className="lucide lucide-loader-2 animate-spin" @@ -25,7 +25,7 @@ const Loader2 = ({ size }: { size?: number }) => { viewBox="0 0 24 24" fill="none" stroke="currentColor" - stroke-width="2" + strokeWidth="2" stroke-linecap="round" stroke-linejoin="round" className="lucide lucide-loader-2 animate-spin" diff --git a/lib/genAI.ts b/lib/genAI.ts index 1bd9bd7..47761fc 100644 --- a/lib/genAI.ts +++ b/lib/genAI.ts @@ -1,8 +1,6 @@ import { GoogleGenerativeAI } from "@google/generative-ai"; if (!process.env.GENERATIVE_API_KEY) { - throw new Error( - "You must define the GENERATIVE_API_KEY environment variable", - ); + console.log("You must define the GENERATIVE_API_KEY environment variable"); } -export const genAI = new GoogleGenerativeAI(process.env.GENERATIVE_API_KEY); +export const genAI = new GoogleGenerativeAI(process.env.GENERATIVE_API_KEY || ""); diff --git a/package-lock.json b/package-lock.json index fde30b9..f9a3537 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@google/generative-ai": "^0.2.1", "@hookform/resolvers": "^3.3.4", "@primer/react": "^36.7.1", - "@prisma/client": "^5.9.1", + "@prisma/client": "^5.10.2", "@radix-ui/react-avatar": "^1.0.4", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.0.6", @@ -88,7 +88,7 @@ "jsdom": "^24.0.0", "postcss": "^8", "prettier": "3.2.5", - "prisma": "^5.9.1", + "prisma": "^5.10.2", "tailwindcss": "^3.3.0", "typescript": "^5", "vitest": "^1.2.2" @@ -2933,9 +2933,9 @@ } }, "node_modules/@prisma/client": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.9.1.tgz", - "integrity": "sha512-caSOnG4kxcSkhqC/2ShV7rEoWwd3XrftokxJqOCMVvia4NYV/TPtJlS9C2os3Igxw/Qyxumj9GBQzcStzECvtQ==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.10.2.tgz", + "integrity": "sha512-ef49hzB2yJZCvM5gFHMxSFL9KYrIP9udpT5rYo0CsHD4P9IKj473MbhU1gjKKftiwWBTIyrt9jukprzZXazyag==", "hasInstallScript": true, "engines": { "node": ">=16.13" @@ -2950,48 +2950,48 @@ } }, "node_modules/@prisma/debug": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.9.1.tgz", - "integrity": "sha512-yAHFSFCg8KVoL0oRUno3m60GAjsUKYUDkQ+9BA2X2JfVR3kRVSJFc/GpQ2fSORi4pSHZR9orfM4UC9OVXIFFTA==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.10.2.tgz", + "integrity": "sha512-bkBOmH9dpEBbMKFJj8V+Zp8IZHIBjy3fSyhLhxj4FmKGb/UBSt9doyfA6k1UeUREsMJft7xgPYBbHSOYBr8XCA==", "devOptional": true }, "node_modules/@prisma/engines": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.9.1.tgz", - "integrity": "sha512-gkdXmjxQ5jktxWNdDA5aZZ6R8rH74JkoKq6LD5mACSvxd2vbqWeWIOV0Py5wFC8vofOYShbt6XUeCIUmrOzOnQ==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.10.2.tgz", + "integrity": "sha512-HkSJvix6PW8YqEEt3zHfCYYJY69CXsNdhU+wna+4Y7EZ+AwzeupMnUThmvaDA7uqswiHkgm5/SZ6/4CStjaGmw==", "devOptional": true, "hasInstallScript": true, "dependencies": { - "@prisma/debug": "5.9.1", - "@prisma/engines-version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", - "@prisma/fetch-engine": "5.9.1", - "@prisma/get-platform": "5.9.1" + "@prisma/debug": "5.10.2", + "@prisma/engines-version": "5.10.0-34.5a9203d0590c951969e85a7d07215503f4672eb9", + "@prisma/fetch-engine": "5.10.2", + "@prisma/get-platform": "5.10.2" } }, "node_modules/@prisma/engines-version": { - "version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64.tgz", - "integrity": "sha512-HFl7275yF0FWbdcNvcSRbbu9JCBSLMcurYwvWc8WGDnpu7APxQo2ONtZrUggU3WxLxUJ2uBX+0GOFIcJeVeOOQ==", + "version": "5.10.0-34.5a9203d0590c951969e85a7d07215503f4672eb9", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.10.0-34.5a9203d0590c951969e85a7d07215503f4672eb9.tgz", + "integrity": "sha512-uCy/++3Jx/O3ufM+qv2H1L4tOemTNqcP/gyEVOlZqTpBvYJUe0tWtW0y3o2Ueq04mll4aM5X3f6ugQftOSLdFQ==", "devOptional": true }, "node_modules/@prisma/fetch-engine": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.9.1.tgz", - "integrity": "sha512-l0goQOMcNVOJs1kAcwqpKq3ylvkD9F04Ioe1oJoCqmz05mw22bNAKKGWuDd3zTUoUZr97va0c/UfLNru+PDmNA==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.10.2.tgz", + "integrity": "sha512-dSmXcqSt6DpTmMaLQ9K8ZKzVAMH3qwGCmYEZr/uVnzVhxRJ1EbT/w2MMwIdBNq1zT69Rvh0h75WMIi0mrIw7Hg==", "devOptional": true, "dependencies": { - "@prisma/debug": "5.9.1", - "@prisma/engines-version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", - "@prisma/get-platform": "5.9.1" + "@prisma/debug": "5.10.2", + "@prisma/engines-version": "5.10.0-34.5a9203d0590c951969e85a7d07215503f4672eb9", + "@prisma/get-platform": "5.10.2" } }, "node_modules/@prisma/get-platform": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.9.1.tgz", - "integrity": "sha512-6OQsNxTyhvG+T2Ksr8FPFpuPeL4r9u0JF0OZHUBI/Uy9SS43sPyAIutt4ZEAyqWQt104ERh70EZedkHZKsnNbg==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.10.2.tgz", + "integrity": "sha512-nqXP6vHiY2PIsebBAuDeWiUYg8h8mfjBckHh6Jezuwej0QJNnjDiOq30uesmg+JXxGk99nqyG3B7wpcOODzXvg==", "devOptional": true, "dependencies": { - "@prisma/debug": "5.9.1" + "@prisma/debug": "5.10.2" } }, "node_modules/@radix-ui/number": { @@ -12985,13 +12985,13 @@ "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==" }, "node_modules/prisma": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.9.1.tgz", - "integrity": "sha512-Hy/8KJZz0ELtkw4FnG9MS9rNWlXcJhf98Z2QMqi0QiVMoS8PzsBkpla0/Y5hTlob8F3HeECYphBjqmBxrluUrQ==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.10.2.tgz", + "integrity": "sha512-hqb/JMz9/kymRE25pMWCxkdyhbnIWrq+h7S6WysJpdnCvhstbJSNP/S6mScEcqiB8Qv2F+0R3yG+osRaWqZacQ==", "devOptional": true, "hasInstallScript": true, "dependencies": { - "@prisma/engines": "5.9.1" + "@prisma/engines": "5.10.2" }, "bin": { "prisma": "build/index.js" diff --git a/package.json b/package.json index 29f2a27..1910b00 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@google/generative-ai": "^0.2.1", "@hookform/resolvers": "^3.3.4", "@primer/react": "^36.7.1", - "@prisma/client": "^5.9.1", + "@prisma/client": "^5.10.2", "@radix-ui/react-avatar": "^1.0.4", "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.0.6", @@ -92,7 +92,7 @@ "jsdom": "^24.0.0", "postcss": "^8", "prettier": "3.2.5", - "prisma": "^5.9.1", + "prisma": "^5.10.2", "tailwindcss": "^3.3.0", "typescript": "^5", "vitest": "^1.2.2"