From b61217d1afede932452190dfbbadd9bd86d22260 Mon Sep 17 00:00:00 2001 From: Nazarii Korniienko Date: Fri, 25 Aug 2023 02:52:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=B3=20feat(store):=20add=20checkout=20?= =?UTF-8?q?&=20some=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 10 +- .github/workflows/code-check.yml | 1 + package.json | 22 +- pnpm-lock.yaml | 449 +++++++++--------- prettier.config.cjs | 12 +- src/app.ts | 2 +- .../(api)/api/newsletter/subscribe/route.ts | 6 +- src/app/(api)/api/webhooks/stripe/route.ts | 89 +++- src/app/[locale]/(adm)/layout.tsx | 2 +- src/app/[locale]/(auth)/layout.tsx | 2 +- src/app/[locale]/(auth)/sign-in/page.tsx | 4 +- .../(auth)/sign-in/reset-password/page.tsx | 4 +- .../sign-in/reset-password/step-two/page.tsx | 4 +- src/app/[locale]/(auth)/sign-out/loading.tsx | 2 +- src/app/[locale]/(auth)/sign-out/page.tsx | 17 +- src/app/[locale]/(auth)/sign-sso/page.tsx | 2 +- src/app/[locale]/(auth)/sign-up/page.tsx | 4 +- .../(auth)/sign-up/verify-email/page.tsx | 4 +- .../(inner)/dashboard/account/loading.tsx | 2 +- .../(inner)/dashboard/account/page.tsx | 6 +- .../(inner)/dashboard/billing/loading.tsx | 4 +- .../(inner)/dashboard/billing/page.tsx | 12 +- .../(inner)/dashboard/purchases/loading.tsx | 2 +- .../(inner)/dashboard/purchases/page.tsx | 4 +- .../stores/[storeId]/analytics/page.tsx | 4 +- .../dashboard/stores/[storeId]/layout.tsx | 12 +- .../dashboard/stores/[storeId]/not-found.tsx | 4 +- .../stores/[storeId]/orders/page.tsx | 4 +- .../dashboard/stores/[storeId]/page.tsx | 8 +- .../products/[productId]/not-found.tsx | 4 +- .../[storeId]/products/[productId]/page.tsx | 6 +- .../stores/[storeId]/products/new/page.tsx | 2 +- .../stores/[storeId]/products/page.tsx | 6 +- .../(inner)/dashboard/stores/loading.tsx | 2 +- .../(inner)/dashboard/stores/new/page.tsx | 4 +- .../(inner)/dashboard/stores/page.tsx | 20 +- src/app/[locale]/(inner)/layout.tsx | 2 +- .../[locale]/(main)/[...slug]/not-found.tsx | 4 +- src/app/[locale]/(main)/[...slug]/page.tsx | 6 +- src/app/[locale]/(main)/about/page.tsx | 4 +- .../(main)/blog/[...slug]/not-found.tsx | 4 +- .../[locale]/(main)/blog/[...slug]/page.tsx | 10 +- src/app/[locale]/(main)/blog/page.tsx | 8 +- .../[locale]/(main)/build-a-board/page.tsx | 16 +- .../[category]/[subcategory]/page.tsx | 8 +- .../(main)/categories/[category]/page.tsx | 8 +- .../(main)/checkout/[storeId]/error.tsx | 26 + .../checkout/[storeId]/order-summary/page.tsx | 28 ++ .../(main)/checkout/[storeId]/page.tsx | 106 +++++ src/app/[locale]/(main)/checkout/layout.tsx | 7 + src/app/[locale]/(main)/checkout/loading.tsx | 87 ++++ src/app/[locale]/(main)/checkout/page.tsx | 146 ++++++ .../(main)/email-preferences/loading.tsx | 2 +- .../(main)/email-preferences/not-found.tsx | 4 +- .../(main)/email-preferences/page.tsx | 6 +- src/app/[locale]/(main)/features/page.tsx | 4 +- .../[locale]/(main)/features/todo/page.tsx | 4 +- src/app/[locale]/(main)/page.tsx | 23 +- .../(main)/product/[productId]/loading.tsx | 4 +- .../(main)/product/[productId]/not-found.tsx | 4 +- .../(main)/product/[productId]/page.tsx | 12 +- src/app/[locale]/(main)/products/loading.tsx | 4 +- src/app/[locale]/(main)/products/page.tsx | 8 +- .../(main)/store/[storeId]/loading.tsx | 4 +- .../(main)/store/[storeId]/not-found.tsx | 4 +- .../[locale]/(main)/store/[storeId]/page.tsx | 12 +- src/app/[locale]/(main)/stores/loading.tsx | 2 +- src/app/[locale]/(main)/stores/page.tsx | 6 +- src/app/[locale]/layout.tsx | 8 +- src/app/[locale]/not-found.tsx | 2 +- src/data/db/{drizzle.ts => index.ts} | 3 +- src/data/db/schema.ts | 20 +- src/data/zod/cart.ts | 5 +- src/env.mjs | 5 +- src/forms/add-product-form.tsx | 18 +- src/forms/add-store-form.tsx | 6 +- src/forms/add-to-cart-form.tsx | 6 +- src/forms/manage-subscription-form.tsx | 6 +- src/forms/newsletter-subscribe.tsx | 2 +- src/forms/reset-password-form-two.tsx | 4 +- src/forms/reset-password-form.tsx | 4 +- src/forms/sign-in.tsx | 4 +- src/forms/signin-form.tsx | 4 +- src/forms/signup-form.tsx | 4 +- src/forms/update-email-preferences-form.tsx | 6 +- src/forms/update-product-form.tsx | 20 +- src/forms/verify-email-form.tsx | 4 +- src/islands/account/cart/cart-sheet.tsx | 156 ------ src/islands/account/logout-buttons.tsx | 4 +- src/islands/account/oauth-signin.tsx | 2 +- src/islands/account/sign-in-oauth.tsx | 2 +- src/islands/account/sso-callback.tsx | 2 +- src/islands/{ => account}/user-profile.tsx | 0 src/islands/board-builder.tsx | 24 +- src/islands/{ => cards}/error-card.tsx | 39 +- .../feature-card.tsx} | 0 .../{modules/markdown => cards}/mdx-card.tsx | 0 src/islands/{ => cards}/product-card.tsx | 6 +- .../{modules => cards}/skeleton-card.tsx | 0 src/islands/{ => cards}/store-card.tsx | 10 +- src/islands/checkout/cart-line-items.tsx | 67 +++ src/islands/checkout/cart-sheet.tsx | 131 +++++ src/islands/checkout/checkout-form.tsx | 145 ++++++ src/islands/checkout/checkout-shell.tsx | 39 ++ .../cart => checkout}/update-cart.tsx | 36 +- src/islands/client-button.tsx | 10 + src/islands/common/main-nav.tsx | 4 +- src/islands/common/mobile-nav.tsx | 6 +- src/islands/common/providers.tsx | 4 +- src/islands/common/sidebar-nav.tsx | 4 +- src/islands/common/theme-toggle.tsx | 2 +- .../connect-store-to-stripe-button.tsx | 4 +- src/islands/copy-button.tsx | 2 +- src/islands/faceted-filter.tsx | 4 +- src/islands/file-dialog.tsx | 6 +- src/islands/generate-button.tsx | 4 +- src/islands/{primitives => }/icons.tsx | 0 src/islands/loading-button.tsx | 4 +- src/islands/loglib-analytics.tsx | 1 + src/islands/modules/combobox.tsx | 8 +- .../data-table/data-table-column-header.tsx | 2 +- .../data-table/data-table-faceted-filter.tsx | 4 +- .../modules/data-table/data-table-toolbar.tsx | 10 +- src/islands/modules/data-table/data-table.tsx | 8 +- .../modules/markdown/mdx-components.tsx | 4 +- src/islands/modules/site-footer.tsx | 6 +- src/islands/modules/site-header.tsx | 7 +- src/islands/modules/user-account-nav.tsx | 10 +- src/islands/multi-select.tsx | 2 +- src/islands/page-header.tsx | 2 - .../{common/pager => pagers}/breadcrumbs.tsx | 0 .../{common/pager => pagers}/mdx-pager.tsx | 4 +- .../pager => pagers}/pagination-button.tsx | 2 +- .../pager => pagers}/product-pager.tsx | 6 +- .../{common/pager => pagers}/store-pager.tsx | 4 +- .../pager => pagers}/store-switcher.tsx | 4 +- .../{common/pager => pagers}/store-tabs.tsx | 2 +- src/islands/password-input.tsx | 4 +- src/islands/primitives/alert-dialog.tsx | 2 +- src/islands/primitives/calendar.tsx | 2 +- src/islands/primitives/command.tsx | 2 +- src/islands/primitives/form.tsx | 2 +- src/islands/primitives/forms/password.tsx | 4 +- src/islands/product-image-carousel.tsx | 6 +- src/islands/products.tsx | 12 +- .../{common => }/shells/dialog-shell.tsx | 4 +- .../shells/products-table-shell.tsx | 4 +- src/islands/{common => }/shells/shell.tsx | 0 src/islands/stores.tsx | 12 +- src/middleware.ts | 95 ++-- src/utils/appts/dashboard.ts | 2 +- src/utils/appts/products.ts | 2 +- src/utils/appts/socials.ts | 2 +- src/utils/appts/subs.ts | 3 +- src/utils/server/actions/cart.ts | 12 +- src/utils/server/actions/email.ts | 6 +- src/utils/server/actions/generate.ts | 4 +- src/utils/server/actions/product.ts | 34 +- src/utils/server/actions/store.ts | 16 +- src/utils/server/actions/stripe.ts | 150 +++--- src/utils/server/addons/get-stripe.ts | 14 + src/utils/server/mw.ts | 17 + src/utils/server/resend.ts | 3 +- src/utils/server/stripe.ts | 3 +- src/utils/server/subs.ts | 7 +- src/utils/server/utils.ts | 16 +- src/utils/types/{store-main.ts => index.ts} | 26 +- tailwind.config.ts | 5 +- 168 files changed, 1782 insertions(+), 938 deletions(-) create mode 100644 src/app/[locale]/(main)/checkout/[storeId]/error.tsx create mode 100644 src/app/[locale]/(main)/checkout/[storeId]/order-summary/page.tsx create mode 100644 src/app/[locale]/(main)/checkout/[storeId]/page.tsx create mode 100644 src/app/[locale]/(main)/checkout/layout.tsx create mode 100644 src/app/[locale]/(main)/checkout/loading.tsx create mode 100644 src/app/[locale]/(main)/checkout/page.tsx rename src/data/db/{drizzle.ts => index.ts} (99%) delete mode 100644 src/islands/account/cart/cart-sheet.tsx rename src/islands/{ => account}/user-profile.tsx (100%) rename src/islands/{ => cards}/error-card.tsx (65%) rename src/islands/{modules/feature-cards.tsx => cards/feature-card.tsx} (100%) rename src/islands/{modules/markdown => cards}/mdx-card.tsx (100%) rename src/islands/{ => cards}/product-card.tsx (98%) rename src/islands/{modules => cards}/skeleton-card.tsx (100%) rename src/islands/{ => cards}/store-card.tsx (89%) create mode 100644 src/islands/checkout/cart-line-items.tsx create mode 100644 src/islands/checkout/cart-sheet.tsx create mode 100644 src/islands/checkout/checkout-form.tsx create mode 100644 src/islands/checkout/checkout-shell.tsx rename src/islands/{account/cart => checkout}/update-cart.tsx (74%) create mode 100644 src/islands/client-button.tsx rename src/islands/{primitives => }/icons.tsx (100%) rename src/islands/{common/pager => pagers}/breadcrumbs.tsx (100%) rename src/islands/{common/pager => pagers}/mdx-pager.tsx (97%) rename src/islands/{common/pager => pagers}/pagination-button.tsx (100%) rename src/islands/{common/pager => pagers}/product-pager.tsx (97%) rename src/islands/{common/pager => pagers}/store-pager.tsx (97%) rename src/islands/{common/pager => pagers}/store-switcher.tsx (100%) rename src/islands/{common/pager => pagers}/store-tabs.tsx (100%) rename src/islands/{common => }/shells/dialog-shell.tsx (95%) rename src/islands/{common => }/shells/products-table-shell.tsx (100%) rename src/islands/{common => }/shells/shell.tsx (100%) create mode 100644 src/utils/server/addons/get-stripe.ts create mode 100644 src/utils/server/mw.ts rename src/utils/types/{store-main.ts => index.ts} (82%) diff --git a/.env.example b/.env.example index 509f8e44..6066c4da 100644 --- a/.env.example +++ b/.env.example @@ -49,25 +49,27 @@ UPLOADTHING_APP_ID="" # !! STRIPE CREDENTIALS (https://stripe.com) -# Stripe Secret Key found at https://dashboard.stripe.com/test/apikeys # These values should be replaced with production keys on the deployed site to accept real payments # ?? [12] pk_test_**** +# Stripe Publishable Key and Secret Key found at https://dashboard.stripe.com/test/apikeys NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="" # ?? [13] sk_test_**** STRIPE_API_KEY="" -# Stripe Webhook Secret found at https://dashboard.stripe.com/test/webhooks/create?endpoint_location=local # ?? [14] whsec_**** +# Stripe Webhook Secret found at https://dashboard.stripe.com/test/webhooks/create?endpoint_location=local STRIPE_WEBHOOK_SECRET="" -# Stripe Product and Price IDs for your created products -# found at https://dashboard.stripe.com/test/products # ?? [15] Store Item | price_**** +# Stripe Product and Price IDs for your created products +# found at https://dashboard.stripe.com/test/products STRIPE_STD_MONTHLY_PRICE_ID="" # ?? [16] Subscription | price_**** +# Stripe Product and Price IDs for your created products +# found at https://dashboard.stripe.com/test/products STRIPE_PRO_MONTHLY_PRICE_ID="" # !! STRIPE WEBHOOK SECRET (https://stripe.com) diff --git a/.github/workflows/code-check.yml b/.github/workflows/code-check.yml index 1141f11f..259289d6 100644 --- a/.github/workflows/code-check.yml +++ b/.github/workflows/code-check.yml @@ -13,6 +13,7 @@ env: EMAIL_FROM_ADDRESS: "fake@fake.com" UPLOADTHING_SECRET: "fake" UPLOADTHING_APP_ID: "fake" + NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: "fake" STRIPE_API_KEY: "fake" STRIPE_WEBHOOK_SECRET: "fake" STRIPE_STD_MONTHLY_PRICE_ID: "fake" diff --git a/package.json b/package.json index 23a3208a..9d3069ee 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "dev": "next dev", "edge": "pnpm up --latest && pnpm canary", "email": "email dev --dir src/data/mail -p 3001", + "format": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache", "format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache", - "format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache", "postinstall": "drizzle-kit generate:mysql --config drizzle.config.ts", "lint": "next lint", "lint:fix": "next lint --fix", @@ -68,11 +68,13 @@ "@radix-ui/react-tooltip": "^1.0.6", "@react-email/components": "^0.0.7", "@react-email/tailwind": "^0.0.8", + "@stripe/react-stripe-js": "^2.1.2", + "@stripe/stripe-js": "^2.1.0", "@tanstack/react-query": "^4.33.0", "@tanstack/react-table": "^8.9.3", - "@trpc/client": "^10.37.1", - "@trpc/react-query": "^10.37.1", - "@trpc/server": "^10.37.1", + "@trpc/client": "^10.38.0", + "@trpc/react-query": "^10.38.0", + "@trpc/server": "^10.38.0", "@uploadthing/react": "^5.3.0", "@vercel/og": "^0.5.11", "class-variance-authority": "^0.7.0", @@ -80,11 +82,11 @@ "cmdk": "^0.2.0", "dayjs": "^1.11.9", "dotenv": "^16.3.1", - "drizzle-orm": "^0.28.3", + "drizzle-orm": "^0.28.5", "embla-carousel-react": "8.0.0-rc12", "lucide-react": "^0.268.0", "next": "13.4.19", - "next-international": "^0.9.2", + "next-international": "^0.9.3", "next-themes": "^0.2.1", "postgres": "^3.3.5", "react": "18.2.0", @@ -98,12 +100,12 @@ "react-wrap-balancer": "^1.1.0", "resend": "^1.0.0", "sonner": "^0.6.2", - "stripe": "^13.2.0", + "stripe": "^13.3.0", "tailwind-variants": "^0.1.13", "tailwindcss-animate": "^1.0.6", "translate": "^2.0.2", "uploadthing": "^5.3.3", - "valibot": "^0.12.0", + "valibot": "^0.13.1", "zod": "^3.22.2" }, "devDependencies": { @@ -115,7 +117,7 @@ "@t3-oss/env-nextjs": "^0.6.1", "@tailwindcss/typography": "^0.5.9", "@tanstack/eslint-plugin-query": "^4.32.5", - "@types/node": "20.5.3", + "@types/node": "20.5.4", "@types/react": "18.2.21", "@types/react-dom": "18.2.7", "@typescript-eslint/eslint-plugin": "^6.4.1", @@ -136,6 +138,6 @@ "prettier-plugin-tailwindcss": "^0.5.3", "tailwind-merge": "^1.14.0", "tailwindcss": "3.3.3", - "typescript": "5.1.6" + "typescript": "5.2.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 92a4e0eb..0efd6402 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,6 +95,12 @@ dependencies: '@react-email/tailwind': specifier: ^0.0.8 version: 0.0.8(ts-node@10.9.1) + '@stripe/react-stripe-js': + specifier: ^2.1.2 + version: 2.1.2(@stripe/stripe-js@2.1.0)(react-dom@18.2.0)(react@18.2.0) + '@stripe/stripe-js': + specifier: ^2.1.0 + version: 2.1.0 '@tanstack/react-query': specifier: ^4.33.0 version: 4.33.0(react-dom@18.2.0)(react@18.2.0) @@ -102,14 +108,14 @@ dependencies: specifier: ^8.9.3 version: 8.9.3(react-dom@18.2.0)(react@18.2.0) '@trpc/client': - specifier: ^10.37.1 - version: 10.37.1(@trpc/server@10.37.1) + specifier: ^10.38.0 + version: 10.38.0(@trpc/server@10.38.0) '@trpc/react-query': - specifier: ^10.37.1 - version: 10.37.1(@tanstack/react-query@4.33.0)(@trpc/client@10.37.1)(@trpc/server@10.37.1)(react-dom@18.2.0)(react@18.2.0) + specifier: ^10.38.0 + version: 10.38.0(@tanstack/react-query@4.33.0)(@trpc/client@10.38.0)(@trpc/server@10.38.0)(react-dom@18.2.0)(react@18.2.0) '@trpc/server': - specifier: ^10.37.1 - version: 10.37.1 + specifier: ^10.38.0 + version: 10.38.0 '@uploadthing/react': specifier: ^5.3.0 version: 5.3.0(react-dropzone@14.2.3)(react@18.2.0)(uploadthing@5.3.3)(zod@3.22.2) @@ -132,8 +138,8 @@ dependencies: specifier: ^16.3.1 version: 16.3.1 drizzle-orm: - specifier: ^0.28.3 - version: 0.28.3(@planetscale/database@1.11.0)(postgres@3.3.5) + specifier: ^0.28.5 + version: 0.28.5(@planetscale/database@1.11.0)(postgres@3.3.5) embla-carousel-react: specifier: 8.0.0-rc12 version: 8.0.0-rc12(react@18.2.0) @@ -142,10 +148,10 @@ dependencies: version: 0.268.0(react@18.2.0) next: specifier: 13.4.19 - version: 13.4.19(@babel/core@7.22.10)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.19(@babel/core@7.22.11)(react-dom@18.2.0)(react@18.2.0) next-international: - specifier: ^0.9.2 - version: 0.9.2 + specifier: ^0.9.3 + version: 0.9.3 next-themes: specifier: ^0.2.1 version: 0.2.1(next@13.4.19)(react-dom@18.2.0)(react@18.2.0) @@ -186,8 +192,8 @@ dependencies: specifier: ^0.6.2 version: 0.6.2(react-dom@18.2.0)(react@18.2.0) stripe: - specifier: ^13.2.0 - version: 13.2.0 + specifier: ^13.3.0 + version: 13.3.0 tailwind-variants: specifier: ^0.1.13 version: 0.1.13(tailwindcss@3.3.3) @@ -201,8 +207,8 @@ dependencies: specifier: ^5.3.3 version: 5.3.3(zod@3.22.2) valibot: - specifier: ^0.12.0 - version: 0.12.0 + specifier: ^0.13.1 + version: 0.13.1 zod: specifier: ^3.22.2 version: 3.22.2 @@ -225,7 +231,7 @@ devDependencies: version: 4.1.0(prettier@3.0.2) '@t3-oss/env-nextjs': specifier: ^0.6.1 - version: 0.6.1(typescript@5.1.6)(zod@3.22.2) + version: 0.6.1(typescript@5.2.2)(zod@3.22.2) '@tailwindcss/typography': specifier: ^0.5.9 version: 0.5.9(tailwindcss@3.3.3) @@ -233,8 +239,8 @@ devDependencies: specifier: ^4.32.5 version: 4.32.5 '@types/node': - specifier: 20.5.3 - version: 20.5.3 + specifier: 20.5.4 + version: 20.5.4 '@types/react': specifier: 18.2.21 version: 18.2.21 @@ -243,10 +249,10 @@ devDependencies: version: 18.2.7 '@typescript-eslint/eslint-plugin': specifier: ^6.4.1 - version: 6.4.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6) + version: 6.4.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.2.2) '@typescript-eslint/parser': specifier: ^6.4.1 - version: 6.4.1(eslint@8.47.0)(typescript@5.1.6) + version: 6.4.1(eslint@8.47.0)(typescript@5.2.2) autoprefixer: specifier: 10.4.15 version: 10.4.15(postcss@8.4.28) @@ -264,7 +270,7 @@ devDependencies: version: 8.47.0 eslint-config-next: specifier: 13.4.19 - version: 13.4.19(eslint@8.47.0)(typescript@5.1.6) + version: 13.4.19(eslint@8.47.0)(typescript@5.2.2) eslint-config-prettier: specifier: ^9.0.0 version: 9.0.0(eslint@8.47.0) @@ -296,8 +302,8 @@ devDependencies: specifier: 3.3.3 version: 3.3.3(ts-node@10.9.1) typescript: - specifier: 5.1.6 - version: 5.1.6 + specifier: 5.2.2 + version: 5.2.2 packages: @@ -328,20 +334,20 @@ packages: resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} engines: {node: '>=6.9.0'} - /@babel/core@7.22.10: - resolution: {integrity: sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw==} + /@babel/core@7.22.11: + resolution: {integrity: sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 '@babel/code-frame': 7.22.10 '@babel/generator': 7.22.10 '@babel/helper-compilation-targets': 7.22.10 - '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.10) - '@babel/helpers': 7.22.10 - '@babel/parser': 7.22.10 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.22.11) + '@babel/helpers': 7.22.11 + '@babel/parser': 7.22.11 '@babel/template': 7.22.5 - '@babel/traverse': 7.22.10 - '@babel/types': 7.22.10 + '@babel/traverse': 7.22.11 + '@babel/types': 7.22.11 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -354,7 +360,7 @@ packages: resolution: {integrity: sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.10 + '@babel/types': 7.22.11 '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.19 jsesc: 2.5.2 @@ -378,27 +384,27 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/types': 7.22.10 + '@babel/types': 7.22.11 /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.10 + '@babel/types': 7.22.11 /@babel/helper-module-imports@7.22.5: resolution: {integrity: sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.10 + '@babel/types': 7.22.11 - /@babel/helper-module-transforms@7.22.9(@babel/core@7.22.10): + /@babel/helper-module-transforms@7.22.9(@babel/core@7.22.11): resolution: {integrity: sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.22.10 + '@babel/core': 7.22.11 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-module-imports': 7.22.5 '@babel/helper-simple-access': 7.22.5 @@ -409,13 +415,13 @@ packages: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.10 + '@babel/types': 7.22.11 /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.10 + '@babel/types': 7.22.11 /@babel/helper-string-parser@7.22.5: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} @@ -429,13 +435,13 @@ packages: resolution: {integrity: sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==} engines: {node: '>=6.9.0'} - /@babel/helpers@7.22.10: - resolution: {integrity: sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw==} + /@babel/helpers@7.22.11: + resolution: {integrity: sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/traverse': 7.22.10 - '@babel/types': 7.22.10 + '@babel/traverse': 7.22.11 + '@babel/types': 7.22.11 transitivePeerDependencies: - supports-color @@ -447,15 +453,15 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser@7.22.10: - resolution: {integrity: sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==} + /@babel/parser@7.22.11: + resolution: {integrity: sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.22.10 + '@babel/types': 7.22.11 - /@babel/runtime@7.22.10: - resolution: {integrity: sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==} + /@babel/runtime@7.22.11: + resolution: {integrity: sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.0 @@ -465,11 +471,11 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.10 - '@babel/parser': 7.22.10 - '@babel/types': 7.22.10 + '@babel/parser': 7.22.11 + '@babel/types': 7.22.11 - /@babel/traverse@7.22.10: - resolution: {integrity: sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==} + /@babel/traverse@7.22.11: + resolution: {integrity: sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.10 @@ -478,15 +484,15 @@ packages: '@babel/helper-function-name': 7.22.5 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.22.10 - '@babel/types': 7.22.10 + '@babel/parser': 7.22.11 + '@babel/types': 7.22.11 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color - /@babel/types@7.22.10: - resolution: {integrity: sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==} + /@babel/types@7.22.11: + resolution: {integrity: sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 @@ -555,7 +561,7 @@ packages: '@clerk/clerk-react': 4.23.2(react@18.2.0) '@clerk/clerk-sdk-node': 4.12.2 '@clerk/types': 3.49.0 - next: 13.4.19(@babel/core@7.22.10)(react-dom@18.2.0)(react@18.2.0) + next: 13.4.19(@babel/core@7.22.11)(react-dom@18.2.0)(react@18.2.0) path-to-regexp: 6.2.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -677,13 +683,13 @@ packages: '@types/node': 20.4.7 chalk: 4.1.2 cosmiconfig: 8.2.0 - cosmiconfig-typescript-loader: 4.4.0(@types/node@20.4.7)(cosmiconfig@8.2.0)(ts-node@10.9.1)(typescript@5.1.6) + cosmiconfig-typescript-loader: 4.4.0(@types/node@20.4.7)(cosmiconfig@8.2.0)(ts-node@10.9.1)(typescript@5.2.2) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 resolve-from: 5.0.0 - ts-node: 10.9.1(@types/node@20.5.3)(typescript@5.1.6) - typescript: 5.1.6 + ts-node: 10.9.1(@types/node@20.5.4)(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -767,7 +773,7 @@ packages: '@cspell/dict-cpp': 5.0.4 '@cspell/dict-cryptocurrencies': 3.0.1 '@cspell/dict-csharp': 4.0.2 - '@cspell/dict-css': 4.0.6 + '@cspell/dict-css': 4.0.7 '@cspell/dict-dart': 2.0.3 '@cspell/dict-django': 4.1.0 '@cspell/dict-docker': 1.1.7 @@ -866,8 +872,8 @@ packages: resolution: {integrity: sha512-1JMofhLK+4p4KairF75D3A924m5ERMgd1GvzhwK2geuYgd2ZKuGW72gvXpIV7aGf52E3Uu1kDXxxGAiZ5uVG7g==} dev: true - /@cspell/dict-css@4.0.6: - resolution: {integrity: sha512-2Lo8W2ezHmGgY8cWFr4RUwnjbndna5mokpCK/DuxGILQnuajR0J31ANQOXj/8iZM2phFB93ZzMNk/0c04TDfSQ==} + /@cspell/dict-css@4.0.7: + resolution: {integrity: sha512-NNlUTx/sYg+74kC0EtRewb7pjkEtPlIsu9JFNWAXa0JMTqqpQXqM3aEO4QJvUZFZF09bObeCAvzzxemAwxej7Q==} dev: true /@cspell/dict-dart@2.0.3: @@ -1575,11 +1581,11 @@ packages: '@vue/compiler-sfc': optional: true dependencies: - '@babel/core': 7.22.10 + '@babel/core': 7.22.11 '@babel/generator': 7.22.10 - '@babel/parser': 7.22.10 - '@babel/traverse': 7.22.10 - '@babel/types': 7.22.10 + '@babel/parser': 7.22.11 + '@babel/traverse': 7.22.11 + '@babel/types': 7.22.11 prettier: 3.0.2 semver: 7.5.4 transitivePeerDependencies: @@ -1784,19 +1790,19 @@ packages: /@radix-ui/number@1.0.1: resolution: {integrity: sha512-T5gIdVO2mmPW3NNhjNgEP3cqMXjXL9UbO0BzWcXfvdBs+BohbQxvd/K5hSVKmn9/lbTdsQVKbUcP5WLCwvUbBg==} dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 dev: false /@radix-ui/primitive@1.0.0: resolution: {integrity: sha512-3e7rn8FDMin4CgeL7Z/49smCA3rFYY3Ha2rUQ7HRWFadS5iCRw08ZgVT1LaNTCNqgvrUiyczLflrVrF0SRQtNA==} dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 dev: false /@radix-ui/primitive@1.0.1: resolution: {integrity: sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==} dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 dev: false /@radix-ui/react-accordion@1.1.2(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): @@ -1812,7 +1818,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-collapsible': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) @@ -1841,7 +1847,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -1867,7 +1873,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@types/react': 18.2.21 '@types/react-dom': 18.2.7 @@ -1888,7 +1894,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@types/react': 18.2.21 '@types/react-dom': 18.2.7 @@ -1909,7 +1915,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -1933,7 +1939,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -1961,7 +1967,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -1989,7 +1995,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) @@ -2005,7 +2011,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 react: 18.2.0 dev: false @@ -2018,7 +2024,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@types/react': 18.2.21 react: 18.2.0 dev: false @@ -2028,7 +2034,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 react: 18.2.0 dev: false @@ -2041,7 +2047,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@types/react': 18.2.21 react: 18.2.0 dev: false @@ -2052,7 +2058,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.0 '@radix-ui/react-compose-refs': 1.0.0(react@18.2.0) '@radix-ui/react-context': 1.0.0(react@18.2.0) @@ -2086,7 +2092,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2116,7 +2122,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@types/react': 18.2.21 react: 18.2.0 dev: false @@ -2127,7 +2133,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.0 '@radix-ui/react-compose-refs': 1.0.0(react@18.2.0) '@radix-ui/react-primitive': 1.0.0(react-dom@18.2.0)(react@18.2.0) @@ -2150,7 +2156,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) @@ -2175,7 +2181,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2194,7 +2200,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 react: 18.2.0 dev: false @@ -2207,7 +2213,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@types/react': 18.2.21 react: 18.2.0 dev: false @@ -2218,7 +2224,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-compose-refs': 1.0.0(react@18.2.0) '@radix-ui/react-primitive': 1.0.0(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-use-callback-ref': 1.0.0(react@18.2.0) @@ -2239,7 +2245,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2262,7 +2268,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-use-layout-effect': 1.0.0(react@18.2.0) react: 18.2.0 dev: false @@ -2276,7 +2282,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@types/react': 18.2.21 react: 18.2.0 @@ -2295,7 +2301,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@types/react': 18.2.21 '@types/react-dom': 18.2.7 @@ -2316,7 +2322,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2354,7 +2360,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2384,7 +2390,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2418,7 +2424,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2453,7 +2459,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@floating-ui/react-dom': 2.0.1(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-arrow': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2476,7 +2482,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-primitive': 1.0.0(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -2495,7 +2501,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@types/react': 18.2.21 '@types/react-dom': 18.2.7 @@ -2509,7 +2515,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-compose-refs': 1.0.0(react@18.2.0) '@radix-ui/react-use-layout-effect': 1.0.0(react@18.2.0) react: 18.2.0 @@ -2529,7 +2535,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@types/react': 18.2.21 @@ -2544,7 +2550,7 @@ packages: react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-slot': 1.0.0(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -2563,7 +2569,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-slot': 1.0.2(@types/react@18.2.21)(react@18.2.0) '@types/react': 18.2.21 '@types/react-dom': 18.2.7 @@ -2584,7 +2590,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2613,7 +2619,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/number': 1.0.1 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2642,7 +2648,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/number': 1.0.1 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) @@ -2683,7 +2689,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@types/react': 18.2.21 '@types/react-dom': 18.2.7 @@ -2704,7 +2710,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/number': 1.0.1 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) @@ -2727,7 +2733,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-compose-refs': 1.0.0(react@18.2.0) react: 18.2.0 dev: false @@ -2741,7 +2747,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@types/react': 18.2.21 react: 18.2.0 @@ -2760,7 +2766,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2787,7 +2793,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-direction': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2815,7 +2821,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2847,7 +2853,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/primitive': 1.0.1 '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@radix-ui/react-context': 1.0.1(@types/react@18.2.21)(react@18.2.0) @@ -2871,7 +2877,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 react: 18.2.0 dev: false @@ -2884,7 +2890,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@types/react': 18.2.21 react: 18.2.0 dev: false @@ -2894,7 +2900,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-use-callback-ref': 1.0.0(react@18.2.0) react: 18.2.0 dev: false @@ -2908,7 +2914,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@types/react': 18.2.21 react: 18.2.0 @@ -2919,7 +2925,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-use-callback-ref': 1.0.0(react@18.2.0) react: 18.2.0 dev: false @@ -2933,7 +2939,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@types/react': 18.2.21 react: 18.2.0 @@ -2944,7 +2950,7 @@ packages: peerDependencies: react: ^16.8 || ^17.0 || ^18.0 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 react: 18.2.0 dev: false @@ -2957,7 +2963,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@types/react': 18.2.21 react: 18.2.0 dev: false @@ -2971,7 +2977,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@types/react': 18.2.21 react: 18.2.0 dev: false @@ -2985,7 +2991,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/rect': 1.0.1 '@types/react': 18.2.21 react: 18.2.0 @@ -3000,7 +3006,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.21)(react@18.2.0) '@types/react': 18.2.21 react: 18.2.0 @@ -3019,7 +3025,7 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@types/react': 18.2.21 '@types/react-dom': 18.2.7 @@ -3030,7 +3036,7 @@ packages: /@radix-ui/rect@1.0.1: resolution: {integrity: sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ==} dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 dev: false /@react-email/body@0.0.2: @@ -3206,30 +3212,47 @@ packages: string.prototype.codepointat: 0.2.1 dev: false + /@stripe/react-stripe-js@2.1.2(@stripe/stripe-js@2.1.0)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-2JcKRvOdMD698uGrY0cINLHb6XHnY24L+wlWlw2+TbI2aXlQZ9t8Mc+KssFES+EuNgISbrp7fJR3w/13epfiOw==} + peerDependencies: + '@stripe/stripe-js': ^1.44.1 || ^2.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + '@stripe/stripe-js': 2.1.0 + prop-types: 15.8.1 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@stripe/stripe-js@2.1.0: + resolution: {integrity: sha512-AdMHWqIq/s3TLmoyuzdb6l21STKDKNm82cjce1VelyQGinVNjVgSEPH5UDtxENEP7OzgMZH8RTphFMi0fMJGLQ==} + dev: false + /@swc/helpers@0.5.1: resolution: {integrity: sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==} dependencies: tslib: 2.6.2 dev: false - /@t3-oss/env-core@0.6.1(typescript@5.1.6)(zod@3.22.2): + /@t3-oss/env-core@0.6.1(typescript@5.2.2)(zod@3.22.2): resolution: {integrity: sha512-KQD7qEDJtkWIWWmTVjNvk0wnHpkvAQ6CRbUxbWMFNG/fiosBQDQvtRpBNu6USxBscJCoC4z6y7P9MN52/mLOzw==} peerDependencies: typescript: '>=4.7.2' zod: ^3.0.0 dependencies: - typescript: 5.1.6 + typescript: 5.2.2 zod: 3.22.2 dev: true - /@t3-oss/env-nextjs@0.6.1(typescript@5.1.6)(zod@3.22.2): + /@t3-oss/env-nextjs@0.6.1(typescript@5.2.2)(zod@3.22.2): resolution: {integrity: sha512-z1dIC++Vxj9kmzX5nSPfcrCSkszy3dTEPC4Ssx7Ap5AqR3c2Qa7S0xf8axn6coy7D/vCXDAAnHYnCMDhtcY3SQ==} peerDependencies: typescript: '>=4.7.2' zod: ^3.0.0 dependencies: - '@t3-oss/env-core': 0.6.1(typescript@5.1.6)(zod@3.22.2) - typescript: 5.1.6 + '@t3-oss/env-core': 0.6.1(typescript@5.2.2)(zod@3.22.2) + typescript: 5.2.2 zod: 3.22.2 dev: true @@ -3288,32 +3311,32 @@ packages: engines: {node: '>=12'} dev: false - /@trpc/client@10.37.1(@trpc/server@10.37.1): - resolution: {integrity: sha512-OSblNfeI0Z9ERn3usgLV2x63CwwPoNOHf1FQK85cOT7F8MNaWyEHoEv7tHUwNGJwyzKXmpU+ockZ0movzX3D0g==} + /@trpc/client@10.38.0(@trpc/server@10.38.0): + resolution: {integrity: sha512-+uFQeyzVBoWDYt0Oyj+hLUJeBJjMyj/yxfm9s23EU+Y50YZVRSnB9dmAfI6jAAcehJubNLu2NH+jyEJrOen+aA==} peerDependencies: - '@trpc/server': 10.37.1 + '@trpc/server': 10.38.0 dependencies: - '@trpc/server': 10.37.1 + '@trpc/server': 10.38.0 dev: false - /@trpc/react-query@10.37.1(@tanstack/react-query@4.33.0)(@trpc/client@10.37.1)(@trpc/server@10.37.1)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-TbOOPp0fZVaKfaeEyDoV8QeTHW1vgPTbfOs0uSQ4AzBXqXPu+9v1B44z8GGRJSdUxuOX9pG/6Ap5Kx8PQ3eF+Q==} + /@trpc/react-query@10.38.0(@tanstack/react-query@4.33.0)(@trpc/client@10.38.0)(@trpc/server@10.38.0)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-2YRfsDlXQvuhGOoZDz6iZ+vo6mWOBdkRPMA177WVII1Hds9r29zJMJ+14U9reOMGC0Sfec9QSPh9nUHE7Hvkzw==} peerDependencies: '@tanstack/react-query': ^4.18.0 - '@trpc/client': 10.37.1 - '@trpc/server': 10.37.1 + '@trpc/client': 10.38.0 + '@trpc/server': 10.38.0 react: '>=16.8.0' react-dom: '>=16.8.0' dependencies: '@tanstack/react-query': 4.33.0(react-dom@18.2.0)(react@18.2.0) - '@trpc/client': 10.37.1(@trpc/server@10.37.1) - '@trpc/server': 10.37.1 + '@trpc/client': 10.38.0(@trpc/server@10.38.0) + '@trpc/server': 10.38.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@trpc/server@10.37.1: - resolution: {integrity: sha512-r3VeA319/braYMBIzj+XLgLKQ9lJSVglvPvP9HUv4kr5w6Y5grQMxMcExhTiZWltE9bnSJHKtBBzHafOo7KC8A==} + /@trpc/server@10.38.0: + resolution: {integrity: sha512-uMjWTMhqOPVmdiqPFOYwsdQ6Vzy8FtRcgM+ld3OrHsD88NiwZ1BWNIC6KwffjgrgLG/uKBFzNNKntLryv0NamQ==} dev: false /@tsconfig/node10@1.0.9: @@ -3332,13 +3355,13 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 20.5.3 + '@types/node': 20.5.4 dev: false /@types/connect@3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 20.5.3 + '@types/node': 20.5.4 dev: false /@types/cookies@0.7.7: @@ -3347,13 +3370,13 @@ packages: '@types/connect': 3.4.35 '@types/express': 4.17.14 '@types/keygrip': 1.0.2 - '@types/node': 20.5.3 + '@types/node': 20.5.4 dev: false /@types/express-serve-static-core@4.17.36: resolution: {integrity: sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==} dependencies: - '@types/node': 20.5.3 + '@types/node': 20.5.4 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -3399,7 +3422,7 @@ packages: /@types/node-fetch@2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 20.5.3 + '@types/node': 20.5.4 form-data: 3.0.1 dev: false @@ -3411,8 +3434,8 @@ packages: resolution: {integrity: sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==} dev: true - /@types/node@20.5.3: - resolution: {integrity: sha512-ITI7rbWczR8a/S6qjAW7DMqxqFMjjTo61qZVWJ1ubPvbIQsL5D/TvwjYEalM8Kthpe3hTzOGrF2TGbAu2uyqeA==} + /@types/node@20.5.4: + resolution: {integrity: sha512-Y9vbIAoM31djQZrPYjpTLo0XlaSwOIsrlfE3LpulZeRblttsLQRFRlBAppW0LOxyT3ALj2M5vU1ucQQayQH3jA==} /@types/normalize-package-data@2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -3452,7 +3475,7 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 20.5.3 + '@types/node': 20.5.4 dev: false /@types/serve-static@1.15.2: @@ -3460,10 +3483,10 @@ packages: dependencies: '@types/http-errors': 2.0.1 '@types/mime': 3.0.1 - '@types/node': 20.5.3 + '@types/node': 20.5.4 dev: false - /@typescript-eslint/eslint-plugin@6.4.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6): + /@typescript-eslint/eslint-plugin@6.4.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.2.2): resolution: {integrity: sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -3475,10 +3498,10 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.7.0 - '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.2.2) '@typescript-eslint/scope-manager': 6.4.1 - '@typescript-eslint/type-utils': 6.4.1(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/utils': 6.4.1(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/type-utils': 6.4.1(eslint@8.47.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.4.1(eslint@8.47.0)(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.4.1 debug: 4.3.4 eslint: 8.47.0 @@ -3486,13 +3509,13 @@ packages: ignore: 5.2.4 natural-compare: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.2(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.2(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@6.4.1(eslint@8.47.0)(typescript@5.1.6): + /@typescript-eslint/parser@6.4.1(eslint@8.47.0)(typescript@5.2.2): resolution: {integrity: sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -3504,11 +3527,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 6.4.1 '@typescript-eslint/types': 6.4.1 - '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.4.1 debug: 4.3.4 eslint: 8.47.0 - typescript: 5.1.6 + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true @@ -3521,7 +3544,7 @@ packages: '@typescript-eslint/visitor-keys': 6.4.1 dev: true - /@typescript-eslint/type-utils@6.4.1(eslint@8.47.0)(typescript@5.1.6): + /@typescript-eslint/type-utils@6.4.1(eslint@8.47.0)(typescript@5.2.2): resolution: {integrity: sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -3531,12 +3554,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.1.6) - '@typescript-eslint/utils': 6.4.1(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.2.2) + '@typescript-eslint/utils': 6.4.1(eslint@8.47.0)(typescript@5.2.2) debug: 4.3.4 eslint: 8.47.0 - ts-api-utils: 1.0.2(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.2(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true @@ -3546,7 +3569,7 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.4.1(typescript@5.1.6): + /@typescript-eslint/typescript-estree@6.4.1(typescript@5.2.2): resolution: {integrity: sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -3561,13 +3584,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - ts-api-utils: 1.0.2(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.2(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@6.4.1(eslint@8.47.0)(typescript@5.1.6): + /@typescript-eslint/utils@6.4.1(eslint@8.47.0)(typescript@5.2.2): resolution: {integrity: sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -3578,7 +3601,7 @@ packages: '@types/semver': 7.5.0 '@typescript-eslint/scope-manager': 6.4.1 '@typescript-eslint/types': 6.4.1 - '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.2.2) eslint: 8.47.0 semver: 7.5.4 transitivePeerDependencies: @@ -3967,7 +3990,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001522 - electron-to-chromium: 1.4.499 + electron-to-chromium: 1.4.501 node-releases: 2.0.13 update-browserslist-db: 1.0.11(browserslist@4.21.10) @@ -4279,7 +4302,7 @@ packages: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: true - /cosmiconfig-typescript-loader@4.4.0(@types/node@20.4.7)(cosmiconfig@8.2.0)(ts-node@10.9.1)(typescript@5.1.6): + /cosmiconfig-typescript-loader@4.4.0(@types/node@20.4.7)(cosmiconfig@8.2.0)(ts-node@10.9.1)(typescript@5.2.2): resolution: {integrity: sha512-BabizFdC3wBHhbI4kJh0VkQP9GkBfoHPydD0COMce1nJ1kJAB3F2TmJ/I7diULBKtmEWSwEbuN/KDtgnmUUVmw==} engines: {node: '>=v14.21.3'} peerDependencies: @@ -4290,8 +4313,8 @@ packages: dependencies: '@types/node': 20.4.7 cosmiconfig: 8.2.0 - ts-node: 10.9.1(@types/node@20.5.3)(typescript@5.1.6) - typescript: 5.1.6 + ts-node: 10.9.1(@types/node@20.5.4)(typescript@5.2.2) + typescript: 5.2.2 dev: true /cosmiconfig@8.0.0: @@ -4378,7 +4401,7 @@ packages: engines: {node: '>=16'} dependencies: '@cspell/cspell-service-bus': 7.0.1 - node-fetch: 2.6.13(encoding@0.1.13) + node-fetch: 2.7.0(encoding@0.1.13) transitivePeerDependencies: - encoding dev: true @@ -4500,7 +4523,7 @@ packages: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} engines: {node: '>=0.11'} dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 dev: false /dayjs@1.11.9: @@ -4742,8 +4765,8 @@ packages: - supports-color dev: true - /drizzle-orm@0.28.3(@planetscale/database@1.11.0)(postgres@3.3.5): - resolution: {integrity: sha512-7LwNEBJH5EFvkD0vm7RdKWDZsFP9CYR4AWN2fMwns/ezexoX3+UNoVOWGRPJf1qsj357SESldrNEueFvUDfZxA==} + /drizzle-orm@0.28.5(@planetscale/database@1.11.0)(postgres@3.3.5): + resolution: {integrity: sha512-6r6Iw4c38NAmW6TiKH3TUpGUQ1YdlEoLJOQptn8XPx3Z63+vFNKfAiANqrIiYZiMjKR9+NYAL219nFrmo1duXA==} peerDependencies: '@aws-sdk/client-rds-data': '>=3' '@cloudflare/workers-types': '>=3' @@ -4823,8 +4846,8 @@ packages: semver: 7.5.4 dev: false - /electron-to-chromium@1.4.499: - resolution: {integrity: sha512-0NmjlYBLKVHva4GABWAaHuPJolnDuL0AhV3h1hES6rcLCWEIbRL6/8TghfsVwkx6TEroQVdliX7+aLysUpKvjw==} + /electron-to-chromium@1.4.501: + resolution: {integrity: sha512-NCF5hZUg73MEP0guvIM+BjPs9W07UeAuc5XCNqRZZTKJxLjE0ZS/Zo5UsV8bbs2y/jeKRPFPzdWdBfOGEZTXKg==} /embla-carousel-react@8.0.0-rc12(react@18.2.0): resolution: {integrity: sha512-Tyd9TNH9i8bb/0S9/WZsmEvfZm8jlFU9sgaWNNgLzbPsUtz/L6UTYuRGOBDOt2oh6VPhaL1G8vRuOAuH81G5Cg==} @@ -5094,7 +5117,7 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-next@13.4.19(eslint@8.47.0)(typescript@5.1.6): + /eslint-config-next@13.4.19(eslint@8.47.0)(typescript@5.2.2): resolution: {integrity: sha512-WE8367sqMnjhWHvR5OivmfwENRQ1ixfNE9hZwQqNCsd+iM3KnuMc1V8Pt6ytgjxjf23D+xbesADv9x3xaKfT3g==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 @@ -5105,7 +5128,7 @@ packages: dependencies: '@next/eslint-plugin-next': 13.4.19 '@rushstack/eslint-patch': 1.3.3 - '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.2.2) eslint: 8.47.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0) @@ -5113,7 +5136,7 @@ packages: eslint-plugin-jsx-a11y: 6.7.1(eslint@8.47.0) eslint-plugin-react: 7.33.2(eslint@8.47.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.47.0) - typescript: 5.1.6 + typescript: 5.2.2 transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color @@ -5187,7 +5210,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.2.2) debug: 3.2.7 eslint: 8.47.0 eslint-import-resolver-node: 0.3.9 @@ -5206,7 +5229,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.2.2) array-includes: 3.1.6 array.prototype.findlastindex: 1.2.2 array.prototype.flat: 1.3.1 @@ -5237,7 +5260,7 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.22.10 + '@babel/runtime': 7.22.11 aria-query: 5.3.0 array-includes: 3.1.6 array.prototype.flatmap: 1.3.1 @@ -6723,8 +6746,8 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true - /next-international@0.9.2: - resolution: {integrity: sha512-vWcMienS6M9IU718SGK3MoXFgkRyHdV2v31ePknfAGXA+6sYu8552CEPJH/KoUEt2G/efNtx5BWXx6RFdhuqyw==} + /next-international@0.9.3: + resolution: {integrity: sha512-iriIoo75bmAMd3Oe7F11c/Srz031nDKlrtbVAYWH6XGH0vIWjjOZnDF1i1vG4U6/UZlr0smGnO7+qefHYjRJxQ==} dependencies: client-only: 0.0.1 international-types: 0.8.0 @@ -6738,7 +6761,7 @@ packages: react: '*' react-dom: '*' dependencies: - next: 13.4.19(@babel/core@7.22.10)(react-dom@18.2.0)(react@18.2.0) + next: 13.4.19(@babel/core@7.22.11)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false @@ -6747,7 +6770,7 @@ packages: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} dev: true - /next@13.4.19(@babel/core@7.22.10)(react-dom@18.2.0)(react@18.2.0): + /next@13.4.19(@babel/core@7.22.11)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-HuPSzzAbJ1T4BD8e0bs6B9C1kWQ6gv8ykZoRWs5AQoiIuqbGHHdQO7Ljuvg05Q0Z24E2ABozHe6FxDvI6HfyAw==} engines: {node: '>=16.8.0'} hasBin: true @@ -6769,7 +6792,7 @@ packages: postcss: 8.4.14 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - styled-jsx: 5.1.1(@babel/core@7.22.10)(react@18.2.0) + styled-jsx: 5.1.1(@babel/core@7.22.11)(react@18.2.0) watchpack: 2.4.0 zod: 3.21.4 optionalDependencies: @@ -6811,8 +6834,8 @@ packages: whatwg-url: 5.0.0 dev: false - /node-fetch@2.6.13(encoding@0.1.13): - resolution: {integrity: sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA==} + /node-fetch@2.7.0(encoding@0.1.13): + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} peerDependencies: encoding: ^0.1.0 @@ -7204,7 +7227,7 @@ packages: dependencies: lilconfig: 2.1.0 postcss: 8.4.21 - ts-node: 10.9.1(@types/node@20.5.3)(typescript@5.1.6) + ts-node: 10.9.1(@types/node@20.5.4)(typescript@5.2.2) yaml: 1.10.2 dev: false @@ -7222,7 +7245,7 @@ packages: dependencies: lilconfig: 2.1.0 postcss: 8.4.28 - ts-node: 10.9.1(@types/node@20.5.3)(typescript@5.1.6) + ts-node: 10.9.1(@types/node@20.5.4)(typescript@5.2.2) yaml: 2.3.1 /postcss-nested@6.0.0(postcss@8.4.21): @@ -8088,11 +8111,11 @@ packages: engines: {node: '>=8'} dev: true - /stripe@13.2.0: - resolution: {integrity: sha512-4a2UHpe/tyxP3sxSGhuKMgbW8hQnqSQIPMigXC8kW3P0+BpsITpKDP+xxriTMDkRAP0xTQwzxcqhfqB+/404Mg==} + /stripe@13.3.0: + resolution: {integrity: sha512-saDZBvk8fCBz9GigKpVXAaAo0K+TQe+DwVmucAzpJq503Y44P2ehMqulfaRoK8a+etuwIUlgsXD+am6YSMxepg==} engines: {node: '>=12.*'} dependencies: - '@types/node': 20.5.3 + '@types/node': 20.5.4 qs: 6.11.2 dev: false @@ -8108,7 +8131,7 @@ packages: inline-style-parser: 0.1.1 dev: false - /styled-jsx@5.1.1(@babel/core@7.22.10)(react@18.2.0): + /styled-jsx@5.1.1(@babel/core@7.22.11)(react@18.2.0): resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} engines: {node: '>= 12.0.0'} peerDependencies: @@ -8121,7 +8144,7 @@ packages: babel-plugin-macros: optional: true dependencies: - '@babel/core': 7.22.10 + '@babel/core': 7.22.11 client-only: 0.0.1 react: 18.2.0 dev: false @@ -8346,19 +8369,19 @@ packages: engines: {node: '>=8'} dev: true - /ts-api-utils@1.0.2(typescript@5.1.6): + /ts-api-utils@1.0.2(typescript@5.2.2): resolution: {integrity: sha512-Cbu4nIqnEdd+THNEsBdkolnOXhg0I8XteoHaEKgvsxpsbWda4IsUut2c187HxywQCvveojow0Dgw/amxtSKVkQ==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.1.6 + typescript: 5.2.2 dev: true /ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - /ts-node@10.9.1(@types/node@20.5.3)(typescript@5.1.6): + /ts-node@10.9.1(@types/node@20.5.4)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -8377,14 +8400,14 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.5.3 + '@types/node': 20.5.4 acorn: 8.10.0 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.1.6 + typescript: 5.2.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 @@ -8509,8 +8532,8 @@ packages: is-typedarray: 1.0.0 dev: true - /typescript@5.1.6: - resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} engines: {node: '>=14.17'} hasBin: true @@ -8617,8 +8640,8 @@ packages: /v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - /valibot@0.12.0: - resolution: {integrity: sha512-EGx/uDUpRa9wB9NkD7fsktc02rvXWlJzDTC/ihbE+NybhzAsMhns2OOdNv2R4BtdGnDvaCEGi/DbgR5RvgCS8A==} + /valibot@0.13.1: + resolution: {integrity: sha512-SG2W1RHqE2LShl3p6tyERt6I+G6PQa9ZFVfkyNKXz01HBzL+tBeH5kXw/5AQeAzPJSjI3djVGBl1CyozA1kyBQ==} dev: false /validate-npm-package-license@3.0.4: diff --git a/prettier.config.cjs b/prettier.config.cjs index dbcae36d..f847c020 100644 --- a/prettier.config.cjs +++ b/prettier.config.cjs @@ -17,15 +17,17 @@ const config = { "^(next/(.*)$)|^(next$)", "", "", - "^~/app.ts", - "^~/app/(.*)$", + "^~/utils/types/(.*)$", + "^~/utils/appts/(.*)$", + "^~/utils/(.*)$", "^~/data/(.*)$", - "^~/forms/(.*)$", "^~/hooks/(.*)$", + "^~/forms/(.*)$", "^~/islands/(.*)$", - "^~/schema/(.*)$", "^~/styles/(.*)$", - "^~/utils/(.*)$", + "^~/app/(.*)$", + "^~/env.mjs", + "^~/app.ts", "", "^[./]", "" diff --git a/src/app.ts b/src/app.ts index 1edff541..274651c5 100644 --- a/src/app.ts +++ b/src/app.ts @@ -5,7 +5,7 @@ import { ContentSection, HeroHeader } from "~/utils/appts/appts"; import { productCategories } from "~/utils/appts/products"; import { networks } from "~/utils/appts/socials"; import { slugify } from "~/utils/server/utils"; -import type { FooterItem, MainNavItem } from "~/utils/types/store-main"; +import type { FooterItem, MainNavItem } from "~/utils/types"; // ======================================================== diff --git a/src/app/(api)/api/newsletter/subscribe/route.ts b/src/app/(api)/api/newsletter/subscribe/route.ts index 63b04e33..6c60b38a 100644 --- a/src/app/(api)/api/newsletter/subscribe/route.ts +++ b/src/app/(api)/api/newsletter/subscribe/route.ts @@ -1,14 +1,14 @@ import { currentUser } from "@clerk/nextjs"; -import { env } from "~/env.mjs"; import { eq } from "drizzle-orm"; import { type ErrorResponse } from "resend"; import { z } from "zod"; -import { db } from "~/data/db/drizzle"; +import { resend } from "~/utils/server/resend"; +import { db } from "~/data/db"; import { emailPreferences } from "~/data/db/schema"; import NewsletterWelcomeEmail from "~/data/mail/newsletter-welcome-email"; import { subscribeToNewsletterSchema } from "~/data/zod/email"; -import { resend } from "~/utils/server/resend"; +import { env } from "~/env.mjs"; export async function POST(req: Request) { const input = subscribeToNewsletterSchema.parse(await req.json()); diff --git a/src/app/(api)/api/webhooks/stripe/route.ts b/src/app/(api)/api/webhooks/stripe/route.ts index ead8b9d3..aaa43823 100644 --- a/src/app/(api)/api/webhooks/stripe/route.ts +++ b/src/app/(api)/api/webhooks/stripe/route.ts @@ -1,10 +1,14 @@ import { headers } from "next/headers"; import { clerkClient } from "@clerk/nextjs"; -import { env } from "~/env.mjs"; +import { eq } from "drizzle-orm"; import type Stripe from "stripe"; -import { userPrivateMetadataSchema } from "~/data/zod/auth"; import { stripe } from "~/utils/server/stripe"; +import type { CheckoutItem } from "~/utils/types"; +import { db } from "~/data/db"; +import { addresses, carts, orders, payments } from "~/data/db/schema"; +import { userPrivateMetadataSchema } from "~/data/zod/auth"; +import { env } from "~/env.mjs"; export async function POST(req: Request) { const body = await req.text(); @@ -80,5 +84,86 @@ export async function POST(req: Request) { }); } + // Handle payment intents + switch (event.type) { + case "payment_intent.payment_failed": + // Handle the payment_intent.payment_failed event + break; + case "payment_intent.processing": + // Handle the payment_intent.processing event + break; + case "payment_intent.succeeded": + // Handle the payment_intent.succeeded event + const stripeObject = event?.data?.object as Stripe.PaymentIntent; + + const paymentIntentId = stripeObject?.id; + const orderTotal = stripeObject?.amount; + const cartItems = stripeObject?.metadata + ?.items as unknown as CheckoutItem[]; + + try { + if (!event.account) throw new Error("No account on event"); + + const payment = await db.query.payments.findFirst({ + columns: { + storeId: true + }, + where: eq(payments.stripeAccountId, event.account) + }); + + if (!payment?.storeId) { + return new Response("Store not found", { status: 404 }); + } + + // Create new address in DB + const stripeAddress = stripeObject?.shipping?.address; + + const newAddress = await db.insert(addresses).values({ + line1: stripeAddress?.line1, + line2: stripeAddress?.line2, + city: stripeAddress?.city, + state: stripeAddress?.state, + country: stripeAddress?.country, + postalCode: stripeAddress?.postal_code + }); + + if (!newAddress.insertId) throw new Error("No address created."); + + // Create new order in DB + const newOrder = await db.insert(orders).values({ + storeId: payment.storeId, + items: cartItems ?? [], + total: String(Number(orderTotal) / 100), + stripePaymentIntentId: paymentIntentId, + stripePaymentIntentStatus: stripeObject?.status, + name: stripeObject?.shipping?.name, + email: stripeObject?.receipt_email, + addressId: Number(newAddress.insertId) + }); + + console.log("Order created", newOrder); + } catch (err) { + console.log("Error creating order.", err); + } + + try { + // Close cart and clear items + await db + .update(carts) + .set({ + closed: true, + items: null + }) + .where(eq(carts.paymentIntentId, paymentIntentId)); + } catch (err) { + console.error(err); + return new Response("Error updating cart", { status: 500 }); + } + + break; + default: + console.log(`Unhandled event type ${event.type}`); + } + return new Response(null, { status: 200 }); } diff --git a/src/app/[locale]/(adm)/layout.tsx b/src/app/[locale]/(adm)/layout.tsx index f7f41a3a..903fa730 100644 --- a/src/app/[locale]/(adm)/layout.tsx +++ b/src/app/[locale]/(adm)/layout.tsx @@ -1,11 +1,11 @@ import { redirect } from "next/navigation"; import { currentUser } from "@clerk/nextjs"; +import { dashboardConfig } from "~/utils/appts/dashboard"; import { SidebarNav } from "~/islands/common/sidebar-nav"; import { SiteFooter } from "~/islands/modules/site-footer"; import { SiteHeader } from "~/islands/modules/site-header"; import { ScrollArea } from "~/islands/primitives/scroll-area"; -import { dashboardConfig } from "~/utils/appts/dashboard"; interface DashboardLayoutProps { children: React.ReactNode; diff --git a/src/app/[locale]/(auth)/layout.tsx b/src/app/[locale]/(auth)/layout.tsx index 1b556fa5..e0dd6575 100644 --- a/src/app/[locale]/(auth)/layout.tsx +++ b/src/app/[locale]/(auth)/layout.tsx @@ -2,8 +2,8 @@ import Image from "next/image"; import Link from "next/link"; import { siteConfig } from "~/app"; +import { Icons } from "~/islands/icons"; import { AspectRatio } from "~/islands/primitives/aspect-ratio"; -import { Icons } from "~/islands/primitives/icons"; interface AuthLayoutProps { children: React.ReactNode; diff --git a/src/app/[locale]/(auth)/sign-in/page.tsx b/src/app/[locale]/(auth)/sign-in/page.tsx index 08cbb6e0..ccc07cf5 100644 --- a/src/app/[locale]/(auth)/sign-in/page.tsx +++ b/src/app/[locale]/(auth)/sign-in/page.tsx @@ -2,11 +2,9 @@ import { type Metadata } from "next"; import Link from "next/link"; import { redirect } from "next/navigation"; import { currentUser } from "@clerk/nextjs"; -import { env } from "~/env.mjs"; import { SignInForm } from "~/forms/signin-form"; import { OAuthSignIn } from "~/islands/account/oauth-signin"; -import { Shell } from "~/islands/common/shells/shell"; import { Card, CardContent, @@ -15,6 +13,8 @@ import { CardHeader, CardTitle } from "~/islands/primitives/card"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(auth)/sign-in/reset-password/page.tsx b/src/app/[locale]/(auth)/sign-in/reset-password/page.tsx index 70c36adc..44b34377 100644 --- a/src/app/[locale]/(auth)/sign-in/reset-password/page.tsx +++ b/src/app/[locale]/(auth)/sign-in/reset-password/page.tsx @@ -1,8 +1,6 @@ import { type Metadata } from "next"; -import { env } from "~/env.mjs"; import { ResetPasswordForm } from "~/forms/reset-password-form"; -import { Shell } from "~/islands/common/shells/shell"; import { Card, CardContent, @@ -10,6 +8,8 @@ import { CardHeader, CardTitle } from "~/islands/primitives/card"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(auth)/sign-in/reset-password/step-two/page.tsx b/src/app/[locale]/(auth)/sign-in/reset-password/step-two/page.tsx index f1338f98..2b3c8828 100644 --- a/src/app/[locale]/(auth)/sign-in/reset-password/step-two/page.tsx +++ b/src/app/[locale]/(auth)/sign-in/reset-password/step-two/page.tsx @@ -1,8 +1,6 @@ import { type Metadata } from "next"; -import { env } from "~/env.mjs"; import { ResetPasswordSecondForm } from "~/forms/reset-password-form-two"; -import { Shell } from "~/islands/common/shells/shell"; import { Card, CardContent, @@ -10,6 +8,8 @@ import { CardHeader, CardTitle } from "~/islands/primitives/card"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(auth)/sign-out/loading.tsx b/src/app/[locale]/(auth)/sign-out/loading.tsx index c123ad32..569de1ca 100644 --- a/src/app/[locale]/(auth)/sign-out/loading.tsx +++ b/src/app/[locale]/(auth)/sign-out/loading.tsx @@ -1,10 +1,10 @@ -import { Shell } from "~/islands/common/shells/shell"; import { PageHeader, PageHeaderDescription, PageHeaderHeading } from "~/islands/page-header"; import { Skeleton } from "~/islands/primitives/skeleton"; +import { Shell } from "~/islands/shells/shell"; export default function SignOutLoading() { return ( diff --git a/src/app/[locale]/(auth)/sign-out/page.tsx b/src/app/[locale]/(auth)/sign-out/page.tsx index 005b10a5..e11843d7 100644 --- a/src/app/[locale]/(auth)/sign-out/page.tsx +++ b/src/app/[locale]/(auth)/sign-out/page.tsx @@ -1,15 +1,28 @@ +import type { Metadata } from "next"; + import { LogOutButtons } from "~/islands/account/logout-buttons"; -import { Shell } from "~/islands/common/shells/shell"; import { PageHeader, PageHeaderDescription, PageHeaderHeading } from "~/islands/page-header"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; + +export const metadata: Metadata = { + metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), + title: "Sign out", + description: "Sign out of your account" +}; export default function SignOutPage() { return ( - + Sign out Are you sure you want to sign out? diff --git a/src/app/[locale]/(auth)/sign-sso/page.tsx b/src/app/[locale]/(auth)/sign-sso/page.tsx index ceabfc61..ef4da591 100644 --- a/src/app/[locale]/(auth)/sign-sso/page.tsx +++ b/src/app/[locale]/(auth)/sign-sso/page.tsx @@ -1,7 +1,7 @@ import { type HandleOAuthCallbackParams } from "@clerk/types"; import SSOCallback from "~/islands/account/sso-callback"; -import { Shell } from "~/islands/common/shells/shell"; +import { Shell } from "~/islands/shells/shell"; // Running out of edge function execution units on vercel free plan // export const runtime = "edge" diff --git a/src/app/[locale]/(auth)/sign-up/page.tsx b/src/app/[locale]/(auth)/sign-up/page.tsx index f98ec8af..8091d930 100644 --- a/src/app/[locale]/(auth)/sign-up/page.tsx +++ b/src/app/[locale]/(auth)/sign-up/page.tsx @@ -2,11 +2,9 @@ import { type Metadata } from "next"; import Link from "next/link"; import { redirect } from "next/navigation"; import { currentUser } from "@clerk/nextjs"; -import { env } from "~/env.mjs"; import { SignUpForm } from "~/forms/signup-form"; import { OAuthSignIn } from "~/islands/account/oauth-signin"; -import { Shell } from "~/islands/common/shells/shell"; import { Card, CardContent, @@ -15,6 +13,8 @@ import { CardHeader, CardTitle } from "~/islands/primitives/card"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(auth)/sign-up/verify-email/page.tsx b/src/app/[locale]/(auth)/sign-up/verify-email/page.tsx index 42715869..2950b0b3 100644 --- a/src/app/[locale]/(auth)/sign-up/verify-email/page.tsx +++ b/src/app/[locale]/(auth)/sign-up/verify-email/page.tsx @@ -1,8 +1,6 @@ import { type Metadata } from "next"; -import { env } from "~/env.mjs"; import { VerifyEmailForm } from "~/forms/verify-email-form"; -import { Shell } from "~/islands/common/shells/shell"; import { Card, CardContent, @@ -10,6 +8,8 @@ import { CardHeader, CardTitle } from "~/islands/primitives/card"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(inner)/dashboard/account/loading.tsx b/src/app/[locale]/(inner)/dashboard/account/loading.tsx index 7a827e02..f968627f 100644 --- a/src/app/[locale]/(inner)/dashboard/account/loading.tsx +++ b/src/app/[locale]/(inner)/dashboard/account/loading.tsx @@ -1,10 +1,10 @@ -import { Shell } from "~/islands/common/shells/shell"; import { PageHeader, PageHeaderDescription, PageHeaderHeading } from "~/islands/page-header"; import { Skeleton } from "~/islands/primitives/skeleton"; +import { Shell } from "~/islands/shells/shell"; export default function AccountLoading() { return ( diff --git a/src/app/[locale]/(inner)/dashboard/account/page.tsx b/src/app/[locale]/(inner)/dashboard/account/page.tsx index 7cc47cd6..26c0bc60 100644 --- a/src/app/[locale]/(inner)/dashboard/account/page.tsx +++ b/src/app/[locale]/(inner)/dashboard/account/page.tsx @@ -1,13 +1,13 @@ import type { Metadata } from "next"; -import { env } from "~/env.mjs"; -import { Shell } from "~/islands/common/shells/shell"; +import { UserProfile } from "~/islands/account/user-profile"; import { PageHeader, PageHeaderDescription, PageHeaderHeading } from "~/islands/page-header"; -import { UserProfile } from "~/islands/user-profile"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(inner)/dashboard/billing/loading.tsx b/src/app/[locale]/(inner)/dashboard/billing/loading.tsx index 9f09dba3..cc2ca33b 100644 --- a/src/app/[locale]/(inner)/dashboard/billing/loading.tsx +++ b/src/app/[locale]/(inner)/dashboard/billing/loading.tsx @@ -1,4 +1,4 @@ -import { Shell } from "~/islands/common/shells/shell"; +import { cn } from "~/utils/server/utils"; import { PageHeader, PageHeaderDescription, @@ -11,7 +11,7 @@ import { CardHeader } from "~/islands/primitives/card"; import { Skeleton } from "~/islands/primitives/skeleton"; -import { cn } from "~/utils/server/utils"; +import { Shell } from "~/islands/shells/shell"; export default function BillingLoading() { return ( diff --git a/src/app/[locale]/(inner)/dashboard/billing/page.tsx b/src/app/[locale]/(inner)/dashboard/billing/page.tsx index 3cda51e2..a4c56418 100644 --- a/src/app/[locale]/(inner)/dashboard/billing/page.tsx +++ b/src/app/[locale]/(inner)/dashboard/billing/page.tsx @@ -2,10 +2,12 @@ import type { Metadata } from "next"; import Link from "next/link"; import { redirect } from "next/navigation"; import { currentUser } from "@clerk/nextjs"; -import { env } from "~/env.mjs"; +import { storeSubscriptionPlans } from "~/utils/appts/subs"; +import { getUserSubscriptionPlan } from "~/utils/server/subs"; +import { cn, formatDate, formatPrice } from "~/utils/server/utils"; import { ManageSubscriptionForm } from "~/forms/manage-subscription-form"; -import { Shell } from "~/islands/common/shells/shell"; +import { Icons } from "~/islands/icons"; import { PageHeader, PageHeaderDescription, @@ -20,10 +22,8 @@ import { CardHeader, CardTitle } from "~/islands/primitives/card"; -import { Icons } from "~/islands/primitives/icons"; -import { storeSubscriptionPlans } from "~/utils/appts/subs"; -import { getUserSubscriptionPlan } from "~/utils/server/subs"; -import { cn, formatDate, formatPrice } from "~/utils/server/utils"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(inner)/dashboard/purchases/loading.tsx b/src/app/[locale]/(inner)/dashboard/purchases/loading.tsx index f3e633c6..a00a7051 100644 --- a/src/app/[locale]/(inner)/dashboard/purchases/loading.tsx +++ b/src/app/[locale]/(inner)/dashboard/purchases/loading.tsx @@ -1,10 +1,10 @@ -import { Shell } from "~/islands/common/shells/shell"; import { PageHeader, PageHeaderDescription, PageHeaderHeading } from "~/islands/page-header"; import { Skeleton } from "~/islands/primitives/skeleton"; +import { Shell } from "~/islands/shells/shell"; export default function PurchasesLoading() { return ( diff --git a/src/app/[locale]/(inner)/dashboard/purchases/page.tsx b/src/app/[locale]/(inner)/dashboard/purchases/page.tsx index 8da73b3a..bcdf63c1 100644 --- a/src/app/[locale]/(inner)/dashboard/purchases/page.tsx +++ b/src/app/[locale]/(inner)/dashboard/purchases/page.tsx @@ -1,14 +1,14 @@ import type { Metadata } from "next"; import { redirect } from "next/navigation"; import { currentUser } from "@clerk/nextjs"; -import { env } from "~/env.mjs"; -import { Shell } from "~/islands/common/shells/shell"; import { PageHeader, PageHeaderDescription, PageHeaderHeading } from "~/islands/page-header"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/analytics/page.tsx b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/analytics/page.tsx index b6a46398..e56d4f06 100644 --- a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/analytics/page.tsx +++ b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/analytics/page.tsx @@ -1,10 +1,9 @@ import type { Metadata } from "next"; import { notFound } from "next/navigation"; -import { env } from "~/env.mjs"; import { eq } from "drizzle-orm"; import { Activity, CreditCard, DollarSign, Users } from "lucide-react"; -import { db } from "~/data/db/drizzle"; +import { db } from "~/data/db"; import { stores } from "~/data/db/schema"; import { Card, @@ -12,6 +11,7 @@ import { CardHeader, CardTitle } from "~/islands/primitives/card"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/layout.tsx b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/layout.tsx index eda6ddc5..41008d74 100644 --- a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/layout.tsx +++ b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/layout.tsx @@ -2,16 +2,16 @@ import { notFound, redirect } from "next/navigation"; import { currentUser } from "@clerk/nextjs"; import { eq } from "drizzle-orm"; -import { db } from "~/data/db/drizzle"; -import { stores } from "~/data/db/schema"; -import { StoreSwitcher } from "~/islands/common/pager/store-switcher"; -import { StoreTabs } from "~/islands/common/pager/store-tabs"; -import { Shell } from "~/islands/common/shells/shell"; -import { PageHeaderHeading } from "~/islands/page-header"; import { getDashboardRedirectPath, getUserSubscriptionPlan } from "~/utils/server/subs"; +import { db } from "~/data/db"; +import { stores } from "~/data/db/schema"; +import { PageHeaderHeading } from "~/islands/page-header"; +import { StoreSwitcher } from "~/islands/pagers/store-switcher"; +import { StoreTabs } from "~/islands/pagers/store-tabs"; +import { Shell } from "~/islands/shells/shell"; interface StoreLayoutProps { children: React.ReactNode; diff --git a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/not-found.tsx b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/not-found.tsx index a260976a..e61e4289 100644 --- a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/not-found.tsx +++ b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/not-found.tsx @@ -1,5 +1,5 @@ -import { Shell } from "~/islands/common/shells/shell"; -import { ErrorCard } from "~/islands/error-card"; +import { ErrorCard } from "~/islands/cards/error-card"; +import { Shell } from "~/islands/shells/shell"; export default function StoreNotFound() { return ( diff --git a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/orders/page.tsx b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/orders/page.tsx index ca0e8471..97189957 100644 --- a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/orders/page.tsx +++ b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/orders/page.tsx @@ -1,10 +1,10 @@ import type { Metadata } from "next"; import { notFound } from "next/navigation"; -import { env } from "~/env.mjs"; import { eq } from "drizzle-orm"; -import { db } from "~/data/db/drizzle"; +import { db } from "~/data/db"; import { stores } from "~/data/db/schema"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/page.tsx b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/page.tsx index 2c3ec705..22bcd25c 100644 --- a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/page.tsx +++ b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/page.tsx @@ -2,10 +2,11 @@ import { type Metadata } from "next"; import { revalidatePath } from "next/cache"; import Link from "next/link"; import { notFound, redirect } from "next/navigation"; -import { env } from "~/env.mjs"; import { and, eq, not } from "drizzle-orm"; -import { db } from "~/data/db/drizzle"; +import { getStripeAccountAction } from "~/utils/server/actions/stripe"; +import { cn, formatDate } from "~/utils/server/utils"; +import { db } from "~/data/db"; import { products, stores } from "~/data/db/schema"; import { ConnectStoreToStripeButton } from "~/islands/connect-store-to-stripe-button"; import { LoadingButton } from "~/islands/loading-button"; @@ -21,8 +22,7 @@ import { import { Input } from "~/islands/primitives/input"; import { Label } from "~/islands/primitives/label"; import { Textarea } from "~/islands/primitives/textarea"; -import { getStripeAccountAction } from "~/utils/server/actions/stripe"; -import { cn, formatDate } from "~/utils/server/utils"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/[productId]/not-found.tsx b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/[productId]/not-found.tsx index d7ad5857..aa22a83c 100644 --- a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/[productId]/not-found.tsx +++ b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/[productId]/not-found.tsx @@ -1,5 +1,5 @@ -import { Shell } from "~/islands/common/shells/shell"; -import { ErrorCard } from "~/islands/error-card"; +import { ErrorCard } from "~/islands/cards/error-card"; +import { Shell } from "~/islands/shells/shell"; interface ProductNotFoundProps { params: { diff --git a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/[productId]/page.tsx b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/[productId]/page.tsx index 8e2158a1..50bd5bf7 100644 --- a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/[productId]/page.tsx +++ b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/[productId]/page.tsx @@ -1,12 +1,11 @@ import { type Metadata } from "next"; import { notFound } from "next/navigation"; -import { env } from "~/env.mjs"; import { and, eq } from "drizzle-orm"; -import { db } from "~/data/db/drizzle"; +import { db } from "~/data/db"; import { products } from "~/data/db/schema"; import { UpdateProductForm } from "~/forms/update-product-form"; -import { ProductPager } from "~/islands/common/pager/product-pager"; +import { ProductPager } from "~/islands/pagers/product-pager"; import { Card, CardContent, @@ -14,6 +13,7 @@ import { CardHeader, CardTitle } from "~/islands/primitives/card"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/new/page.tsx b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/new/page.tsx index 538038ae..eb0ae9b1 100644 --- a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/new/page.tsx +++ b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/new/page.tsx @@ -1,7 +1,6 @@ import type { Metadata } from "next"; import { redirect } from "next/navigation"; import { currentUser } from "@clerk/nextjs"; -import { env } from "~/env.mjs"; import { AddProductForm } from "~/forms/add-product-form"; import { @@ -11,6 +10,7 @@ import { CardHeader, CardTitle } from "~/islands/primitives/card"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/page.tsx b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/page.tsx index 7de03333..4a8c0c9d 100644 --- a/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/page.tsx +++ b/src/app/[locale]/(inner)/dashboard/stores/[storeId]/products/page.tsx @@ -1,12 +1,12 @@ import { type Metadata } from "next"; import { notFound } from "next/navigation"; -import { env } from "~/env.mjs"; import { and, asc, desc, eq, inArray, like, sql } from "drizzle-orm"; -import { db } from "~/data/db/drizzle"; +import { db } from "~/data/db"; import { products, stores, type Product } from "~/data/db/schema"; -import { ProductsTableShell } from "~/islands/common/shells/products-table-shell"; import { GenerateButton } from "~/islands/generate-button"; +import { ProductsTableShell } from "~/islands/shells/products-table-shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(inner)/dashboard/stores/loading.tsx b/src/app/[locale]/(inner)/dashboard/stores/loading.tsx index 1f14f161..58b7c1e4 100644 --- a/src/app/[locale]/(inner)/dashboard/stores/loading.tsx +++ b/src/app/[locale]/(inner)/dashboard/stores/loading.tsx @@ -1,4 +1,3 @@ -import { Shell } from "~/islands/common/shells/shell"; import { PageHeader, PageHeaderDescription, @@ -7,6 +6,7 @@ import { import { AspectRatio } from "~/islands/primitives/aspect-ratio"; import { Card, CardHeader } from "~/islands/primitives/card"; import { Skeleton } from "~/islands/primitives/skeleton"; +import { Shell } from "~/islands/shells/shell"; export default function StoresLoading() { return ( diff --git a/src/app/[locale]/(inner)/dashboard/stores/new/page.tsx b/src/app/[locale]/(inner)/dashboard/stores/new/page.tsx index ada28a6d..2bfa98d1 100644 --- a/src/app/[locale]/(inner)/dashboard/stores/new/page.tsx +++ b/src/app/[locale]/(inner)/dashboard/stores/new/page.tsx @@ -1,10 +1,8 @@ import type { Metadata } from "next"; import { redirect } from "next/navigation"; import { currentUser } from "@clerk/nextjs"; -import { env } from "~/env.mjs"; import { AddStoreForm } from "~/forms/add-store-form"; -import { Shell } from "~/islands/common/shells/shell"; import { PageHeader, PageHeaderDescription, @@ -17,6 +15,8 @@ import { CardHeader, CardTitle } from "~/islands/primitives/card"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(inner)/dashboard/stores/page.tsx b/src/app/[locale]/(inner)/dashboard/stores/page.tsx index e68b5349..d5b59c2f 100644 --- a/src/app/[locale]/(inner)/dashboard/stores/page.tsx +++ b/src/app/[locale]/(inner)/dashboard/stores/page.tsx @@ -3,12 +3,17 @@ import Link from "next/link"; import { redirect } from "next/navigation"; import { currentUser } from "@clerk/nextjs"; import { RocketIcon } from "@radix-ui/react-icons"; -import { env } from "~/env.mjs"; import { desc, eq, sql } from "drizzle-orm"; -import { db } from "~/data/db/drizzle"; +import { + getDashboardRedirectPath, + getPlanFeatures, + getUserSubscriptionPlan +} from "~/utils/server/subs"; +import { cn } from "~/utils/server/utils"; +import { db } from "~/data/db"; import { products, stores } from "~/data/db/schema"; -import { Shell } from "~/islands/common/shells/shell"; +import { StoreCard } from "~/islands/cards/store-card"; import { PageHeader, PageHeaderDescription, @@ -20,13 +25,8 @@ import { AlertTitle } from "~/islands/primitives/alert"; import { buttonVariants } from "~/islands/primitives/button"; -import { StoreCard } from "~/islands/store-card"; -import { - getDashboardRedirectPath, - getPlanFeatures, - getUserSubscriptionPlan -} from "~/utils/server/subs"; -import { cn } from "~/utils/server/utils"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(inner)/layout.tsx b/src/app/[locale]/(inner)/layout.tsx index f7f41a3a..903fa730 100644 --- a/src/app/[locale]/(inner)/layout.tsx +++ b/src/app/[locale]/(inner)/layout.tsx @@ -1,11 +1,11 @@ import { redirect } from "next/navigation"; import { currentUser } from "@clerk/nextjs"; +import { dashboardConfig } from "~/utils/appts/dashboard"; import { SidebarNav } from "~/islands/common/sidebar-nav"; import { SiteFooter } from "~/islands/modules/site-footer"; import { SiteHeader } from "~/islands/modules/site-header"; import { ScrollArea } from "~/islands/primitives/scroll-area"; -import { dashboardConfig } from "~/utils/appts/dashboard"; interface DashboardLayoutProps { children: React.ReactNode; diff --git a/src/app/[locale]/(main)/[...slug]/not-found.tsx b/src/app/[locale]/(main)/[...slug]/not-found.tsx index c7cf7920..e0f69e07 100644 --- a/src/app/[locale]/(main)/[...slug]/not-found.tsx +++ b/src/app/[locale]/(main)/[...slug]/not-found.tsx @@ -1,5 +1,5 @@ -import { Shell } from "~/islands/common/shells/shell"; -import { ErrorCard } from "~/islands/error-card"; +import { ErrorCard } from "~/islands/cards/error-card"; +import { Shell } from "~/islands/shells/shell"; export default function PageNotFound() { return ( diff --git a/src/app/[locale]/(main)/[...slug]/page.tsx b/src/app/[locale]/(main)/[...slug]/page.tsx index 97b49b3f..c4658d39 100644 --- a/src/app/[locale]/(main)/[...slug]/page.tsx +++ b/src/app/[locale]/(main)/[...slug]/page.tsx @@ -5,16 +5,16 @@ import "~/styles/mdx.css"; import { type Metadata } from "next"; import { siteConfig } from "~/app"; -import { MdxPager } from "~/islands/common/pager/mdx-pager"; -import { Shell } from "~/islands/common/shells/shell"; +import { absoluteUrl } from "~/utils/server/utils"; import { Mdx } from "~/islands/modules/markdown/mdx-components"; import { PageHeader, PageHeaderDescription, PageHeaderHeading } from "~/islands/page-header"; +import { MdxPager } from "~/islands/pagers/mdx-pager"; import { Separator } from "~/islands/primitives/separator"; -import { absoluteUrl } from "~/utils/server/utils"; +import { Shell } from "~/islands/shells/shell"; interface PageProps { params: { diff --git a/src/app/[locale]/(main)/about/page.tsx b/src/app/[locale]/(main)/about/page.tsx index 924bc944..e6524fc6 100644 --- a/src/app/[locale]/(main)/about/page.tsx +++ b/src/app/[locale]/(main)/about/page.tsx @@ -2,9 +2,9 @@ import { REPOSITORY_URL } from "~/app"; import { Balancer } from "react-wrap-balancer"; import { cnBase } from "tailwind-variants"; -import { getScopedI18n } from "~/data/i18n/server"; -import { typography } from "~/utils/server/text"; import type { GenerateMetadata } from "~/utils/types/metadata"; +import { typography } from "~/utils/server/text"; +import { getScopedI18n } from "~/data/i18n/server"; export const generateMetadata: GenerateMetadata = async () => { const t = await getScopedI18n("pages.about"); diff --git a/src/app/[locale]/(main)/blog/[...slug]/not-found.tsx b/src/app/[locale]/(main)/blog/[...slug]/not-found.tsx index 3175e87d..52e1c0cd 100644 --- a/src/app/[locale]/(main)/blog/[...slug]/not-found.tsx +++ b/src/app/[locale]/(main)/blog/[...slug]/not-found.tsx @@ -1,5 +1,5 @@ -import { Shell } from "~/islands/common/shells/shell"; -import { ErrorCard } from "~/islands/error-card"; +import { ErrorCard } from "~/islands/cards/error-card"; +import { Shell } from "~/islands/shells/shell"; export default function BlogNotFound() { return ( diff --git a/src/app/[locale]/(main)/blog/[...slug]/page.tsx b/src/app/[locale]/(main)/blog/[...slug]/page.tsx index 4635ea1f..e256070d 100644 --- a/src/app/[locale]/(main)/blog/[...slug]/page.tsx +++ b/src/app/[locale]/(main)/blog/[...slug]/page.tsx @@ -7,14 +7,14 @@ import "~/styles/mdx.css"; import { type Metadata } from "next"; import Image from "next/image"; import Link from "next/link"; -import { env } from "~/env.mjs"; -import { MdxPager } from "~/islands/common/pager/mdx-pager"; -import { Shell } from "~/islands/common/shells/shell"; +import { absoluteUrl, cn, formatDate } from "~/utils/server/utils"; +import { Icons } from "~/islands/icons"; +import { MdxPager } from "~/islands/pagers/mdx-pager"; import { buttonVariants } from "~/islands/primitives/button"; -import { Icons } from "~/islands/primitives/icons"; import { Separator } from "~/islands/primitives/separator"; -import { absoluteUrl, cn, formatDate } from "~/utils/server/utils"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; interface PostPageProps { params: { diff --git a/src/app/[locale]/(main)/blog/page.tsx b/src/app/[locale]/(main)/blog/page.tsx index a285830b..ffc5c187 100644 --- a/src/app/[locale]/(main)/blog/page.tsx +++ b/src/app/[locale]/(main)/blog/page.tsx @@ -1,19 +1,19 @@ import { type Metadata } from "next"; import Image from "next/image"; import Link from "next/link"; -import { env } from "~/env.mjs"; import dayjs from "dayjs"; -import { Shell } from "~/islands/common/shells/shell"; +import { formatDate } from "~/utils/server/utils"; +import { Icons } from "~/islands/icons"; import { PageHeader, PageHeaderDescription, PageHeaderHeading } from "~/islands/page-header"; import { AspectRatio } from "~/islands/primitives/aspect-ratio"; -import { Icons } from "~/islands/primitives/icons"; import { Separator } from "~/islands/primitives/separator"; -import { formatDate } from "~/utils/server/utils"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), diff --git a/src/app/[locale]/(main)/build-a-board/page.tsx b/src/app/[locale]/(main)/build-a-board/page.tsx index eff65fee..2080ef6d 100644 --- a/src/app/[locale]/(main)/build-a-board/page.tsx +++ b/src/app/[locale]/(main)/build-a-board/page.tsx @@ -1,20 +1,20 @@ import { type Metadata } from "next"; import { cookies } from "next/headers"; import Link from "next/link"; -import { env } from "~/env.mjs"; +import { productCategories } from "~/utils/appts/products"; +import { getCartItemsAction } from "~/utils/server/actions/cart"; +import { getProductsAction } from "~/utils/server/actions/product"; +import { cn } from "~/utils/server/utils"; import { BoardBuilder } from "~/islands/board-builder"; -import { Shell } from "~/islands/common/shells/shell"; +import { Icons } from "~/islands/icons"; import { PageHeader, PageHeaderDescription, PageHeaderHeading } from "~/islands/page-header"; -import { Icons } from "~/islands/primitives/icons"; -import { productCategories } from "~/utils/appts/products"; -import { getCartItemsAction } from "~/utils/server/actions/cart"; -import { getProductsAction } from "~/utils/server/actions/product"; -import { cn } from "~/utils/server/utils"; +import { Shell } from "~/islands/shells/shell"; +import { env } from "~/env.mjs"; export const metadata: Metadata = { metadataBase: new URL(env.NEXT_PUBLIC_APP_URL), @@ -86,7 +86,7 @@ export default async function BuildABoardPage({ )} > {cartItems - ?.map((item) => item.productSubcategory) + ?.map((item) => item.subcategory) ?.includes(subcategory.slug) ? (