From 1c456d32ac95083862ff123459a636b8174ca09e Mon Sep 17 00:00:00 2001 From: Lewis Carhart Date: Thu, 20 Mar 2025 12:48:08 +0000 Subject: [PATCH 1/6] chore: update dependencies and improve middleware logic - Updated various package dependencies including `@aws-sdk/client-securityhub`, `@ai-sdk/openai`, `@ai-sdk/provider`, `@ai-sdk/react`, `@tanstack/react-query`, and others to their latest versions. - Enhanced middleware logic to streamline authentication checks and improve session handling. - Refactored Google sign-in component for better readability and maintainability. - Adjusted layout component to remove unnecessary authentication checks. --- apps/app/package.json | 18 +- .../(dashboard)/[orgId]/(home)/layout.tsx | 7 - apps/app/src/components/google-sign-in.tsx | 58 ++--- apps/app/src/middleware.ts | 79 +++--- apps/portal/package.json | 14 +- bun.lock | 223 ++++------------- package.json | 3 +- packages/db/package.json | 2 +- packages/db/src/index.js | 26 +- yarn.lock | 233 +++++++++--------- 10 files changed, 254 insertions(+), 409 deletions(-) diff --git a/apps/app/package.json b/apps/app/package.json index 4a85882cbf..29263ad1b6 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -13,9 +13,9 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@ai-sdk/openai": "^1.2.5", - "@ai-sdk/provider": "^1.0.11", - "@ai-sdk/react": "^1.1.23", + "@ai-sdk/openai": "^1.2.7", + "@ai-sdk/provider": "^1.0.12", + "@ai-sdk/react": "^1.1.25", "@aws-sdk/client-s3": "^3.758.0", "@aws-sdk/s3-request-presigner": "^3.758.0", "@browserbasehq/sdk": "^2.4.0", @@ -26,7 +26,7 @@ "@novu/headless": "^2.6.6", "@novu/react": "^2.6.6", "@prisma/instrumentation": "^6.5.0", - "@tanstack/react-query": "^5.68.0", + "@tanstack/react-query": "^5.69.0", "@tanstack/react-table": "^8.21.2", "@tiptap/extension-table": "^2.11.5", "@tiptap/extension-table-cell": "^2.11.5", @@ -40,7 +40,7 @@ "@types/d3": "^7.4.3", "@uploadthing/react": "^7.3.0", "@upstash/ratelimit": "^2.0.5", - "ai": "^4.1.61", + "ai": "^4.1.64", "argon2": "^0.41.1", "bun": "^1.2.5", "crypto": "^1.0.1", @@ -52,7 +52,7 @@ "ky": "^1.7.5", "languine": "^3.1.2", "marked": "^15.0.7", - "next": "^15.3.0-canary.13", + "next": "^15.3.0-canary.14", "next-auth": "^5.0.0-beta.25", "next-international": "^1.3.1", "next-intl": "^3.26.5", @@ -61,8 +61,8 @@ "novel": "^1.0.2", "novu": "^2.6.6", "nuqs": "^2.4.1", - "playwright-core": "^1.51.0", - "posthog-js": "^1.231.0", + "playwright-core": "^1.51.1", + "posthog-js": "^1.232.0", "posthog-node": "^4.10.1", "puppeteer-core": "^24.4.0", "react": "^19.0.0", @@ -81,7 +81,7 @@ "tiptap-markdown": "^0.8.10", "ts-pattern": "^5.6.2", "use-debounce": "^10.0.4", - "use-long-press": "^3.2.0", + "use-long-press": "^3.3.0", "uuid": "^11.1.0", "xml2js": "^0.6.2", "yarn": "^1.22.22", diff --git a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/(home)/layout.tsx b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/(home)/layout.tsx index a1d11fa0f9..1c4bb2f821 100644 --- a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/(home)/layout.tsx +++ b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/(home)/layout.tsx @@ -1,6 +1,4 @@ -import { auth } from "@/auth"; import { getI18n } from "@/locales/server"; -import { redirect } from "next/navigation"; import { SecondaryMenu } from "@bubba/ui/secondary-menu"; export default async function Layout({ @@ -9,11 +7,6 @@ export default async function Layout({ children: React.ReactNode; }) { const t = await getI18n(); - const session = await auth(); - - if (!session?.user?.organizationId) { - redirect("/auth"); - } return (
diff --git a/apps/app/src/components/google-sign-in.tsx b/apps/app/src/components/google-sign-in.tsx index 4fe0b53930..89639e519a 100644 --- a/apps/app/src/components/google-sign-in.tsx +++ b/apps/app/src/components/google-sign-in.tsx @@ -9,39 +9,39 @@ import { signIn } from "next-auth/react"; import { useState } from "react"; export function GoogleSignIn({ - inviteCode, + inviteCode, }: { - inviteCode?: string; + inviteCode?: string; }) { - const t = useI18n(); + const t = useI18n(); - const [isLoading, setLoading] = useState(false); + const [isLoading, setLoading] = useState(false); - const handleSignIn = async () => { - setLoading(true); + const handleSignIn = async () => { + setLoading(true); - await signIn("google", { - redirectTo: inviteCode - ? `/api/auth/invitation?code=${inviteCode}` - : "/setup", - }); - }; + await signIn("google", { + redirectTo: inviteCode + ? `/api/auth/invitation?code=${inviteCode}` + : "/", + }); + }; - return ( - - ); + return ( + + ); } diff --git a/apps/app/src/middleware.ts b/apps/app/src/middleware.ts index 33fb7aa428..4e52fc4ab2 100644 --- a/apps/app/src/middleware.ts +++ b/apps/app/src/middleware.ts @@ -5,57 +5,62 @@ import { auth } from "@/auth"; import type { Session } from "next-auth"; export const config = { - matcher: [ - // Skip auth-related routes - "/((?!api|_next/static|_next/image|favicon.ico|monitoring|ingest).*)", - ], - runtime: "nodejs", // Specify the runtime environment as Node.js, since we're using AWS with Postgres. + matcher: [ + // Skip auth-related routes + "/((?!api|_next/static|_next/image|favicon.ico|monitoring|ingest).*)", + ], + runtime: "nodejs", // Specify the runtime environment as Node.js, since we're using AWS with Postgres. }; const I18nMiddleware = createI18nMiddleware({ - locales: ["en", "es", "fr", "no", "pt"], - defaultLocale: "en", - urlMappingStrategy: "rewrite", + locales: ["en", "es", "fr", "no", "pt"], + defaultLocale: "en", + urlMappingStrategy: "rewrite", }); // By invoking auth, we ensure that the session is loaded and we are wrapping the middleware. // Add any middleware logic here inside the callback. // See: https://authjs.dev/getting-started/session-management/protecting?framework=Next.js -async function mainMiddleware(request: NextRequest & { auth: Session | null }) { - try { - // If the user is not authenticated, redirect to the auth page - if (!request.auth && request.nextUrl.pathname !== "/auth") { - return NextResponse.redirect(new URL("/auth", request.nextUrl.origin)); - } +export async function middleware( + request: NextRequest & { auth: Session | null }, +) { + try { + const session = await auth(); - // Only handle root path redirects - if (request.nextUrl.pathname === "/") { - if (!request.auth) { - return NextResponse.redirect(new URL("/auth", request.nextUrl.origin)); - } + if (!session?.user && request.nextUrl.pathname !== "/auth") { + return NextResponse.redirect(new URL("/auth", request.nextUrl.origin)); + } - // If authenticated, let the page handle the redirection - // This way we avoid Prisma in middleware - return NextResponse.next(); - } + if (session?.user.id && request.nextUrl.pathname === "/auth") { + return NextResponse.redirect(new URL("/", request.nextUrl.origin)); + } - const response = I18nMiddleware(request); - const nextUrl = request.nextUrl; + // Only handle root path redirects + if (request.nextUrl.pathname === "/") { + if (!session?.user) { + return NextResponse.redirect(new URL("/auth", request.nextUrl.origin)); + } - const pathnameLocale = nextUrl.pathname.split("/", 2)?.[1]; + // If authenticated, let the page handle the redirection + // This way we avoid Prisma in middleware + return NextResponse.next(); + } - const pathnameWithoutLocale = pathnameLocale - ? nextUrl.pathname.slice(pathnameLocale.length + 1) - : nextUrl.pathname; + const response = I18nMiddleware(request); + const nextUrl = request.nextUrl; - response.headers.set("x-pathname", request.nextUrl.pathname); + const pathnameLocale = nextUrl.pathname.split("/", 2)?.[1]; - return response; - } catch (error) { - console.error("Middleware error:", error); - return new NextResponse("Internal Server Error", { status: 500 }); - } -} + const pathnameWithoutLocale = pathnameLocale + ? nextUrl.pathname.slice(pathnameLocale.length + 1) + : nextUrl.pathname; + + response.headers.set("x-pathname", request.nextUrl.pathname); -export default auth(mainMiddleware); + return response; + } catch (error) { + console.error("Middleware error:", error); + return new NextResponse("Internal Server Error", { status: 500 }); + } +} diff --git a/apps/portal/package.json b/apps/portal/package.json index 1447555ff3..544998ee02 100644 --- a/apps/portal/package.json +++ b/apps/portal/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@t3-oss/env-nextjs": "^0.12.0", - "better-auth": "^1.1.18", - "next": "^15.2.0", + "better-auth": "^1.2.4", + "next": "^15.2.3", "react": "^19.0.0", "react-dom": "^19.0.0", "react-otp-input": "^3.1.1" @@ -19,11 +19,11 @@ "devDependencies": { "@bubba/ui": "workspace:*", "@bubba/db": "workspace:*", - "@types/node": "^22.13.2", - "@types/react": "^19.0.8", - "@types/react-dom": "^19.0.3", - "postcss": "^8.5.2", + "@types/node": "^22.13.10", + "@types/react": "^19.0.12", + "@types/react-dom": "^19.0.4", + "postcss": "^8.5.3", "tailwindcss": "^3.4.17", - "typescript": "^5.7.3" + "typescript": "^5.8.2" } } \ No newline at end of file diff --git a/bun.lock b/bun.lock index c765a6c0b7..751dd9913a 100644 --- a/bun.lock +++ b/bun.lock @@ -5,7 +5,7 @@ "name": "comp", "dependencies": { "@aws-sdk/client-s3": "^3.758.0", - "@aws-sdk/client-securityhub": "^3.758.0", + "@aws-sdk/client-securityhub": "^3.765.0", "@azure/core-http": "^3.0.5", "@azure/identity": "^4.8.0", "@manypkg/cli": "^0.23.0", @@ -17,6 +17,7 @@ "d3": "^7.9.0", "gitmoji": "^1.1.1", "gray-matter": "^4.0.3", + "next": "^15.3.0-canary.14", "pg": "^8.14.1", "sharp": "^0.33.5", "use-debounce": "^10.0.4", @@ -32,9 +33,9 @@ "name": "@bubba/app", "version": "0.1.0", "dependencies": { - "@ai-sdk/openai": "^1.2.5", - "@ai-sdk/provider": "^1.0.11", - "@ai-sdk/react": "^1.1.23", + "@ai-sdk/openai": "^1.2.7", + "@ai-sdk/provider": "^1.0.12", + "@ai-sdk/react": "^1.1.25", "@aws-sdk/client-s3": "^3.758.0", "@aws-sdk/s3-request-presigner": "^3.758.0", "@browserbasehq/sdk": "^2.4.0", @@ -45,7 +46,7 @@ "@novu/headless": "^2.6.6", "@novu/react": "^2.6.6", "@prisma/instrumentation": "^6.5.0", - "@tanstack/react-query": "^5.68.0", + "@tanstack/react-query": "^5.69.0", "@tanstack/react-table": "^8.21.2", "@tiptap/extension-table": "^2.11.5", "@tiptap/extension-table-cell": "^2.11.5", @@ -59,7 +60,7 @@ "@types/d3": "^7.4.3", "@uploadthing/react": "^7.3.0", "@upstash/ratelimit": "^2.0.5", - "ai": "^4.1.61", + "ai": "^4.1.64", "argon2": "^0.41.1", "bun": "^1.2.5", "crypto": "^1.0.1", @@ -71,7 +72,7 @@ "ky": "^1.7.5", "languine": "^3.1.2", "marked": "^15.0.7", - "next": "^15.3.0-canary.13", + "next": "^15.3.0-canary.14", "next-auth": "^5.0.0-beta.25", "next-international": "^1.3.1", "next-intl": "^3.26.5", @@ -80,8 +81,8 @@ "novel": "^1.0.2", "novu": "^2.6.6", "nuqs": "^2.4.1", - "playwright-core": "^1.51.0", - "posthog-js": "^1.231.0", + "playwright-core": "^1.51.1", + "posthog-js": "^1.232.0", "posthog-node": "^4.10.1", "puppeteer-core": "^24.4.0", "react": "^19.0.0", @@ -100,7 +101,7 @@ "tiptap-markdown": "^0.8.10", "ts-pattern": "^5.6.2", "use-debounce": "^10.0.4", - "use-long-press": "^3.2.0", + "use-long-press": "^3.3.0", "uuid": "^11.1.0", "xml2js": "^0.6.2", "yarn": "^1.22.22", @@ -123,8 +124,8 @@ "version": "0.1.0", "dependencies": { "@t3-oss/env-nextjs": "^0.12.0", - "better-auth": "^1.1.18", - "next": "^15.2.0", + "better-auth": "^1.2.4", + "next": "^15.2.3", "react": "^19.0.0", "react-dom": "^19.0.0", "react-otp-input": "^3.1.1", @@ -132,12 +133,12 @@ "devDependencies": { "@bubba/db": "workspace:*", "@bubba/ui": "workspace:*", - "@types/node": "^22.13.2", - "@types/react": "^19.0.8", - "@types/react-dom": "^19.0.3", - "postcss": "^8.5.2", + "@types/node": "^22.13.10", + "@types/react": "^19.0.12", + "@types/react-dom": "^19.0.4", + "postcss": "^8.5.3", "tailwindcss": "^3.4.17", - "typescript": "^5.7.3", + "typescript": "^5.8.2", }, }, "packages/analytics": { @@ -305,13 +306,13 @@ }, }, "packages": { - "@ai-sdk/openai": ["@ai-sdk/openai@1.2.6", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "@ai-sdk/provider-utils": "2.1.14" }, "peerDependencies": { "zod": "^3.0.0" } }, "sha512-0HxWjE3NDABAxu6u33Q253a4N+xxOCD/M2HeZuALC1O2gjmzLeytxjSbDA6QU0PnVN0uaYLOc2YT/keFF5eGrg=="], + "@ai-sdk/openai": ["@ai-sdk/openai@1.2.7", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "@ai-sdk/provider-utils": "2.1.15" }, "peerDependencies": { "zod": "^3.0.0" } }, "sha512-0yYAr7wFrRAoP4BnZ5g4kL6BpsLzDN4m4cmw8C273FZn3Sqz7LsJ3h2YJv2EVB12GZDsgzmsRlMkLeKZI5JCPw=="], "@ai-sdk/provider": ["@ai-sdk/provider@1.0.12", "", { "dependencies": { "json-schema": "^0.4.0" } }, "sha512-88Uu1zJIE1UUOVJWfE2ybJXgiH8JJ97QY9fbmplErEbfa/k/1kF+tWMVAAJolF2aOGmazQGyQLhv4I9CCuVACw=="], "@ai-sdk/provider-utils": ["@ai-sdk/provider-utils@1.0.22", "", { "dependencies": { "@ai-sdk/provider": "0.0.26", "eventsource-parser": "^1.1.2", "nanoid": "^3.3.7", "secure-json-parse": "^2.7.0" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-YHK2rpj++wnLVc9vPGzGFP3Pjeld2MwhKinetA0zKXOoHAT/Jit5O8kZsxcSlJPu9wvcGT1UGZEjZrtO7PfFOQ=="], - "@ai-sdk/react": ["@ai-sdk/react@1.1.24", "", { "dependencies": { "@ai-sdk/provider-utils": "2.1.14", "@ai-sdk/ui-utils": "1.1.20", "swr": "^2.2.5", "throttleit": "2.1.0" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "zod": "^3.0.0" }, "optionalPeers": ["react", "zod"] }, "sha512-20rVK34QCaEl/4u87/Y+JXt7eCzF60UwoJOjHJhlCdmFrbk6AfRsijv0ludA9ELArE+ulxkSf21L3FokkZ2Gmg=="], + "@ai-sdk/react": ["@ai-sdk/react@1.1.25", "", { "dependencies": { "@ai-sdk/provider-utils": "2.1.15", "@ai-sdk/ui-utils": "1.1.21", "swr": "^2.2.5", "throttleit": "2.1.0" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "zod": "^3.0.0" }, "optionalPeers": ["react", "zod"] }, "sha512-uKrnxvJmiixAhndquDtac/q/wOnG9EFBkAsL6mpDRDflHQv34+xtkOKswDxyEzt1FaQFoqig0J44Lx0F3vGSkg=="], "@ai-sdk/solid": ["@ai-sdk/solid@0.0.54", "", { "dependencies": { "@ai-sdk/provider-utils": "1.0.22", "@ai-sdk/ui-utils": "0.0.50" }, "peerDependencies": { "solid-js": "^1.7.7" }, "optionalPeers": ["solid-js"] }, "sha512-96KWTVK+opdFeRubqrgaJXoNiDP89gNxFRWUp0PJOotZW816AbhUf4EnDjBjXTLjXL1n0h8tGSE9sZsRkj9wQQ=="], @@ -749,23 +750,23 @@ "@neondatabase/serverless": ["@neondatabase/serverless@0.10.4", "", { "dependencies": { "@types/pg": "8.11.6" } }, "sha512-2nZuh3VUO9voBauuh+IGYRhGU/MskWHt1IuZvHcJw6GLjDgtqj/KViKo7SIrLdGLdot7vFbiRRw+BgEy3wT9HA=="], - "@next/env": ["@next/env@15.3.0-canary.13", "", {}, "sha512-JSc7jRSVdstjZ0bfxKMFeYM+gVRgUbPpGSWq9JLDQDH/mYHMN+LMNR8CafQCKjoSL7tzkBpH9Ug6r9WaIescCw=="], + "@next/env": ["@next/env@15.3.0-canary.14", "", {}, "sha512-wYQx9YYFuPUNtQP839fW7bPPMb7KF1q0DFO9COqsy441OyiXHyVs0BnsnhULSVpSs3FSsfRglPXFpxkVxQiq2w=="], - "@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.3.0-canary.13", "", { "os": "darwin", "cpu": "arm64" }, "sha512-A1EiOZHBTFF3Asyb+h4R0/IuOFEx+HN/0ek9BwR7g4neqZunAMU0LaGeExhxX7eUDJR4NWV16HEQq6nBcJB/UA=="], + "@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.3.0-canary.14", "", { "os": "darwin", "cpu": "arm64" }, "sha512-23MqQNFQ1ljHZ6+onzltjDEmNXgMoXdTIOMnxpOdE4p8F45ODU2g+k0Vl4ypPwAfgqd8Ni6aI9jG7RJfubvkrg=="], - "@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.3.0-canary.13", "", { "os": "darwin", "cpu": "x64" }, "sha512-ojmJVrcv571Q893G0EZGgnYJOGjxYTYSvrNiXMaY2gz9W8p1G+wY/Fc6f2Vm5c2GQcjUdmJOb57x3Ujdxi3szw=="], + "@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.3.0-canary.14", "", { "os": "darwin", "cpu": "x64" }, "sha512-qFIbXnnjKqo3J5H3DhIMupmuxsf2nbwC+Kex42VVss9aCMn0Ap7zwZd/J54RIgC/gZJtP0KCqUY663xa0m/lBQ=="], - "@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.3.0-canary.13", "", { "os": "linux", "cpu": "arm64" }, "sha512-k4dEOZZ9x8PtHH8HtD/3h/epDBRqWOf13UOE3JY/NH60pY5t4uXG3JEj9tcKnezhv0/Q5eT9c6WiydXdjs2YvQ=="], + "@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.3.0-canary.14", "", { "os": "linux", "cpu": "arm64" }, "sha512-rpC12NgJ29z8iU4s6yl6AYsMcAiuDuzMljkTnAyUuRg/ehhlDoNMseidTldAofsnbp+K0NRNDujRHc+fgjeRAA=="], - "@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.3.0-canary.13", "", { "os": "linux", "cpu": "arm64" }, "sha512-Ms7b0OF05Q2qpo90ih/cVhviNrEatVZtsobBVyoXGfWxv/gOrhXoxuzROFGNdGXRZNJ7EgUaWmO4pZGjfUhEWw=="], + "@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.3.0-canary.14", "", { "os": "linux", "cpu": "arm64" }, "sha512-I1+JUYW3R9pWP2taLJABCaYXG6RybDHv8K1La9/7RGDRciPNu3RukjoFGL4/1SbzqjgIg/rkBuN4/mJ6XwwquA=="], - "@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.3.0-canary.13", "", { "os": "linux", "cpu": "x64" }, "sha512-id/4NWejJpglZiY/PLpV0H675bITfo0QrUNjZtRuKfphJNkPoRGsMXdaZ3mSpFscTqofyaINQ3fis0D4sSmJUw=="], + "@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.3.0-canary.14", "", { "os": "linux", "cpu": "x64" }, "sha512-JiqCXhIQdMnUa+Mc3G7Ed3r9AqnLlzKO2XcGgmm/zmAzIIxU3EVn0mD830B+h4zhq9FyQDKmvj9ZZkKRVfc26w=="], - "@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.3.0-canary.13", "", { "os": "linux", "cpu": "x64" }, "sha512-9eE2E6KN01yxwE9H2fWaQA6PRvfjuY+lvadGBpub/pf710kdWFe9VYb8zECT492Vw90axHmktFZDTXuf2WaVTA=="], + "@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.3.0-canary.14", "", { "os": "linux", "cpu": "x64" }, "sha512-M+4zHSgqBXTAYgZAJ0w07pYYA5Q2dALC4QBY+YWdugBRSQEIOq2xKo3WlxTbIpij5xTrL54uJZI8UBFYuHbecQ=="], - "@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.3.0-canary.13", "", { "os": "win32", "cpu": "arm64" }, "sha512-PbJ/yFCUBxhLr6wKoaC+CQebzeaiqrYOJXEMb9O1XFWp2te8okLjF2BihSziFVLtoA4m2one56pG5jU7W9GUzg=="], + "@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.3.0-canary.14", "", { "os": "win32", "cpu": "arm64" }, "sha512-2Jf9KI75uiRZtm27Sm3xn6xdosskabFpoZCI2q64r2ufuBx+gTgr5qZ6kIxcw9Oe/2atkWrjGXpdHNfJAxEXlA=="], - "@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.3.0-canary.13", "", { "os": "win32", "cpu": "x64" }, "sha512-6dUpH6huWVS0uBObUWBTolu/lZIP99oD1TdgjGt3S2te+OjXAlza8ERgR8mGTV04hpRZFv7tUivISaGlkYE+Bw=="], + "@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.3.0-canary.14", "", { "os": "win32", "cpu": "x64" }, "sha512-driLBL2CcZpXNdRbiLklaDOVvTmRCMhFEkJyQNK7EYhEKLH6QNaifi/NSyQrLRDhv9yfLLbVvDy7DlRiFBfWLQ=="], "@noble/ciphers": ["@noble/ciphers@0.6.0", "", {}, "sha512-mIbq/R9QXk5/cTfESb1OKtyFnk7oc1Om/8onA1158K9/OZUQFDEVy55jVTato+xmp3XX6F6Qh0zz0Nc1AxAlRQ=="], @@ -899,7 +900,7 @@ "@prisma/engines-version": ["@prisma/engines-version@6.5.0-73.173f8d54f8d52e692c7e27e72a88314ec7aeff60", "", {}, "sha512-iK3EmiVGFDCmXjSpdsKGNqy9hOdLnvYBrJB61far/oP03hlIxrb04OWmDjNTwtmZ3UZdA5MCvI+f+3k2jPTflQ=="], - "@prisma/extension-accelerate": ["@prisma/extension-accelerate@1.2.2", "", { "peerDependencies": { "@prisma/client": ">=4.16.1" } }, "sha512-LOlfkG6If+o8PFRzLzp26ackP/d+j2HrkTJaxuV/Wd+sdAHz/AkmzEDGbo2UpHFpxEM9hWMBe3ScSwUKYUDOXg=="], + "@prisma/extension-accelerate": ["@prisma/extension-accelerate@1.3.0", "", { "peerDependencies": { "@prisma/client": ">=4.16.1" } }, "sha512-W41D+kWejVJvMFEh45oYIU0VY+lIE3hh5vyHLHxgpyOfF+EHzSr8EIPT9kPRJg1FTYR7WGutXi64nyaNFUJ06A=="], "@prisma/fetch-engine": ["@prisma/fetch-engine@6.5.0", "", { "dependencies": { "@prisma/debug": "6.5.0", "@prisma/engines-version": "6.5.0-73.173f8d54f8d52e692c7e27e72a88314ec7aeff60", "@prisma/get-platform": "6.5.0" } }, "sha512-3LhYA+FXP6pqY8FLHCjewyE8pGXXJ7BxZw2rhPq+CZAhvflVzq4K8Qly3OrmOkn6wGlz79nyLQdknyCG2HBTuA=="], @@ -2709,7 +2710,7 @@ "netmask": ["netmask@2.0.2", "", {}, "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg=="], - "next": ["next@15.3.0-canary.13", "", { "dependencies": { "@next/env": "15.3.0-canary.13", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.3.0-canary.13", "@next/swc-darwin-x64": "15.3.0-canary.13", "@next/swc-linux-arm64-gnu": "15.3.0-canary.13", "@next/swc-linux-arm64-musl": "15.3.0-canary.13", "@next/swc-linux-x64-gnu": "15.3.0-canary.13", "@next/swc-linux-x64-musl": "15.3.0-canary.13", "@next/swc-win32-arm64-msvc": "15.3.0-canary.13", "@next/swc-win32-x64-msvc": "15.3.0-canary.13", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-c8BO/c1FjV/jY4OmlBTKaeI0YYDIsakkmJQFgpjq9RzoBetoi/VLAloZMDpsrfSFIhHDHhraLMxzSvS6mFKeuA=="], + "next": ["next@15.3.0-canary.14", "", { "dependencies": { "@next/env": "15.3.0-canary.14", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.3.0-canary.14", "@next/swc-darwin-x64": "15.3.0-canary.14", "@next/swc-linux-arm64-gnu": "15.3.0-canary.14", "@next/swc-linux-arm64-musl": "15.3.0-canary.14", "@next/swc-linux-x64-gnu": "15.3.0-canary.14", "@next/swc-linux-x64-musl": "15.3.0-canary.14", "@next/swc-win32-arm64-msvc": "15.3.0-canary.14", "@next/swc-win32-x64-msvc": "15.3.0-canary.14", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-YYn3Ucr7pbuvIB7iLHhhMiZ+HoDFe8ekgT7ZDuEyhPJVqodoVq2kd1VKWMNHBukNqe7HDz29SOYj/H/RA4OEGQ=="], "next-auth": ["next-auth@5.0.0-beta.25", "", { "dependencies": { "@auth/core": "0.37.2" }, "peerDependencies": { "@simplewebauthn/browser": "^9.0.1", "@simplewebauthn/server": "^9.0.2", "next": "^14.0.0-0 || ^15.0.0-0", "nodemailer": "^6.6.5", "react": "^18.2.0 || ^19.0.0-0" }, "optionalPeers": ["@simplewebauthn/browser", "@simplewebauthn/server", "nodemailer"] }, "sha512-2dJJw1sHQl2qxCrRk+KTQbeH+izFbGFPuJj5eGgBZFYyiYYtvlrBeUw1E/OJJxTRjuxbSYGnCTkUIRsIIW0bog=="], @@ -2913,7 +2914,7 @@ "postgres-range": ["postgres-range@1.1.4", "", {}, "sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w=="], - "posthog-js": ["posthog-js@1.231.2", "", { "dependencies": { "core-js": "^3.38.1", "fflate": "^0.4.8", "preact": "^10.19.3", "web-vitals": "^4.2.4" }, "peerDependencies": { "@rrweb/types": "2.0.0-alpha.17", "rrweb-snapshot": "2.0.0-alpha.17" }, "optionalPeers": ["@rrweb/types", "rrweb-snapshot"] }, "sha512-KTOZTvPbVZoZYC4vqZUmPoG/brbyNqqeeUllH4MZBIW0gyC6JJJYsU+za1of9La73F4KBN1ZM3O0tXpFrLSAww=="], + "posthog-js": ["posthog-js@1.232.0", "", { "dependencies": { "core-js": "^3.38.1", "fflate": "^0.4.8", "preact": "^10.19.3", "web-vitals": "^4.2.4" }, "peerDependencies": { "@rrweb/types": "2.0.0-alpha.17", "rrweb-snapshot": "2.0.0-alpha.17" }, "optionalPeers": ["@rrweb/types", "rrweb-snapshot"] }, "sha512-+flinmOGBz/YGpFbCcd/L1GCKleEkrkNRA8xTFJtaX8A/ZNEoUTdR8MYfFYj6qb9f5aSbexTLNzeglbYcgHXwA=="], "posthog-node": ["posthog-node@4.10.1", "", { "dependencies": { "axios": "^1.7.4" } }, "sha512-rEzVszfaOkUFTjEabDcRLJNRqMwTOeU1WpqKgQEDV3x82O4ODifkvkoCERaPxl/ossi1NtqKXBOZ+XnhQ19pNQ=="], @@ -3631,15 +3632,15 @@ "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="], - "@ai-sdk/openai/@ai-sdk/provider-utils": ["@ai-sdk/provider-utils@2.1.14", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "eventsource-parser": "^3.0.0", "nanoid": "^3.3.8", "secure-json-parse": "^2.7.0" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-0fNQwstwqHP+cE9bP9nQXeEhY/qJRGW5Y+AQrvwzd0EI2+gH1GmwI1IC/gIOksmz/gRy4G+kXXD+Fbq4T/jCbA=="], + "@ai-sdk/openai/@ai-sdk/provider-utils": ["@ai-sdk/provider-utils@2.1.15", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "eventsource-parser": "^3.0.0", "nanoid": "^3.3.8", "secure-json-parse": "^2.7.0" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-ndMVtDm2xS86t45CJZSfyl7UblZFewRB8gZkXQHeNi7BhjCYkhE+XQMwfDl6UOAO7kaV60IC1R4JLDWxWiiHug=="], "@ai-sdk/provider-utils/@ai-sdk/provider": ["@ai-sdk/provider@0.0.26", "", { "dependencies": { "json-schema": "^0.4.0" } }, "sha512-dQkfBDs2lTYpKM8389oopPdQgIU007GQyCbuPPrV+K6MtSII3HBfE0stUIMXUb44L+LK1t6GXPP7wjSzjO6uKg=="], "@ai-sdk/provider-utils/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], - "@ai-sdk/react/@ai-sdk/provider-utils": ["@ai-sdk/provider-utils@2.1.14", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "eventsource-parser": "^3.0.0", "nanoid": "^3.3.8", "secure-json-parse": "^2.7.0" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-0fNQwstwqHP+cE9bP9nQXeEhY/qJRGW5Y+AQrvwzd0EI2+gH1GmwI1IC/gIOksmz/gRy4G+kXXD+Fbq4T/jCbA=="], + "@ai-sdk/react/@ai-sdk/provider-utils": ["@ai-sdk/provider-utils@2.1.15", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "eventsource-parser": "^3.0.0", "nanoid": "^3.3.8", "secure-json-parse": "^2.7.0" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-ndMVtDm2xS86t45CJZSfyl7UblZFewRB8gZkXQHeNi7BhjCYkhE+XQMwfDl6UOAO7kaV60IC1R4JLDWxWiiHug=="], - "@ai-sdk/react/@ai-sdk/ui-utils": ["@ai-sdk/ui-utils@1.1.20", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "@ai-sdk/provider-utils": "2.1.14", "zod-to-json-schema": "^3.24.1" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-k+qQh1YA8/kH12d8KQFWjr0UxyS9nLibzbLr2OY6fzpfZg8xIAKlZeH952JIp2XwAp72tesgbsAmA15cDldtyw=="], + "@ai-sdk/react/@ai-sdk/ui-utils": ["@ai-sdk/ui-utils@1.1.21", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "@ai-sdk/provider-utils": "2.1.15", "zod-to-json-schema": "^3.24.1" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-z88UBEioQvJM6JsBoLmG6MOholc5pDkq1BBeb53NZ7JmMeWX4btCbrGmM4qs+gYLDnZokV/HB8C6zpS1jaJbAw=="], "@ai-sdk/ui-utils/@ai-sdk/provider": ["@ai-sdk/provider@0.0.26", "", { "dependencies": { "json-schema": "^0.4.0" } }, "sha512-dQkfBDs2lTYpKM8389oopPdQgIU007GQyCbuPPrV+K6MtSII3HBfE0stUIMXUb44L+LK1t6GXPP7wjSzjO6uKg=="], @@ -3693,12 +3694,14 @@ "@browserbasehq/sdk/@types/node": ["@types/node@18.19.80", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-kEWeMwMeIvxYkeg1gTc01awpwLbfMRZXdIhwRcakd/KlK53jmRC26LqcbIt7fnAQTu5GzlnWmzA3H6+l1u6xxQ=="], - "@bubba/app/ai": ["ai@4.1.63", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "@ai-sdk/provider-utils": "2.1.14", "@ai-sdk/react": "1.1.24", "@ai-sdk/ui-utils": "1.1.20", "@opentelemetry/api": "1.9.0", "eventsource-parser": "^3.0.0", "jsondiffpatch": "0.6.0" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "zod": "^3.0.0" }, "optionalPeers": ["react", "zod"] }, "sha512-XXAU/jbtNZOHkTh9ZO4+ttXFXRjcs/62jJHbpO2M8UiH2FVIDia4fy4D5l8jGKlYVzKeE7rx/qB2GtrMjcc07w=="], + "@bubba/app/ai": ["ai@4.1.64", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "@ai-sdk/provider-utils": "2.1.15", "@ai-sdk/react": "1.1.25", "@ai-sdk/ui-utils": "1.1.21", "@opentelemetry/api": "1.9.0", "eventsource-parser": "^3.0.0", "jsondiffpatch": "0.6.0" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "zod": "^3.0.0" }, "optionalPeers": ["react", "zod"] }, "sha512-pTq12C0V4T9LA0U7Do0G2jFVW1t7LT+s2bS2buL9GB1JH0tmIaLXzzXeq1W6cTWD8dlnEM+9fjB86aEh2gMMig=="], "@bubba/app/typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="], "@bubba/db/typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="], + "@bubba/email/@types/react": ["@types/react@19.0.12", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-V6Ar115dBDrjbtXSrS+/Oruobc+qVbbUxDFC1RSbRqLt5SYvxxyIDrSC85RWml54g+jfNeEMZhEj7wW07ONQhA=="], + "@bubba/email/typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="], "@bubba/integrations/@ai-sdk/openai": ["@ai-sdk/openai@0.0.66", "", { "dependencies": { "@ai-sdk/provider": "0.0.24", "@ai-sdk/provider-utils": "1.0.20" }, "peerDependencies": { "zod": "^3.0.0" } }, "sha512-V4XeDnlNl5/AY3GB3ozJUjqnBLU5pK3DacKTbCNH3zH8/MggJoH6B8wRGdLUPVFMcsMz60mtvh4DC9JsIVFrKw=="], @@ -3779,8 +3782,6 @@ "@types/pg/pg-types": ["pg-types@4.0.2", "", { "dependencies": { "pg-int8": "1.0.1", "pg-numeric": "1.0.2", "postgres-array": "~3.0.1", "postgres-bytea": "~3.0.0", "postgres-date": "~2.1.0", "postgres-interval": "^3.0.0", "postgres-range": "^1.1.1" } }, "sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng=="], - "@uploadthing/react/next": ["next@15.2.3", "", { "dependencies": { "@next/env": "15.2.3", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.2.3", "@next/swc-darwin-x64": "15.2.3", "@next/swc-linux-arm64-gnu": "15.2.3", "@next/swc-linux-arm64-musl": "15.2.3", "@next/swc-linux-x64-gnu": "15.2.3", "@next/swc-linux-x64-musl": "15.2.3", "@next/swc-win32-arm64-msvc": "15.2.3", "@next/swc-win32-x64-msvc": "15.2.3", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w=="], - "@vue/compiler-core/@babel/parser": ["@babel/parser@7.26.10", "", { "dependencies": { "@babel/types": "^7.26.10" }, "bin": "./bin/babel-parser.js" }, "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA=="], "@vue/compiler-sfc/@babel/parser": ["@babel/parser@7.26.10", "", { "dependencies": { "@babel/types": "^7.26.10" }, "bin": "./bin/babel-parser.js" }, "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA=="], @@ -3879,8 +3880,6 @@ "gaxios/https-proxy-agent": ["https-proxy-agent@5.0.1", "", { "dependencies": { "agent-base": "6", "debug": "4" } }, "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA=="], - "geist/next": ["next@15.2.3", "", { "dependencies": { "@next/env": "15.2.3", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.2.3", "@next/swc-darwin-x64": "15.2.3", "@next/swc-linux-arm64-gnu": "15.2.3", "@next/swc-linux-arm64-musl": "15.2.3", "@next/swc-linux-x64-gnu": "15.2.3", "@next/swc-linux-x64-musl": "15.2.3", "@next/swc-win32-arm64-msvc": "15.2.3", "@next/swc-win32-x64-msvc": "15.2.3", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w=="], - "get-uri/data-uri-to-buffer": ["data-uri-to-buffer@6.0.2", "", {}, "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw=="], "google-auth-library/lru-cache": ["lru-cache@6.0.0", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA=="], @@ -3937,12 +3936,6 @@ "next/postcss": ["postcss@8.4.31", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="], - "next-auth/next": ["next@15.2.3", "", { "dependencies": { "@next/env": "15.2.3", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.2.3", "@next/swc-darwin-x64": "15.2.3", "@next/swc-linux-arm64-gnu": "15.2.3", "@next/swc-linux-arm64-musl": "15.2.3", "@next/swc-linux-x64-gnu": "15.2.3", "@next/swc-linux-x64-musl": "15.2.3", "@next/swc-win32-arm64-msvc": "15.2.3", "@next/swc-win32-x64-msvc": "15.2.3", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w=="], - - "next-intl/next": ["next@15.2.3", "", { "dependencies": { "@next/env": "15.2.3", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.2.3", "@next/swc-darwin-x64": "15.2.3", "@next/swc-linux-arm64-gnu": "15.2.3", "@next/swc-linux-arm64-musl": "15.2.3", "@next/swc-linux-x64-gnu": "15.2.3", "@next/swc-linux-x64-musl": "15.2.3", "@next/swc-win32-arm64-msvc": "15.2.3", "@next/swc-win32-x64-msvc": "15.2.3", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w=="], - - "next-safe-action/next": ["next@15.2.3", "", { "dependencies": { "@next/env": "15.2.3", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.2.3", "@next/swc-darwin-x64": "15.2.3", "@next/swc-linux-arm64-gnu": "15.2.3", "@next/swc-linux-arm64-musl": "15.2.3", "@next/swc-linux-x64-gnu": "15.2.3", "@next/swc-linux-x64-musl": "15.2.3", "@next/swc-win32-arm64-msvc": "15.2.3", "@next/swc-win32-x64-msvc": "15.2.3", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w=="], - "node-gyp/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], "node-gyp/semver": ["semver@5.3.0", "", { "bin": { "semver": "./bin/semver" } }, "sha512-mfmm3/H9+67MCVix1h+IXTpDwL6710LyHuk7+cWC9T1mE0qz4iHhh6r4hU2wrIT9iTsAAC2XQRvfblL028cpLw=="], @@ -3963,8 +3956,6 @@ "npm-run-path/path-key": ["path-key@4.0.0", "", {}, "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ=="], - "nuqs/next": ["next@15.2.3", "", { "dependencies": { "@next/env": "15.2.3", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.2.3", "@next/swc-darwin-x64": "15.2.3", "@next/swc-linux-arm64-gnu": "15.2.3", "@next/swc-linux-arm64-musl": "15.2.3", "@next/swc-linux-x64-gnu": "15.2.3", "@next/swc-linux-x64-musl": "15.2.3", "@next/swc-win32-arm64-msvc": "15.2.3", "@next/swc-win32-x64-msvc": "15.2.3", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w=="], - "ora/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], "p-queue/eventemitter3": ["eventemitter3@4.0.7", "", {}, "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="], @@ -3977,6 +3968,8 @@ "plist/xmlbuilder": ["xmlbuilder@15.1.1", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="], + "portal/@types/react": ["@types/react@19.0.12", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-V6Ar115dBDrjbtXSrS+/Oruobc+qVbbUxDFC1RSbRqLt5SYvxxyIDrSC85RWml54g+jfNeEMZhEj7wW07ONQhA=="], + "portal/next": ["next@15.2.3", "", { "dependencies": { "@next/env": "15.2.3", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.2.3", "@next/swc-darwin-x64": "15.2.3", "@next/swc-linux-arm64-gnu": "15.2.3", "@next/swc-linux-arm64-musl": "15.2.3", "@next/swc-linux-x64-gnu": "15.2.3", "@next/swc-linux-x64-musl": "15.2.3", "@next/swc-win32-arm64-msvc": "15.2.3", "@next/swc-win32-x64-msvc": "15.2.3", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w=="], "portal/typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="], @@ -4081,9 +4074,9 @@ "@browserbasehq/sdk/@types/node/undici-types": ["undici-types@5.26.5", "", {}, "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="], - "@bubba/app/ai/@ai-sdk/provider-utils": ["@ai-sdk/provider-utils@2.1.14", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "eventsource-parser": "^3.0.0", "nanoid": "^3.3.8", "secure-json-parse": "^2.7.0" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-0fNQwstwqHP+cE9bP9nQXeEhY/qJRGW5Y+AQrvwzd0EI2+gH1GmwI1IC/gIOksmz/gRy4G+kXXD+Fbq4T/jCbA=="], + "@bubba/app/ai/@ai-sdk/provider-utils": ["@ai-sdk/provider-utils@2.1.15", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "eventsource-parser": "^3.0.0", "nanoid": "^3.3.8", "secure-json-parse": "^2.7.0" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-ndMVtDm2xS86t45CJZSfyl7UblZFewRB8gZkXQHeNi7BhjCYkhE+XQMwfDl6UOAO7kaV60IC1R4JLDWxWiiHug=="], - "@bubba/app/ai/@ai-sdk/ui-utils": ["@ai-sdk/ui-utils@1.1.20", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "@ai-sdk/provider-utils": "2.1.14", "zod-to-json-schema": "^3.24.1" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-k+qQh1YA8/kH12d8KQFWjr0UxyS9nLibzbLr2OY6fzpfZg8xIAKlZeH952JIp2XwAp72tesgbsAmA15cDldtyw=="], + "@bubba/app/ai/@ai-sdk/ui-utils": ["@ai-sdk/ui-utils@1.1.21", "", { "dependencies": { "@ai-sdk/provider": "1.0.12", "@ai-sdk/provider-utils": "2.1.15", "zod-to-json-schema": "^3.24.1" }, "peerDependencies": { "zod": "^3.0.0" }, "optionalPeers": ["zod"] }, "sha512-z88UBEioQvJM6JsBoLmG6MOholc5pDkq1BBeb53NZ7JmMeWX4btCbrGmM4qs+gYLDnZokV/HB8C6zpS1jaJbAw=="], "@bubba/app/ai/eventsource-parser": ["eventsource-parser@3.0.0", "", {}, "sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA=="], @@ -4137,26 +4130,6 @@ "@types/pg/pg-types/postgres-interval": ["postgres-interval@3.0.0", "", {}, "sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw=="], - "@uploadthing/react/next/@next/env": ["@next/env@15.2.3", "", {}, "sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw=="], - - "@uploadthing/react/next/@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.2.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw=="], - - "@uploadthing/react/next/@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.2.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw=="], - - "@uploadthing/react/next/@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ=="], - - "@uploadthing/react/next/@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q=="], - - "@uploadthing/react/next/@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w=="], - - "@uploadthing/react/next/@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg=="], - - "@uploadthing/react/next/@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.2.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q=="], - - "@uploadthing/react/next/@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.2.3", "", { "os": "win32", "cpu": "x64" }, "sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w=="], - - "@uploadthing/react/next/postcss": ["postcss@8.4.31", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="], - "are-we-there-yet/readable-stream/isarray": ["isarray@1.0.0", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="], "are-we-there-yet/readable-stream/safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="], @@ -4205,26 +4178,6 @@ "gaxios/https-proxy-agent/agent-base": ["agent-base@6.0.2", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="], - "geist/next/@next/env": ["@next/env@15.2.3", "", {}, "sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw=="], - - "geist/next/@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.2.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw=="], - - "geist/next/@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.2.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw=="], - - "geist/next/@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ=="], - - "geist/next/@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q=="], - - "geist/next/@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w=="], - - "geist/next/@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg=="], - - "geist/next/@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.2.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q=="], - - "geist/next/@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.2.3", "", { "os": "win32", "cpu": "x64" }, "sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w=="], - - "geist/next/postcss": ["postcss@8.4.31", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="], - "google-auth-library/lru-cache/yallist": ["yallist@4.0.0", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="], "inquirer/ansi-escapes/type-fest": ["type-fest@0.21.3", "", {}, "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="], @@ -4245,66 +4198,6 @@ "languine/@trigger.dev/sdk/uuid": ["uuid@9.0.1", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="], - "next-auth/next/@next/env": ["@next/env@15.2.3", "", {}, "sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw=="], - - "next-auth/next/@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.2.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw=="], - - "next-auth/next/@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.2.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw=="], - - "next-auth/next/@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ=="], - - "next-auth/next/@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q=="], - - "next-auth/next/@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w=="], - - "next-auth/next/@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg=="], - - "next-auth/next/@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.2.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q=="], - - "next-auth/next/@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.2.3", "", { "os": "win32", "cpu": "x64" }, "sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w=="], - - "next-auth/next/postcss": ["postcss@8.4.31", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="], - - "next-intl/next/@next/env": ["@next/env@15.2.3", "", {}, "sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw=="], - - "next-intl/next/@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.2.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw=="], - - "next-intl/next/@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.2.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw=="], - - "next-intl/next/@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ=="], - - "next-intl/next/@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q=="], - - "next-intl/next/@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w=="], - - "next-intl/next/@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg=="], - - "next-intl/next/@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.2.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q=="], - - "next-intl/next/@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.2.3", "", { "os": "win32", "cpu": "x64" }, "sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w=="], - - "next-intl/next/postcss": ["postcss@8.4.31", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="], - - "next-safe-action/next/@next/env": ["@next/env@15.2.3", "", {}, "sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw=="], - - "next-safe-action/next/@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.2.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw=="], - - "next-safe-action/next/@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.2.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw=="], - - "next-safe-action/next/@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ=="], - - "next-safe-action/next/@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q=="], - - "next-safe-action/next/@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w=="], - - "next-safe-action/next/@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg=="], - - "next-safe-action/next/@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.2.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q=="], - - "next-safe-action/next/@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.2.3", "", { "os": "win32", "cpu": "x64" }, "sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w=="], - - "next-safe-action/next/postcss": ["postcss@8.4.31", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="], - "next/postcss/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], "node-gyp/glob/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], @@ -4315,26 +4208,6 @@ "novu/open/is-wsl": ["is-wsl@2.2.0", "", { "dependencies": { "is-docker": "^2.0.0" } }, "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="], - "nuqs/next/@next/env": ["@next/env@15.2.3", "", {}, "sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw=="], - - "nuqs/next/@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.2.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw=="], - - "nuqs/next/@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.2.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw=="], - - "nuqs/next/@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ=="], - - "nuqs/next/@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q=="], - - "nuqs/next/@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w=="], - - "nuqs/next/@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg=="], - - "nuqs/next/@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.2.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q=="], - - "nuqs/next/@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.2.3", "", { "os": "win32", "cpu": "x64" }, "sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w=="], - - "nuqs/next/postcss": ["postcss@8.4.31", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="], - "portal/next/@next/env": ["@next/env@15.2.3", "", {}, "sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw=="], "portal/next/@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.2.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw=="], @@ -4413,8 +4286,6 @@ "@bubba/integrations/@azure/identity/open/is-wsl": ["is-wsl@2.2.0", "", { "dependencies": { "is-docker": "^2.0.0" } }, "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="], - "@uploadthing/react/next/postcss/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], - "cmdk/@radix-ui/react-dialog/@radix-ui/react-dismissable-layer/@radix-ui/react-use-callback-ref": ["@radix-ui/react-use-callback-ref@1.0.0", "", { "dependencies": { "@babel/runtime": "^7.13.10" }, "peerDependencies": { "react": "^16.8 || ^17.0 || ^18.0" } }, "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg=="], "cmdk/@radix-ui/react-dialog/@radix-ui/react-dismissable-layer/@radix-ui/react-use-escape-keydown": ["@radix-ui/react-use-escape-keydown@1.0.0", "", { "dependencies": { "@babel/runtime": "^7.13.10", "@radix-ui/react-use-callback-ref": "1.0.0" }, "peerDependencies": { "react": "^16.8 || ^17.0 || ^18.0" } }, "sha512-JwfBCUIfhXRxKExgIqGa4CQsiMemo1Xt0W/B4ei3fpzpvPENKpMKQ8mZSB6Acj3ebrAEgi2xiQvcI1PAAodvyg=="], @@ -4427,8 +4298,6 @@ "cmdk/@radix-ui/react-dialog/@radix-ui/react-use-controllable-state/@radix-ui/react-use-callback-ref": ["@radix-ui/react-use-callback-ref@1.0.0", "", { "dependencies": { "@babel/runtime": "^7.13.10" }, "peerDependencies": { "react": "^16.8 || ^17.0 || ^18.0" } }, "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg=="], - "geist/next/postcss/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], - "languine/@trigger.dev/sdk/@trigger.dev/core/eventsource-parser": ["eventsource-parser@3.0.0", "", {}, "sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA=="], "languine/@trigger.dev/sdk/@trigger.dev/core/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], @@ -4437,16 +4306,8 @@ "languine/@trigger.dev/sdk/@trigger.dev/core/zod": ["zod@3.23.8", "", {}, "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g=="], - "next-auth/next/postcss/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], - - "next-intl/next/postcss/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], - - "next-safe-action/next/postcss/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], - "node-gyp/glob/minimatch/brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="], - "nuqs/next/postcss/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], - "portal/next/postcss/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], "react-email/next/postcss/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], diff --git a/package.json b/package.json index 08bdb4863e..58d8b4f7bc 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ ], "dependencies": { "@aws-sdk/client-s3": "^3.758.0", - "@aws-sdk/client-securityhub": "^3.758.0", + "@aws-sdk/client-securityhub": "^3.765.0", "@azure/core-http": "^3.0.5", "@azure/identity": "^4.8.0", "@manypkg/cli": "^0.23.0", @@ -40,6 +40,7 @@ "d3": "^7.9.0", "gitmoji": "^1.1.1", "gray-matter": "^4.0.3", + "next": "^15.3.0-canary.14", "pg": "^8.14.1", "sharp": "^0.33.5", "use-debounce": "^10.0.4" diff --git a/packages/db/package.json b/packages/db/package.json index a0b42b406d..4efbbf04fb 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -27,7 +27,7 @@ "@neondatabase/serverless": "^0.10.4", "@prisma/adapter-neon": "^6.5.0", "@prisma/client": "^6.5.0", - "@prisma/extension-accelerate": "^1.2.2", + "@prisma/extension-accelerate": "^1.3.0", "prisma": "^6.5.0" }, "devDependencies": { diff --git a/packages/db/src/index.js b/packages/db/src/index.js index bac2be198d..d91de728bd 100644 --- a/packages/db/src/index.js +++ b/packages/db/src/index.js @@ -1,36 +1,18 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.db = void 0; -const serverless_1 = require("@neondatabase/serverless"); -const serverless_2 = require("@neondatabase/serverless"); -const adapter_neon_1 = require("@prisma/adapter-neon"); const client_1 = require("@prisma/client"); -// Ensure this only runs in a Node.js environment -if (typeof window === "undefined") { - const ws = require("ws"); - serverless_1.neonConfig.webSocketConstructor = ws; -} -serverless_1.neonConfig.useSecureWebSocket = true; +const pg_1 = require("pg"); +const adapter_pg_1 = require("@prisma/adapter-pg"); const createPrismaClient = () => { const connectionString = process.env.DATABASE_URL; if (!connectionString) { throw new Error("DATABASE_URL is not defined"); } - // Use Neon for serverless environments - if (connectionString.includes("neon.tech")) { - const pool = new serverless_2.Pool({ connectionString }); - const adapter = new adapter_neon_1.PrismaNeon(pool); - return new client_1.PrismaClient({ - adapter, - log: ["error", "warn"], - }); - } // Only import pg in a Node.js environment if (typeof window === "undefined") { - const { Pool: PgPool } = require("pg"); - const { PrismaPg } = require("@prisma/adapter-pg"); - const pool = new PgPool({ connectionString }); - const adapter = new PrismaPg(pool); + const pool = new pg_1.Pool({ connectionString }); + const adapter = new adapter_pg_1.PrismaPg(pool); return new client_1.PrismaClient({ adapter, log: ["error", "warn"], diff --git a/yarn.lock b/yarn.lock index 95602c434d..fbde0a7368 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11,13 +11,13 @@ "@ai-sdk/provider" "0.0.24" "@ai-sdk/provider-utils" "1.0.20" -"@ai-sdk/openai@^1.2.5": - version "1.2.6" - resolved "https://registry.npmjs.org/@ai-sdk/openai/-/openai-1.2.6.tgz" - integrity sha512-0HxWjE3NDABAxu6u33Q253a4N+xxOCD/M2HeZuALC1O2gjmzLeytxjSbDA6QU0PnVN0uaYLOc2YT/keFF5eGrg== +"@ai-sdk/openai@^1.2.7": + version "1.2.7" + resolved "https://registry.npmjs.org/@ai-sdk/openai/-/openai-1.2.7.tgz" + integrity sha512-0yYAr7wFrRAoP4BnZ5g4kL6BpsLzDN4m4cmw8C273FZn3Sqz7LsJ3h2YJv2EVB12GZDsgzmsRlMkLeKZI5JCPw== dependencies: "@ai-sdk/provider" "1.0.12" - "@ai-sdk/provider-utils" "2.1.14" + "@ai-sdk/provider-utils" "2.1.15" "@ai-sdk/provider@0.0.24": version "0.0.24" @@ -33,7 +33,7 @@ dependencies: json-schema "^0.4.0" -"@ai-sdk/provider@1.0.12", "@ai-sdk/provider@^1.0.11": +"@ai-sdk/provider@1.0.12", "@ai-sdk/provider@^1.0.12": version "1.0.12" resolved "https://registry.npmjs.org/@ai-sdk/provider/-/provider-1.0.12.tgz" integrity sha512-88Uu1zJIE1UUOVJWfE2ybJXgiH8JJ97QY9fbmplErEbfa/k/1kF+tWMVAAJolF2aOGmazQGyQLhv4I9CCuVACw== @@ -60,10 +60,10 @@ nanoid "^3.3.7" secure-json-parse "^2.7.0" -"@ai-sdk/provider-utils@2.1.14": - version "2.1.14" - resolved "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-2.1.14.tgz" - integrity sha512-0fNQwstwqHP+cE9bP9nQXeEhY/qJRGW5Y+AQrvwzd0EI2+gH1GmwI1IC/gIOksmz/gRy4G+kXXD+Fbq4T/jCbA== +"@ai-sdk/provider-utils@2.1.15": + version "2.1.15" + resolved "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-2.1.15.tgz" + integrity sha512-ndMVtDm2xS86t45CJZSfyl7UblZFewRB8gZkXQHeNi7BhjCYkhE+XQMwfDl6UOAO7kaV60IC1R4JLDWxWiiHug== dependencies: "@ai-sdk/provider" "1.0.12" eventsource-parser "^3.0.0" @@ -80,13 +80,13 @@ swr "^2.2.5" throttleit "2.1.0" -"@ai-sdk/react@1.1.24", "@ai-sdk/react@^1.1.23": - version "1.1.24" - resolved "https://registry.npmjs.org/@ai-sdk/react/-/react-1.1.24.tgz" - integrity sha512-20rVK34QCaEl/4u87/Y+JXt7eCzF60UwoJOjHJhlCdmFrbk6AfRsijv0ludA9ELArE+ulxkSf21L3FokkZ2Gmg== +"@ai-sdk/react@1.1.25", "@ai-sdk/react@^1.1.25": + version "1.1.25" + resolved "https://registry.npmjs.org/@ai-sdk/react/-/react-1.1.25.tgz" + integrity sha512-uKrnxvJmiixAhndquDtac/q/wOnG9EFBkAsL6mpDRDflHQv34+xtkOKswDxyEzt1FaQFoqig0J44Lx0F3vGSkg== dependencies: - "@ai-sdk/provider-utils" "2.1.14" - "@ai-sdk/ui-utils" "1.1.20" + "@ai-sdk/provider-utils" "2.1.15" + "@ai-sdk/ui-utils" "1.1.21" swr "^2.2.5" throttleit "2.1.0" @@ -118,13 +118,13 @@ secure-json-parse "^2.7.0" zod-to-json-schema "^3.23.3" -"@ai-sdk/ui-utils@1.1.20": - version "1.1.20" - resolved "https://registry.npmjs.org/@ai-sdk/ui-utils/-/ui-utils-1.1.20.tgz" - integrity sha512-k+qQh1YA8/kH12d8KQFWjr0UxyS9nLibzbLr2OY6fzpfZg8xIAKlZeH952JIp2XwAp72tesgbsAmA15cDldtyw== +"@ai-sdk/ui-utils@1.1.21": + version "1.1.21" + resolved "https://registry.npmjs.org/@ai-sdk/ui-utils/-/ui-utils-1.1.21.tgz" + integrity sha512-z88UBEioQvJM6JsBoLmG6MOholc5pDkq1BBeb53NZ7JmMeWX4btCbrGmM4qs+gYLDnZokV/HB8C6zpS1jaJbAw== dependencies: "@ai-sdk/provider" "1.0.12" - "@ai-sdk/provider-utils" "2.1.14" + "@ai-sdk/provider-utils" "2.1.15" zod-to-json-schema "^3.24.1" "@ai-sdk/vue@0.0.59": @@ -321,7 +321,7 @@ "@smithy/util-waiter" "^4.0.2" tslib "^2.6.2" -"@aws-sdk/client-securityhub@^3.0.0", "@aws-sdk/client-securityhub@^3.758.0": +"@aws-sdk/client-securityhub@^3.0.0", "@aws-sdk/client-securityhub@^3.765.0": version "3.765.0" resolved "https://registry.npmjs.org/@aws-sdk/client-securityhub/-/client-securityhub-3.765.0.tgz" integrity sha512-H/8tftWfmnZGvVDMOnAn+PxfF/OdE9aqlvi1jfcBHhqu1FgZu5vF3Gzg4uTVOIqM3tvMd7jEE2CswpFINNwCpg== @@ -1244,9 +1244,9 @@ tailwindcss "^3.4.17" typescript "^5.8.2" dependencies: - "@ai-sdk/openai" "^1.2.5" - "@ai-sdk/provider" "^1.0.11" - "@ai-sdk/react" "^1.1.23" + "@ai-sdk/openai" "^1.2.7" + "@ai-sdk/provider" "^1.0.12" + "@ai-sdk/react" "^1.1.25" "@aws-sdk/client-s3" "^3.758.0" "@aws-sdk/s3-request-presigner" "^3.758.0" "@browserbasehq/sdk" "^2.4.0" @@ -1257,7 +1257,7 @@ "@novu/headless" "^2.6.6" "@novu/react" "^2.6.6" "@prisma/instrumentation" "^6.5.0" - "@tanstack/react-query" "^5.68.0" + "@tanstack/react-query" "^5.69.0" "@tanstack/react-table" "^8.21.2" "@tiptap/extension-table" "^2.11.5" "@tiptap/extension-table-cell" "^2.11.5" @@ -1271,7 +1271,7 @@ "@types/d3" "^7.4.3" "@uploadthing/react" "^7.3.0" "@upstash/ratelimit" "^2.0.5" - ai "^4.1.61" + ai "^4.1.64" argon2 "^0.41.1" bun "^1.2.5" crypto "^1.0.1" @@ -1283,7 +1283,7 @@ ky "^1.7.5" languine "^3.1.2" marked "^15.0.7" - next "^15.3.0-canary.13" + next "^15.3.0-canary.14" next-auth "^5.0.0-beta.25" next-international "^1.3.1" next-intl "^3.26.5" @@ -1292,8 +1292,8 @@ novel "^1.0.2" novu "^2.6.6" nuqs "^2.4.1" - playwright-core "^1.51.0" - posthog-js "^1.231.0" + playwright-core "^1.51.1" + posthog-js "^1.232.0" posthog-node "^4.10.1" puppeteer-core "^24.4.0" react "^19.0.0" @@ -1312,7 +1312,7 @@ tiptap-markdown "^0.8.10" ts-pattern "^5.6.2" use-debounce "^10.0.4" - use-long-press "^3.2.0" + use-long-press "^3.3.0" uuid "^11.1.0" xml2js "^0.6.2" yarn "^1.22.22" @@ -1342,7 +1342,6 @@ dependencies: "@bubba/ui" "workspace:*" "@bubba/utils" "workspace:*" - dependencies: "@react-email/components" "0.0.31" "@react-email/render" "0.0.10" "@react-email/tailwind" "1.0.4" @@ -1363,9 +1362,7 @@ "@ai-sdk/openai" "^0.0.66" "@aws-sdk/client-securityhub" "^3.0.0" "@azure/identity" "^3.0.0" - dependencies: "@bubba/app" "workspace:*" - dependencies: "@google-cloud/security-center" "^7.0.0" "@slack/bolt" "^3.22.0" "@slack/web-api" "^7.8.0" @@ -2280,10 +2277,10 @@ resolved "https://registry.npmjs.org/@next/env/-/env-15.2.3.tgz" integrity sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw== -"@next/env@15.3.0-canary.13": - version "15.3.0-canary.13" - resolved "https://registry.npmjs.org/@next/env/-/env-15.3.0-canary.13.tgz" - integrity sha512-JSc7jRSVdstjZ0bfxKMFeYM+gVRgUbPpGSWq9JLDQDH/mYHMN+LMNR8CafQCKjoSL7tzkBpH9Ug6r9WaIescCw== +"@next/env@15.3.0-canary.14": + version "15.3.0-canary.14" + resolved "https://registry.npmjs.org/@next/env/-/env-15.3.0-canary.14.tgz" + integrity sha512-wYQx9YYFuPUNtQP839fW7bPPMb7KF1q0DFO9COqsy441OyiXHyVs0BnsnhULSVpSs3FSsfRglPXFpxkVxQiq2w== "@next/swc-darwin-arm64@15.0.4": version "15.0.4" @@ -2295,10 +2292,10 @@ resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.2.3.tgz" integrity sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw== -"@next/swc-darwin-arm64@15.3.0-canary.13": - version "15.3.0-canary.13" - resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.3.0-canary.13.tgz" - integrity sha512-A1EiOZHBTFF3Asyb+h4R0/IuOFEx+HN/0ek9BwR7g4neqZunAMU0LaGeExhxX7eUDJR4NWV16HEQq6nBcJB/UA== +"@next/swc-darwin-arm64@15.3.0-canary.14": + version "15.3.0-canary.14" + resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.3.0-canary.14.tgz" + integrity sha512-23MqQNFQ1ljHZ6+onzltjDEmNXgMoXdTIOMnxpOdE4p8F45ODU2g+k0Vl4ypPwAfgqd8Ni6aI9jG7RJfubvkrg== "@next/swc-darwin-x64@15.0.4": version "15.0.4" @@ -2310,10 +2307,10 @@ resolved "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.2.3.tgz" integrity sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw== -"@next/swc-darwin-x64@15.3.0-canary.13": - version "15.3.0-canary.13" - resolved "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.3.0-canary.13.tgz" - integrity sha512-ojmJVrcv571Q893G0EZGgnYJOGjxYTYSvrNiXMaY2gz9W8p1G+wY/Fc6f2Vm5c2GQcjUdmJOb57x3Ujdxi3szw== +"@next/swc-darwin-x64@15.3.0-canary.14": + version "15.3.0-canary.14" + resolved "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.3.0-canary.14.tgz" + integrity sha512-qFIbXnnjKqo3J5H3DhIMupmuxsf2nbwC+Kex42VVss9aCMn0Ap7zwZd/J54RIgC/gZJtP0KCqUY663xa0m/lBQ== "@next/swc-linux-arm64-gnu@15.0.4": version "15.0.4" @@ -2325,10 +2322,10 @@ resolved "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.2.3.tgz" integrity sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ== -"@next/swc-linux-arm64-gnu@15.3.0-canary.13": - version "15.3.0-canary.13" - resolved "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.3.0-canary.13.tgz" - integrity sha512-k4dEOZZ9x8PtHH8HtD/3h/epDBRqWOf13UOE3JY/NH60pY5t4uXG3JEj9tcKnezhv0/Q5eT9c6WiydXdjs2YvQ== +"@next/swc-linux-arm64-gnu@15.3.0-canary.14": + version "15.3.0-canary.14" + resolved "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.3.0-canary.14.tgz" + integrity sha512-rpC12NgJ29z8iU4s6yl6AYsMcAiuDuzMljkTnAyUuRg/ehhlDoNMseidTldAofsnbp+K0NRNDujRHc+fgjeRAA== "@next/swc-linux-arm64-musl@15.0.4": version "15.0.4" @@ -2340,10 +2337,10 @@ resolved "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.2.3.tgz" integrity sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q== -"@next/swc-linux-arm64-musl@15.3.0-canary.13": - version "15.3.0-canary.13" - resolved "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.3.0-canary.13.tgz" - integrity sha512-Ms7b0OF05Q2qpo90ih/cVhviNrEatVZtsobBVyoXGfWxv/gOrhXoxuzROFGNdGXRZNJ7EgUaWmO4pZGjfUhEWw== +"@next/swc-linux-arm64-musl@15.3.0-canary.14": + version "15.3.0-canary.14" + resolved "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.3.0-canary.14.tgz" + integrity sha512-I1+JUYW3R9pWP2taLJABCaYXG6RybDHv8K1La9/7RGDRciPNu3RukjoFGL4/1SbzqjgIg/rkBuN4/mJ6XwwquA== "@next/swc-linux-x64-gnu@15.0.4": version "15.0.4" @@ -2355,10 +2352,10 @@ resolved "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.2.3.tgz" integrity sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w== -"@next/swc-linux-x64-gnu@15.3.0-canary.13": - version "15.3.0-canary.13" - resolved "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.3.0-canary.13.tgz" - integrity sha512-id/4NWejJpglZiY/PLpV0H675bITfo0QrUNjZtRuKfphJNkPoRGsMXdaZ3mSpFscTqofyaINQ3fis0D4sSmJUw== +"@next/swc-linux-x64-gnu@15.3.0-canary.14": + version "15.3.0-canary.14" + resolved "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.3.0-canary.14.tgz" + integrity sha512-JiqCXhIQdMnUa+Mc3G7Ed3r9AqnLlzKO2XcGgmm/zmAzIIxU3EVn0mD830B+h4zhq9FyQDKmvj9ZZkKRVfc26w== "@next/swc-linux-x64-musl@15.0.4": version "15.0.4" @@ -2370,10 +2367,10 @@ resolved "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.2.3.tgz" integrity sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg== -"@next/swc-linux-x64-musl@15.3.0-canary.13": - version "15.3.0-canary.13" - resolved "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.3.0-canary.13.tgz" - integrity sha512-9eE2E6KN01yxwE9H2fWaQA6PRvfjuY+lvadGBpub/pf710kdWFe9VYb8zECT492Vw90axHmktFZDTXuf2WaVTA== +"@next/swc-linux-x64-musl@15.3.0-canary.14": + version "15.3.0-canary.14" + resolved "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.3.0-canary.14.tgz" + integrity sha512-M+4zHSgqBXTAYgZAJ0w07pYYA5Q2dALC4QBY+YWdugBRSQEIOq2xKo3WlxTbIpij5xTrL54uJZI8UBFYuHbecQ== "@next/swc-win32-arm64-msvc@15.0.4": version "15.0.4" @@ -2385,10 +2382,10 @@ resolved "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.2.3.tgz" integrity sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q== -"@next/swc-win32-arm64-msvc@15.3.0-canary.13": - version "15.3.0-canary.13" - resolved "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.3.0-canary.13.tgz" - integrity sha512-PbJ/yFCUBxhLr6wKoaC+CQebzeaiqrYOJXEMb9O1XFWp2te8okLjF2BihSziFVLtoA4m2one56pG5jU7W9GUzg== +"@next/swc-win32-arm64-msvc@15.3.0-canary.14": + version "15.3.0-canary.14" + resolved "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.3.0-canary.14.tgz" + integrity sha512-2Jf9KI75uiRZtm27Sm3xn6xdosskabFpoZCI2q64r2ufuBx+gTgr5qZ6kIxcw9Oe/2atkWrjGXpdHNfJAxEXlA== "@next/swc-win32-x64-msvc@15.0.4": version "15.0.4" @@ -2400,10 +2397,10 @@ resolved "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.2.3.tgz" integrity sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w== -"@next/swc-win32-x64-msvc@15.3.0-canary.13": - version "15.3.0-canary.13" - resolved "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.3.0-canary.13.tgz" - integrity sha512-6dUpH6huWVS0uBObUWBTolu/lZIP99oD1TdgjGt3S2te+OjXAlza8ERgR8mGTV04hpRZFv7tUivISaGlkYE+Bw== +"@next/swc-win32-x64-msvc@15.3.0-canary.14": + version "15.3.0-canary.14" + resolved "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.3.0-canary.14.tgz" + integrity sha512-driLBL2CcZpXNdRbiLklaDOVvTmRCMhFEkJyQNK7EYhEKLH6QNaifi/NSyQrLRDhv9yfLLbVvDy7DlRiFBfWLQ== "@noble/ciphers@^0.6.0": version "0.6.0" @@ -2918,9 +2915,9 @@ integrity sha512-iK3EmiVGFDCmXjSpdsKGNqy9hOdLnvYBrJB61far/oP03hlIxrb04OWmDjNTwtmZ3UZdA5MCvI+f+3k2jPTflQ== "@prisma/extension-accelerate@^1.2.2": - version "1.2.2" - resolved "https://registry.npmjs.org/@prisma/extension-accelerate/-/extension-accelerate-1.2.2.tgz" - integrity sha512-LOlfkG6If+o8PFRzLzp26ackP/d+j2HrkTJaxuV/Wd+sdAHz/AkmzEDGbo2UpHFpxEM9hWMBe3ScSwUKYUDOXg== + version "1.3.0" + resolved "https://registry.npmjs.org/@prisma/extension-accelerate/-/extension-accelerate-1.3.0.tgz" + integrity sha512-W41D+kWejVJvMFEh45oYIU0VY+lIE3hh5vyHLHxgpyOfF+EHzSr8EIPT9kPRJg1FTYR7WGutXi64nyaNFUJ06A== "@prisma/fetch-engine@6.5.0": version "6.5.0" @@ -4617,7 +4614,7 @@ resolved "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.69.0.tgz" integrity sha512-Kn410jq6vs1P8Nm+ZsRj9H+U3C0kjuEkYLxbiCyn3MDEiYor1j2DGVULqAz62SLZtUZ/e9Xt6xMXiJ3NJ65WyQ== -"@tanstack/react-query@^5.68.0": +"@tanstack/react-query@^5.69.0": version "5.69.0" resolved "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.69.0.tgz" integrity sha512-Ift3IUNQqTcaFa1AiIQ7WCb/PPy8aexZdq9pZWLXhfLcLxH0+PZqJ2xFImxCpdDZrFRZhLJrh76geevS5xjRhA== @@ -5476,14 +5473,21 @@ resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz" integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ== -"@types/react@*", "@types/react@19.0.10", "@types/react@>=16.8", "@types/react@>=17.0.0", "@types/react@>=18", "@types/react@^16.8.0 || ^17.0.0 || ^18.0.0", "@types/react@^17.0.0 || ^18.0.0 || ^19.0.0", "@types/react@^19.0.0", "@types/react@^19.0.8": +"@types/react@*", "@types/react@19.0.10", "@types/react@>=16.8", "@types/react@>=17.0.0", "@types/react@>=18", "@types/react@^16.8.0 || ^17.0.0 || ^18.0.0", "@types/react@^17.0.0 || ^18.0.0 || ^19.0.0", "@types/react@^19.0.0": version "19.0.10" resolved "https://registry.npmjs.org/@types/react/-/react-19.0.10.tgz" integrity sha512-JuRQ9KXLEjaUNjTWpzuR231Z2WpIwczOkBEIvbHNCzQefFIT0L8IqE6NV6ULLyC1SI/i234JnDoMkfg+RjQj2g== dependencies: csstype "^3.0.2" -"@types/react-dom@*", "@types/react-dom@19.0.4", "@types/react-dom@^19.0.0", "@types/react-dom@^19.0.3": +"@types/react@^19.0.0", "@types/react@^19.0.12": + version "19.0.12" + resolved "https://registry.npmjs.org/@types/react/-/react-19.0.12.tgz" + integrity sha512-V6Ar115dBDrjbtXSrS+/Oruobc+qVbbUxDFC1RSbRqLt5SYvxxyIDrSC85RWml54g+jfNeEMZhEj7wW07ONQhA== + dependencies: + csstype "^3.0.2" + +"@types/react-dom@*", "@types/react-dom@19.0.4", "@types/react-dom@^19.0.0", "@types/react-dom@^19.0.4": version "19.0.4" resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.0.4.tgz" integrity sha512-4fSQ8vWFkg+TGhePfUzVmat3eC14TXYSsiiDSLI0dVLsrm9gZFABjPy/Qu6TKgl1tq1Bu1yDsuQgY3A3DOjCcg== @@ -5802,15 +5806,15 @@ ai@3.4.33, ai@^3.4.33: secure-json-parse "^2.7.0" zod-to-json-schema "^3.23.3" -ai@^4.1.61: - version "4.1.63" - resolved "https://registry.npmjs.org/ai/-/ai-4.1.63.tgz" - integrity sha512-XXAU/jbtNZOHkTh9ZO4+ttXFXRjcs/62jJHbpO2M8UiH2FVIDia4fy4D5l8jGKlYVzKeE7rx/qB2GtrMjcc07w== +ai@^4.1.64: + version "4.1.64" + resolved "https://registry.npmjs.org/ai/-/ai-4.1.64.tgz" + integrity sha512-pTq12C0V4T9LA0U7Do0G2jFVW1t7LT+s2bS2buL9GB1JH0tmIaLXzzXeq1W6cTWD8dlnEM+9fjB86aEh2gMMig== dependencies: "@ai-sdk/provider" "1.0.12" - "@ai-sdk/provider-utils" "2.1.14" - "@ai-sdk/react" "1.1.24" - "@ai-sdk/ui-utils" "1.1.20" + "@ai-sdk/provider-utils" "2.1.15" + "@ai-sdk/react" "1.1.25" + "@ai-sdk/ui-utils" "1.1.21" "@opentelemetry/api" "1.9.0" eventsource-parser "^3.0.0" jsondiffpatch "0.6.0" @@ -6148,7 +6152,7 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -better-auth@^1.1.18: +better-auth@^1.2.4: version "1.2.4" resolved "https://registry.npmjs.org/better-auth/-/better-auth-1.2.4.tgz" integrity sha512-/ZK2jbUjm8JwdeCLFrUWUBmexPyI9PkaLVXWLWtN60sMDHTY8B5G72wcHglo1QMFBaw4G0qFkP5ayl9k6XfDaA== @@ -10566,7 +10570,7 @@ next@15.0.4: postcss "8.4.31" styled-jsx "5.1.6" -next@*, "next@>= 14.0.0", next@>=13.2.0, next@>=14.2.0, "next@^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0", "next@^14.0.0-0 || ^15.0.0-0", next@^15.2.0: +next@^15.2.3: version "15.2.3" resolved "https://registry.npmjs.org/next/-/next-15.2.3.tgz" integrity sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w== @@ -10589,28 +10593,28 @@ next@*, "next@>= 14.0.0", next@>=13.2.0, next@>=14.2.0, "next@^10.0.0 || ^11.0.0 postcss "8.4.31" styled-jsx "5.1.6" -"next@^15.3.0-canary.13": - version "15.3.0-canary.13" - resolved "https://registry.npmjs.org/next/-/next-15.3.0-canary.13.tgz" - integrity sha512-c8BO/c1FjV/jY4OmlBTKaeI0YYDIsakkmJQFgpjq9RzoBetoi/VLAloZMDpsrfSFIhHDHhraLMxzSvS6mFKeuA== +next@*, "next@>= 14.0.0", next@>=13.2.0, next@>=14.2.0, "next@^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0", "next@^14.0.0-0 || ^15.0.0-0", "next@^15.3.0-canary.14": + version "15.3.0-canary.14" + resolved "https://registry.npmjs.org/next/-/next-15.3.0-canary.14.tgz" + integrity sha512-YYn3Ucr7pbuvIB7iLHhhMiZ+HoDFe8ekgT7ZDuEyhPJVqodoVq2kd1VKWMNHBukNqe7HDz29SOYj/H/RA4OEGQ== + optionalDependencies: + "@next/swc-darwin-arm64" "15.3.0-canary.14" + "@next/swc-darwin-x64" "15.3.0-canary.14" + "@next/swc-linux-arm64-gnu" "15.3.0-canary.14" + "@next/swc-linux-arm64-musl" "15.3.0-canary.14" + "@next/swc-linux-x64-gnu" "15.3.0-canary.14" + "@next/swc-linux-x64-musl" "15.3.0-canary.14" + "@next/swc-win32-arm64-msvc" "15.3.0-canary.14" + "@next/swc-win32-x64-msvc" "15.3.0-canary.14" + sharp "^0.33.5" dependencies: - "@next/env" "15.3.0-canary.13" + "@next/env" "15.3.0-canary.14" "@swc/counter" "0.1.3" "@swc/helpers" "0.5.15" busboy "1.6.0" caniuse-lite "^1.0.30001579" postcss "8.4.31" styled-jsx "5.1.6" - optionalDependencies: - sharp "^0.33.5" - "@next/swc-darwin-arm64" "15.3.0-canary.13" - "@next/swc-darwin-x64" "15.3.0-canary.13" - "@next/swc-linux-arm64-gnu" "15.3.0-canary.13" - "@next/swc-linux-arm64-musl" "15.3.0-canary.13" - "@next/swc-linux-x64-gnu" "15.3.0-canary.13" - "@next/swc-linux-x64-musl" "15.3.0-canary.13" - "@next/swc-win32-arm64-msvc" "15.3.0-canary.13" - "@next/swc-win32-x64-msvc" "15.3.0-canary.13" "next-auth@^5.0.0-beta.25": version "5.0.0-beta.25" @@ -11303,7 +11307,7 @@ pkg-types@^1.1.3, pkg-types@^1.3.0: mlly "^1.7.4" pathe "^2.0.1" -playwright-core@^1.51.0: +playwright-core@^1.51.1: version "1.51.1" resolved "https://registry.npmjs.org/playwright-core/-/playwright-core-1.51.1.tgz" integrity sha512-/crRMj8+j/Nq5s8QcvegseuyeZPxpQCZb6HNk3Sos3BlZyAknRjoyJPFWkpNn8v0+P3WiwqFF8P+zQo4eqiNuw== @@ -11323,17 +11327,16 @@ plist@^3.1.0: devDependencies: "@bubba/db" "workspace:*" "@bubba/ui" "workspace:*" - devDependencies: - "@types/node" "^22.13.2" - "@types/react" "^19.0.8" - "@types/react-dom" "^19.0.3" - postcss "^8.5.2" + "@types/node" "^22.13.10" + "@types/react" "^19.0.12" + "@types/react-dom" "^19.0.4" + postcss "^8.5.3" tailwindcss "^3.4.17" - typescript "^5.7.3" + typescript "^5.8.2" dependencies: "@t3-oss/env-nextjs" "^0.12.0" - better-auth "^1.1.18" - next "^15.2.0" + better-auth "^1.2.4" + next "^15.2.3" react "^19.0.0" react-dom "^19.0.0" react-otp-input "^3.1.1" @@ -11352,7 +11355,7 @@ postcss@8.4.31: picocolors "^1.0.0" source-map-js "^1.0.2" -postcss@>=8.0.9, postcss@^8.0.0, postcss@^8.1.0, postcss@^8.2.14, postcss@^8.4.21, postcss@^8.4.47, postcss@^8.4.48, postcss@^8.5.2, postcss@^8.5.3: +postcss@>=8.0.9, postcss@^8.0.0, postcss@^8.1.0, postcss@^8.2.14, postcss@^8.4.21, postcss@^8.4.47, postcss@^8.4.48, postcss@^8.5.3: version "8.5.3" resolved "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz" integrity sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A== @@ -11462,10 +11465,10 @@ postgres-range@^1.1.1: resolved "https://registry.npmjs.org/postgres-range/-/postgres-range-1.1.4.tgz" integrity sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w== -posthog-js@^1.215.3, posthog-js@^1.231.0: - version "1.231.2" - resolved "https://registry.npmjs.org/posthog-js/-/posthog-js-1.231.2.tgz" - integrity sha512-KTOZTvPbVZoZYC4vqZUmPoG/brbyNqqeeUllH4MZBIW0gyC6JJJYsU+za1of9La73F4KBN1ZM3O0tXpFrLSAww== +posthog-js@^1.215.3, posthog-js@^1.232.0: + version "1.232.0" + resolved "https://registry.npmjs.org/posthog-js/-/posthog-js-1.232.0.tgz" + integrity sha512-+flinmOGBz/YGpFbCcd/L1GCKleEkrkNRA8xTFJtaX8A/ZNEoUTdR8MYfFYj6qb9f5aSbexTLNzeglbYcgHXwA== dependencies: core-js "^3.38.1" fflate "^0.4.8" @@ -13924,7 +13927,7 @@ use-latest@^1.2.1: dependencies: use-isomorphic-layout-effect "^1.1.1" -use-long-press@^3.2.0: +use-long-press@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/use-long-press/-/use-long-press-3.3.0.tgz" integrity sha512-Yedz46ILxsb1BTS6kUzpV/wyEZPUlJDq+8Oat0LP1eOZQHbS887baJHJbIGENqCo8wTKNxmoTHLdY8lU/e+wvw== From f2b40394a8e17b9cfb9c2b519d400ba4b5a303ad Mon Sep 17 00:00:00 2001 From: Lewis Carhart Date: Thu, 20 Mar 2025 12:58:59 +0000 Subject: [PATCH 2/6] chore: update Next.js and related dependencies - Upgraded `next` to version `15.3.0-canary.14` for improved features and performance. - Updated `@types/react` to `19.0.10` and `posthog-js` to `1.232.0` for better type definitions and analytics support. - Adjusted `@types/react-dom` to `19.0.4` for consistency across type definitions. - Enhanced `providers.tsx` to use fragment syntax for rendering children. --- apps/portal/package.json | 10 ++- apps/portal/src/app/[locale]/providers.tsx | 2 +- bun.lock | 43 +++------- packages/analytics/package.json | 11 ++- yarn.lock | 94 ++++------------------ 5 files changed, 42 insertions(+), 118 deletions(-) diff --git a/apps/portal/package.json b/apps/portal/package.json index 544998ee02..942dd75fe4 100644 --- a/apps/portal/package.json +++ b/apps/portal/package.json @@ -11,7 +11,7 @@ "dependencies": { "@t3-oss/env-nextjs": "^0.12.0", "better-auth": "^1.2.4", - "next": "^15.2.3", + "next": "^15.3.0-canary.14", "react": "^19.0.0", "react-dom": "^19.0.0", "react-otp-input": "^3.1.1" @@ -20,10 +20,14 @@ "@bubba/ui": "workspace:*", "@bubba/db": "workspace:*", "@types/node": "^22.13.10", - "@types/react": "^19.0.12", - "@types/react-dom": "^19.0.4", + "@types/react": "19.0.10", + "@types/react-dom": "19.0.4", "postcss": "^8.5.3", "tailwindcss": "^3.4.17", "typescript": "^5.8.2" + }, + "resolutions": { + "@types/react": "19.0.10", + "@types/react-dom": "19.0.4" } } \ No newline at end of file diff --git a/apps/portal/src/app/[locale]/providers.tsx b/apps/portal/src/app/[locale]/providers.tsx index 475c112e4b..0f11b57525 100644 --- a/apps/portal/src/app/[locale]/providers.tsx +++ b/apps/portal/src/app/[locale]/providers.tsx @@ -31,7 +31,7 @@ export function Providers({ children, locale }: ProviderProps) { {children} ) : ( - children + <>{children} )} diff --git a/bun.lock b/bun.lock index 751dd9913a..5337a828a7 100644 --- a/bun.lock +++ b/bun.lock @@ -125,7 +125,7 @@ "dependencies": { "@t3-oss/env-nextjs": "^0.12.0", "better-auth": "^1.2.4", - "next": "^15.2.3", + "next": "^15.3.0-canary.14", "react": "^19.0.0", "react-dom": "^19.0.0", "react-otp-input": "^3.1.1", @@ -134,8 +134,8 @@ "@bubba/db": "workspace:*", "@bubba/ui": "workspace:*", "@types/node": "^22.13.10", - "@types/react": "^19.0.12", - "@types/react-dom": "^19.0.4", + "@types/react": "19.0.10", + "@types/react-dom": "19.0.4", "postcss": "^8.5.3", "tailwindcss": "^3.4.17", "typescript": "^5.8.2", @@ -145,8 +145,13 @@ "name": "@bubba/analytics", "version": "1.0.0", "dependencies": { - "posthog-js": "^1.215.3", - "posthog-node": "^4.4.1", + "posthog-js": "^1.232.0", + "posthog-node": "^4.10.1", + }, + "devDependencies": { + "@types/node": "^22.13.10", + "@types/react": "19.0.10", + "@types/react-dom": "19.0.4", }, }, "packages/db": { @@ -157,7 +162,7 @@ "@neondatabase/serverless": "^0.10.4", "@prisma/adapter-neon": "^6.5.0", "@prisma/client": "^6.5.0", - "@prisma/extension-accelerate": "^1.2.2", + "@prisma/extension-accelerate": "^1.3.0", "prisma": "^6.5.0", }, "devDependencies": { @@ -3968,10 +3973,6 @@ "plist/xmlbuilder": ["xmlbuilder@15.1.1", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="], - "portal/@types/react": ["@types/react@19.0.12", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-V6Ar115dBDrjbtXSrS+/Oruobc+qVbbUxDFC1RSbRqLt5SYvxxyIDrSC85RWml54g+jfNeEMZhEj7wW07ONQhA=="], - - "portal/next": ["next@15.2.3", "", { "dependencies": { "@next/env": "15.2.3", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.2.3", "@next/swc-darwin-x64": "15.2.3", "@next/swc-linux-arm64-gnu": "15.2.3", "@next/swc-linux-arm64-musl": "15.2.3", "@next/swc-linux-x64-gnu": "15.2.3", "@next/swc-linux-x64-musl": "15.2.3", "@next/swc-win32-arm64-msvc": "15.2.3", "@next/swc-win32-x64-msvc": "15.2.3", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w=="], - "portal/typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="], "postcss/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], @@ -4208,26 +4209,6 @@ "novu/open/is-wsl": ["is-wsl@2.2.0", "", { "dependencies": { "is-docker": "^2.0.0" } }, "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="], - "portal/next/@next/env": ["@next/env@15.2.3", "", {}, "sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw=="], - - "portal/next/@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@15.2.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw=="], - - "portal/next/@next/swc-darwin-x64": ["@next/swc-darwin-x64@15.2.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw=="], - - "portal/next/@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ=="], - - "portal/next/@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@15.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q=="], - - "portal/next/@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w=="], - - "portal/next/@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@15.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg=="], - - "portal/next/@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@15.2.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q=="], - - "portal/next/@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@15.2.3", "", { "os": "win32", "cpu": "x64" }, "sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w=="], - - "portal/next/postcss": ["postcss@8.4.31", "", { "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ=="], - "prosemirror-markdown/@types/markdown-it/@types/linkify-it": ["@types/linkify-it@5.0.0", "", {}, "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q=="], "prosemirror-markdown/@types/markdown-it/@types/mdurl": ["@types/mdurl@2.0.0", "", {}, "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg=="], @@ -4308,8 +4289,6 @@ "node-gyp/glob/minimatch/brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="], - "portal/next/postcss/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], - "react-email/next/postcss/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], "rimraf/glob/minimatch/brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="], diff --git a/packages/analytics/package.json b/packages/analytics/package.json index de53c242e9..5dc299fcb7 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -10,7 +10,12 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "posthog-js": "^1.215.3", - "posthog-node": "^4.4.1" + "posthog-js": "^1.232.0", + "posthog-node": "^4.10.1" + }, + "devDependencies": { + "@types/node": "^22.13.10", + "@types/react": "19.0.10", + "@types/react-dom": "19.0.4" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index fbde0a7368..286ab50f3a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1226,9 +1226,13 @@ "@bubba/analytics@packages/analytics": version "workspace:packages/analytics" resolved "workspace:packages/analytics" + devDependencies: + "@types/node" "^22.13.10" + "@types/react" "19.0.10" + "@types/react-dom" "19.0.4" dependencies: - posthog-js "^1.215.3" - posthog-node "^4.4.1" + posthog-js "^1.232.0" + posthog-node "^4.10.1" "@bubba/app@apps/app", "@bubba/app@workspace:*": version "workspace:apps/app" @@ -1329,7 +1333,7 @@ "@neondatabase/serverless" "^0.10.4" "@prisma/adapter-neon" "^6.5.0" "@prisma/client" "^6.5.0" - "@prisma/extension-accelerate" "^1.2.2" + "@prisma/extension-accelerate" "^1.3.0" prisma "^6.5.0" "@bubba/email@packages/email": @@ -2272,11 +2276,6 @@ resolved "https://registry.npmjs.org/@next/env/-/env-15.0.4.tgz" integrity sha512-WNRvtgnRVDD4oM8gbUcRc27IAhaL4eXQ/2ovGbgLnPGUvdyDr8UdXP4Q/IBDdAdojnD2eScryIDirv0YUCjUVw== -"@next/env@15.2.3": - version "15.2.3" - resolved "https://registry.npmjs.org/@next/env/-/env-15.2.3.tgz" - integrity sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw== - "@next/env@15.3.0-canary.14": version "15.3.0-canary.14" resolved "https://registry.npmjs.org/@next/env/-/env-15.3.0-canary.14.tgz" @@ -2287,11 +2286,6 @@ resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.0.4.tgz" integrity sha512-QecQXPD0yRHxSXWL5Ff80nD+A56sUXZG9koUsjWJwA2Z0ZgVQfuy7gd0/otjxoOovPVHR2eVEvPMHbtZP+pf9w== -"@next/swc-darwin-arm64@15.2.3": - version "15.2.3" - resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.2.3.tgz" - integrity sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw== - "@next/swc-darwin-arm64@15.3.0-canary.14": version "15.3.0-canary.14" resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.3.0-canary.14.tgz" @@ -2302,11 +2296,6 @@ resolved "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.0.4.tgz" integrity sha512-pb7Bye3y1Og3PlCtnz2oO4z+/b3pH2/HSYkLbL0hbVuTGil7fPen8/3pyyLjdiTLcFJ+ymeU3bck5hd4IPFFCA== -"@next/swc-darwin-x64@15.2.3": - version "15.2.3" - resolved "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.2.3.tgz" - integrity sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw== - "@next/swc-darwin-x64@15.3.0-canary.14": version "15.3.0-canary.14" resolved "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.3.0-canary.14.tgz" @@ -2317,11 +2306,6 @@ resolved "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.0.4.tgz" integrity sha512-12oSaBFjGpB227VHzoXF3gJoK2SlVGmFJMaBJSu5rbpaoT5OjP5OuCLuR9/jnyBF1BAWMs/boa6mLMoJPRriMA== -"@next/swc-linux-arm64-gnu@15.2.3": - version "15.2.3" - resolved "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.2.3.tgz" - integrity sha512-50ibWdn2RuFFkOEUmo9NCcQbbV9ViQOrUfG48zHBCONciHjaUKtHcYFiCwBVuzD08fzvzkWuuZkd4AqbvKO7UQ== - "@next/swc-linux-arm64-gnu@15.3.0-canary.14": version "15.3.0-canary.14" resolved "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.3.0-canary.14.tgz" @@ -2332,11 +2316,6 @@ resolved "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.0.4.tgz" integrity sha512-QARO88fR/a+wg+OFC3dGytJVVviiYFEyjc/Zzkjn/HevUuJ7qGUUAUYy5PGVWY1YgTzeRYz78akQrVQ8r+sMjw== -"@next/swc-linux-arm64-musl@15.2.3": - version "15.2.3" - resolved "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.2.3.tgz" - integrity sha512-2gAPA7P652D3HzR4cLyAuVYwYqjG0mt/3pHSWTCyKZq/N/dJcUAEoNQMyUmwTZWCJRKofB+JPuDVP2aD8w2J6Q== - "@next/swc-linux-arm64-musl@15.3.0-canary.14": version "15.3.0-canary.14" resolved "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.3.0-canary.14.tgz" @@ -2347,11 +2326,6 @@ resolved "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.0.4.tgz" integrity sha512-Z50b0gvYiUU1vLzfAMiChV8Y+6u/T2mdfpXPHraqpypP7yIT2UV9YBBhcwYkxujmCvGEcRTVWOj3EP7XW/wUnw== -"@next/swc-linux-x64-gnu@15.2.3": - version "15.2.3" - resolved "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.2.3.tgz" - integrity sha512-ODSKvrdMgAJOVU4qElflYy1KSZRM3M45JVbeZu42TINCMG3anp7YCBn80RkISV6bhzKwcUqLBAmOiWkaGtBA9w== - "@next/swc-linux-x64-gnu@15.3.0-canary.14": version "15.3.0-canary.14" resolved "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.3.0-canary.14.tgz" @@ -2362,11 +2336,6 @@ resolved "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.0.4.tgz" integrity sha512-7H9C4FAsrTAbA/ENzvFWsVytqRYhaJYKa2B3fyQcv96TkOGVMcvyS6s+sj4jZlacxxTcn7ygaMXUPkEk7b78zw== -"@next/swc-linux-x64-musl@15.2.3": - version "15.2.3" - resolved "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.2.3.tgz" - integrity sha512-ZR9kLwCWrlYxwEoytqPi1jhPd1TlsSJWAc+H/CJHmHkf2nD92MQpSRIURR1iNgA/kuFSdxB8xIPt4p/T78kwsg== - "@next/swc-linux-x64-musl@15.3.0-canary.14": version "15.3.0-canary.14" resolved "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.3.0-canary.14.tgz" @@ -2377,11 +2346,6 @@ resolved "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.0.4.tgz" integrity sha512-Z/v3WV5xRaeWlgJzN9r4PydWD8sXV35ywc28W63i37G2jnUgScA4OOgS8hQdiXLxE3gqfSuHTicUhr7931OXPQ== -"@next/swc-win32-arm64-msvc@15.2.3": - version "15.2.3" - resolved "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.2.3.tgz" - integrity sha512-+G2FrDcfm2YDbhDiObDU/qPriWeiz/9cRR0yMWJeTLGGX6/x8oryO3tt7HhodA1vZ8r2ddJPCjtLcpaVl7TE2Q== - "@next/swc-win32-arm64-msvc@15.3.0-canary.14": version "15.3.0-canary.14" resolved "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.3.0-canary.14.tgz" @@ -2392,11 +2356,6 @@ resolved "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.0.4.tgz" integrity sha512-NGLchGruagh8lQpDr98bHLyWJXOBSmkEAfK980OiNBa7vNm6PsNoPvzTfstT78WyOeMRQphEQ455rggd7Eo+Dw== -"@next/swc-win32-x64-msvc@15.2.3": - version "15.2.3" - resolved "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.2.3.tgz" - integrity sha512-gHYS9tc+G2W0ZC8rBL+H6RdtXIyk40uLiaos0yj5US85FNhbFEndMA2nW3z47nzOWiSvXTZ5kBClc3rD0zJg0w== - "@next/swc-win32-x64-msvc@15.3.0-canary.14": version "15.3.0-canary.14" resolved "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.3.0-canary.14.tgz" @@ -2914,7 +2873,7 @@ resolved "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-6.5.0-73.173f8d54f8d52e692c7e27e72a88314ec7aeff60.tgz" integrity sha512-iK3EmiVGFDCmXjSpdsKGNqy9hOdLnvYBrJB61far/oP03hlIxrb04OWmDjNTwtmZ3UZdA5MCvI+f+3k2jPTflQ== -"@prisma/extension-accelerate@^1.2.2": +"@prisma/extension-accelerate@^1.3.0": version "1.3.0" resolved "https://registry.npmjs.org/@prisma/extension-accelerate/-/extension-accelerate-1.3.0.tgz" integrity sha512-W41D+kWejVJvMFEh45oYIU0VY+lIE3hh5vyHLHxgpyOfF+EHzSr8EIPT9kPRJg1FTYR7WGutXi64nyaNFUJ06A== @@ -5480,14 +5439,14 @@ dependencies: csstype "^3.0.2" -"@types/react@^19.0.0", "@types/react@^19.0.12": +"@types/react@^19.0.0": version "19.0.12" resolved "https://registry.npmjs.org/@types/react/-/react-19.0.12.tgz" integrity sha512-V6Ar115dBDrjbtXSrS+/Oruobc+qVbbUxDFC1RSbRqLt5SYvxxyIDrSC85RWml54g+jfNeEMZhEj7wW07ONQhA== dependencies: csstype "^3.0.2" -"@types/react-dom@*", "@types/react-dom@19.0.4", "@types/react-dom@^19.0.0", "@types/react-dom@^19.0.4": +"@types/react-dom@*", "@types/react-dom@19.0.4", "@types/react-dom@^19.0.0": version "19.0.4" resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.0.4.tgz" integrity sha512-4fSQ8vWFkg+TGhePfUzVmat3eC14TXYSsiiDSLI0dVLsrm9gZFABjPy/Qu6TKgl1tq1Bu1yDsuQgY3A3DOjCcg== @@ -10570,29 +10529,6 @@ next@15.0.4: postcss "8.4.31" styled-jsx "5.1.6" -next@^15.2.3: - version "15.2.3" - resolved "https://registry.npmjs.org/next/-/next-15.2.3.tgz" - integrity sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w== - optionalDependencies: - "@next/swc-darwin-arm64" "15.2.3" - "@next/swc-darwin-x64" "15.2.3" - "@next/swc-linux-arm64-gnu" "15.2.3" - "@next/swc-linux-arm64-musl" "15.2.3" - "@next/swc-linux-x64-gnu" "15.2.3" - "@next/swc-linux-x64-musl" "15.2.3" - "@next/swc-win32-arm64-msvc" "15.2.3" - "@next/swc-win32-x64-msvc" "15.2.3" - sharp "^0.33.5" - dependencies: - "@next/env" "15.2.3" - "@swc/counter" "0.1.3" - "@swc/helpers" "0.5.15" - busboy "1.6.0" - caniuse-lite "^1.0.30001579" - postcss "8.4.31" - styled-jsx "5.1.6" - next@*, "next@>= 14.0.0", next@>=13.2.0, next@>=14.2.0, "next@^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0", "next@^14.0.0-0 || ^15.0.0-0", "next@^15.3.0-canary.14": version "15.3.0-canary.14" resolved "https://registry.npmjs.org/next/-/next-15.3.0-canary.14.tgz" @@ -11328,15 +11264,15 @@ plist@^3.1.0: "@bubba/db" "workspace:*" "@bubba/ui" "workspace:*" "@types/node" "^22.13.10" - "@types/react" "^19.0.12" - "@types/react-dom" "^19.0.4" + "@types/react" "19.0.10" + "@types/react-dom" "19.0.4" postcss "^8.5.3" tailwindcss "^3.4.17" typescript "^5.8.2" dependencies: "@t3-oss/env-nextjs" "^0.12.0" better-auth "^1.2.4" - next "^15.2.3" + next "^15.3.0-canary.14" react "^19.0.0" react-dom "^19.0.0" react-otp-input "^3.1.1" @@ -11465,7 +11401,7 @@ postgres-range@^1.1.1: resolved "https://registry.npmjs.org/postgres-range/-/postgres-range-1.1.4.tgz" integrity sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w== -posthog-js@^1.215.3, posthog-js@^1.232.0: +posthog-js@^1.232.0: version "1.232.0" resolved "https://registry.npmjs.org/posthog-js/-/posthog-js-1.232.0.tgz" integrity sha512-+flinmOGBz/YGpFbCcd/L1GCKleEkrkNRA8xTFJtaX8A/ZNEoUTdR8MYfFYj6qb9f5aSbexTLNzeglbYcgHXwA== @@ -11475,7 +11411,7 @@ posthog-js@^1.215.3, posthog-js@^1.232.0: preact "^10.19.3" web-vitals "^4.2.4" -posthog-node@^4.10.1, posthog-node@^4.4.1: +posthog-node@^4.10.1: version "4.10.1" resolved "https://registry.npmjs.org/posthog-node/-/posthog-node-4.10.1.tgz" integrity sha512-rEzVszfaOkUFTjEabDcRLJNRqMwTOeU1WpqKgQEDV3x82O4ODifkvkoCERaPxl/ossi1NtqKXBOZ+XnhQ19pNQ== From 1a08fa5002a0fcc9f1cc5e4edea8e3f886103187 Mon Sep 17 00:00:00 2001 From: Lewis Carhart Date: Thu, 20 Mar 2025 13:06:31 +0000 Subject: [PATCH 3/6] refactor: streamline middleware authentication logic - Simplified middleware by removing unnecessary comments and restructuring the authentication checks. - Updated the middleware to use destructured request properties for cleaner code. - Ensured consistent handling of session and URL redirection logic. - Maintained the integration of the I18n middleware for internationalization support. --- apps/app/src/middleware.ts | 40 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/apps/app/src/middleware.ts b/apps/app/src/middleware.ts index 4e52fc4ab2..2b8f04f00f 100644 --- a/apps/app/src/middleware.ts +++ b/apps/app/src/middleware.ts @@ -1,15 +1,12 @@ import { createI18nMiddleware } from "next-international/middleware"; -import type { NextRequest } from "next/server"; import { NextResponse } from "next/server"; import { auth } from "@/auth"; -import type { Session } from "next-auth"; export const config = { matcher: [ - // Skip auth-related routes "/((?!api|_next/static|_next/image|favicon.ico|monitoring|ingest).*)", ], - runtime: "nodejs", // Specify the runtime environment as Node.js, since we're using AWS with Postgres. + runtime: "nodejs", }; const I18nMiddleware = createI18nMiddleware({ @@ -18,28 +15,22 @@ const I18nMiddleware = createI18nMiddleware({ urlMappingStrategy: "rewrite", }); -// By invoking auth, we ensure that the session is loaded and we are wrapping the middleware. -// Add any middleware logic here inside the callback. -// See: https://authjs.dev/getting-started/session-management/protecting?framework=Next.js - -export async function middleware( - request: NextRequest & { auth: Session | null }, -) { +export default auth((req) => { try { - const session = await auth(); + const { auth: session, nextUrl } = req; - if (!session?.user && request.nextUrl.pathname !== "/auth") { - return NextResponse.redirect(new URL("/auth", request.nextUrl.origin)); + if (!session?.user && nextUrl.pathname !== "/auth") { + return NextResponse.redirect(new URL("/auth", nextUrl.origin)); } - if (session?.user.id && request.nextUrl.pathname === "/auth") { - return NextResponse.redirect(new URL("/", request.nextUrl.origin)); + if (session?.user.id && nextUrl.pathname === "/auth") { + return NextResponse.redirect(new URL("/", nextUrl.origin)); } // Only handle root path redirects - if (request.nextUrl.pathname === "/") { + if (nextUrl.pathname === "/") { if (!session?.user) { - return NextResponse.redirect(new URL("/auth", request.nextUrl.origin)); + return NextResponse.redirect(new URL("/auth", nextUrl.origin)); } // If authenticated, let the page handle the redirection @@ -47,20 +38,13 @@ export async function middleware( return NextResponse.next(); } - const response = I18nMiddleware(request); - const nextUrl = request.nextUrl; - - const pathnameLocale = nextUrl.pathname.split("/", 2)?.[1]; + const response = I18nMiddleware(req); - const pathnameWithoutLocale = pathnameLocale - ? nextUrl.pathname.slice(pathnameLocale.length + 1) - : nextUrl.pathname; - - response.headers.set("x-pathname", request.nextUrl.pathname); + response.headers.set("x-pathname", nextUrl.pathname); return response; } catch (error) { console.error("Middleware error:", error); return new NextResponse("Internal Server Error", { status: 500 }); } -} +}); From 29ed517e9a35b6a2ce3713165c6f0707e5861b9b Mon Sep 17 00:00:00 2001 From: Lewis Carhart Date: Thu, 20 Mar 2025 13:15:27 +0000 Subject: [PATCH 4/6] refactor: enhance middleware authentication with NextAuth integration - Integrated NextAuth for improved authentication handling within the middleware. - Updated the middleware to utilize TypeScript types for request and response. - Streamlined session retrieval and URL redirection logic for better clarity and performance. - Maintained compatibility with the existing I18n middleware for internationalization support. --- apps/app/src/middleware.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/app/src/middleware.ts b/apps/app/src/middleware.ts index 2b8f04f00f..c6c13e8031 100644 --- a/apps/app/src/middleware.ts +++ b/apps/app/src/middleware.ts @@ -1,6 +1,7 @@ +import { authConfig } from "@/auth/config"; +import NextAuth from "next-auth"; import { createI18nMiddleware } from "next-international/middleware"; -import { NextResponse } from "next/server"; -import { auth } from "@/auth"; +import { type NextRequest, NextResponse } from "next/server"; export const config = { matcher: [ @@ -15,9 +16,12 @@ const I18nMiddleware = createI18nMiddleware({ urlMappingStrategy: "rewrite", }); -export default auth((req) => { +const { auth } = NextAuth(authConfig); + +export default auth(async function middleware(req: NextRequest) { try { - const { auth: session, nextUrl } = req; + const session = await auth(); + const nextUrl = req.nextUrl; if (!session?.user && nextUrl.pathname !== "/auth") { return NextResponse.redirect(new URL("/auth", nextUrl.origin)); From 444a377d5602a73103c247aeb332835d71806041 Mon Sep 17 00:00:00 2001 From: Lewis Carhart Date: Thu, 20 Mar 2025 13:26:48 +0000 Subject: [PATCH 5/6] refactor: enhance middleware logic with streamlined authentication and I18n integration - Refactored middleware to utilize the `auth` middleware for session management. - Simplified URL redirection logic for unauthenticated users and improved handling for authenticated users. - Maintained the integration of the I18n middleware for consistent internationalization support. - Improved code clarity and performance by restructuring the middleware flow. --- apps/app/src/middleware.ts | 61 ++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/apps/app/src/middleware.ts b/apps/app/src/middleware.ts index c6c13e8031..50ee8db9a8 100644 --- a/apps/app/src/middleware.ts +++ b/apps/app/src/middleware.ts @@ -1,8 +1,13 @@ -import { authConfig } from "@/auth/config"; -import NextAuth from "next-auth"; +import { auth as authMiddleware } from "@/auth"; import { createI18nMiddleware } from "next-international/middleware"; import { type NextRequest, NextResponse } from "next/server"; +const I18nMiddleware = createI18nMiddleware({ + locales: ["en", "es", "fr", "no", "pt"], + defaultLocale: "en", + urlMappingStrategy: "rewrite", +}); + export const config = { matcher: [ "/((?!api|_next/static|_next/image|favicon.ico|monitoring|ingest).*)", @@ -10,45 +15,31 @@ export const config = { runtime: "nodejs", }; -const I18nMiddleware = createI18nMiddleware({ - locales: ["en", "es", "fr", "no", "pt"], - defaultLocale: "en", - urlMappingStrategy: "rewrite", -}); +export async function middleware(request: NextRequest) { + const session = await authMiddleware(); + const nextUrl = request.nextUrl; -const { auth } = NextAuth(authConfig); + if (!session?.user && nextUrl.pathname !== "/auth") { + return NextResponse.redirect(new URL("/auth", nextUrl.origin)); + } -export default auth(async function middleware(req: NextRequest) { - try { - const session = await auth(); - const nextUrl = req.nextUrl; + if (session?.user.id && nextUrl.pathname === "/auth") { + return NextResponse.redirect(new URL("/", nextUrl.origin)); + } - if (!session?.user && nextUrl.pathname !== "/auth") { + if (nextUrl.pathname === "/") { + if (!session?.user) { return NextResponse.redirect(new URL("/auth", nextUrl.origin)); } - if (session?.user.id && nextUrl.pathname === "/auth") { - return NextResponse.redirect(new URL("/", nextUrl.origin)); - } - - // Only handle root path redirects - if (nextUrl.pathname === "/") { - if (!session?.user) { - return NextResponse.redirect(new URL("/auth", nextUrl.origin)); - } - - // If authenticated, let the page handle the redirection - // This way we avoid Prisma in middleware - return NextResponse.next(); - } + // If authenticated, let the page handle the redirection + // This way we avoid Prisma in middleware + return NextResponse.next(); + } - const response = I18nMiddleware(req); + const response = I18nMiddleware(request); - response.headers.set("x-pathname", nextUrl.pathname); + response.headers.set("x-pathname", nextUrl.pathname); - return response; - } catch (error) { - console.error("Middleware error:", error); - return new NextResponse("Internal Server Error", { status: 500 }); - } -}); + return response; +} From 0efc2e23cc9b9ad3b288aee98097189a9517a571 Mon Sep 17 00:00:00 2001 From: Lewis Carhart Date: Thu, 20 Mar 2025 13:50:26 +0000 Subject: [PATCH 6/6] refactor: streamline middleware and layout components for improved clarity - Updated middleware to enhance I18n integration and simplified session handling. - Refactored layout component for consistent formatting. - Adjusted RootPage redirection logic to ensure proper user flow. - Modified Google and Magic Link sign-in components to redirect to "/setup" after authentication. --- apps/app/src/app/layout.tsx | 4 +- apps/app/src/app/page.tsx | 18 ++++----- apps/app/src/components/google-sign-in.tsx | 2 +- apps/app/src/components/magic-link.tsx | 4 +- apps/app/src/middleware.ts | 43 +++++++--------------- 5 files changed, 28 insertions(+), 43 deletions(-) diff --git a/apps/app/src/app/layout.tsx b/apps/app/src/app/layout.tsx index 677510c260..11de7b385b 100644 --- a/apps/app/src/app/layout.tsx +++ b/apps/app/src/app/layout.tsx @@ -1,3 +1,3 @@ export default function Layout({ children }: { children: React.ReactNode }) { - return <>{children}; -} + return <>{children}; +} \ No newline at end of file diff --git a/apps/app/src/app/page.tsx b/apps/app/src/app/page.tsx index e0ead87c27..d577f72d1b 100644 --- a/apps/app/src/app/page.tsx +++ b/apps/app/src/app/page.tsx @@ -2,15 +2,15 @@ import { auth } from "@/auth"; import { redirect } from "next/navigation"; export default async function RootPage() { - const session = await auth(); + const session = await auth(); - if (!session) { - redirect("/auth"); - } + if (!session?.user) { + redirect("/auth"); + } - if (session.user?.organizationId) { - redirect(`/${session.user.organizationId}`); - } + if (session.user?.organizationId) { + redirect(`/${session.user.organizationId}`); + } - redirect("/setup"); -} + redirect("/setup"); +} \ No newline at end of file diff --git a/apps/app/src/components/google-sign-in.tsx b/apps/app/src/components/google-sign-in.tsx index 89639e519a..60a8d142db 100644 --- a/apps/app/src/components/google-sign-in.tsx +++ b/apps/app/src/components/google-sign-in.tsx @@ -23,7 +23,7 @@ export function GoogleSignIn({ await signIn("google", { redirectTo: inviteCode ? `/api/auth/invitation?code=${inviteCode}` - : "/", + : "/setup", }); }; diff --git a/apps/app/src/components/magic-link.tsx b/apps/app/src/components/magic-link.tsx index c8a69ebfee..d7008db878 100644 --- a/apps/app/src/components/magic-link.tsx +++ b/apps/app/src/components/magic-link.tsx @@ -43,7 +43,9 @@ export function MagicLinkSignIn({ className, inviteCode }: Props) { await signIn("resend", { email: email, - redirectTo: inviteCode ? `/api/auth/invitation?code=${inviteCode}` : "/", + redirectTo: inviteCode + ? `/api/auth/invitation?code=${inviteCode}` + : "/setup", }) .then((res) => { setSent(true); diff --git a/apps/app/src/middleware.ts b/apps/app/src/middleware.ts index 50ee8db9a8..65f8ba9a9e 100644 --- a/apps/app/src/middleware.ts +++ b/apps/app/src/middleware.ts @@ -1,6 +1,5 @@ -import { auth as authMiddleware } from "@/auth"; import { createI18nMiddleware } from "next-international/middleware"; -import { type NextRequest, NextResponse } from "next/server"; +import { NextResponse, type NextRequest } from "next/server"; const I18nMiddleware = createI18nMiddleware({ locales: ["en", "es", "fr", "no", "pt"], @@ -8,38 +7,22 @@ const I18nMiddleware = createI18nMiddleware({ urlMappingStrategy: "rewrite", }); -export const config = { - matcher: [ - "/((?!api|_next/static|_next/image|favicon.ico|monitoring|ingest).*)", - ], - runtime: "nodejs", -}; - export async function middleware(request: NextRequest) { - const session = await authMiddleware(); + const response = I18nMiddleware(request); const nextUrl = request.nextUrl; + const pathnameLocale = nextUrl.pathname.split("/", 2)?.[1]; - if (!session?.user && nextUrl.pathname !== "/auth") { - return NextResponse.redirect(new URL("/auth", nextUrl.origin)); - } - - if (session?.user.id && nextUrl.pathname === "/auth") { - return NextResponse.redirect(new URL("/", nextUrl.origin)); - } - - if (nextUrl.pathname === "/") { - if (!session?.user) { - return NextResponse.redirect(new URL("/auth", nextUrl.origin)); - } + const pathnameWithoutLocale = pathnameLocale + ? nextUrl.pathname.slice(pathnameLocale.length + 1) + : nextUrl.pathname; - // If authenticated, let the page handle the redirection - // This way we avoid Prisma in middleware - return NextResponse.next(); - } - - const response = I18nMiddleware(request); - - response.headers.set("x-pathname", nextUrl.pathname); + response.headers.set("x-pathname", request.nextUrl.pathname); return response; } + +export const config = { + matcher: [ + "/((?!api|_next/static|_next/image|favicon.ico|monitoring|ingest).*)", + ], +};