From 858b2fa7de288636dc915db1a2f5bad76d105bb1 Mon Sep 17 00:00:00 2001 From: sujanpokharel Date: Wed, 26 Mar 2025 06:45:38 +0000 Subject: [PATCH 1/9] this is the 2nd commit --- .env | 12 +- app/layout.js | 5 + components/Navbar.jsx | 38 +- components/seller/Navbar.jsx | 5 +- context/AppContext.jsx | 3 + middleware.ts | 12 + package-lock.json | 1586 ++++++++++++++++++++++++++++++++-- package.json | 6 +- 8 files changed, 1581 insertions(+), 86 deletions(-) create mode 100644 middleware.ts diff --git a/.env b/.env index 195967ea4..72b0e23cf 100644 --- a/.env +++ b/.env @@ -1,12 +1,14 @@ # Public Environment Variables NEXT_PUBLIC_CURRENCY=$ -NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY='' +NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_ZGl2ZXJzZS1zb2xlLTczLmNsZXJrLmFjY291bnRzLmRldiQ + + # Private Environment Variables -CLERK_SECRET_KEY='' -MONGODB_URI='' -INNGEST_SIGNING_KEY='' -INNGEST_EVENT_KEY='' +CLERK_SECRET_KEY=sk_test_Opil93SxX121UNorC0ZBwLL0Axz3jwJmC898OEI5iS +MONGODB_URI='mongodb+srv://pokharelsujan07:Sujan12345@cluster0.1xlqh.mongodb.net' +INNGEST_SIGNING_KEY='signkey-prod-60df7a20c045b4a846c4fac7f49ddff89326452a1e2a73557a04f3eacdfd62df' +INNGEST_EVENT_KEY='7sdtIcNJXgAlATL7J3OlmxmVT6fZoKqLgqnBtz9oEYW4fadm3Z2qvF705Mw0ETabf5uTdrZ-RwKAH-dG9avdqg' # Cloudinary CLOUDINARY_CLOUD_NAME ='' CLOUDINARY_API_KEY ='' diff --git a/app/layout.js b/app/layout.js index 9a70a3e83..d90b6d15f 100644 --- a/app/layout.js +++ b/app/layout.js @@ -2,6 +2,9 @@ import { Outfit } from "next/font/google"; import "./globals.css"; import { AppContextProvider } from "@/context/AppContext"; import { Toaster } from "react-hot-toast"; +import { ClerkProvider } from "@clerk/nextjs"; +import clerk from "clerk"; + const outfit = Outfit({ subsets: ['latin'], weight: ["300", "400", "500"] }) @@ -12,6 +15,7 @@ export const metadata = { export default function RootLayout({ children }) { return ( + @@ -20,5 +24,6 @@ export default function RootLayout({ children }) { + ); } diff --git a/components/Navbar.jsx b/components/Navbar.jsx index ed1f4b58e..c8612e677 100644 --- a/components/Navbar.jsx +++ b/components/Navbar.jsx @@ -1,13 +1,17 @@ "use client" import React from "react"; -import { assets} from "@/assets/assets"; +import { assets, BagIcon, BoxIcon, CartIcon, HomeIcon} from "@/assets/assets"; import Link from "next/link" import { useAppContext } from "@/context/AppContext"; import Image from "next/image"; +import { useClerk, UserButton } from "@clerk/nextjs"; const Navbar = () => { - const { isSeller, router } = useAppContext(); + const { isSeller, router, user } = useAppContext(); + const { openSignIn }= useClerk(); + + return ( ); diff --git a/components/seller/Navbar.jsx b/components/seller/Navbar.jsx index 75f9a0e48..c80c051d2 100644 --- a/components/seller/Navbar.jsx +++ b/components/seller/Navbar.jsx @@ -2,10 +2,13 @@ import React from 'react' import { assets } from '../../assets/assets' import Image from 'next/image' import { useAppContext } from '@/context/AppContext' +import { useClerk } from '@clerk/nextjs' const Navbar = () => { - const { router } = useAppContext() + const { router } = useAppContext(); + + return (
diff --git a/context/AppContext.jsx b/context/AppContext.jsx index 583ca6231..8333016d5 100644 --- a/context/AppContext.jsx +++ b/context/AppContext.jsx @@ -1,5 +1,6 @@ 'use client' import { productsDummyData, userDummyData } from "@/assets/assets"; +import { useUser } from "@clerk/nextjs"; import { useRouter } from "next/navigation"; import { createContext, useContext, useEffect, useState } from "react"; @@ -13,6 +14,7 @@ export const AppContextProvider = (props) => { const currency = process.env.NEXT_PUBLIC_CURRENCY const router = useRouter() + const {user}= useUser() const [products, setProducts] = useState([]) const [userData, setUserData] = useState(false) @@ -82,6 +84,7 @@ export const AppContextProvider = (props) => { }, []) const value = { + user, currency, router, isSeller, setIsSeller, userData, fetchUserData, diff --git a/middleware.ts b/middleware.ts new file mode 100644 index 000000000..3c977e92c --- /dev/null +++ b/middleware.ts @@ -0,0 +1,12 @@ +import { clerkMiddleware } from "@clerk/nextjs/server"; + +export default clerkMiddleware(); + +export const config = { + matcher: [ + // Skip Next.js internals and all static files, unless found in search params + '/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)', + // Always run for API routes + '/(api|trpc)(.*)', + ], +}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 97bd61805..67bcb6806 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,11 @@ "name": "ecommerce-inngest", "version": "0.1.0", "dependencies": { - "next": "15.1.6", + "@clerk/nextjs": "^6.12.9", + "clerk": "^0.8.3", + "inngest": "^3.33.0", + "mongoose": "^8.13.0", + "next": "^15.2.3", "react": "^19.0.0", "react-dom": "^19.0.0", "react-hot-toast": "^2.5.1" @@ -34,6 +38,110 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@bufbuild/protobuf": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.2.5.tgz", + "integrity": "sha512-/g5EzJifw5GF8aren8wZ/G5oMuPoGeS6MQD3ca8ddcvdXR5UELUfdTZITCGNhNXynY/AYl3Z4plmxdj/tRl/hQ==", + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "node_modules/@clerk/backend": { + "version": "1.25.5", + "resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-1.25.5.tgz", + "integrity": "sha512-nnBpr7oSq5iATWRExuljEfp7xa90KE1OUgaGCSmtZYF0T9TWHGkZHYqkQhD4XjiqlR2XsrsQ/UzPfmHM1Km7+Q==", + "license": "MIT", + "dependencies": { + "@clerk/shared": "^3.2.0", + "@clerk/types": "^4.49.1", + "cookie": "1.0.2", + "snakecase-keys": "8.0.1", + "tslib": "2.8.1" + }, + "engines": { + "node": ">=18.17.0" + } + }, + "node_modules/@clerk/clerk-react": { + "version": "5.25.2", + "resolved": "https://registry.npmjs.org/@clerk/clerk-react/-/clerk-react-5.25.2.tgz", + "integrity": "sha512-QdqAwYz6iYcbMoinMOvtVlHcvwW6idzPbImFGtH8Aw5WjpFPYb7G2Fv3qMGRu8frE43Z9JyxwsHKgipafU1DSA==", + "license": "MIT", + "dependencies": { + "@clerk/shared": "^3.2.0", + "@clerk/types": "^4.49.1", + "tslib": "2.8.1" + }, + "engines": { + "node": ">=18.17.0" + }, + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0 || ^19.0.0-0", + "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-0" + } + }, + "node_modules/@clerk/nextjs": { + "version": "6.12.9", + "resolved": "https://registry.npmjs.org/@clerk/nextjs/-/nextjs-6.12.9.tgz", + "integrity": "sha512-nVhvGC4ZkmlzO1jY4QCqH8vpNazLTXLgBrmI1KuqPWg6OcrGGh90Bwsq49sSntfpMb6fScqz09nVFZdrQ5U3XQ==", + "license": "MIT", + "dependencies": { + "@clerk/backend": "^1.25.5", + "@clerk/clerk-react": "^5.25.2", + "@clerk/shared": "^3.2.0", + "@clerk/types": "^4.49.1", + "server-only": "0.0.1", + "tslib": "2.8.1" + }, + "engines": { + "node": ">=18.17.0" + }, + "peerDependencies": { + "next": "^13.5.7 || ^14.2.25 || ^15.2.3", + "react": "^18.0.0 || ^19.0.0 || ^19.0.0-0", + "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-0" + } + }, + "node_modules/@clerk/shared": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@clerk/shared/-/shared-3.2.0.tgz", + "integrity": "sha512-+b0A3FJuaTkvV6jTg78IZk9wIBUZ7+I08eQy1Ib/xj5w2y5eDekU5Qnu3EmMc0PW8btMeeoz6MI0MeGK35HVbQ==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@clerk/types": "^4.49.1", + "dequal": "2.0.3", + "glob-to-regexp": "0.4.1", + "js-cookie": "3.0.5", + "std-env": "^3.7.0", + "swr": "^2.2.0" + }, + "engines": { + "node": ">=18.17.0" + }, + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0 || ^19.0.0-0", + "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, + "node_modules/@clerk/types": { + "version": "4.49.1", + "resolved": "https://registry.npmjs.org/@clerk/types/-/types-4.49.1.tgz", + "integrity": "sha512-eVxDDvf4D36lFp5fWek6P+bTeZa4c4KAAlo3sE7Ga2lIsnhot9p+p+ugqeP/Y5EgOmj3+uy1nwvpcgZ4oV93PA==", + "license": "MIT", + "dependencies": { + "csstype": "3.1.3" + }, + "engines": { + "node": ">=18.17.0" + } + }, "node_modules/@emnapi/runtime": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", @@ -599,6 +707,16 @@ "url": "https://opencollective.com/libvips" } }, + "node_modules/@inngest/ai": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@inngest/ai/-/ai-0.1.3.tgz", + "integrity": "sha512-J8R/pff6Nsm16e5V9UvcNO/wfaaNVS54/wN7cE8CREb1OOFzlCd3Y4TyGb0wyw3y+iTayOLa/KJEYziaGMPIbA==", + "license": "Apache-2.0", + "dependencies": { + "@types/node": "^22.10.5", + "typescript": "^5.7.3" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -617,6 +735,12 @@ "node": ">=12" } }, + "node_modules/@jpwilliams/waitgroup": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@jpwilliams/waitgroup/-/waitgroup-2.1.1.tgz", + "integrity": "sha512-0CxRhNfkvFCTLZBKGvKxY2FYtYW1yWhO2McLqBL0X5UWvYjIf9suH8anKW/DNutl369A75Ewyoh2iJMwBZ2tRg==", + "license": "MIT" + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.8", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", @@ -670,10 +794,19 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.2.0.tgz", + "integrity": "sha512-+ywrb0AqkfaYuhHs6LxKWgqbh3I72EpEgESCw37o+9qPx9WTCkgDm2B+eMrwehGtHBWHFU4GXvnSCNiFhhausg==", + "license": "MIT", + "dependencies": { + "sparse-bitfield": "^3.0.3" + } + }, "node_modules/@next/env": { - "version": "15.1.6", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.1.6.tgz", - "integrity": "sha512-d9AFQVPEYNr+aqokIiPLNK/MTyt3DWa/dpKveiAaVccUadFbhFEvY6FXYX2LJO2Hv7PHnLBu2oWwB4uBuHjr/w==", + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.2.3.tgz", + "integrity": "sha512-a26KnbW9DFEUsSxAxKBORR/uD9THoYoKbkpFywMN/AFvboTt94b8+g/07T8J6ACsdLag8/PDU60ov4rPxRAixw==", "license": "MIT" }, "node_modules/@next/eslint-plugin-next": { @@ -687,9 +820,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "15.1.6", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.1.6.tgz", - "integrity": "sha512-u7lg4Mpl9qWpKgy6NzEkz/w0/keEHtOybmIl0ykgItBxEM5mYotS5PmqTpo+Rhg8FiOiWgwr8USxmKQkqLBCrw==", + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.2.3.tgz", + "integrity": "sha512-uaBhA8aLbXLqwjnsHSkxs353WrRgQgiFjduDpc7YXEU0B54IKx3vU+cxQlYwPCyC8uYEEX7THhtQQsfHnvv8dw==", "cpu": [ "arm64" ], @@ -703,9 +836,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "15.1.6", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.1.6.tgz", - "integrity": "sha512-x1jGpbHbZoZ69nRuogGL2MYPLqohlhnT9OCU6E6QFewwup+z+M6r8oU47BTeJcWsF2sdBahp5cKiAcDbwwK/lg==", + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.2.3.tgz", + "integrity": "sha512-pVwKvJ4Zk7h+4hwhqOUuMx7Ib02u3gDX3HXPKIShBi9JlYllI0nU6TWLbPT94dt7FSi6mSBhfc2JrHViwqbOdw==", "cpu": [ "x64" ], @@ -719,9 +852,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.1.6", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.1.6.tgz", - "integrity": "sha512-jar9sFw0XewXsBzPf9runGzoivajeWJUc/JkfbLTC4it9EhU8v7tCRLH7l5Y1ReTMN6zKJO0kKAGqDk8YSO2bg==", + "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==", "cpu": [ "arm64" ], @@ -735,9 +868,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.1.6", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.1.6.tgz", - "integrity": "sha512-+n3u//bfsrIaZch4cgOJ3tXCTbSxz0s6brJtU3SzLOvkJlPQMJ+eHVRi6qM2kKKKLuMY+tcau8XD9CJ1OjeSQQ==", + "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==", "cpu": [ "arm64" ], @@ -751,9 +884,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.1.6", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.1.6.tgz", - "integrity": "sha512-SpuDEXixM3PycniL4iVCLyUyvcl6Lt0mtv3am08sucskpG0tYkW1KlRhTgj4LI5ehyxriVVcfdoxuuP8csi3kQ==", + "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==", "cpu": [ "x64" ], @@ -767,9 +900,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "15.1.6", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.1.6.tgz", - "integrity": "sha512-L4druWmdFSZIIRhF+G60API5sFB7suTbDRhYWSjiw0RbE+15igQvE2g2+S973pMGvwN3guw7cJUjA/TmbPWTHQ==", + "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==", "cpu": [ "x64" ], @@ -783,9 +916,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.1.6", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.1.6.tgz", - "integrity": "sha512-s8w6EeqNmi6gdvM19tqKKWbCyOBvXFbndkGHl+c9YrzsLARRdCHsD9S1fMj8gsXm9v8vhC8s3N8rjuC/XrtkEg==", + "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==", "cpu": [ "arm64" ], @@ -799,9 +932,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.1.6", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.1.6.tgz", - "integrity": "sha512-6xomMuu54FAFxttYr5PJbEfu96godcxBTRk1OhAvJq0/EnmFU/Ybiax30Snis4vdWZ9LGpf7Roy5fSs7v/5ROQ==", + "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==", "cpu": [ "x64" ], @@ -902,6 +1035,15 @@ "tslib": "^2.8.0" } }, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "license": "MIT", + "dependencies": { + "@types/ms": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -923,6 +1065,36 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.13.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.13.tgz", + "integrity": "sha512-ClsL5nMwKaBRwPcCvH8E7+nU4GxHVx1axNvMZTFHMEfNI7oahimt26P5zjVCRrjiIWj6YFXfE1v3dEp94wLcGQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@types/webidl-conversions": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==", + "license": "MIT" + }, + "node_modules/@types/whatwg-url": { + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz", + "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==", + "license": "MIT", + "dependencies": { + "@types/webidl-conversions": "*" + } + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.23.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.23.0.tgz", @@ -1216,7 +1388,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -1430,6 +1601,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/asn1": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz", + "integrity": "sha512-Fh9zh3G2mZ8qM/kwsiKwL2U2FmXxVsboP4x1mXjnhKHv3SmzaBZoYvxEQJz/YS2gnCgd8xlAVWcZnQyC9qZBsA==", + "engines": { + "node": ">=0.4.9" + } + }, + "node_modules/assert-plus": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz", + "integrity": "sha512-brU24g7ryhRwGCI2y+1dGQmQXiZF7TtIj583S96y0jjdajIe6wn8BuXyELYhvD22dtIxDQVFk04YTJwwdwOYJw==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/ast-types-flow": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", @@ -1437,6 +1624,12 @@ "dev": true, "license": "MIT" }, + "node_modules/async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==", + "license": "MIT" + }, "node_modules/async-function": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", @@ -1463,6 +1656,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/aws-sign2": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz", + "integrity": "sha512-oqUX0DM5j7aPWPCnpWebiyNIj2wiNI87ZxnOMoGv0aE4TGlBy2N+5iWc6dQ/NOKZaBD2W6PVz8jtOGkWzSC5EA==", + "engines": { + "node": "*" + } + }, "node_modules/axe-core": { "version": "4.10.2", "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.2.tgz", @@ -1503,6 +1704,34 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bl": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", + "integrity": "sha512-njlCs8XLBIK7LCChTWfzWuIAxkpmmLXcL7/igCofFT1B039Sz0IPnAmosN5QaO22lU4qr8LcUz2ojUlE6pLkRQ==", + "license": "MIT", + "dependencies": { + "readable-stream": "~1.0.26" + } + }, + "node_modules/bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha512-UfFSr22dmHPQqPP9XWHRhq+gWnHCYguQGkXQlbyPtW5qTnhFWA8/iXg765tH0cAjy7l/zPJ1aBTO0g5XgA7kvQ==", + "license": "MIT" + }, + "node_modules/boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha512-KbiZEa9/vofNcVJXGwdWWn25reQ3V3dHBWbS07FTF3/TOehLnm9GEhJV4T6ZvGPkShRpmUqYwnaCrkj0mRnP6Q==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "license": "BSD-3-Clause", + "dependencies": { + "hoek": "2.x.x" + }, + "engines": { + "node": ">=0.10.40" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1527,6 +1756,23 @@ "node": ">=8" } }, + "node_modules/browser-request": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz", + "integrity": "sha512-YyNI4qJJ+piQG6MMEuo7J3Bzaqssufx04zpEKYfSrl/1Op59HWali9zMtBpXnkmqMcOuWJPZvudrm9wISmnCbg==", + "engines": [ + "node" + ] + }, + "node_modules/bson": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.10.3.tgz", + "integrity": "sha512-MTxGsqgYTwfshYWTRdmZRC+M7FnG1b4y7RO7p2k3X24Wq0yv1m77Wsj0BzlPzd/IowgESfsruQCUToa7vbOpPQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=16.20.1" + } + }, "node_modules/busboy": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", @@ -1628,11 +1874,22 @@ ], "license": "CC-BY-4.0" }, + "node_modules/canonicalize": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/canonicalize/-/canonicalize-1.0.8.tgz", + "integrity": "sha512-0CNTVCLZggSh7bc5VkX5WWPWO+cyZbNd07IHIsSXLia/eAq+r836hgk+8BKoEh7949Mda87VUOitx5OddVj64A==", + "license": "Apache-2.0" + }, + "node_modules/caseless": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz", + "integrity": "sha512-6msL6rlJApxKoPTh2QkZF+pn7/4fqQZAJb8s5noLh/GQxFGnGYfvFaz0JGNFOip/JBM3oP3RjCdwyc4uDXWJwQ==", + "license": "BSD" + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", @@ -1683,6 +1940,19 @@ "node": ">= 6" } }, + "node_modules/clerk": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/clerk/-/clerk-0.8.3.tgz", + "integrity": "sha512-9g8PiDSzpZ+DdJqIIZVM3A2dfXoNl5dC9XOriBcQAiIn8UZWpvA0NiTqYwUnddCtmA4oMDoz/JAMwqpX5W3xEA==", + "license": "Apache-2.0", + "dependencies": { + "follow": "^0.12.1", + "superagent": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/client-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", @@ -1707,7 +1977,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -1720,7 +1989,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true, "license": "MIT" }, "node_modules/color-string": { @@ -1734,6 +2002,17 @@ "simple-swizzle": "^0.2.2" } }, + "node_modules/combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", + "dependencies": { + "delayed-stream": "0.0.5" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -1744,6 +2023,12 @@ "node": ">= 6" } }, + "node_modules/component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA==", + "license": "MIT" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1751,6 +2036,36 @@ "dev": true, "license": "MIT" }, + "node_modules/cookie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/cookiejar": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.0.6.tgz", + "integrity": "sha512-X9IsySmsr1heROBZCpyEYhqJyU7CXNJoVxIlQ5bBb7DskYUx0mQ+g2f7yPYajceZeGJWHQbIfGB6j0hywV/ARQ==", + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/cross-fetch": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.1.0.tgz", + "integrity": "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==", + "license": "MIT", + "dependencies": { + "node-fetch": "^2.7.0" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -1766,6 +2081,19 @@ "node": ">= 8" } }, + "node_modules/cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha512-FFN5KwpvvQTTS5hWPxrU8/QE4kQUc6uwZcrnlMBN82t1MgAtq8mnoDwINBly9Tdr02seeIIhtdF+UH1feBYGog==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "license": "BSD-3-Clause", + "dependencies": { + "boom": "2.x.x" + }, + "engines": { + "node": ">=0.10.40" + } + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -1785,6 +2113,14 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "license": "MIT" }, + "node_modules/ctype": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz", + "integrity": "sha512-T6CEkoSV4q50zW3TlTHMbzy1E5+zlnNcY+yb7tWVYlTwPhx9LpnfAkd4wecpWknDyptp4k97LUZeInlf6jdzBg==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/damerau-levenshtein": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", @@ -1850,7 +2186,6 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -1907,6 +2242,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/detect-libc": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", @@ -1944,6 +2296,16 @@ "node": ">=0.10.0" } }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -2627,6 +2989,12 @@ "node": ">=0.10.0" } }, + "node_modules/extend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", + "integrity": "sha512-5mYyg57hpD+sFaJmgNL9BidQ5C7dmJE3U5vzlRWbuqG+8dytvYEoxvKs6Tj5cm3LpMsFvRt20qz1ckezmsOUgQ==", + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2752,6 +3120,38 @@ "dev": true, "license": "ISC" }, + "node_modules/follow": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/follow/-/follow-0.12.1.tgz", + "integrity": "sha512-kcE3KjTQk/Od8wItJYIKTuMlkDBh1nemJhY0yqNWQwdn1q/R2McjmapPIvsJp4sXm2EfKWdnZdy7kITKi49QbA==", + "license": "Apache 2.0", + "dependencies": { + "browser-request": "~0.3.0", + "debug": "^2.1.0", + "request": "~2.55.0" + }, + "bin": { + "follow": "cli.js" + }, + "engines": { + "node": "0.12.x || 0.10.x || 0.8.x" + } + }, + "node_modules/follow/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/follow/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, "node_modules/for-each": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.4.tgz", @@ -2785,6 +3185,37 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", + "integrity": "sha512-LkinaG6JazVhYj2AKi67NOIAhqXcBOQACraT0WdhWW4ZO3kTiS0X7C1nJ1jFZf6wak4bVHIA/oOzWkh2ThAipg==", + "dependencies": { + "async": "~0.9.0", + "combined-stream": "~0.0.4", + "mime-types": "~2.0.3" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/formidable": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.17.tgz", + "integrity": "sha512-95MFT5qipMvUiesmuvGP1BI4hh5XWCzyTapiNJ/k8JBQda7rPy7UCWYItz2uZEdTgGNy1eInjzlL9Wx1O9fedg==", + "deprecated": "Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2841,6 +3272,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "license": "MIT", + "dependencies": { + "is-property": "^1.0.2" + } + }, + "node_modules/generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha512-TuOwZWgJ2VAMEGJvAyPWvpqxSANF0LDpmyHauMjFYzaACvn+QTT/AZomvPCzVBV7yDN3OmwHQ5OvHaeLKre3JQ==", + "license": "MIT", + "dependencies": { + "is-property": "^1.0.0" + } + }, "node_modules/get-intrinsic": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", @@ -2945,6 +3394,12 @@ "node": ">=10.13.0" } }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "license": "BSD-2-Clause" + }, "node_modules/glob/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -3037,37 +3492,146 @@ "dev": true, "license": "MIT" }, - "node_modules/has-bigints": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", - "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" + "node_modules/har-validator": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-1.8.0.tgz", + "integrity": "sha512-0+M2lRG5aXVEFwZZ2tUeRVBZT5AxViug9y94qquvQaHHVoL9ydL86aJvI3K28rwoD+DL15DzAgWtPCXNhdTKAQ==", + "deprecated": "this library is no longer supported", + "license": "ISC", + "dependencies": { + "bluebird": "^2.9.30", + "chalk": "^1.0.0", + "commander": "^2.8.1", + "is-my-json-valid": "^2.12.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "har-validator": "bin/har-validator" + }, + "engines": { + "node": ">=0.10" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, + "node_modules/har-validator/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", "license": "MIT", "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, + "node_modules/har-validator/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/har-validator/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/har-validator/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" + }, + "node_modules/har-validator/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/har-validator/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/har-validator/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-ansi/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-bigints": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3118,6 +3682,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -3131,6 +3705,45 @@ "node": ">= 0.4" } }, + "node_modules/hawk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz", + "integrity": "sha512-Pnn5Bomr1ypnBHCwhsnj+5zhP3nel9ZPa9wdzFoanaN5+1/g5dtDfBZVVZR112sfYiAftUTFczmiWGkuG0SkSQ==", + "deprecated": "This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", + "dependencies": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha512-V6Yw1rIcYV/4JsnggjBU0l4Kr+EXhpwqXRusENU1Xx6ro00IHPHYNynCuBTOZAPlr3AAmLvchH9I7N/VUdvOwQ==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.40" + } + }, + "node_modules/http-signature": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", + "integrity": "sha512-coK8uR5rq2IMj+Hen+sKPA5ldgbCc1/spPdKCL1Fw6h+D0s/2LzMcRK0Cqufs1h0ryx/niwBHGFu8HC3hwU+lA==", + "license": "MIT", + "dependencies": { + "asn1": "0.1.11", + "assert-plus": "^0.1.5", + "ctype": "0.5.3" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -3168,6 +3781,104 @@ "node": ">=0.8.19" } }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/inngest": { + "version": "3.33.0", + "resolved": "https://registry.npmjs.org/inngest/-/inngest-3.33.0.tgz", + "integrity": "sha512-4YEPMx5tbCc2qt8FDu/i1Q0+UONquPRDJtCrFSclAydpSXPFt1bqahTCb+HKV2Uh8lqPiR5O7tmo3epsP0/u0A==", + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "^2.2.3", + "@inngest/ai": "^0.1.3", + "@jpwilliams/waitgroup": "^2.1.1", + "@types/debug": "^4.1.12", + "canonicalize": "^1.0.8", + "chalk": "^4.1.2", + "cross-fetch": "^4.0.0", + "debug": "^4.3.4", + "hash.js": "^1.1.7", + "json-stringify-safe": "^5.0.1", + "ms": "^2.1.3", + "serialize-error-cjs": "^0.1.3", + "strip-ansi": "^5.2.0", + "temporal-polyfill": "^0.2.5", + "ulidx": "^2.4.1", + "zod": "~3.22.3" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@sveltejs/kit": ">=1.27.3", + "@vercel/node": ">=2.15.9", + "aws-lambda": ">=1.0.7", + "express": ">=4.19.2", + "fastify": ">=4.21.0", + "h3": ">=1.8.1", + "hono": ">=4.2.7", + "koa": ">=2.14.2", + "next": ">=12.0.0", + "typescript": ">=4.7.2" + }, + "peerDependenciesMeta": { + "@sveltejs/kit": { + "optional": true + }, + "@vercel/node": { + "optional": true + }, + "aws-lambda": { + "optional": true + }, + "express": { + "optional": true + }, + "fastify": { + "optional": true + }, + "h3": { + "optional": true + }, + "hono": { + "optional": true + }, + "koa": { + "optional": true + }, + "next": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/inngest/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/inngest/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/internal-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", @@ -3429,6 +4140,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-my-ip-valid": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.1.tgz", + "integrity": "sha512-jxc8cBcOWbNK2i2aTkCZP6i7wkHF1bqKFrwEHuN5Jtg5BSaZHUZQ/JTOJwoV41YvHnOaRyWWh72T/KvfNz9DJg==", + "license": "MIT" + }, + "node_modules/is-my-json-valid": { + "version": "2.20.6", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.20.6.tgz", + "integrity": "sha512-1JQwulVNjx8UqkPE/bqDaxtH4PXCe/2VRh/y3p99heOV87HG4Id5/VfDswd+YiAfHcRTfDlWgISycnHuhZq1aw==", + "license": "MIT", + "dependencies": { + "generate-function": "^2.0.0", + "generate-object-property": "^1.1.0", + "is-my-ip-valid": "^1.0.0", + "jsonpointer": "^5.0.0", + "xtend": "^4.0.0" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -3456,6 +4186,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", + "license": "MIT" + }, "node_modules/is-regex": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", @@ -3615,6 +4351,12 @@ "dev": true, "license": "ISC" }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "license": "MIT" + }, "node_modules/iterator.prototype": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", @@ -3659,6 +4401,15 @@ "jiti": "bin/jiti.js" } }, + "node_modules/js-cookie": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", + "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", + "license": "MIT", + "engines": { + "node": ">=14" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3700,6 +4451,12 @@ "dev": true, "license": "MIT" }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "license": "ISC" + }, "node_modules/json5": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", @@ -3713,6 +4470,15 @@ "json5": "lib/cli.js" } }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/jsx-ast-utils": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", @@ -3729,6 +4495,15 @@ "node": ">=4.0" } }, + "node_modules/kareem": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.6.3.tgz", + "integrity": "sha512-C3iHfuGUXK2u8/ipq9LfjFfXFxAZMQJJq7vLS45r3D9Y2xQ/m4S8zaR4zMLFWh9AsNPXmcFfUDhTEO8UIC/V6Q==", + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -3759,6 +4534,12 @@ "node": ">=0.10" } }, + "node_modules/layerr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/layerr/-/layerr-3.0.0.tgz", + "integrity": "sha512-tv754Ki2dXpPVApOrjTyRo4/QegVb9eVFq4mjqp4+NM5NaX7syQvN5BBNfV/ZpAHCEHV24XdUVrBAoka4jt3pA==", + "license": "MIT" + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -3829,6 +4610,15 @@ "loose-envify": "cli.js" } }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, "node_modules/lru-cache": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", @@ -3836,6 +4626,18 @@ "dev": true, "license": "ISC" }, + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -3846,6 +4648,12 @@ "node": ">= 0.4" } }, + "node_modules/memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "license": "MIT" + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -3856,6 +4664,15 @@ "node": ">= 8" } }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -3870,6 +4687,41 @@ "node": ">=8.6" } }, + "node_modules/mime": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", + "integrity": "sha512-sAaYXszED5ALBt665F0wMQCUXpGuZsGdopoqcHPdL39ZYdi7uHoZlhrfZfhv8WzivhBzr/oXwaj+yiK5wY8MXQ==", + "bin": { + "mime": "cli.js" + } + }, + "node_modules/mime-db": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz", + "integrity": "sha512-5aMAW7I4jZoZB27fXRuekqc4DVvJ7+hM8UcWrNj2mqibE54gXgPSonBYBdQW5hyaVNGmiYjY0ZMqn9fBefWYvA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", + "integrity": "sha512-2ZHUEstNkIf2oTWgtODr6X0Cc4Ns/RN/hktdozndiEhhAC2wxXejF1FH0XLHTEImE9h6gr/tcnr3YOnSGsxc7Q==", + "license": "MIT", + "dependencies": { + "mime-db": "~1.12.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "license": "ISC" + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3903,11 +4755,109 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/mongodb": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.15.0.tgz", + "integrity": "sha512-ifBhQ0rRzHDzqp9jAQP6OwHSH7dbYIQjD3SbJs9YYk9AikKEettW/9s/tbSFDTpXcRbF+u1aLrhHxDFaYtZpFQ==", + "license": "Apache-2.0", + "dependencies": { + "@mongodb-js/saslprep": "^1.1.9", + "bson": "^6.10.3", + "mongodb-connection-string-url": "^3.0.0" + }, + "engines": { + "node": ">=16.20.1" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.1.0 || ^2.0.0", + "gcp-metadata": "^5.2.0", + "kerberos": "^2.0.1", + "mongodb-client-encryption": ">=6.0.0 <7", + "snappy": "^7.2.2", + "socks": "^2.7.1" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "gcp-metadata": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + }, + "socks": { + "optional": true + } + } + }, + "node_modules/mongodb-connection-string-url": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.2.tgz", + "integrity": "sha512-rMO7CGo/9BFwyZABcKAWL8UJwH/Kc2x0g72uhDWzG48URRax5TCIcJ7Rc3RZqffZzO/Gwff/jyKwCU9TN8gehA==", + "license": "Apache-2.0", + "dependencies": { + "@types/whatwg-url": "^11.0.2", + "whatwg-url": "^14.1.0 || ^13.0.0" + } + }, + "node_modules/mongoose": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.13.0.tgz", + "integrity": "sha512-e/iYV1mPeOkg+SWAMHzt3t42/EZyER3OB1H2pjP9C3vQ+Qb5DMeV9Kb+YCUycKgScA3fbwL7dKG4EpinGlg21g==", + "license": "MIT", + "dependencies": { + "bson": "^6.10.3", + "kareem": "2.6.3", + "mongodb": "~6.15.0", + "mpath": "0.9.0", + "mquery": "5.0.0", + "ms": "2.1.3", + "sift": "17.1.3" + }, + "engines": { + "node": ">=16.20.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mongoose" + } + }, + "node_modules/mpath": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mquery": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz", + "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", + "license": "MIT", + "dependencies": { + "debug": "4.x" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, "license": "MIT" }, "node_modules/mz": { @@ -3948,12 +4898,12 @@ "license": "MIT" }, "node_modules/next": { - "version": "15.1.6", - "resolved": "https://registry.npmjs.org/next/-/next-15.1.6.tgz", - "integrity": "sha512-Hch4wzbaX0vKQtalpXvUiw5sYivBy4cm5rzUKrBnUB/y436LGrvOUqYvlSeNVCWFO/770gDlltR9gqZH62ct4Q==", + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/next/-/next-15.2.3.tgz", + "integrity": "sha512-x6eDkZxk2rPpu46E1ZVUWIBhYCLszmUY6fvHBFcbzJ9dD+qRX6vcHusaqqDlnY+VngKzKbAiG2iRCkPbmi8f7w==", "license": "MIT", "dependencies": { - "@next/env": "15.1.6", + "@next/env": "15.2.3", "@swc/counter": "0.1.3", "@swc/helpers": "0.5.15", "busboy": "1.6.0", @@ -3968,14 +4918,14 @@ "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "15.1.6", - "@next/swc-darwin-x64": "15.1.6", - "@next/swc-linux-arm64-gnu": "15.1.6", - "@next/swc-linux-arm64-musl": "15.1.6", - "@next/swc-linux-x64-gnu": "15.1.6", - "@next/swc-linux-x64-musl": "15.1.6", - "@next/swc-win32-arm64-msvc": "15.1.6", - "@next/swc-win32-x64-msvc": "15.1.6", + "@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": { @@ -4029,6 +4979,67 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "license": "MIT", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA==", + "deprecated": "Use uuid module instead", + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -4039,6 +5050,14 @@ "node": ">=0.10.0" } }, + "node_modules/oauth-sign": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz", + "integrity": "sha512-E65G/AGfoCE6FILW9X+4cfJu27PNIi40brTmDmnrWIjOdPaaJSNti1XZ/+WzFkyIdMxYk0/WtwGNiQr6puZGWQ==", + "engines": { + "node": "*" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -4528,12 +5547,16 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/qs": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.4.2.tgz", + "integrity": "sha512-Ur2glV49dt6jknphzkWeLUNCy7pmwGxGaEJuuxVVBioSwQzT00cZPLEtRqr4cg/iO/6N+RbfB0lFD2EovyeEng==" + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -4610,6 +5633,24 @@ "pify": "^2.3.0" } }, + "node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/readable-stream/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "license": "MIT" + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -4623,6 +5664,12 @@ "node": ">=8.10.0" } }, + "node_modules/reduce-component": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/reduce-component/-/reduce-component-1.0.1.tgz", + "integrity": "sha512-y0wyCcdQul3hI3xHfIs0vg/jSbboQc/YTOAqaxjFG7At+XSexduuOqBVL9SmOLSwa/ldkbzVzdwuk9s2EKTAZg==", + "license": "Apache, Version 2.0" + }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", @@ -4667,6 +5714,36 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/request": { + "version": "2.55.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.55.0.tgz", + "integrity": "sha512-tmHyusPYdblyvhGzDxPtDGOHWnP2h3dR9M5yO0UC5ndGGx0nRpOU+4c8bcv7utMxB7AakrE9p4B0CsqUBxYyyA==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "license": "Apache-2.0", + "dependencies": { + "aws-sign2": "~0.5.0", + "bl": "~0.9.0", + "caseless": "~0.9.0", + "combined-stream": "~0.0.5", + "forever-agent": "~0.6.0", + "form-data": "~0.2.0", + "har-validator": "^1.4.0", + "hawk": "~2.3.0", + "http-signature": "~0.10.0", + "isstream": "~0.1.1", + "json-stringify-safe": "~5.0.0", + "mime-types": "~2.0.1", + "node-uuid": "~1.4.0", + "oauth-sign": "~0.6.0", + "qs": "~2.4.0", + "stringstream": "~0.0.4", + "tough-cookie": ">=0.12.0", + "tunnel-agent": "~0.4.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/resolve": { "version": "1.22.10", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", @@ -4817,6 +5894,22 @@ "node": ">=10" } }, + "node_modules/serialize-error-cjs": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/serialize-error-cjs/-/serialize-error-cjs-0.1.4.tgz", + "integrity": "sha512-6a6dNqipzbCPlTFgztfNP2oG+IGcflMe/01zSzGrQcxGMKbIjOemBBD85pH92klWaJavAUWxAh9Z0aU28zxW6A==", + "deprecated": "Rolling release, please update to 0.2.0", + "license": "MIT-0", + "funding": { + "url": "https://github.com/sponsors/finwo" + } + }, + "node_modules/server-only": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/server-only/-/server-only-0.0.1.tgz", + "integrity": "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==", + "license": "MIT" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -5005,6 +6098,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/sift": { + "version": "17.1.3", + "resolved": "https://registry.npmjs.org/sift/-/sift-17.1.3.tgz", + "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==", + "license": "MIT" + }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", @@ -5028,6 +6127,42 @@ "is-arrayish": "^0.3.1" } }, + "node_modules/snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/snakecase-keys": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-8.0.1.tgz", + "integrity": "sha512-Sj51kE1zC7zh6TDlNNz0/Jn1n5HiHdoQErxO8jLtnyrkJW/M5PrI7x05uDgY3BO7OUQYKCvmeMurW6BPUdwEOw==", + "license": "MIT", + "dependencies": { + "map-obj": "^4.1.0", + "snake-case": "^3.0.4", + "type-fest": "^4.15.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha512-7bgVOAnPj3XjrKY577S+puCKGCRlUrcrEdsMeRXlg9Ghf5df/xNi6sONUa43WrHUd3TjJBF7O04jYoiY0FVa0A==", + "deprecated": "This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", + "dependencies": { + "hoek": "2.x.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -5037,6 +6172,15 @@ "node": ">=0.10.0" } }, + "node_modules/sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "license": "MIT", + "dependencies": { + "memory-pager": "^1.0.2" + } + }, "node_modules/stable-hash": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.4.tgz", @@ -5044,6 +6188,12 @@ "dev": true, "license": "MIT" }, + "node_modules/std-env": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.1.tgz", + "integrity": "sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==", + "license": "MIT" + }, "node_modules/streamsearch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", @@ -5052,6 +6202,12 @@ "node": ">=10.0.0" } }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "license": "MIT" + }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -5229,6 +6385,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/stringstream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", + "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", + "license": "MIT" + }, "node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -5338,11 +6500,133 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/superagent": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-1.8.5.tgz", + "integrity": "sha512-4h4R6fISQXvgjIqZ8DjONYy3y2XPxgZO0LgHsBI6tDAEhzJLpWuK+thM60SmUiERJOEJzmxlIGx/GP6+azky/A==", + "deprecated": "Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net", + "license": "MIT", + "dependencies": { + "component-emitter": "~1.2.0", + "cookiejar": "2.0.6", + "debug": "2", + "extend": "3.0.0", + "form-data": "1.0.0-rc3", + "formidable": "~1.0.14", + "methods": "~1.1.1", + "mime": "1.3.4", + "qs": "2.3.3", + "readable-stream": "1.0.27-1", + "reduce-component": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/superagent/node_modules/async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", + "license": "MIT" + }, + "node_modules/superagent/node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/superagent/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/superagent/node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/superagent/node_modules/form-data": { + "version": "1.0.0-rc3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc3.tgz", + "integrity": "sha512-Z5JWXWsFDI8x73Rt/Dc7SK/EvKBzudhqIVBtEhcAhtoevCTqO3YJmctGBLzT0Ggg39xFcefkXt00t1TYLz6D0w==", + "license": "MIT", + "dependencies": { + "async": "^1.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.3" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/superagent/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "license": "MIT" + }, + "node_modules/superagent/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/superagent/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/superagent/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/superagent/node_modules/qs": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", + "integrity": "sha512-f5M0HQqZWkzU8GELTY8LyMrGkr3bPjKoFtTkwUEqJQbcljbeK8M7mliP9Ia2xoOI6oMerp+QPS7oYJtpGmWe/A==" + }, + "node_modules/superagent/node_modules/readable-stream": { + "version": "1.0.27-1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.27-1.tgz", + "integrity": "sha512-uQE31HGhpMrqZwtDjRliOs2aC3XBi+DdkhLs+Xa0dvVD5eDiZr3+k8rKVZcyTzxosgtMw7B/twQsK3P1KTZeVg==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -5364,6 +6648,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/swr": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/swr/-/swr-2.3.3.tgz", + "integrity": "sha512-dshNvs3ExOqtZ6kJBaAsabhPdHyeY4P2cKwRCniDVifBMoG/SVI7tfLWqPXriVspf2Rg4tPzXJTnwaihIeFw2A==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.3", + "use-sync-external-store": "^1.4.0" + }, + "peerDependencies": { + "react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/tailwindcss": { "version": "3.4.17", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", @@ -5442,6 +6739,21 @@ "node": ">=6" } }, + "node_modules/temporal-polyfill": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.2.5.tgz", + "integrity": "sha512-ye47xp8Cb0nDguAhrrDS1JT1SzwEV9e26sSsrWzVu+yPZ7LzceEcH0i2gci9jWfOfSCCgM3Qv5nOYShVUUFUXA==", + "license": "MIT", + "dependencies": { + "temporal-spec": "^0.2.4" + } + }, + "node_modules/temporal-spec": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.2.4.tgz", + "integrity": "sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==", + "license": "ISC" + }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -5465,6 +6777,24 @@ "node": ">=0.8" } }, + "node_modules/tldts": { + "version": "6.1.85", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.85.tgz", + "integrity": "sha512-gBdZ1RjCSevRPFix/hpaUWeak2/RNUZB4/8frF1r5uYMHjFptkiT0JXIebWvgI/0ZHXvxaUDDJshiA0j6GdL3w==", + "license": "MIT", + "dependencies": { + "tldts-core": "^6.1.85" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "6.1.85", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.85.tgz", + "integrity": "sha512-DTjUVvxckL1fIoPSb3KE7ISNtkWSawZdpfxGxwiIrZoO6EbHVDXXUIlIuWympPaeS+BLGyggozX/HTMsRAdsoA==", + "license": "MIT" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5478,6 +6808,30 @@ "node": ">=8.0" } }, + "node_modules/tough-cookie": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz", + "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==", + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^6.1.32" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/tr46": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.0.tgz", + "integrity": "sha512-IUWnUK7ADYR5Sl1fZlO1INDUhVhatWl7BtJWsIhwJ0UAK7ilzzIa8uIqOO/aYVWHZPJkKbEL+362wrzoeRF7bw==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/ts-api-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.1.tgz", @@ -5517,6 +6871,15 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, + "node_modules/tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha512-e0IoVDWx8SDHc/hwFTqJDQ7CCDTEeGhmcT9jkWJjoGQSpgBz20nAMr80E3Tpk7PatJ1b37DQDgJR3CNSzcMOZQ==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5530,6 +6893,18 @@ "node": ">= 0.8.0" } }, + "node_modules/type-fest": { + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.38.0.tgz", + "integrity": "sha512-2dBz5D5ycHIoliLYLi0Q2V7KRaDlH0uWIvmk7TYlAg5slqwiPv1ezJdZm1QEM0xgk29oYWMCbIG7E6gHpvChlg==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typed-array-buffer": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", @@ -5612,9 +6987,7 @@ "version": "5.7.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", - "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -5623,6 +6996,18 @@ "node": ">=14.17" } }, + "node_modules/ulidx": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/ulidx/-/ulidx-2.4.1.tgz", + "integrity": "sha512-xY7c8LPyzvhvew0Fn+Ek3wBC9STZAuDI/Y5andCKi9AX6/jvfaX45PhsDX8oxgPL0YFp0Jhr8qWMbS/p9375Xg==", + "license": "MIT", + "dependencies": { + "layerr": "^3.0.0" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/unbox-primitive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", @@ -5642,6 +7027,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "license": "MIT" + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -5652,6 +7043,15 @@ "punycode": "^2.1.0" } }, + "node_modules/use-sync-external-store": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.4.0.tgz", + "integrity": "sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -5659,6 +7059,28 @@ "dev": true, "license": "MIT" }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz", + "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", + "license": "MIT", + "dependencies": { + "tr46": "^5.1.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -5868,6 +7290,15 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, "node_modules/yaml": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", @@ -5893,6 +7324,15 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zod": { + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.5.tgz", + "integrity": "sha512-HqnGsCdVZ2xc0qWPLdO25WnseXThh0kEYKIdV5F/hTHO75hNZFp8thxSeHhiPrHZKrFTo1SOgkAj9po5bexZlw==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/package.json b/package.json index 10bb81e5a..2cd2c6129 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,11 @@ "lint": "next lint" }, "dependencies": { - "next": "15.1.6", + "@clerk/nextjs": "^6.12.9", + "clerk": "^0.8.3", + "inngest": "^3.33.0", + "mongoose": "^8.13.0", + "next": "^15.2.3", "react": "^19.0.0", "react-dom": "^19.0.0", "react-hot-toast": "^2.5.1" From c9b1aea58d80794675326dda95932775f525b182 Mon Sep 17 00:00:00 2001 From: sujanpokharel Date: Wed, 26 Mar 2025 06:49:09 +0000 Subject: [PATCH 2/9] 3rd commit --- api/inngest/route.js | 14 +++++++++++ config/db.js | 31 +++++++++++++++++++++++++ config/inngest.js | 55 ++++++++++++++++++++++++++++++++++++++++++++ ecommercenext | 1 + models/user.js | 33 ++++++++++++++++++++++++++ 5 files changed, 134 insertions(+) create mode 100644 api/inngest/route.js create mode 100644 config/db.js create mode 100644 config/inngest.js create mode 160000 ecommercenext create mode 100644 models/user.js diff --git a/api/inngest/route.js b/api/inngest/route.js new file mode 100644 index 000000000..46c185384 --- /dev/null +++ b/api/inngest/route.js @@ -0,0 +1,14 @@ +import { serve } from "inngest/next"; +import { inngest } from "@/config/inngest"; +import { syncUserCreation, syncUserDeletion } from "../../config/inngest"; + +// Create an API that serves zero functions +export const { GET, POST, PUT } = serve({ + client: inngest, + functions: [ + syncUserCreation, + syncUserDeletion, + syncUserDeletion, + + ], +}); diff --git a/config/db.js b/config/db.js new file mode 100644 index 000000000..de84ccaf7 --- /dev/null +++ b/config/db.js @@ -0,0 +1,31 @@ +import mongoose from 'mongoose'; + + +let cached = global.mongoose; + + +if (!cached) { + cached = global.mongoose = { conn: null, promise: null }; +} + +async function connectDB(params) { + if (cached.conn) { + return cached.conn; + } + + if (!cached.promise) { + const opts = { + + bufferCommands: false, + + }; + + cached.promise = mongoose.connect(`${process.env.MONGO_URI}/quick cart `, opts).then(mongoose => { + return mongoose; + }); + } + cached.conn = await cached.promise; + return cached.conn; +} + +export default connectDB; \ No newline at end of file diff --git a/config/inngest.js b/config/inngest.js new file mode 100644 index 000000000..8217f61a4 --- /dev/null +++ b/config/inngest.js @@ -0,0 +1,55 @@ +import { Inngest } from "inngest"; + +// Create a client to send and receive events +export const inngest = new Inngest({ id: "quickcart-next" }); + + +// inngest function to save to the database +import { inngest } from "./client"; +import connectDB from "./db"; +import User from "../models/user"; + +export const syncUserCreation = inngest.createFunction( + { id: "sync-user-from-clerk" }, + { event: "clerk/user.created" }, + async ({ event, step }) => { + const{id, first_name, lasr_name, email_addresses, inage_url } = event.data; + const userData = { + _id:id, + email: email_addresses[0].email_address, + name: first_name + " " + last_name, + imageUrl: image_url, + + } + await connectDB(); + await User.create(userData); + }, +); + +// inngest function to update the user data in database +export const syncUserUpdate = inngest.createFunction( + { id: "update-user_from_clerk" }, + { event: "clerk/user.updated" }, + async ({ event }) => { + const { id, first_name, last_name, email_addresses, image_url } = event.data; + const userData = { + email: email_addresses[0].email_address, + name: first_name + " " + last_name, + imageUrl: image_url, + } + await connectDB(); + await User.findByIdAndUpdate(id, userData); + }, +); + +// inngest function to delete the user from the database +export const syncUserDeletion = inngest.createFunction( + { id: "delete-user-from-clerk" }, + { event: "clerk/user.deleted" }, + async ({ event}) => { + const { id } = event.data; + await connectDB(); + await User.findByIdAndDelete(id); + }, +); + diff --git a/ecommercenext b/ecommercenext new file mode 160000 index 000000000..5b9db598f --- /dev/null +++ b/ecommercenext @@ -0,0 +1 @@ +Subproject commit 5b9db598fc4b8bae266a39726fd0f55c8106b567 diff --git a/models/user.js b/models/user.js new file mode 100644 index 000000000..dfc637092 --- /dev/null +++ b/models/user.js @@ -0,0 +1,33 @@ +import mongoose from 'mongoose'; + +const userSchema = new mongoose.Schema({ + id: { + type: String, + required: true + }, + name: { + type: String, + required: true + }, + email: { + type: String, + required: true, + unique: true + }, + ImageUrl: { + type: String, + required: true + }, + password: { + type: String, + required: true + }, + isAdmin: { + type: Boolean, + required: true, + default: false + } +},{minimize: false}); + +const User = mongoose.models.User || mongoose.model('User', userSchema); +export default User; \ No newline at end of file From 221fc57927510f58e4be98398d18d5518df80268 Mon Sep 17 00:00:00 2001 From: sujanpokharel Date: Thu, 3 Apr 2025 11:17:11 +0545 Subject: [PATCH 3/9] Move API route from api/inngest to app/inngest --- {api => app}/inngest/route.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {api => app}/inngest/route.js (78%) diff --git a/api/inngest/route.js b/app/inngest/route.js similarity index 78% rename from api/inngest/route.js rename to app/inngest/route.js index 46c185384..3d5d3d0b7 100644 --- a/api/inngest/route.js +++ b/app/inngest/route.js @@ -1,6 +1,6 @@ import { serve } from "inngest/next"; import { inngest } from "@/config/inngest"; -import { syncUserCreation, syncUserDeletion } from "../../config/inngest"; +import { syncUserCreation, syncUserDeletion } from "@/config/inngest"; // Create an API that serves zero functions export const { GET, POST, PUT } = serve({ From 130ba26ddbe061eb4499000a338777b9cbe5efb9 Mon Sep 17 00:00:00 2001 From: Sujan Pokharel Date: Wed, 17 Dec 2025 16:33:53 +0545 Subject: [PATCH 4/9] updae --- .agent/knowledge.md | 216 +++++++++++++++++++++++++++++++ .env | 15 --- .gitignore | 2 +- app/api/address/route.js | 93 +++++++++++++ app/api/order/route.js | 76 +++++++++++ app/api/order/seller/route.js | 108 ++++++++++++++++ app/api/product/[id]/route.js | 98 ++++++++++++++ app/api/product/route.js | 68 ++++++++++ app/seller/orders/page.jsx | 137 ++++++++++++++------ app/seller/page.jsx | 67 +++++++++- app/seller/product-list/page.jsx | 66 ++++++++-- config/db.js | 6 +- models/Address.js | 36 ++++++ models/Order.js | 53 ++++++++ models/Product.js | 41 ++++++ package-lock.json | 13 +- 16 files changed, 1022 insertions(+), 73 deletions(-) create mode 100644 .agent/knowledge.md delete mode 100644 .env create mode 100644 app/api/address/route.js create mode 100644 app/api/order/route.js create mode 100644 app/api/order/seller/route.js create mode 100644 app/api/product/[id]/route.js create mode 100644 app/api/product/route.js create mode 100644 models/Address.js create mode 100644 models/Order.js create mode 100644 models/Product.js diff --git a/.agent/knowledge.md b/.agent/knowledge.md new file mode 100644 index 000000000..12bf3f9a3 --- /dev/null +++ b/.agent/knowledge.md @@ -0,0 +1,216 @@ +# QuickCart - E-Commerce Platform Knowledge Base + +## Project Overview + +**QuickCart** is a modern e-commerce web application built with **Next.js 15** (App Router), designed for selling electronics and tech products. The application supports both customer shopping experiences and seller dashboard functionality. + +## Technology Stack + +| Technology | Purpose | +|------------|---------| +| **Next.js 15** | React framework with App Router (Turbopack enabled) | +| **React 19** | UI library | +| **Tailwind CSS 3.4** | Utility-first CSS framework | +| **Clerk** | Authentication & user management | +| **MongoDB/Mongoose** | Database (via Mongoose ODM) | +| **Inngest** | Background job processing & webhook handling | +| **react-hot-toast** | Toast notifications | + +## Project Structure + +``` +QuickCart/ +├── app/ # Next.js App Router pages +│ ├── layout.js # Root layout (Clerk, AppContext, Toaster) +│ ├── page.jsx # Homepage +│ ├── globals.css # Global styles +│ ├── all-products/ # Product listing page +│ ├── product/[id]/ # Dynamic product detail page +│ ├── cart/ # Shopping cart page +│ ├── my-orders/ # Customer order history +│ ├── order-placed/ # Order confirmation page +│ ├── add-address/ # Address form page +│ ├── seller/ # Seller dashboard (nested layout) +│ │ ├── layout.jsx # Seller dashboard layout +│ │ ├── page.jsx # Add Product form +│ │ ├── product-list/ # Seller's product list +│ │ └── orders/ # Seller's orders +│ └── inngest/ # Inngest webhook handler (API route) +├── components/ # Reusable UI components +│ ├── Navbar.jsx # Main navigation +│ ├── Footer.jsx # Site footer +│ ├── ProductCard.jsx # Product display card +│ ├── HeaderSlider.jsx # Homepage carousel +│ ├── HomeProducts.jsx # Homepage product grid +│ ├── FeaturedProduct.jsx# Featured product section +│ ├── Banner.jsx # Promotional banner +│ ├── NewsLetter.jsx # Newsletter signup +│ ├── OrderSummary.jsx # Cart order summary & checkout +│ ├── Loading.jsx # Loading spinner +│ └── seller/ # Seller-specific components +│ ├── Navbar.jsx +│ ├── Sidebar.jsx +│ └── Footer.jsx +├── context/ # React Context providers +│ └── AppContext.jsx # Global app state (cart, user, products) +├── config/ # Configuration files +│ ├── db.js # MongoDB connection +│ └── inngest.js # Inngest client & functions +├── lib/ # Utility libraries +│ └── authSeller.js # Seller authentication helper +├── models/ # Mongoose schemas +│ └── user.js # User model +├── assets/ # Static assets & dummy data +│ └── assets.js # Image imports & dummy data +├── middleware.ts # Clerk authentication middleware +└── public/ # Public static files +``` + +## Core Features + +### 1. Customer Features +- **Browse Products**: View all products on `/all-products` +- **Product Details**: View individual product on `/product/[id]` +- **Shopping Cart**: Add/remove products, adjust quantities at `/cart` +- **Checkout Flow**: Address selection, promo codes, order placement +- **Order History**: View past orders at `/my-orders` +- **Authentication**: Sign in via Clerk (UserButton with custom menu items) + +### 2. Seller Features (Protected Routes) +- **Add Products**: Upload product images, set name/description/category/price +- **Product Management**: View all products in tabular format +- **Order Management**: View customer orders +- **Seller Role Check**: `authSeller.js` verifies `publicMetadata.role === 'seller'` + +## Application Flow + +### Authentication Flow +1. Clerk handles auth via `ClerkProvider` in root layout +2. `middleware.ts` applies Clerk middleware to protect routes +3. User data synced to MongoDB via Inngest webhooks: + - `clerk/user.created` → Create user in DB + - `clerk/user.updated` → Update user in DB + - `clerk/user.deleted` → Delete user from DB + +### State Management (AppContext) +The `AppContext` provides global state: +```javascript +{ + user, // Clerk user object + currency, // From NEXT_PUBLIC_CURRENCY env + router, // Next.js router + isSeller, setIsSeller, // Seller mode toggle + userData, fetchUserData, // User data from DB + products, fetchProductData, // Product catalog + cartItems, setCartItems, // Shopping cart state + addToCart, // Add item to cart + updateCartQuantity, // Update cart item quantity + getCartCount, // Total items in cart + getCartAmount // Total cart value +} +``` + +### Shopping Flow +1. Browse products on homepage or `/all-products` +2. Click product → navigate to `/product/[id]` +3. "Add to Cart" or "Buy Now" → updates `cartItems` in context +4. View cart at `/cart` with `OrderSummary` component +5. Select address (or add new via `/add-address`) +6. Apply promo code (optional) +7. "Place Order" → creates order → redirects to `/order-placed` +8. Auto-redirect to `/my-orders` after 5 seconds + +## Product Categories +- Earphone +- Headphone +- Watch +- Smartphone +- Laptop +- Camera +- Accessories + +## Key Components + +### Navbar (`components/Navbar.jsx`) +- Logo with home navigation +- Desktop nav: Home, Shop, About Us, Contact +- Seller Dashboard button (conditionally shown) +- User menu via Clerk UserButton with custom actions: + - Cart, My Orders (desktop) + - Home, Products, Cart, My Orders (mobile) + +### ProductCard (`components/ProductCard.jsx`) +- Product image with hover scale effect +- Wishlist button (heart icon) +- Product name, description (truncated) +- Star rating display +- Price with "Buy now" button + +### OrderSummary (`components/OrderSummary.jsx`) +- Address dropdown selector +- "Add New Address" option +- Promo code input +- Item count, subtotal, shipping (free), tax (2%) +- Total calculation +- "Place Order" button + +### Seller Sidebar (`components/seller/Sidebar.jsx`) +- Add Product, Product List, Orders navigation +- Active state highlighting with orange accent + +## Database Schema + +### User Model (`models/user.js`) +```javascript +{ + id: String, // Clerk user ID + name: String, + email: String, // Unique + ImageUrl: String, + password: String, + isAdmin: Boolean // Default: false +} +``` + +## Environment Variables + +| Variable | Purpose | +|----------|---------| +| `MONGO_URI` | MongoDB connection string | +| `NEXT_PUBLIC_CURRENCY` | Currency symbol (e.g., "$") | +| Clerk variables | Clerk API keys | + +## Current State (Development) + +The application currently uses **dummy data** from `assets/assets.js`: +- `productsDummyData` - Sample product catalog +- `userDummyData` - Sample user data +- `orderDummyData` - Sample order data +- `addressDummyData` - Sample addresses + +**Note**: API integration and database operations are not yet fully implemented. Functions like `handleSubmit`, `createOrder`, `onSubmitHandler` are placeholder stubs. + +## File Naming Conventions + +- Pages: `page.jsx` +- Layouts: `layout.jsx` +- Components: PascalCase (e.g., `ProductCard.jsx`) +- Utils/Config: camelCase (e.g., `authSeller.js`) +- Assets: snake_case (e.g., `heart_icon.svg`) + +## Styling Guidelines + +- Tailwind CSS for all styling +- Orange accent color: `orange-500`, `orange-600` +- Gray text: `gray-500`, `gray-600`, `gray-700`, `gray-800` +- Responsive breakpoints: `max-sm`, `md`, `lg`, `xl` +- Font: Outfit (Google Font) with weights 300, 400, 500 + +## Known Issues / TODOs + +1. Inngest config imports itself (`import { inngest } from "./client"` should reference same file) +2. Typos in `inngest.js`: `lasr_name` should be `last_name`, `inage_url` should be `image_url` +3. `syncUserDeletion` is registered twice in inngest route +4. MongoDB database name has a space: `"quick cart "` (should be fixed) +5. Form submissions (`handleSubmit`, `createOrder`, `onSubmitHandler`) are empty stubs +6. Currently using all dummy data instead of real API calls diff --git a/.env b/.env deleted file mode 100644 index 72b0e23cf..000000000 --- a/.env +++ /dev/null @@ -1,15 +0,0 @@ -# Public Environment Variables -NEXT_PUBLIC_CURRENCY=$ -NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_ZGl2ZXJzZS1zb2xlLTczLmNsZXJrLmFjY291bnRzLmRldiQ - - - -# Private Environment Variables -CLERK_SECRET_KEY=sk_test_Opil93SxX121UNorC0ZBwLL0Axz3jwJmC898OEI5iS -MONGODB_URI='mongodb+srv://pokharelsujan07:Sujan12345@cluster0.1xlqh.mongodb.net' -INNGEST_SIGNING_KEY='signkey-prod-60df7a20c045b4a846c4fac7f49ddff89326452a1e2a73557a04f3eacdfd62df' -INNGEST_EVENT_KEY='7sdtIcNJXgAlATL7J3OlmxmVT6fZoKqLgqnBtz9oEYW4fadm3Z2qvF705Mw0ETabf5uTdrZ-RwKAH-dG9avdqg' -# Cloudinary -CLOUDINARY_CLOUD_NAME ='' -CLOUDINARY_API_KEY ='' -CLOUDINARY_API_SECRET ='' \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1b7a73ab0..fab4aa3df 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ !.yarn/plugins !.yarn/releases !.yarn/versions - +. # testing /coverage diff --git a/app/api/address/route.js b/app/api/address/route.js new file mode 100644 index 000000000..5eefc821e --- /dev/null +++ b/app/api/address/route.js @@ -0,0 +1,93 @@ +import { NextResponse } from 'next/server'; +import connectDB from '@/config/db'; +import Address from '@/models/Address'; +import { auth } from '@clerk/nextjs/server'; + +// GET all addresses for the authenticated user +export async function GET(request) { + try { + const { userId } = await auth(); + + if (!userId) { + return NextResponse.json({ success: false, message: 'Not authenticated' }, { status: 401 }); + } + + await connectDB(); + + const addresses = await Address.find({ userId }); + + return NextResponse.json({ success: true, addresses }); + } catch (error) { + return NextResponse.json({ success: false, message: error.message }, { status: 500 }); + } +} + +// POST - Add new address +export async function POST(request) { + try { + const { userId } = await auth(); + + if (!userId) { + return NextResponse.json({ success: false, message: 'Not authenticated' }, { status: 401 }); + } + + await connectDB(); + + const body = await request.json(); + const { fullName, phoneNumber, pincode, area, city, state } = body; + + if (!fullName || !phoneNumber || !pincode || !area || !city || !state) { + return NextResponse.json({ success: false, message: 'All fields are required' }, { status: 400 }); + } + + const address = await Address.create({ + userId, + fullName, + phoneNumber, + pincode, + area, + city, + state + }); + + return NextResponse.json({ success: true, message: 'Address added successfully', address }, { status: 201 }); + } catch (error) { + return NextResponse.json({ success: false, message: error.message }, { status: 500 }); + } +} + +// DELETE - Remove address +export async function DELETE(request) { + try { + const { userId } = await auth(); + + if (!userId) { + return NextResponse.json({ success: false, message: 'Not authenticated' }, { status: 401 }); + } + + await connectDB(); + + const { searchParams } = new URL(request.url); + const addressId = searchParams.get('id'); + + if (!addressId) { + return NextResponse.json({ success: false, message: 'Address ID is required' }, { status: 400 }); + } + + const address = await Address.findById(addressId); + + if (!address) { + return NextResponse.json({ success: false, message: 'Address not found' }, { status: 404 }); + } + + if (address.userId !== userId) { + return NextResponse.json({ success: false, message: 'Not authorized' }, { status: 403 }); + } + + await Address.findByIdAndDelete(addressId); + + return NextResponse.json({ success: true, message: 'Address deleted successfully' }); + } catch (error) { + return NextResponse.json({ success: false, message: error.message }, { status: 500 }); + } +} diff --git a/app/api/order/route.js b/app/api/order/route.js new file mode 100644 index 000000000..802c31a2b --- /dev/null +++ b/app/api/order/route.js @@ -0,0 +1,76 @@ +import { NextResponse } from 'next/server'; +import connectDB from '@/config/db'; +import Order from '@/models/Order'; +import Product from '@/models/Product'; +import { auth } from '@clerk/nextjs/server'; + +// GET orders for the authenticated user +export async function GET(request) { + try { + const { userId } = await auth(); + + if (!userId) { + return NextResponse.json({ success: false, message: 'Not authenticated' }, { status: 401 }); + } + + await connectDB(); + + const orders = await Order.find({ userId }) + .populate('items.product') + .sort({ date: -1 }); + + return NextResponse.json({ success: true, orders }); + } catch (error) { + return NextResponse.json({ success: false, message: error.message }, { status: 500 }); + } +} + +// POST - Create new order +export async function POST(request) { + try { + const { userId } = await auth(); + + if (!userId) { + return NextResponse.json({ success: false, message: 'Not authenticated' }, { status: 401 }); + } + + await connectDB(); + + const body = await request.json(); + const { items, address } = body; + + if (!items || items.length === 0) { + return NextResponse.json({ success: false, message: 'Cart is empty' }, { status: 400 }); + } + + if (!address) { + return NextResponse.json({ success: false, message: 'Address is required' }, { status: 400 }); + } + + // Calculate total amount + let amount = 0; + for (const item of items) { + const product = await Product.findById(item.product); + if (product) { + amount += product.offerPrice * item.quantity; + } + } + + // Add tax (2%) + amount = amount + Math.floor(amount * 0.02); + + const order = await Order.create({ + userId, + items, + amount, + address + }); + + // Populate the product details before sending response + await order.populate('items.product'); + + return NextResponse.json({ success: true, message: 'Order placed successfully', order }, { status: 201 }); + } catch (error) { + return NextResponse.json({ success: false, message: error.message }, { status: 500 }); + } +} diff --git a/app/api/order/seller/route.js b/app/api/order/seller/route.js new file mode 100644 index 000000000..34f7bac42 --- /dev/null +++ b/app/api/order/seller/route.js @@ -0,0 +1,108 @@ +import { NextResponse } from 'next/server'; +import connectDB from '@/config/db'; +import Order from '@/models/Order'; +import Product from '@/models/Product'; +import { auth } from '@clerk/nextjs/server'; +import authSeller from '@/lib/authSeller'; + +// GET orders for seller (orders containing their products) +export async function GET(request) { + try { + const { userId } = await auth(); + + if (!userId) { + return NextResponse.json({ success: false, message: 'Not authenticated' }, { status: 401 }); + } + + // Verify seller role + const isSeller = await authSeller(userId); + if (!isSeller) { + return NextResponse.json({ success: false, message: 'Not authorized as seller' }, { status: 403 }); + } + + await connectDB(); + + // Get all products by this seller + const sellerProducts = await Product.find({ userId }); + const sellerProductIds = sellerProducts.map(p => p._id); + + // Find all orders that contain at least one product from this seller + const orders = await Order.find({ + 'items.product': { $in: sellerProductIds } + }) + .populate('items.product') + .sort({ date: -1 }); + + // Filter order items to only include seller's products + const sellerOrders = orders.map(order => { + const sellerItems = order.items.filter(item => + item.product && sellerProductIds.some(id => id.equals(item.product._id)) + ); + + // Calculate amount for seller's items only + const sellerAmount = sellerItems.reduce((sum, item) => { + return sum + (item.product.offerPrice * item.quantity); + }, 0); + + return { + _id: order._id, + items: sellerItems, + amount: sellerAmount, + address: order.address, + status: order.status, + paymentMethod: order.paymentMethod, + isPaid: order.isPaid, + date: order.date + }; + }).filter(order => order.items.length > 0); + + return NextResponse.json({ success: true, orders: sellerOrders }); + } catch (error) { + return NextResponse.json({ success: false, message: error.message }, { status: 500 }); + } +} + +// PUT - Update order status (Seller only) +export async function PUT(request) { + try { + const { userId } = await auth(); + + if (!userId) { + return NextResponse.json({ success: false, message: 'Not authenticated' }, { status: 401 }); + } + + // Verify seller role + const isSeller = await authSeller(userId); + if (!isSeller) { + return NextResponse.json({ success: false, message: 'Not authorized as seller' }, { status: 403 }); + } + + await connectDB(); + + const body = await request.json(); + const { orderId, status } = body; + + if (!orderId || !status) { + return NextResponse.json({ success: false, message: 'Order ID and status are required' }, { status: 400 }); + } + + const validStatuses = ['Order Placed', 'Shipped', 'Out for Delivery', 'Delivered', 'Cancelled']; + if (!validStatuses.includes(status)) { + return NextResponse.json({ success: false, message: 'Invalid status' }, { status: 400 }); + } + + const order = await Order.findByIdAndUpdate( + orderId, + { status }, + { new: true } + ).populate('items.product'); + + if (!order) { + return NextResponse.json({ success: false, message: 'Order not found' }, { status: 404 }); + } + + return NextResponse.json({ success: true, message: 'Order status updated', order }); + } catch (error) { + return NextResponse.json({ success: false, message: error.message }, { status: 500 }); + } +} diff --git a/app/api/product/[id]/route.js b/app/api/product/[id]/route.js new file mode 100644 index 000000000..33e7c8289 --- /dev/null +++ b/app/api/product/[id]/route.js @@ -0,0 +1,98 @@ +import { NextResponse } from 'next/server'; +import connectDB from '@/config/db'; +import Product from '@/models/Product'; +import { auth } from '@clerk/nextjs/server'; +import authSeller from '@/lib/authSeller'; + +// GET single product by ID +export async function GET(request, { params }) { + try { + await connectDB(); + + const { id } = await params; + const product = await Product.findById(id); + + if (!product) { + return NextResponse.json({ success: false, message: 'Product not found' }, { status: 404 }); + } + + return NextResponse.json({ success: true, product }); + } catch (error) { + return NextResponse.json({ success: false, message: error.message }, { status: 500 }); + } +} + +// DELETE product by ID (Seller only - must own the product) +export async function DELETE(request, { params }) { + try { + const { userId } = await auth(); + + if (!userId) { + return NextResponse.json({ success: false, message: 'Not authenticated' }, { status: 401 }); + } + + // Verify seller role + const isSeller = await authSeller(userId); + if (!isSeller) { + return NextResponse.json({ success: false, message: 'Not authorized as seller' }, { status: 403 }); + } + + await connectDB(); + + const { id } = await params; + const product = await Product.findById(id); + + if (!product) { + return NextResponse.json({ success: false, message: 'Product not found' }, { status: 404 }); + } + + // Check if the seller owns this product + if (product.userId !== userId) { + return NextResponse.json({ success: false, message: 'Not authorized to delete this product' }, { status: 403 }); + } + + await Product.findByIdAndDelete(id); + + return NextResponse.json({ success: true, message: 'Product deleted successfully' }); + } catch (error) { + return NextResponse.json({ success: false, message: error.message }, { status: 500 }); + } +} + +// PUT - Update product (Seller only - must own the product) +export async function PUT(request, { params }) { + try { + const { userId } = await auth(); + + if (!userId) { + return NextResponse.json({ success: false, message: 'Not authenticated' }, { status: 401 }); + } + + // Verify seller role + const isSeller = await authSeller(userId); + if (!isSeller) { + return NextResponse.json({ success: false, message: 'Not authorized as seller' }, { status: 403 }); + } + + await connectDB(); + + const { id } = await params; + const product = await Product.findById(id); + + if (!product) { + return NextResponse.json({ success: false, message: 'Product not found' }, { status: 404 }); + } + + // Check if the seller owns this product + if (product.userId !== userId) { + return NextResponse.json({ success: false, message: 'Not authorized to update this product' }, { status: 403 }); + } + + const body = await request.json(); + const updatedProduct = await Product.findByIdAndUpdate(id, body, { new: true }); + + return NextResponse.json({ success: true, message: 'Product updated successfully', product: updatedProduct }); + } catch (error) { + return NextResponse.json({ success: false, message: error.message }, { status: 500 }); + } +} diff --git a/app/api/product/route.js b/app/api/product/route.js new file mode 100644 index 000000000..0cc80315d --- /dev/null +++ b/app/api/product/route.js @@ -0,0 +1,68 @@ +import { NextResponse } from 'next/server'; +import connectDB from '@/config/db'; +import Product from '@/models/Product'; +import { auth } from '@clerk/nextjs/server'; +import authSeller from '@/lib/authSeller'; + +// GET all products or products by seller +export async function GET(request) { + try { + await connectDB(); + + const { searchParams } = new URL(request.url); + const sellerId = searchParams.get('sellerId'); + + let products; + if (sellerId) { + // Get products for a specific seller + products = await Product.find({ userId: sellerId }).sort({ date: -1 }); + } else { + // Get all products + products = await Product.find({}).sort({ date: -1 }); + } + + return NextResponse.json({ success: true, products }); + } catch (error) { + return NextResponse.json({ success: false, message: error.message }, { status: 500 }); + } +} + +// POST - Add new product (Seller only) +export async function POST(request) { + try { + const { userId } = await auth(); + + if (!userId) { + return NextResponse.json({ success: false, message: 'Not authenticated' }, { status: 401 }); + } + + // Verify seller role + const isSeller = await authSeller(userId); + if (!isSeller) { + return NextResponse.json({ success: false, message: 'Not authorized as seller' }, { status: 403 }); + } + + await connectDB(); + + const body = await request.json(); + const { name, description, price, offerPrice, image, category } = body; + + if (!name || !description || !price || !offerPrice || !image || !category) { + return NextResponse.json({ success: false, message: 'All fields are required' }, { status: 400 }); + } + + const product = await Product.create({ + userId, + name, + description, + price: Number(price), + offerPrice: Number(offerPrice), + image, + category + }); + + return NextResponse.json({ success: true, message: 'Product added successfully', product }, { status: 201 }); + } catch (error) { + return NextResponse.json({ success: false, message: error.message }, { status: 500 }); + } +} diff --git a/app/seller/orders/page.jsx b/app/seller/orders/page.jsx index 78a7d03f1..e223d5bba 100644 --- a/app/seller/orders/page.jsx +++ b/app/seller/orders/page.jsx @@ -1,10 +1,11 @@ 'use client'; import React, { useEffect, useState } from "react"; -import { assets, orderDummyData } from "@/assets/assets"; +import { assets } from "@/assets/assets"; import Image from "next/image"; import { useAppContext } from "@/context/AppContext"; import Footer from "@/components/seller/Footer"; import Loading from "@/components/Loading"; +import toast from "react-hot-toast"; const Orders = () => { @@ -14,8 +15,46 @@ const Orders = () => { const [loading, setLoading] = useState(true); const fetchSellerOrders = async () => { - setOrders(orderDummyData); - setLoading(false); + try { + const response = await fetch('/api/order/seller'); + const data = await response.json(); + + if (data.success) { + setOrders(data.orders); + } else { + // If not a seller or no orders, show empty state + setOrders([]); + } + } catch (error) { + toast.error('Error fetching orders: ' + error.message); + } finally { + setLoading(false); + } + } + + const updateOrderStatus = async (orderId, status) => { + try { + const response = await fetch('/api/order/seller', { + method: 'PUT', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ orderId, status }), + }); + const data = await response.json(); + + if (data.success) { + toast.success('Order status updated'); + // Update local state + setOrders(orders.map(order => + order._id === orderId ? { ...order, status } : order + )); + } else { + toast.error(data.message || 'Failed to update order status'); + } + } catch (error) { + toast.error('Error updating order: ' + error.message); + } } useEffect(() => { @@ -26,44 +65,62 @@ const Orders = () => {
{loading ? :

Orders

-
- {orders.map((order, index) => ( -
-
- box_icon -

- - {order.items.map((item) => item.product.name + ` x ${item.quantity}`).join(", ")} - - Items : {order.items.length} -

-
-
-

- {order.address.fullName} -
- {order.address.area} -
- {`${order.address.city}, ${order.address.state}`} -
- {order.address.phoneNumber} -

-
-

{currency}{order.amount}

-
-

- Method : COD - Date : {new Date(order.date).toLocaleDateString()} - Payment : Pending -

+ {orders.length === 0 ? ( +

No orders found. Orders will appear here when customers purchase your products.

+ ) : ( +
+ {orders.map((order, index) => ( +
+
+ box_icon +

+ + {order.items.map((item) => item.product?.name + ` x ${item.quantity}`).join(", ")} + + Items : {order.items.length} +

+
+
+

+ {order.address?.fullName} +
+ {order.address?.area} +
+ {`${order.address?.city}, ${order.address?.state}`} +
+ {order.address?.phoneNumber} +

+
+

{currency}{order.amount}

+
+

+ Method : {order.paymentMethod || 'COD'} + Date : {new Date(order.date).toLocaleDateString()} + Payment : {order.isPaid ? 'Paid' : 'Pending'} +

+
+
+ + +
-
- ))} -
+ ))} +
+ )}
}
diff --git a/app/seller/page.jsx b/app/seller/page.jsx index 9e65e3417..42ef300b2 100644 --- a/app/seller/page.jsx +++ b/app/seller/page.jsx @@ -2,8 +2,11 @@ import React, { useState } from "react"; import { assets } from "@/assets/assets"; import Image from "next/image"; +import toast from "react-hot-toast"; +import { useRouter } from "next/navigation"; const AddProduct = () => { + const router = useRouter(); const [files, setFiles] = useState([]); const [name, setName] = useState(''); @@ -11,10 +14,66 @@ const AddProduct = () => { const [category, setCategory] = useState('Earphone'); const [price, setPrice] = useState(''); const [offerPrice, setOfferPrice] = useState(''); + const [loading, setLoading] = useState(false); const handleSubmit = async (e) => { e.preventDefault(); + if (files.length === 0) { + toast.error('Please upload at least one product image'); + return; + } + + setLoading(true); + + try { + // Convert files to base64 for storage (in production, use cloud storage like Cloudinary) + const imagePromises = files.filter(Boolean).map(file => { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onload = () => resolve(reader.result); + reader.onerror = reject; + reader.readAsDataURL(file); + }); + }); + + const images = await Promise.all(imagePromises); + + const response = await fetch('/api/product', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + name, + description, + category, + price, + offerPrice, + image: images + }), + }); + + const data = await response.json(); + + if (data.success) { + toast.success('Product added successfully!'); + // Reset form + setFiles([]); + setName(''); + setDescription(''); + setCategory('Earphone'); + setPrice(''); + setOfferPrice(''); + router.push('/seller/product-list'); + } else { + toast.error(data.message || 'Failed to add product'); + } + } catch (error) { + toast.error('Error adding product: ' + error.message); + } finally { + setLoading(false); + } }; return ( @@ -124,8 +183,12 @@ const AddProduct = () => { />
- {/*