diff --git a/.env.example b/.env.example deleted file mode 100644 index 19336667..00000000 --- a/.env.example +++ /dev/null @@ -1,29 +0,0 @@ -# Database Connection -# Replace with your MongoDB connection string -DATABASE_URL="mongodb://localhost:27017/editron" - -# Authentication Secret -# Generate a random secret using: openssl rand -base64 32 -AUTH_SECRET="" - -# GitHub OAuth Credentials (Optional for local development) -AUTH_GITHUB_ID="" -AUTH_GITHUB_SECRET="" - -# Google OAuth Credentials (Optional for local development) -AUTH_GOOGLE_ID="" -AUTH_GOOGLE_SECRET="" - -# AI Provider API Keys (Optional fallbacks) -GEMINI_API_KEY="" -GROQ_API_KEY="" -MISTRAL_API_KEY="" - -# Collaboration Server Configuration -# If running the collab server separately, provide its URL here -# Example: NEXT_PUBLIC_COLLAB_SERVER_URL="http://localhost:3001" -NEXT_PUBLIC_COLLAB_SERVER_URL="" - -# Environment Validation -# Set to 'true' to skip validation of environment variables during build -# SKIP_ENV_VALIDATION=false diff --git a/Dockerfile.collab b/Dockerfile.collab index 9a2c4f0c..20b8730d 100644 --- a/Dockerfile.collab +++ b/Dockerfile.collab @@ -11,7 +11,7 @@ RUN npm install # Copy server code COPY server/ ./server/ COPY lib/ ./lib/ -COPY next-auth.d.ts ./ +COPY types/ ./types/ COPY tsconfig.json ./ # Expose port diff --git a/auth.config.ts b/auth.config.ts index 91fe2360..1ec2905f 100644 --- a/auth.config.ts +++ b/auth.config.ts @@ -1,5 +1,5 @@ import Google from "next-auth/providers/google" -import type { NextAuthConfig } from "next-auth" +import type { AuthConfig } from "@auth/core" export default { providers: [ // GitHub({ @@ -12,4 +12,4 @@ export default { clientSecret: process.env.AUTH_GOOGLE_SECRET, }) ] -} satisfies NextAuthConfig \ No newline at end of file +} satisfies AuthConfig \ No newline at end of file diff --git a/lib/yjs.ts b/lib/yjs.ts index c69bb85b..aff4ae10 100644 --- a/lib/yjs.ts +++ b/lib/yjs.ts @@ -57,14 +57,6 @@ export function getOrCreateYDoc(roomId: string, token: string) { yDocs.set(roomId, { doc, provider }); - // Optional: Clean up when the connection is closed to prevent memory leaks - provider.on('synced', (isSynced: unknown) => { - console.log(`[Yjs] Room ${roomId} mapped. Synced:`, isSynced as boolean); - }); - provider.on('status', (event: unknown) => { - console.log(`[Yjs] Room ${roomId} status:`, (event as { status: 'connected' | 'disconnected' | 'connecting' }).status); - }); - return { doc, provider }; } diff --git a/package-lock.json b/package-lock.json index 16ce4354..7d30ef35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -92,7 +92,7 @@ }, "devDependencies": { "@eslint/eslintrc": "^3", - "@next/bundle-analyzer": "^15.5.12", + "@next/bundle-analyzer": "^15.5.18", "@tailwindcss/postcss": "^4", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.9.1",