From 36d5ffaea1c6775fcc8399f4e7897d293ace27ec Mon Sep 17 00:00:00 2001 From: Leon Serfaty G Date: Fri, 26 Dec 2025 01:52:09 +0000 Subject: [PATCH] I just dont fucking get it --- package.json | 100 +++++++++++++++++++++++------------------------ push-to-gitea.sh | 57 +++++++++++++++++++++++++++ src/auth.ts | 2 +- 3 files changed, 106 insertions(+), 53 deletions(-) create mode 100644 push-to-gitea.sh diff --git a/package.json b/package.json index 05bc4ee..2630b42 100644 --- a/package.json +++ b/package.json @@ -4,72 +4,68 @@ "private": true, "scripts": { "dev": "next dev -p 3000", - "genkit:dev": "genkit start -- tsx src/ai/dev.ts", - "genkit:watch": "genkit start -- tsx --watch src/ai/dev.ts", "build": "next build", "start": "next start -p 3000", "lint": "next lint", "typecheck": "tsc --noEmit", - "db:seed": "tsx scripts/seed.ts" + "db:seed": "tsx scripts/seed.ts", + "outdated": "npm outdated" }, "dependencies": { - "@next-auth/better-sqlite3-adapter": "^0.3.1", - "@genkit-ai/googleai": "^1.14.1", - "@hookform/resolvers": "^3.3.4", - "@radix-ui/react-accordion": "^1.1.2", - "@radix-ui/react-alert-dialog": "^1.0.5", - "@radix-ui/react-avatar": "^1.0.4", - "@radix-ui/react-checkbox": "^1.0.4", - "@radix-ui/react-collapsible": "^1.0.3", - "@radix-ui/react-dialog": "^1.0.5", - "@radix-ui/react-dropdown-menu": "^2.0.6", - "@radix-ui/react-label": "^2.0.2", - "@radix-ui/react-menubar": "^1.0.4", - "@radix-ui/react-popover": "^1.0.7", - "@radix-ui/react-progress": "^1.0.3", - "@radix-ui/react-radio-group": "^1.1.3", - "@radix-ui/react-scroll-area": "^1.0.5", + "@hookform/resolvers": "^3.4.2", + "@auth/better-sqlite3-adapter": "^0.3.1", + "@radix-ui/react-accordion": "^1.2.0", + "@radix-ui/react-alert-dialog": "^1.1.1", + "@radix-ui/react-avatar": "^1.1.0", + "@radix-ui/react-checkbox": "^1.1.1", + "@radix-ui/react-collapsible": "^1.1.0", + "@radix-ui/react-dialog": "^1.1.1", + "@radix-ui/react-dropdown-menu": "^2.1.1", + "@radix-ui/react-label": "^2.1.0", + "@radix-ui/react-menubar": "^1.1.1", + "@radix-ui/react-popover": "^1.1.1", + "@radix-ui/react-progress": "^1.1.0", + "@radix-ui/react-radio-group": "^1.2.0", + "@radix-ui/react-scroll-area": "^1.1.0", "@radix-ui/react-select": "^2.0.0", - "@radix-ui/react-separator": "^1.0.3", - "@radix-ui/react-slider": "^1.1.2", - "@radix-ui/react-slot": "^1.0.2", - "@radix-ui/react-switch": "^1.0.3", - "@radix-ui/react-tabs": "^1.0.4", - "@radix-ui/react-toast": "^1.1.5", - "@radix-ui/react-tooltip": "^1.0.7", - "better-sqlite3": "^9.4.3", + "@radix-ui/react-separator": "^1.1.0", + "@radix-ui/react-slider": "^1.2.0", + "@radix-ui/react-slot": "^1.1.0", + "@radix-ui/react-switch": "^1.1.0", + "@radix-ui/react-tabs": "^1.1.0", + "@radix-ui/react-toast": "^1.2.1", + "@radix-ui/react-tooltip": "^1.1.2", + "better-sqlite3": "^9.6.0", "class-variance-authority": "^0.7.0", - "clsx": "^2.1.0", + "clsx": "^2.1.1", "date-fns": "^3.6.0", "dotenv": "^16.4.5", - "embla-carousel-react": "^8.0.0", - "firebase": "^10.9.0", - "framer-motion": "^11.0.20", - "genkit": "latest", - "lucide-react": "^0.359.0", - "next": "14.2.35", + "embla-carousel-react": "^8.1.5", + "firebase": "^10.12.2", + "framer-motion": "^11.2.10", + "lucide-react": "^0.395.0", + "next": "14.2.4", "next-auth": "4.24.7", - "nodemailer": "^6.9.13", + "nodemailer": "^6.9.14", "pdf-lib": "^1.17.1", - "react": "^18.2.0", - "react-day-picker": "^8.10.0", - "react-dom": "^18.2.0", - "react-hook-form": "^7.51.1", - "recharts": "^2.12.3", - "tailwind-merge": "^2.2.2", + "react": "^18.3.1", + "react-day-picker": "^8.10.1", + "react-dom": "^18.3.1", + "react-hook-form": "^7.51.5", + "recharts": "^2.12.7", + "tailwind-merge": "^2.3.0", "tailwindcss-animate": "^1.0.7", - "zod": "^3.22.4" + "zod": "^3.23.8" }, "devDependencies": { - "@types/better-sqlite3": "^7.6.9", - "@types/node": "^20", + "@types/better-sqlite3": "^7.6.10", + "@types/node": "^20.14.2", "@types/nodemailer": "^6.4.14", - "@types/react": "^18", - "@types/react-dom": "^18", - "genkit-cli": "latest", - "postcss": "^8", - "tailwindcss": "^3.4.1", - "tsx": "^4.7.1", - "typescript": "^5" + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", + "postcss": "^8.4.38", + "tailwindcss": "^3.4.4", + "tsx": "^4.15.6", + "typescript": "^5.4.5" } -} +} \ No newline at end of file diff --git a/push-to-gitea.sh b/push-to-gitea.sh new file mode 100644 index 0000000..1419a5c --- /dev/null +++ b/push-to-gitea.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# This script will initialize a Git repository and push your code to your Gitea server. +# +# HOW TO RUN THIS SCRIPT: +# 1. Open the Terminal in your development environment. +# 2. Type the following command and press Enter: +# bash push-to-gitea.sh +# + +# Stop the script if any command fails +set -e + +echo "Step 1: Initializing Git repository..." +# Check if a .git directory already exists +if [ -d ".git" ]; then + echo "Git repository already initialized." +else + git init -b main + echo "Repository initialized." +fi + +echo "Step 2: Adding all files to the repository..." +git add . +echo "Files added." + +echo "Step 3: Creating the first commit..." +# Check if a commit already exists to avoid errors on re-run +if git rev-parse -q --verify HEAD; then + echo "A commit already exists. Skipping commit." +else + git commit -m "Initial commit of EstimateFlow project" + echo "Initial commit created." +fi + + +echo "Step 4: Connecting to your Gitea server..." +# The URL for your Gitea repository +GITEA_URL="https://git.serfaty.co/admin/estimation-flow.git" + +# Check if the 'origin' remote already exists +if git remote get-url origin > /dev/null 2>&1; then + echo "Remote 'origin' is already configured." + # Optional: update the URL in case it's wrong + git remote set-url origin $GITEA_URL +else + git remote add origin $GITEA_URL + echo "Remote 'origin' added." +fi + + +echo "Step 5: Pushing your code to Gitea..." +git push -u origin main + +echo "" +echo "✅ All done! Your code has been pushed to your Gitea repository." +echo "You can view it at: $GITEA_URL" diff --git a/src/auth.ts b/src/auth.ts index 39875ae..5ac0f67 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -4,7 +4,7 @@ import CredentialsProvider from 'next-auth/providers/credentials'; import { z } from 'zod'; import { getUserByEmail } from '@/lib/actions/user'; import getDb from './lib/db'; -import { BetterSqlite3Adapter } from '@next-auth/better-sqlite3-adapter'; +import { BetterSqlite3Adapter } from '@auth/better-sqlite3-adapter'; const db = getDb();