From fc941ef5061662a0dc8052641ab010cc45e66c60 Mon Sep 17 00:00:00 2001 From: Nazar Kornienko Date: Thu, 17 Aug 2023 00:49:12 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20feat(app):=20configure=20the=20app?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 109 ++- .eslintrc.cjs | 16 +- .vscode/extensions.json | 31 +- .vscode/settings.json | 17 +- README.md | 108 +-- components.json | 2 +- cspell.json | 7 + drizzle.config.ts | 9 +- knip.json | 13 + next.config.mjs | 31 +- package.json | 4 +- pnpm-lock.yaml | 629 ++++++++++++++++-- src/app.ts | 2 +- src/app/[locale]/features/layout.tsx | 2 + src/app/[locale]/features/todo/todo.tsx | 4 - src/app/[locale]/layout.tsx | 2 + src/data/db/db.ts | 18 - src/data/db/index.ts | 23 + src/data/db/schema.ts | 160 +++-- src/env.mjs | 79 +++ src/islands/common/providers.tsx | 1 + src/islands/sections/hero.tsx | 2 - src/islands/wrappers/icons.tsx | 190 ++++++ .../wrappers/{typed-link.tsx => tlinks.tsx} | 0 src/schema/zod/auth.ts | 49 ++ src/schema/zod/cart.ts | 38 ++ src/schema/zod/email.ts | 20 + src/schema/zod/og.ts | 8 + src/schema/zod/product.ts | 69 ++ src/schema/zod/store.ts | 23 + src/schema/zod/stripe.ts | 16 + src/utils/appts/env.mjs | 41 -- .../appts/islands/unified-bleverse-footer.tsx | 8 +- .../appts/islands/unified-bleverse-header.tsx | 4 +- src/utils/appts/socials.ts | 2 +- .../{types/appts.d.ts => appts/types.ts} | 2 +- .../types/{metadata.d.ts => metadata.ts} | 2 + src/utils/types/page-params.d.ts | 1 - src/utils/types/page-params.ts | 1 + src/utils/types/store-main.ts | 97 +++ .../types/{translate.d.ts => translate.ts} | 0 src/utils/types/with-children.d.ts | 1 - src/utils/types/with-children.ts | 1 + tsconfig.json | 22 +- 44 files changed, 1528 insertions(+), 336 deletions(-) create mode 100644 knip.json delete mode 100644 src/data/db/db.ts create mode 100644 src/data/db/index.ts create mode 100644 src/env.mjs create mode 100644 src/islands/wrappers/icons.tsx rename src/islands/wrappers/{typed-link.tsx => tlinks.tsx} (100%) create mode 100644 src/schema/zod/auth.ts create mode 100644 src/schema/zod/cart.ts create mode 100644 src/schema/zod/email.ts create mode 100644 src/schema/zod/og.ts create mode 100644 src/schema/zod/product.ts create mode 100644 src/schema/zod/store.ts create mode 100644 src/schema/zod/stripe.ts delete mode 100644 src/utils/appts/env.mjs rename src/utils/{types/appts.d.ts => appts/types.ts} (93%) rename src/utils/types/{metadata.d.ts => metadata.ts} (73%) delete mode 100644 src/utils/types/page-params.d.ts create mode 100644 src/utils/types/page-params.ts create mode 100644 src/utils/types/store-main.ts rename src/utils/types/{translate.d.ts => translate.ts} (100%) delete mode 100644 src/utils/types/with-children.d.ts create mode 100644 src/utils/types/with-children.ts diff --git a/.env.example b/.env.example index 18c011f..98a9f48 100644 --- a/.env.example +++ b/.env.example @@ -1,49 +1,92 @@ -# !! PLANETSCALE CREDENTIALS (https://planetscale.com) +# ?? ======================================= +# !! | ENVIRONMENT VARIABLES CONFIGURATION | +# ?? ======================================= + +# Since the ".env" file is gitignored, you can use the ".env.example" file to +# build a new ".env" file when you clone the repo. Keep this file up-to-date +# when you add new variables to `.env`. + +# This file will be committed to version control, so make sure not to have any +# secrets in it. If you are cloning this repo, create a copy of this file named +# ".env" and populate it with your secrets. + +# When adding additional environment variables, the schema in "/src/env.mjs" +# should be updated accordingly. + +# ?? ======================================================================= + +# !! DRIZZLE DB: PLANETSCALE CREDENTIALS (https://planetscale.com) +# Get the Database data from the "prisma" dropdown selector in PlanetScale. # Connect -> Connect with `@planetscale/database`: -DATABASE_HOST="" # ?? aws.connect.psdb.cloud -DATABASE_USERNAME="" # ?? ******************** -DATABASE_PASSWORD="" # ?? pscale_pw_******************************************* +DATABASE_HOST="" # ?? [1] aws.connect.psdb.cloud +DATABASE_USERNAME="" # ?? [2] **** +DATABASE_PASSWORD="" # ?? [3] pscale_pw_**** +NEXT_SECRET_URL_ORM_DRIZZLE="" # ?? [4] Change the query params at the end of the URL to "?ssl={"rejectUnauthorized":true}" + +# !! PRISMA DB: PLANETSCALE CREDENTIALS (https://planetscale.com) +# https://www.prisma.io/docs/reference/database-reference/connection-urls#env +# Get the Database URL from the "prisma" dropdown selector in PlanetScale. +# End of the URL must be: ?sslaccept=strict # Connect -> Connect with `Prisma`: -NEXT_SECRET_URL_PSCALE="" +NEXT_SECRET_URL_ORM_PRISMA="" # ?? [5] End of the URL must be: ?sslaccept=strict # !! CLERK CREDENTIALS (https://clerk.com) +# pk_test, and sk_test are development keys # These values should be replaced with production keys on the deployed site -NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="" # ?? pk_test_******************************** -CLERK_SECRET_KEY="" # ?? sk_test_******************************** +# For production, use pk_live, and sk_live keys (a domain is required) +NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="" # ?? [6] pk_test_**** +CLERK_SECRET_KEY="" # ?? [7] sk_test_**** # !! AUTH.JS CREDENTIALS (https://authjs.dev) -NEXT_PUBLIC_URL_AUTHJS="http://localhost:3000" # ?? http://localhost:3000 when in development +# Use the production URL when deploying to production, e.g. https://example.com +NEXT_PUBLIC_URL_AUTHJS="" # ?? [8] For dev env: http://localhost:3000 +# https://next-auth.js.org/configuration/options#secret +# You can generate a new secret on the command line with: openssl rand -base64 32 +NEXT_SECRET_KEY_AUTHJS="" # ?? [9] **** # !! FILE UPLOADING (https://uploadthing.com) -UPLOADTHING_SECRET="" # ?? sk_live_******************************** -UPLOADTHING_APP_ID="" # ?? ********** +UPLOADTHING_SECRET="" # ?? [10] sk_live_**** +UPLOADTHING_APP_ID="" # ?? [11] **** # !! 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 -NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="" # ?? pk_test_******************************** -STRIPE_SECRET_KEY="" # ?? sk_test_******************************** +NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="" # ?? [12] pk_test_**** +STRIPE_API_KEY="" # ?? [13] sk_test_**** +# Stripe Webhook Secret found at https://dashboard.stripe.com/test/webhooks/create?endpoint_location=local +STRIPE_WEBHOOK_SECRET="" # ?? [14] whsec_**** +# Stripe Product and Price IDs for your created products +# found at https://dashboard.stripe.com/test/products +STRIPE_STD_MONTHLY_PRICE_ID="" # ?? [15] Store Item | price_**** +STRIPE_PRO_MONTHLY_PRICE_ID="" # ?? [16] Subscription | price_**** # !! STRIPE WEBHOOK SECRET (https://stripe.com) # Create a webhook inside the stripe dashboard. Make sure to listen to the `payment_intent.succeeded` event. # The webhook URL should be: https:///api/stripe/webhook -STRIPE_WEBHOOK_SECRET="" # ?? whsec*********************** - -# !! OTHER ENV VARS -POSTMARK_SIGN_IN_TEMPLATE="" # ?? == -POSTMARK_API_TOKEN="" # ?? == -CLOUDFLARE_API="" # ?? == -CLOUDFLARE_USER="" # ?? == -NEXTAUTH_SECRET="" # ?? == -SMTP_FROM="" # ?? == -AUTH_SECRET="" # ?? == -NEXTAUTH_SECRET="" # ?? == -NEXTAUTH_URL="http://localhost:3000" # ?? == -DISCORD_CLIENT_ID="" # ?? == -DISCORD_CLIENT_SECRET="" # ?? == -GITHUB_ID="" # ?? == -GITHUB_SECRET="" # ?? == -GITHUB_CLIENT_ID="" # ?? == -GITHUB_CLIENT_SECRET="" # ?? == -GITHUB_ACCESS_TOKEN="" # ?? == -GOOGLE_CLIENT_ID="" # ?? == -GOOGLE_CLIENT_SECRET="" # ?? == +STRIPE_WEBHOOK_SECRET="" # ?? [17] whsec_**** + +# !! RESEND (REACT EMAIL BUILDER) +# Resend API Key found at https://resend.com/api-keys +RESEND_API_KEY="" # ?? [18] re_**** +# We need to register a domain with Resend to send emails from +# Register a domain at https://resend.com/domains +# Or we can use this email provided by resend for only testing: "onboarding@resend.dev" +# It is not recommended tho +EMAIL_FROM_ADDRESS="" # ?? [19] mail@example.com + +# !! UNSORTED ENV VARS +POSTMARK_SIGN_IN_TEMPLATE="" # ?? [20] +POSTMARK_API_TOKEN="" # ?? [21] +CLOUDFLARE_API="" # ?? [22] +CLOUDFLARE_USER="" # ?? [23] +SMTP_FROM="" # ?? [24] +NEXT_SECRET_KEY_AUTHJS="" # ?? [25] +DISCORD_CLIENT_ID="" # ?? [26] +DISCORD_CLIENT_SECRET="" # ?? [27] +GITHUB_ID="" # ?? [28] +GITHUB_SECRET="" # ?? [29] +GITHUB_CLIENT_ID="" # ?? [30] +GITHUB_CLIENT_SECRET="" # ?? [31] +GITHUB_ACCESS_TOKEN="" # ?? [32] +GOOGLE_CLIENT_ID="" # ?? [33] +GOOGLE_CLIENT_SECRET="" # ?? [34] diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 18cc7d6..d135ddd 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,4 +1,5 @@ // @ts-check + const { defineConfig } = require("eslint-define-config"); module.exports = defineConfig({ @@ -8,9 +9,9 @@ module.exports = defineConfig({ tailwindcss: { callees: ["cn"], config: "tailwind.config.ts" } }, overrides: [ - //! ======================================== - //! | TypeScript EsLint Configuration File | - //! ======================================== + //! ========================================= + //! | TypeScript EsLint Configuration Rules | + //! ========================================= { files: ["*.ts", "*.tsx", "*.mts", "*.cts"], parser: "@typescript-eslint/parser", @@ -30,6 +31,9 @@ module.exports = defineConfig({ "@next/next/no-html-link-for-pages": "off", "@tanstack/query/exhaustive-deps": "error", "@tanstack/query/prefer-query-object-syntax": "error", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-redundant-type-constituents": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-misused-promises": "off", "@typescript-eslint/no-unnecessary-type-assertion": "off", @@ -43,9 +47,9 @@ module.exports = defineConfig({ "react/no-unescaped-entities": "off" } }, - //! ======================================== - //! | JavaScript EsLint Configuration File | - //! ======================================== + //! ========================================= + //! | JavaScript EsLint Configuration Rules | + //! ========================================= { files: ["*.js", "*.jsx", "*.mjs", "*.cjs"], extends: ["next/core-web-vitals"] diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 9714e3e..b2b6153 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,16 +1,17 @@ { - "recommendations": [ - "aaron-bond.better-comments", - "ambar.bundle-size", - "bradlc.vscode-tailwindcss", - "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode", - "lokalise.i18n-ally", - "mattpocock.ts-error-translator", - "mikekscholz.pop-icon-theme", - "neptunedesign.vs-sequential-number", - "streetsidesoftware.code-spell-checker", - "yoavbls.pretty-ts-errors", - "yzhang.markdown-all-in-one" - ] -} \ No newline at end of file + "recommendations": [ + "aaron-bond.better-comments", + "ambar.bundle-size", + "bradlc.vscode-tailwindcss", + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "lokalise.i18n-ally", + "mattpocock.ts-error-translator", + "mikekscholz.pop-icon-theme", + "neptunedesign.vs-sequential-number", + "streetsidesoftware.code-spell-checker", + "yoavbls.pretty-ts-errors", + "yzhang.markdown-all-in-one", + "davidanson.vscode-markdownlint" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 56ff3e1..01cb380 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,10 +1,15 @@ { "typescript.tsdk": "node_modules\\typescript\\lib", - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true, - "editor.formatOnType": true, - "files.associations": { - "*.tson": "typescript", - "*.txt": "plaintext" + "typescript.enablePromptUseWorkspaceTsdk": true, + "tailwindCSS.includeLanguages": { "plaintext": "html" }, + "tailwindCSS.experimental.classRegex": [ + ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], + ["cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], + ["tw=\"([^\"]*)\""] + ], + "markdownlint.config": { + "MD033": { + "allowed_elements": ["img", "p", "a"] + } } } diff --git a/README.md b/README.md index c3c6f8f..98bf098 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Bleverse Relivator: Next.js Starter & Website Builder +# Bleverse Relivator: The Powerful Starter for Next.js 13 -**Crafting the world's most powerful Next.js starter.** +**Crafting the world's most iconic Next.js starter.** ![GitHub repo size](https://img.shields.io/github/repo-size/blefnk/relivator?style=for-the-badge) ![GitHub language count](https://img.shields.io/github/languages/count/blefnk/relivator?style=for-the-badge) @@ -8,19 +8,24 @@ ## 🚀 About the Project -**The Bleverse Framework for the Next.js** +**The Bleverse Framework for the Next.js!** Step into the future with the ultimate Next.js starter. Everything has been set up for you. It's more than just code; it's a journey. You're not on this journey alone. Move faster than ever. It can be proudly called a website builder, although it certainly isn't, at least for now 😏. We've laid the groundwork; now, grab it, dive in and accelerate your development. This is our experimental space where we tinkered with the new Next.js app directory. So, while it's all fun and exploration, there might be a few quirks here and there. Stumbled upon something odd or just feeling generous? DM us on Twitter, sorry, on X [@bleverse_com](https://x.com/bleverse_com) or raise an issue right here. If you've got some coding magic up your sleeve, contributions are always celebrated! 🎉 -## 🔥 TO-DO Features +> **Warning** +> This project is still in development and is not ready for production use. +> It uses new technologies (server actions, drizzle ORM) which are subject to change and may break your application. +> The README.md is not yet finished and may or may not represent features that have not been implemented yet. +> Please check back soon for more features, which are currently in production. -**Copy. Paste. Ship.** +## 🔥 TO-DO Features This roadmap outlines the key features and improvements to be implemented in this web project. -- 🌐 Comprehensive offerings of the Next.js app directory. +- 🌐 Comprehensive offerings of the Next.js App Router with the RSCs and everything all new. +- 🅰️ Ultimate type-safety using TypeScript, Zod, Validabot, typedRoutes, etc. - 📊 Dive deep into SQL with TypeScript ORM via [**Drizzle ORM**](https://github.com/drizzle-team/drizzle-orm). - 🔒 Keep it tight with Authentication using [**Auth.js**](https://authjs.dev) and [**Lucia**](https://github.com/pilcrowOnPaper/lucia). - 🌍 Centralized Database magic at [**PlanetScale**](https://planetscale.com). @@ -28,10 +33,14 @@ This roadmap outlines the key features and improvements to be implemented in thi - 📝 Share insights with Blogs powered by **MDX**. - 💲 Seamless Subscriptions via **Stripe** & [**LemonSqueezy**](https://www.lemonsqueezy.com/). - 🎨 Styled to impress with **Tailwind CSS**. -- 📡 Data-fetching streamlined with RSCs & [**tRPC**](https://github.com/trpc/trpc). -- 📧 Email verification and a lot more features to enhance your application! +- 📡 Data-fetching streamlined with [**tRPC**](https://github.com/trpc/trpc). +- 📧 Email verification and a lot more features to enhance the application. + +## 🌍 i18n: Internationalization -## Configure Your App +At Bleverse, the approach to multilingualism is a separate holy grail. We love talking about this topic. In the future, we'll be writing a lot of interesting things about internationalization with Next.js 13 App Router. Stay tuned for updates! + +## Configure The App The `app.ts` file contains essential configuration used to modify the contents and settings of the website. @@ -39,63 +48,49 @@ The `app.ts` file contains essential configuration used to modify the contents a - Customize various settings, such as disabling theme toggle. - Manage general site-wide information. - - ## 🏃‍♂️ Getting Started Locally -Get all dependencies sorted: +Clone the repository -```sh -pnpm install +```bash +git clone https://github.com/blefnk/relivator.git ``` -Get your environment variables in check: +Get your environment variables in check and update the variables. ```sh cp .env.example .env ``` -Let the server magic begin: +Get all dependencies sorted. ```sh -pnpm dev +pnpm install ``` -### 📚 Setting Up the Database - -#### On Your Machine - -Hop into MySQL: +Bring your database to life with pushing the database schema. ```bash -mysql -u root +pnpm db:push ``` -Bring your database to life: +Let the server magic begin! -```bash -CREATE DATABASE template; +```sh +pnpm dev ``` -Push your DB schema: +Finally start the Stripe webhook listener for Stripe to work. ```bash -npx drizzle-kit mysql:push +pnpm stripe:listen ``` -#### 🌐 PlanetScale +## How do I deploy this? -Thinking of ditching local? Feel free to fully commit to PlanetScale as your primary database! +Follow the deployment guides for [Vercel](https://create.t3.gg/en/deployment/vercel), [Netlify](https://create.t3.gg/en/deployment/netlify) and [Docker](https://create.t3.gg/en/deployment/docker) for more information. -### 🔐 Authentication +## 🔐 Authentication Setting up GitHub OAuth is a breeze: @@ -103,7 +98,7 @@ Setting up GitHub OAuth is a breeze: 2. Hit "New OAuth App". 3. Register your callback URL: `http://localhost:3000/api/oauth/github` -### 💌 Email +## 💌 Email (...soon) Want a sneak peek of your email in dev mode without sending it out? Run: @@ -113,27 +108,36 @@ npx mailing For the real deal in production, you'll be working with [Resend](resend.com). Grab your API key and verify your domain there. -### 💲 Payments +## 💲 Payments (...soon) -LemonSqueezy powers payments, with subscription syncs via webhooks (`lemonsqueezy/route.ts`). Fancy a local test? Expose the webhook with: +Stripe and LemonSqueezy powers payments, with subscription syncs via webhooks (`stripe/route.ts`) and (`lemonsqueezy/route.ts`). Fancy a local test? Expose the webhook with: ```bash npx ngrok http 3000 ``` -Then, register the webhook URL, like `https://abc.eu.ngrok.io/api/lemonsqueezy`, in [LemonSqueezy's webhook settings](https://app.lemonsqueezy.com/settings/webhooks). +Then, register the webhook for Stripe (see `.env.example`) and for lemonsqueezy URL, like `https://abc.eu.ngrok.io/api/lemonsqueezy`, in [LemonSqueezy's webhook settings](https://app.lemonsqueezy.com/settings/webhooks). -### 🖼️ Asset Generation +## 🅰️ Notes -For a fresh splash of branding, swap `logo-mark.svg` with your logo. Then, run: +Because the project is still in active development, sometimes we need to deviate from our own principles. This means that, yeah, there are times when we disable certain TypeScript features, use `any`, `// @ts-expect-error`, and so on. That's the way we love to live on the cutting edge, embracing the newest technologies in web development. So if you come across something like `// !?!`, it indicates that this issue will be resolved in future versions of Relivator. Thank you for your understanding. -```bash -npm run asset-generator -``` +## ⚠️ Possible Issues + +A quick snapshot of the roadblocks or nuances as of now: + +1. There is a possibility that `.d.ts` files do not work correctly in VS Code. They have been temporarily renamed to `.ts`. +2. Occasionally, MySQL throws a tantrum about excessive connections. A quick restart of your Next.js app should soothe it. +3. Pricing plans are playing hard-to-get with the database sync. +4. The RBAC feature is still on probation; thorough testing pending. +5. Jury's out on tRPC's performance in RSCs. +6. An [issue with MJML](https://github.com/vercel/next.js/issues/50042) compelled us to house the email functions within the /pages directory. ## 📫 Contributing to Bleverse Relivator -To contribute to Bleverse Relivator, follow these steps: +Contributions are welcome! Please open an issue if you have any questions or suggestions. Your contributions will be acknowledged. See the [contributing guide](./CONTRIBUTING.md) for more information. + +**To contribute to Bleverse Relivator, follow these steps:** 1. Fork this repository. 2. Create a branch: `git checkout -b `. @@ -145,11 +149,11 @@ Or, see the GitHub docs on [how to create a pull request](https://help.github.co ## 🙌 Kudos to Collaborators -We thank everyone for their contributions to this repository. Please visit [the release page](/releases) to see the full list of contributors and their authors. +We thank everyone for their contributions to this repository. Please visit [the releases](/releases) page to see the full list of contributors and their authors. -## License +## 📄 License -Released under the [MIT license](https://github.com/amosbastian/template/blob/main/LICENSE.md). +Licensed under the MIT License. Check the [LICENSE](./LICENSE) file for details. --- diff --git a/components.json b/components.json index bd9215e..c4796d9 100644 --- a/components.json +++ b/components.json @@ -5,7 +5,7 @@ "tsx": true, "tailwind": { "config": "tailwind.config.ts", - "css": "src/styles/globals.css", + "css": "./src/styles/globals.css", "baseColor": "slate", "cssVariables": true }, diff --git a/cspell.json b/cspell.json index 6ba4993..559ca20 100644 --- a/cspell.json +++ b/cspell.json @@ -17,6 +17,8 @@ "words": [ "appts", "AUTHJS", + "blefnk", + "blefonix", "bleverse", "callees", "clsx", @@ -25,19 +27,24 @@ "Gtkq", "hookform", "Kbwps", + "knip", + "lemonsqueezy", "lucide", "mfpiano", "mfpianotutorial", + "nextjs", "planetscale", "PSCALE", "relivator", "rlig", + "roadmap", "shadcn", "squeezy", "tailwindcss", "tanstack", "tson", "typecheck", + "UPLOADTHING", "valibot", "VALIDABOT", "vercel", diff --git a/drizzle.config.ts b/drizzle.config.ts index 7f5a121..382a51e 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -1,9 +1,10 @@ import type { Config } from "drizzle-kit"; +import * as dotenv from "dotenv"; -import "dotenv/config"; +dotenv.config(); -if (!process.env.NEXT_SECRET_URL_PSCALE) { - throw new Error("NEXT_SECRET_URL_PSCALE is missing"); +if (!process.env.NEXT_SECRET_URL_ORM_DRIZZLE) { + throw new Error("NEXT_SECRET_URL_ORM_DRIZZLE is missing"); } export default { @@ -11,6 +12,6 @@ export default { out: "./src/data/db/dm", driver: "mysql2", dbCredentials: { - connectionString: process.env.NEXT_SECRET_URL_PSCALE + connectionString: process.env.NEXT_SECRET_URL_ORM_DRIZZLE ?? "" } } satisfies Config; diff --git a/knip.json b/knip.json new file mode 100644 index 0000000..d91c3ec --- /dev/null +++ b/knip.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://unpkg.com/knip@2/schema.json", + "project": ["src/**/*.ts"], + "entry": [ + "next.config.{js,ts,cjs,mjs}", + "{app,pages}/**/*.{js,jsx,ts,tsx}", + "src/{app,pages}/**/*.{js,jsx,ts,tsx}" + ], + "paths": { + "~/*": ["./src/*"], + "@/*": ["./public/*"] + } +} diff --git a/next.config.mjs b/next.config.mjs index 2ee30c4..a49f335 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,25 +1,24 @@ -await import("./src/utils/appts/env.mjs"); +// ============================== +// ! Next.js Configuration File ! +// =========================================================================== +// ?? @see https://nextjs.org/docs/app/building-your-application/configuring | +// =========================================================================== + +await import("./src/env.mjs"); /** @type {import('next').NextConfig} */ const nextConfig = { swcMinify: true, - typescript: { - // ?? Dangerously allow builds to successfully complete even if your project has type errors. - // !! Turn Back on When Things are Stable !! - ignoreBuildErrors: true - }, experimental: { - serverComponentsExternalPackages: ["mysql2"], - serverActions: true - // ========================================== - // ?? https://nextjs.org/docs/app/building-your-application/configuring/typescript#statically-typed-links - // typedRoutes: true + serverActions: true, + serverComponentsExternalPackages: ["mysql2"] }, - reactStrictMode: true - // webpack: (config) => { - // config.resolve.fallback = { fs: false }; - // return config; - // } + reactStrictMode: true, + images: { domains: ["uploadthing.com"] } + // ?? Dangerously allow builds to successfully complete + // ?? even if your project has type or eslint errors. + // typescript: { ignoreBuildErrors: true }, + // eslint: { ignoreDuringBuilds: true }, }; export default nextConfig; diff --git a/package.json b/package.json index 4a3d472..0d78262 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ "postgres": "^3.3.5", "react": "18.3.0-canary-0fb5b61ac-20230814", "react-dom": "18.3.0-canary-0fb5b61ac-20230814", + "react-dropzone": "^14.2.3", "react-hook-form": "^7.45.4", "react-icons": "^4.10.1", "react-wrap-balancer": "^1.1.0", @@ -98,6 +99,7 @@ "eslint-config-next": "13.4.16", "eslint-config-prettier": "^9.0.0", "eslint-define-config": "^1.23.0", + "knip": "^2.19.4", "lint-staged": "^14.0.0", "postcss": "8.4.28", "prettier": "^3.0.2", @@ -105,6 +107,6 @@ "prettier-plugin-tailwindcss": "^0.5.3", "tailwind-merge": "^1.14.0", "tailwindcss": "3.3.3", - "typescript": "5.1.6" + "typescript": "5.2.0-beta" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e940fe5..4b88216 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - dependencies: '@hookform/resolvers': specifier: ^3.2.0 @@ -98,6 +94,9 @@ dependencies: react-dom: specifier: 18.3.0-canary-0fb5b61ac-20230814 version: 18.3.0-canary-0fb5b61ac-20230814(react@18.3.0-canary-0fb5b61ac-20230814) + react-dropzone: + specifier: ^14.2.3 + version: 14.2.3(react@18.3.0-canary-0fb5b61ac-20230814) react-hook-form: specifier: ^7.45.4 version: 7.45.4(react@18.3.0-canary-0fb5b61ac-20230814) @@ -138,7 +137,7 @@ devDependencies: version: 4.1.0(prettier@3.0.2) '@t3-oss/env-nextjs': specifier: ^0.6.0 - version: 0.6.0(typescript@5.1.6)(zod@3.22.1) + version: 0.6.0(typescript@5.2.0-beta)(zod@3.22.1) '@tanstack/eslint-plugin-query': specifier: ^4.32.5 version: 4.32.5 @@ -153,10 +152,10 @@ devDependencies: version: 18.2.7 '@typescript-eslint/eslint-plugin': specifier: ^6.4.0 - version: 6.4.0(@typescript-eslint/parser@6.4.0)(eslint@8.47.0)(typescript@5.1.6) + version: 6.4.0(@typescript-eslint/parser@6.4.0)(eslint@8.47.0)(typescript@5.2.0-beta) '@typescript-eslint/parser': specifier: ^6.4.0 - version: 6.4.0(eslint@8.47.0)(typescript@5.1.6) + version: 6.4.0(eslint@8.47.0)(typescript@5.2.0-beta) autoprefixer: specifier: 10.4.15 version: 10.4.15(postcss@8.4.28) @@ -171,13 +170,16 @@ devDependencies: version: 8.47.0 eslint-config-next: specifier: 13.4.16 - version: 13.4.16(eslint@8.47.0)(typescript@5.1.6) + version: 13.4.16(eslint@8.47.0)(typescript@5.2.0-beta) eslint-config-prettier: specifier: ^9.0.0 version: 9.0.0(eslint@8.47.0) eslint-define-config: specifier: ^1.23.0 version: 1.23.0 + knip: + specifier: ^2.19.4 + version: 2.19.4 lint-staged: specifier: ^14.0.0 version: 14.0.0 @@ -200,8 +202,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.0-beta + version: 5.2.0-beta packages: @@ -491,7 +493,7 @@ packages: lodash.merge: 4.6.2 lodash.uniq: 4.5.0 resolve-from: 5.0.0 - ts-node: 10.9.1(@types/node@20.5.0)(typescript@5.1.6) + ts-node: 10.9.1(@types/node@20.5.0)(typescript@5.2.0-beta) typescript: 5.1.6 transitivePeerDependencies: - '@swc/core' @@ -860,6 +862,31 @@ packages: resolution: {integrity: sha512-ps5qF0tMxWRVu+V5gvCRrQNqlY92aTnIKdq27gm9LZMSdaKYZt6AVvSK1dlUMzs6Rt0Jm80b+eWct6xShBKhIw==} dev: true + /@ericcornelissen/bash-parser@0.5.2: + resolution: {integrity: sha512-4pIMTa1nEFfMXitv7oaNEWOdM+zpOZavesa5GaiWTgda6Zk32CFGxjUp/iIaN0PwgUW1yTq/fztSjbpE8SLGZQ==} + engines: {node: '>=4'} + dependencies: + array-last: 1.3.0 + babylon: 6.18.0 + compose-function: 3.0.3 + deep-freeze: 0.0.1 + filter-iterator: 0.0.1 + filter-obj: 1.1.0 + has-own-property: 0.1.0 + identity-function: 1.0.0 + is-iterable: 1.1.1 + iterable-lookahead: 1.0.0 + lodash.curry: 4.1.1 + magic-string: 0.16.0 + map-obj: 2.0.0 + object-pairs: 0.1.0 + object-values: 1.0.0 + reverse-arguments: 1.0.0 + shell-quote-word: 1.0.1 + to-pascal-case: 1.0.0 + unescape-js: 1.1.4 + dev: true + /@esbuild-kit/core-utils@3.1.0: resolution: {integrity: sha512-Uuk8RpCg/7fdHSceR1M6XbSZFSuMrxcePFuGgyvsBn+u339dk5OeL4jv2EojwTN2st/unJGsVm4qHWjWNmJ/tw==} dependencies: @@ -1383,6 +1410,18 @@ packages: - supports-color dev: true + /@isaacs/cliui@8.0.2: + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + dependencies: + string-width: 5.1.2 + string-width-cjs: /string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: /strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: /wrap-ansi@7.0.0 + dev: true + /@jridgewell/gen-mapping@0.3.3: resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} engines: {node: '>=6.0.0'} @@ -1523,6 +1562,28 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 + /@npmcli/map-workspaces@3.0.4: + resolution: {integrity: sha512-Z0TbvXkRbacjFFLpVpV0e2mheCh+WzQpcqL+4xp49uNJOxOnIAPZyXtUxZ5Qn3QBTGKA11Exjd9a5411rBrhDg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + '@npmcli/name-from-folder': 2.0.0 + glob: 10.3.3 + minimatch: 9.0.3 + read-package-json-fast: 3.0.2 + dev: true + + /@npmcli/name-from-folder@2.0.0: + resolution: {integrity: sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + + /@pkgjs/parseargs@0.11.0: + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + requiresBuild: true + dev: true + optional: true + /@pkgr/utils@2.4.2: resolution: {integrity: sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -2585,30 +2646,40 @@ packages: resolution: {integrity: sha512-0xd7qez0AQ+MbHatZTlI1gu5vkG8r7MYRUJAHPAHJBmGLs16zpkrpAVLvjQKQOqaXPDUBwOiJzNc00znHSCVBw==} dev: true + /@snyk/github-codeowners@1.1.0: + resolution: {integrity: sha512-lGFf08pbkEac0NYgVf4hdANpAgApRjNByLXB+WBip3qj1iendOIyAwP2GKkKbQMNVy2r1xxDf0ssfWscoiC+Vw==} + engines: {node: '>=8.10'} + hasBin: true + dependencies: + commander: 4.1.1 + ignore: 5.2.4 + p-map: 4.0.0 + dev: true + /@swc/helpers@0.5.1: resolution: {integrity: sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==} dependencies: tslib: 2.6.1 dev: false - /@t3-oss/env-core@0.6.0(typescript@5.1.6)(zod@3.22.1): + /@t3-oss/env-core@0.6.0(typescript@5.2.0-beta)(zod@3.22.1): resolution: {integrity: sha512-3FkPAba069WRZVVab/sB1m3eSGn/rZeypx5k+sWEu1d+k0OQdRDnvFS+7MtxYgqVrwaRk3b7yVnX2dgSPVmWPQ==} peerDependencies: typescript: '>=4.7.2' zod: ^3.0.0 dependencies: - typescript: 5.1.6 + typescript: 5.2.0-beta zod: 3.22.1 dev: true - /@t3-oss/env-nextjs@0.6.0(typescript@5.1.6)(zod@3.22.1): + /@t3-oss/env-nextjs@0.6.0(typescript@5.2.0-beta)(zod@3.22.1): resolution: {integrity: sha512-SpzcGNIbUYcQw4zPPFeRJqCC1560zL7QmB0puIqOnuCsmykPkqHPX+n9CNZLXVQerboHzfvb7Kd+jAdouk72Vw==} peerDependencies: typescript: '>=4.7.2' zod: ^3.0.0 dependencies: - '@t3-oss/env-core': 0.6.0(typescript@5.1.6)(zod@3.22.1) - typescript: 5.1.6 + '@t3-oss/env-core': 0.6.0(typescript@5.2.0-beta)(zod@3.22.1) + typescript: 5.2.0-beta zod: 3.22.1 dev: true @@ -2695,7 +2766,7 @@ packages: resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} dev: true - /@typescript-eslint/eslint-plugin@6.4.0(@typescript-eslint/parser@6.4.0)(eslint@8.47.0)(typescript@5.1.6): + /@typescript-eslint/eslint-plugin@6.4.0(@typescript-eslint/parser@6.4.0)(eslint@8.47.0)(typescript@5.2.0-beta): resolution: {integrity: sha512-62o2Hmc7Gs3p8SLfbXcipjWAa6qk2wZGChXG2JbBtYpwSRmti/9KHLqfbLs9uDigOexG+3PaQ9G2g3201FWLKg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2707,10 +2778,10 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.6.2 - '@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.2.0-beta) '@typescript-eslint/scope-manager': 6.4.0 - '@typescript-eslint/type-utils': 6.4.0(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/utils': 6.4.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/type-utils': 6.4.0(eslint@8.47.0)(typescript@5.2.0-beta) + '@typescript-eslint/utils': 6.4.0(eslint@8.47.0)(typescript@5.2.0-beta) '@typescript-eslint/visitor-keys': 6.4.0 debug: 4.3.4 eslint: 8.47.0 @@ -2718,13 +2789,13 @@ packages: ignore: 5.2.4 natural-compare: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.1(typescript@5.2.0-beta) + typescript: 5.2.0-beta transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.1.6): + /@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.2.0-beta): resolution: {integrity: sha512-I1Ah1irl033uxjxO9Xql7+biL3YD7w9IU8zF+xlzD/YxY6a4b7DYA08PXUUCbm2sEljwJF6ERFy2kTGAGcNilg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2736,11 +2807,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 6.4.0 '@typescript-eslint/types': 6.4.0 - '@typescript-eslint/typescript-estree': 6.4.0(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.4.0(typescript@5.2.0-beta) '@typescript-eslint/visitor-keys': 6.4.0 debug: 4.3.4 eslint: 8.47.0 - typescript: 5.1.6 + typescript: 5.2.0-beta transitivePeerDependencies: - supports-color dev: true @@ -2753,7 +2824,7 @@ packages: '@typescript-eslint/visitor-keys': 6.4.0 dev: true - /@typescript-eslint/type-utils@6.4.0(eslint@8.47.0)(typescript@5.1.6): + /@typescript-eslint/type-utils@6.4.0(eslint@8.47.0)(typescript@5.2.0-beta): resolution: {integrity: sha512-TvqrUFFyGY0cX3WgDHcdl2/mMCWCDv/0thTtx/ODMY1QhEiyFtv/OlLaNIiYLwRpAxAtOLOY9SUf1H3Q3dlwAg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2763,12 +2834,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.4.0(typescript@5.1.6) - '@typescript-eslint/utils': 6.4.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.4.0(typescript@5.2.0-beta) + '@typescript-eslint/utils': 6.4.0(eslint@8.47.0)(typescript@5.2.0-beta) debug: 4.3.4 eslint: 8.47.0 - ts-api-utils: 1.0.1(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.1(typescript@5.2.0-beta) + typescript: 5.2.0-beta transitivePeerDependencies: - supports-color dev: true @@ -2778,7 +2849,7 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.4.0(typescript@5.1.6): + /@typescript-eslint/typescript-estree@6.4.0(typescript@5.2.0-beta): resolution: {integrity: sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2793,13 +2864,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.1(typescript@5.2.0-beta) + typescript: 5.2.0-beta transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@6.4.0(eslint@8.47.0)(typescript@5.1.6): + /@typescript-eslint/utils@6.4.0(eslint@8.47.0)(typescript@5.2.0-beta): resolution: {integrity: sha512-BvvwryBQpECPGo8PwF/y/q+yacg8Hn/2XS+DqL/oRsOPK+RPt29h5Ui5dqOKHDlbXrAeHUTnyG3wZA0KTDxRZw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -2810,7 +2881,7 @@ packages: '@types/semver': 7.5.0 '@typescript-eslint/scope-manager': 6.4.0 '@typescript-eslint/types': 6.4.0 - '@typescript-eslint/typescript-estree': 6.4.0(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.4.0(typescript@5.2.0-beta) eslint: 8.47.0 semver: 7.5.4 transitivePeerDependencies: @@ -2851,6 +2922,14 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + /aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + dev: true + /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -2937,6 +3016,10 @@ packages: dequal: 2.0.3 dev: true + /arity-n@1.0.4: + resolution: {integrity: sha512-fExL2kFDC1Q2DUOx3whE/9KoN66IzkY4b4zUHUBFM1ojEYjZZYDcUW3bek/ufGionX9giIKDC5redH2IlGqcQQ==} + dev: true + /array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: @@ -2959,6 +3042,13 @@ packages: is-string: 1.0.7 dev: true + /array-last@1.3.0: + resolution: {integrity: sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==} + engines: {node: '>=0.10.0'} + dependencies: + is-number: 4.0.0 + dev: true + /array-timsort@1.0.3: resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==} dev: true @@ -3030,6 +3120,17 @@ packages: resolution: {integrity: sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==} dev: true + /asynciterator.prototype@1.0.0: + resolution: {integrity: sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==} + dependencies: + has-symbols: 1.0.3 + dev: true + + /attr-accept@2.2.2: + resolution: {integrity: sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg==} + engines: {node: '>=4'} + dev: false + /autoprefixer@10.4.15(postcss@8.4.28): resolution: {integrity: sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==} engines: {node: ^10 || ^12 || >=14} @@ -3038,7 +3139,7 @@ packages: postcss: ^8.1.0 dependencies: browserslist: 4.21.10 - caniuse-lite: 1.0.30001520 + caniuse-lite: 1.0.30001521 fraction.js: 4.2.0 normalize-range: 0.1.2 picocolors: 1.0.0 @@ -3062,6 +3163,11 @@ packages: dequal: 2.0.3 dev: true + /babylon@6.18.0: + resolution: {integrity: sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==} + hasBin: true + dev: true + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -3104,7 +3210,7 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001520 + caniuse-lite: 1.0.30001521 electron-to-chromium: 1.4.492 node-releases: 2.0.13 update-browserslist-db: 1.0.11(browserslist@4.21.10) @@ -3162,8 +3268,8 @@ packages: engines: {node: '>=14.16'} dev: true - /caniuse-lite@1.0.30001520: - resolution: {integrity: sha512-tahF5O9EiiTzwTUqAeFjIZbn4Dnqxzz7ktrgGlMYNLH43Ul26IgTMH/zvL3DG0lZxBYnlT04axvInszUsZULdA==} + /caniuse-lite@1.0.30001521: + resolution: {integrity: sha512-fnx1grfpEOvDGH+V17eccmNjucGUnCbP6KL+l5KqBIerp26WK/+RQ7CIDE37KGJjaPyqWXXlFUyKiWmvdNNKmQ==} /chalk-template@1.1.0: resolution: {integrity: sha512-T2VJbcDuZQ0Tb2EWwSotMPJjgpy1/tGee1BTpUNsGZ/qgNjV2t7Mvu+d4600U564nbLesN1x2dPL+xii174Ekg==} @@ -3213,6 +3319,11 @@ packages: clsx: 2.0.0 dev: false + /clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + dev: true + /clear-module@4.1.2: resolution: {integrity: sha512-LWAxzHqdHsAZlPlEyJ2Poz6AIs384mPeqLVCru2p0BrP9G/kVGuhNyZYClLO6cXlnuJjzC8xtsJIuMjKqLXoAw==} engines: {node: '>=8'} @@ -3260,6 +3371,12 @@ packages: wrap-ansi: 7.0.0 dev: true + /clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + dev: true + optional: true + /clsx@2.0.0: resolution: {integrity: sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==} engines: {node: '>=6'} @@ -3343,6 +3460,12 @@ packages: dot-prop: 5.3.0 dev: true + /compose-function@3.0.3: + resolution: {integrity: sha512-xzhzTJ5eC+gmIzvZq+C3kCJHsp9os6tJkrigDRZclyGtOKINbZtE8n1Tzmeh32jW+BUDPbvZpibwvJHBLGMVwg==} + dependencies: + arity-n: 1.0.4 + dev: true + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -3400,7 +3523,7 @@ packages: dependencies: '@types/node': 20.4.7 cosmiconfig: 8.2.0 - ts-node: 10.9.1(@types/node@20.5.0)(typescript@5.1.6) + ts-node: 10.9.1(@types/node@20.5.0)(typescript@5.2.0-beta) typescript: 5.1.6 dev: true @@ -3613,6 +3736,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /deep-freeze@0.0.1: + resolution: {integrity: sha512-Z+z8HiAvsGwmjqlphnHW5oz6yWlOwu6EQfFTjmeTWlDeda3FS2yv3jhq35TX/ewmsnqB+RX2IdsIOyjJCQN5tg==} + dev: true + /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true @@ -3635,6 +3762,13 @@ packages: titleize: 3.0.0 dev: true + /defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + dependencies: + clone: 1.0.4 + dev: true + optional: true + /define-lazy-prop@3.0.0: resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} engines: {node: '>=12'} @@ -3820,6 +3954,14 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true + /easy-table@1.2.0: + resolution: {integrity: sha512-OFzVOv03YpvtcWGe5AayU5G2hgybsg3iqA6drU8UaoZyB9jLGMTrz9+asnLp/E+6qPh88yEI1gvyZFZ41dmgww==} + dependencies: + ansi-regex: 5.0.1 + optionalDependencies: + wcwidth: 1.0.1 + dev: true + /electron-to-chromium@1.4.492: resolution: {integrity: sha512-36K9b/6skMVwAIEsC7GiQ8I8N3soCALVSHqWHzNDtGemAcI9Xu8hP02cywWM0A794rTHm0b0zHPeLJHtgFVamQ==} @@ -3890,6 +4032,25 @@ packages: which-typed-array: 1.1.11 dev: true + /es-iterator-helpers@1.0.13: + resolution: {integrity: sha512-LK3VGwzvaPWobO8xzXXGRUOGw8Dcjyfk62CsY/wfHN75CwsJPbuypOYJxK6g5RyEL8YDjIWcl6jgd8foO6mmrA==} + dependencies: + asynciterator.prototype: 1.0.0 + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + es-set-tostringtag: 2.0.1 + function-bind: 1.1.1 + get-intrinsic: 1.2.1 + globalthis: 1.0.3 + has-property-descriptors: 1.0.0 + has-proto: 1.0.1 + has-symbols: 1.0.3 + internal-slot: 1.0.5 + iterator.prototype: 1.1.0 + safe-array-concat: 1.0.0 + dev: true + /es-set-tostringtag@2.0.1: resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} engines: {node: '>= 0.4'} @@ -4032,7 +4193,7 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-next@13.4.16(eslint@8.47.0)(typescript@5.1.6): + /eslint-config-next@13.4.16(eslint@8.47.0)(typescript@5.2.0-beta): resolution: {integrity: sha512-Of73d/FiaGf0GLCxxTGdh4rW8bRDvsqypylefkshE/uDDpQr8ifVQsD4UiB99rhegks7nJGkYtUnR3dC7kfFlw==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 @@ -4043,15 +4204,15 @@ packages: dependencies: '@next/eslint-plugin-next': 13.4.16 '@rushstack/eslint-patch': 1.3.3 - '@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.2.0-beta) eslint: 8.47.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.0)(eslint@8.47.0) eslint-plugin-import: 2.28.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0) eslint-plugin-jsx-a11y: 6.7.1(eslint@8.47.0) - eslint-plugin-react: 7.33.1(eslint@8.47.0) + eslint-plugin-react: 7.33.2(eslint@8.47.0) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.47.0) - typescript: 5.1.6 + typescript: 5.2.0-beta transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color @@ -4125,7 +4286,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.2.0-beta) debug: 3.2.7 eslint: 8.47.0 eslint-import-resolver-node: 0.3.9 @@ -4144,7 +4305,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.2.0-beta) array-includes: 3.1.6 array.prototype.findlastindex: 1.2.2 array.prototype.flat: 1.3.1 @@ -4204,8 +4365,8 @@ packages: eslint: 8.47.0 dev: true - /eslint-plugin-react@7.33.1(eslint@8.47.0): - resolution: {integrity: sha512-L093k0WAMvr6VhNwReB8VgOq5s2LesZmrpPdKz/kZElQDzqS7G7+DnKoqT+w4JwuiGeAhAvHO0fvy0Eyk4ejDA==} + /eslint-plugin-react@7.33.2(eslint@8.47.0): + resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 @@ -4214,6 +4375,7 @@ packages: array.prototype.flatmap: 1.3.1 array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 + es-iterator-helpers: 1.0.13 eslint: 8.47.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.5 @@ -4416,12 +4578,28 @@ packages: flat-cache: 3.0.4 dev: true + /file-selector@0.6.0: + resolution: {integrity: sha512-QlZ5yJC0VxHxQQsQhXvBaC7VRJ2uaxTf+Tfpu4Z/OcVQJVpZO+DGU0rkoVW5ce2SccxugvpBJoMvUs59iILYdw==} + engines: {node: '>= 12'} + dependencies: + tslib: 2.6.1 + dev: false + /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 + /filter-iterator@0.0.1: + resolution: {integrity: sha512-v4lhL7Qa8XpbW3LN46CEnmhGk3eHZwxfNl5at20aEkreesht4YKb/Ba3BUIbnPhAC/r3dmu7ABaGk6MAvh2alA==} + dev: true + + /filter-obj@1.1.0: + resolution: {integrity: sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==} + engines: {node: '>=0.10.0'} + dev: true + /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -4464,6 +4642,14 @@ packages: is-callable: 1.2.7 dev: true + /foreground-child@3.1.1: + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + dev: true + /fraction.js@4.2.0: resolution: {integrity: sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==} dev: true @@ -4588,6 +4774,18 @@ packages: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} dev: false + /glob@10.3.3: + resolution: {integrity: sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + foreground-child: 3.1.1 + jackspeak: 2.3.0 + minimatch: 9.0.3 + minipass: 7.0.3 + path-scurry: 1.10.1 + dev: true + /glob@7.1.6: resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} dependencies: @@ -4722,6 +4920,10 @@ packages: engines: {node: '>=8'} dev: true + /has-own-property@0.1.0: + resolution: {integrity: sha512-14qdBKoonU99XDhWcFKZTShK+QV47qU97u8zzoVo9cL5TZ3BmBHXogItSt9qJjR0KUMFRhcCW8uGIGl8nkl7Aw==} + dev: true + /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: @@ -4776,6 +4978,10 @@ packages: engines: {node: '>=14.18.0'} dev: true + /identity-function@1.0.0: + resolution: {integrity: sha512-kNrgUK0qI+9qLTBidsH85HjDLpZfrrS0ElquKKe/fJFdB3D7VeKdXXEvOPDUHSHOzdZKCAAaQIWWyp0l2yq6pw==} + dev: true + /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} @@ -4847,6 +5053,13 @@ packages: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true + /is-async-function@2.0.0: + resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + /is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: @@ -4900,6 +5113,12 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + /is-finalizationregistry@1.0.2: + resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} + dependencies: + call-bind: 1.0.2 + dev: true + /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} @@ -4910,6 +5129,13 @@ packages: engines: {node: '>=12'} dev: true + /is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -4924,6 +5150,15 @@ packages: is-docker: 3.0.0 dev: true + /is-iterable@1.1.1: + resolution: {integrity: sha512-EdOZCr0NsGE00Pot+x1ZFx9MJK3C6wy91geZpXwvwexDLJvA4nzYyZf7r+EIwSeVsOLDdBz7ATg9NqKTzuNYuQ==} + engines: {node: '>= 4'} + dev: true + + /is-map@2.0.2: + resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} + dev: true + /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -4936,6 +5171,11 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-number@4.0.0: + resolution: {integrity: sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==} + engines: {node: '>=0.10.0'} + dev: true + /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -4972,6 +5212,10 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-set@2.0.2: + resolution: {integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==} + dev: true + /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: @@ -5020,12 +5264,23 @@ packages: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} dev: true + /is-weakmap@2.0.1: + resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==} + dev: true + /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: call-bind: 1.0.2 dev: true + /is-weakset@2.0.2: + resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + dev: true + /is-wsl@2.2.0: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} @@ -5041,6 +5296,30 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true + /iterable-lookahead@1.0.0: + resolution: {integrity: sha512-hJnEP2Xk4+44DDwJqUQGdXal5VbyeWLaPyDl2AQc242Zr7iqz4DgpQOrEzglWVMGHMDCkguLHEKxd1+rOsmgSQ==} + engines: {node: '>=4'} + dev: true + + /iterator.prototype@1.1.0: + resolution: {integrity: sha512-rjuhAk1AJ1fssphHD0IFV6TWL40CwRZ53FrztKx43yk2v6rguBYsY4Bj1VU4HmoMmKwZUlx7mfnhDf9cOp4YTw==} + dependencies: + define-properties: 1.2.0 + get-intrinsic: 1.2.1 + has-symbols: 1.0.3 + has-tostringtag: 1.0.0 + reflect.getprototypeof: 1.0.3 + dev: true + + /jackspeak@2.3.0: + resolution: {integrity: sha512-uKmsITSsF4rUWQHzqaRUuyAir3fZfW3f202Ee34lz/gZCi970CPZwyQXLGNgWJvvZbvFyzeyGq0+4fcG/mBKZg==} + engines: {node: '>=14'} + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + dev: true + /jiti@1.19.1: resolution: {integrity: sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg==} hasBin: true @@ -5073,6 +5352,11 @@ packages: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true + /json-parse-even-better-errors@3.0.0: + resolution: {integrity: sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true @@ -5125,6 +5409,30 @@ packages: engines: {node: '>=0.10.0'} dev: true + /knip@2.19.4: + resolution: {integrity: sha512-gZi/R8oE8vcxnKkvodE0i16zRA6Mv2mSBPl9NIH4ecmwPFraCiMCa/UqdcRzHNW1k1RAfAMf4bokRWAcNi/BdA==} + engines: {node: '>=16.17.0 <17 || >=18.6.0'} + hasBin: true + dependencies: + '@ericcornelissen/bash-parser': 0.5.2 + '@npmcli/map-workspaces': 3.0.4 + '@snyk/github-codeowners': 1.1.0 + chalk: 5.3.0 + easy-table: 1.2.0 + fast-glob: 3.3.1 + globby: 13.2.2 + jiti: 1.19.1 + js-yaml: 4.1.0 + micromatch: 4.0.5 + minimist: 1.2.8 + pretty-ms: 8.0.0 + strip-json-comments: 5.0.1 + summary: 2.1.0 + typescript: 5.1.6 + zod: 3.22.1 + zod-validation-error: 1.3.1(zod@3.22.1) + dev: true + /ky@0.33.3: resolution: {integrity: sha512-CasD9OCEQSFIam2U8efFK81Yeg8vNMTBUqtMOHlrcWQHqUX3HeCl9Dr31u4toV7emlH8Mymk5+9p0lL6mKb/Xw==} engines: {node: '>=14.16'} @@ -5217,6 +5525,10 @@ packages: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} dev: true + /lodash.curry@4.1.1: + resolution: {integrity: sha512-/u14pXGviLaweY5JI0IUzgzF2J6Ne8INyzAZjImcryjgkZ+ebruBxy2/JaOOkTqScddcYtakjhSaeemV8lR0tA==} + dev: true + /lodash.isfunction@3.0.9: resolution: {integrity: sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==} dev: true @@ -5278,6 +5590,11 @@ packages: dependencies: js-tokens: 4.0.0 + /lru-cache@10.0.1: + resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} + engines: {node: 14 || >=16.14} + dev: true + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -5308,6 +5625,12 @@ packages: react: 18.3.0-canary-0fb5b61ac-20230814 dev: false + /magic-string@0.16.0: + resolution: {integrity: sha512-c4BEos3y6G2qO0B9X7K0FVLOPT9uGrjYwYRLFmDqyl5YMboUviyecnXWp94fJTSMwPw2/sf+CEYt5AGpmklkkQ==} + dependencies: + vlq: 0.2.3 + dev: true + /make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} @@ -5316,6 +5639,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /map-obj@2.0.0: + resolution: {integrity: sha512-TzQSV2DiMYgoF5RycneKVUzIa9bQsj/B3tTgsE3dOGqlzHnGIDaC7XBE7grnA+8kZPnfqSGFe95VHc2oc0VFUQ==} + engines: {node: '>=4'} + dev: true + /map-obj@4.3.0: resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} engines: {node: '>=8'} @@ -5400,6 +5728,13 @@ packages: brace-expansion: 2.0.1 dev: true + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist-options@4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} @@ -5413,6 +5748,11 @@ packages: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true + /minipass@7.0.3: + resolution: {integrity: sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==} + engines: {node: '>=16 || 14 >=14.17'} + dev: true + /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -5478,7 +5818,7 @@ packages: '@next/env': 13.4.16 '@swc/helpers': 0.5.1 busboy: 1.6.0 - caniuse-lite: 1.0.30001520 + caniuse-lite: 1.0.30001521 postcss: 8.4.14 react: 18.3.0-canary-0fb5b61ac-20230814 react-dom: 18.3.0-canary-0fb5b61ac-20230814(react@18.3.0-canary-0fb5b61ac-20230814) @@ -5543,6 +5883,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /npm-normalize-package-bin@3.0.1: + resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: true + /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -5574,6 +5919,15 @@ packages: engines: {node: '>= 0.4'} dev: true + /object-pairs@0.1.0: + resolution: {integrity: sha512-3ECr6K831I4xX/Mduxr9UC+HPOz/d6WKKYj9p4cmC8Lg8p7g8gitzsxNX5IWlSIgFWN/a4JgrJaoAMKn20oKwA==} + dev: true + + /object-values@1.0.0: + resolution: {integrity: sha512-+8hwcz/JnQ9EpLIXzN0Rs7DLsBpJNT/xYehtB/jU93tHYr5BFEO8E+JGQNOSqE7opVzz5cGksKFHt7uUJVLSjQ==} + engines: {node: '>=0.10.0'} + dev: true + /object.assign@4.1.4: resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} engines: {node: '>= 0.4'} @@ -5710,6 +6064,13 @@ packages: p-limit: 4.0.0 dev: true + /p-map@4.0.0: + resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} + engines: {node: '>=10'} + dependencies: + aggregate-error: 3.1.0 + dev: true + /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -5739,6 +6100,11 @@ packages: lines-and-columns: 1.2.4 dev: true + /parse-ms@3.0.0: + resolution: {integrity: sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==} + engines: {node: '>=12'} + dev: true + /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -5766,6 +6132,14 @@ packages: /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + /path-scurry@1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + lru-cache: 10.0.1 + minipass: 7.0.3 + dev: true + /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -5826,7 +6200,7 @@ packages: dependencies: lilconfig: 2.1.0 postcss: 8.4.28 - ts-node: 10.9.1(@types/node@20.5.0)(typescript@5.1.6) + ts-node: 10.9.1(@types/node@20.5.0)(typescript@5.2.0-beta) yaml: 2.3.1 /postcss-nested@6.0.1(postcss@8.4.28): @@ -5949,13 +6323,19 @@ packages: hasBin: true dev: true + /pretty-ms@8.0.0: + resolution: {integrity: sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==} + engines: {node: '>=14.16'} + dependencies: + parse-ms: 3.0.0 + dev: true + /prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 react-is: 16.13.1 - dev: true /punycode@2.3.0: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} @@ -5980,6 +6360,18 @@ packages: scheduler: 0.24.0-canary-0fb5b61ac-20230814 dev: false + /react-dropzone@14.2.3(react@18.3.0-canary-0fb5b61ac-20230814): + resolution: {integrity: sha512-O3om8I+PkFKbxCukfIR3QAGftYXDZfOE2N1mr/7qebQJHs7U+/RSL/9xomJNpRg9kM5h9soQSdf0Gc7OHF5Fug==} + engines: {node: '>= 10.13'} + peerDependencies: + react: '>= 16.8 || 18.0.0' + dependencies: + attr-accept: 2.2.2 + file-selector: 0.6.0 + prop-types: 15.8.1 + react: 18.3.0-canary-0fb5b61ac-20230814 + dev: false + /react-hook-form@7.45.4(react@18.3.0-canary-0fb5b61ac-20230814): resolution: {integrity: sha512-HGDV1JOOBPZj10LB3+OZgfDBTn+IeEsNOKiq/cxbQAIbKaiJUe/KV8DBUzsx0Gx/7IG/orWqRRm736JwOfUSWQ==} engines: {node: '>=12.22.0'} @@ -5999,7 +6391,6 @@ packages: /react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - dev: true /react-remove-scroll-bar@2.3.4(@types/react@18.2.20)(react@18.3.0-canary-0fb5b61ac-20230814): resolution: {integrity: sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==} @@ -6092,6 +6483,14 @@ packages: dependencies: pify: 2.3.0 + /read-package-json-fast@3.0.2: + resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + json-parse-even-better-errors: 3.0.0 + npm-normalize-package-bin: 3.0.1 + dev: true + /read-pkg-up@7.0.1: resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} engines: {node: '>=8'} @@ -6134,6 +6533,18 @@ packages: strip-indent: 3.0.0 dev: true + /reflect.getprototypeof@1.0.3: + resolution: {integrity: sha512-TTAOZpkJ2YLxl7mVHWrNo3iDMEkYlva/kgFcXndqMgbo/AZUmmavEkdXV+hXtE4P8xdyEKRzalaFqZVuwIk/Nw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + get-intrinsic: 1.2.1 + globalthis: 1.0.3 + which-builtin-type: 1.1.3 + dev: true + /regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} @@ -6211,6 +6622,10 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + /reverse-arguments@1.0.0: + resolution: {integrity: sha512-/x8uIPdTafBqakK0TmPNJzgkLP+3H+yxpUJhCQHsLBg1rYEVNR2D8BRYNWQhVBjyOd7oo1dZRVzIkwMY2oqfYQ==} + dev: true + /rfdc@1.3.0: resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} dev: true @@ -6295,6 +6710,10 @@ packages: engines: {node: '>=8'} dev: true + /shell-quote-word@1.0.1: + resolution: {integrity: sha512-lT297f1WLAdq0A4O+AknIFRP6kkiI3s8C913eJ0XqBxJbZPGWUNkRQk2u8zk4bEAjUJ5i+fSLwB6z1HzeT+DEg==} + dev: true + /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: @@ -6307,6 +6726,11 @@ packages: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: true + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: true + /sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} dev: true @@ -6418,6 +6842,10 @@ packages: strip-ansi: 7.1.0 dev: true + /string.fromcodepoint@0.2.1: + resolution: {integrity: sha512-n69H31OnxSGSZyZbgBlvYIXlrMhJQ0dQAX1js1QDhpaUH6zmU3QYlj07bCwCNlPOu3oRXIubGPl2gDGnHsiCqg==} + dev: true + /string.prototype.matchall@4.0.8: resolution: {integrity: sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==} dependencies: @@ -6503,6 +6931,11 @@ packages: engines: {node: '>=8'} dev: true + /strip-json-comments@5.0.1: + resolution: {integrity: sha512-0fk9zBqO67Nq5M/m45qHCJxylV/DhBlIOVExqgOMiCCrzrhU6tCibRXNqE3jwJLftzE9SNuZtYbpzcO+i9FiKw==} + engines: {node: '>=14.16'} + dev: true + /styled-jsx@5.1.1(@babel/core@7.22.10)(react@18.3.0-canary-0fb5b61ac-20230814): resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} engines: {node: '>= 12.0.0'} @@ -6534,6 +6967,10 @@ packages: pirates: 4.0.6 ts-interface-checker: 0.1.13 + /summary@2.1.0: + resolution: {integrity: sha512-nMIjMrd5Z2nuB2RZCKJfFMjgS3fygbeyGk9PxPPaJR1RIcyN9yn4A63Isovzm3ZtQuEkLBVgMdPup8UeLH7aQw==} + dev: true + /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -6661,12 +7098,28 @@ packages: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} + /to-no-case@1.0.2: + resolution: {integrity: sha512-Z3g735FxuZY8rodxV4gH7LxClE4H0hTIyHNIHdk+vpQxjLm0cwnKXq/OFVZ76SOQmto7txVcwSCwkU5kqp+FKg==} + dev: true + + /to-pascal-case@1.0.0: + resolution: {integrity: sha512-QGMWHqM6xPrcQW57S23c5/3BbYb0Tbe9p+ur98ckRnGDwD4wbbtDiYI38CfmMKNB5Iv0REjs5SNDntTwvDxzZA==} + dependencies: + to-space-case: 1.0.0 + dev: true + /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} dependencies: is-number: 7.0.0 + /to-space-case@1.0.0: + resolution: {integrity: sha512-rLdvwXZ39VOn1IxGL3V6ZstoTbwLRckQmn/U8ZDLuWwIXNpuZDhQ3AiRUlhTbOXFVE9C+dR51wM0CBDhk31VcA==} + dependencies: + to-no-case: 1.0.2 + dev: true + /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true @@ -6680,19 +7133,19 @@ packages: engines: {node: '>=8'} dev: true - /ts-api-utils@1.0.1(typescript@5.1.6): + /ts-api-utils@1.0.1(typescript@5.2.0-beta): resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.1.6 + typescript: 5.2.0-beta 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.0)(typescript@5.1.6): + /ts-node@10.9.1(@types/node@20.5.0)(typescript@5.2.0-beta): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -6718,7 +7171,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.1.6 + typescript: 5.2.0-beta v8-compile-cache-lib: 3.0.1 yn: 3.1.1 @@ -6822,6 +7275,12 @@ packages: resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} engines: {node: '>=14.17'} hasBin: true + dev: true + + /typescript@5.2.0-beta: + resolution: {integrity: sha512-z5cq8BXVwaY8cwltw0BiyHRCVXen3QNgIzIcJV4NiLzaWvavxltzFSXd2csO4HoBjlGnuG+/LLbUZ8is3fD6iA==} + engines: {node: '>=14.17'} + hasBin: true /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} @@ -6832,6 +7291,12 @@ packages: which-boxed-primitive: 1.0.2 dev: true + /unescape-js@1.1.4: + resolution: {integrity: sha512-42SD8NOQEhdYntEiUQdYq/1V/YHwr1HLwlHuTJB5InVVdOSbgI6xu8jK5q65yIzuFCfczzyDF/7hbGzVbyCw0g==} + dependencies: + string.fromcodepoint: 0.2.1 + dev: true + /unique-string@3.0.0: resolution: {integrity: sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==} engines: {node: '>=12'} @@ -6921,6 +7386,10 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /vlq@0.2.3: + resolution: {integrity: sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==} + dev: true + /vscode-languageserver-textdocument@1.0.8: resolution: {integrity: sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==} dev: true @@ -6937,6 +7406,14 @@ packages: graceful-fs: 4.2.11 dev: false + /wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + requiresBuild: true + dependencies: + defaults: 1.0.4 + dev: true + optional: true + /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: true @@ -6958,6 +7435,33 @@ packages: is-symbol: 1.0.4 dev: true + /which-builtin-type@1.1.3: + resolution: {integrity: sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==} + engines: {node: '>= 0.4'} + dependencies: + function.prototype.name: 1.1.5 + has-tostringtag: 1.0.0 + is-async-function: 2.0.0 + is-date-object: 1.0.5 + is-finalizationregistry: 1.0.2 + is-generator-function: 1.0.10 + is-regex: 1.1.4 + is-weakref: 1.0.2 + isarray: 2.0.5 + which-boxed-primitive: 1.0.2 + which-collection: 1.0.1 + which-typed-array: 1.1.11 + dev: true + + /which-collection@1.0.1: + resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==} + dependencies: + is-map: 2.0.2 + is-set: 2.0.2 + is-weakmap: 2.0.1 + is-weakset: 2.0.2 + dev: true + /which-typed-array@1.1.11: resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} engines: {node: '>= 0.4'} @@ -7069,9 +7573,22 @@ packages: engines: {node: '>=12.20'} dev: true + /zod-validation-error@1.3.1(zod@3.22.1): + resolution: {integrity: sha512-cNEXpla+tREtNdAnNKY4xKY1SGOn2yzyuZMu4O0RQylX9apRpUjNcPkEc3uHIAr5Ct7LenjZt6RzjEH6+JsqVQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + zod: ^3.18.0 + dependencies: + zod: 3.22.1 + dev: true + /zod@3.21.4: resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==} dev: false /zod@3.22.1: resolution: {integrity: sha512-+qUhAMl414+Elh+fRNtpU+byrwjDFOS1N7NioLY+tSlcADTx4TkCUua/hxJvxwDXcV4397/nZ420jy4n4+3WUg==} + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/src/app.ts b/src/app.ts index f6d6084..d218bc7 100644 --- a/src/app.ts +++ b/src/app.ts @@ -2,7 +2,7 @@ // ?? Materials about @satisfies: https://youtu.be/49gHWuepxxE, https://youtu.be/G1RtAmI0-vc import { networks } from "~/utils/appts/socials"; -import { ContentSection, HeroHeader } from "~/utils/types/appts"; +import { ContentSection, HeroHeader } from "~/utils/appts/types"; // ======================================================== diff --git a/src/app/[locale]/features/layout.tsx b/src/app/[locale]/features/layout.tsx index 022dc81..bf55e09 100644 --- a/src/app/[locale]/features/layout.tsx +++ b/src/app/[locale]/features/layout.tsx @@ -1,3 +1,5 @@ +import { WithChildren } from "~/utils/types/with-children"; + export default function Layout({ children }: WithChildren) { return (
diff --git a/src/app/[locale]/features/todo/todo.tsx b/src/app/[locale]/features/todo/todo.tsx index 5970248..2974ed5 100644 --- a/src/app/[locale]/features/todo/todo.tsx +++ b/src/app/[locale]/features/todo/todo.tsx @@ -42,7 +42,6 @@ export function Todo() { const form = useForm({ resolver: zodResolver(formSchema) }); - // @ts-expect-error unstable implementation const scopedT = useScopedI18n("pages.tools.todo"); const handleAddTodo = form.handleSubmit((data) => { @@ -50,7 +49,6 @@ export function Todo() { ...todos, { id: Date.now().toString(), - // @ts-expect-error unstable implementation title: data.title, createdAt: new Date().toISOString(), completedAt: null @@ -63,10 +61,8 @@ export function Todo() {
- {/* @ts-expect-error unstable implementation */} diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx index 586074d..7a1a00f 100644 --- a/src/app/[locale]/layout.tsx +++ b/src/app/[locale]/layout.tsx @@ -11,6 +11,8 @@ import "~/styles/globals.css"; import { UnifiedBleverseFooter } from "~/utils/appts/islands/unified-bleverse-footer"; import { UnifiedBleverseHeader } from "~/utils/appts/islands/unified-bleverse-header"; +import { PageParams } from "~/utils/types/page-params"; +import { WithChildren } from "~/utils/types/with-children"; const inter = Inter({ subsets: ["latin"] }); diff --git a/src/data/db/db.ts b/src/data/db/db.ts deleted file mode 100644 index 9e005bd..0000000 --- a/src/data/db/db.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { connect } from "@planetscale/database"; -import { migrate } from "drizzle-orm/mysql2/migrator"; -import { drizzle } from "drizzle-orm/planetscale-serverless"; - -// create the connection -const connection = connect({ - host: process.env["DATABASE_HOST"], - username: process.env["DATABASE_USERNAME"], - password: process.env["DATABASE_PASSWORD"] -}); - -export const db = drizzle(connection); - -// syncs the migrations folder to PlanetScale -process.env.NODE_ENV === "development" && - migrate(db as any, { migrationsFolder: "./migrations" }) - .then((res) => res) - .catch((err) => console.log("Migration error in db.ts:", err)); diff --git a/src/data/db/index.ts b/src/data/db/index.ts new file mode 100644 index 0000000..d93ca97 --- /dev/null +++ b/src/data/db/index.ts @@ -0,0 +1,23 @@ +import { connect } from "@planetscale/database"; +import { env } from "~/env.mjs"; +import { migrate } from "drizzle-orm/mysql2/migrator"; +import { drizzle } from "drizzle-orm/planetscale-serverless"; + +import * as schema from "./schema"; + +// ?? Create the connection +const connection = connect({ + url: env.NEXT_SECRET_URL_ORM_DRIZZLE +}); +export const drizzleOrm = drizzle(connection, { schema }); + +// ?? Sync dev with the deploy migration folder +env.NODE_ENV === "development" && + migrate(drizzleOrm as any, { migrationsFolder: "./dm" }) + .then((res) => res) + .catch((err) => + console.log( + "[error] Migration failed. The file ~/data/db/index.ts said:", + err + ) + ); diff --git a/src/data/db/schema.ts b/src/data/db/schema.ts index 4e5ee66..5f32914 100644 --- a/src/data/db/schema.ts +++ b/src/data/db/schema.ts @@ -1,96 +1,134 @@ -import { InferModel } from "drizzle-orm"; +import type { + CartItem, + CheckoutItem, + StoredFile +} from "~/utils/types/store-main"; +import type { InferModel } from "drizzle-orm"; +import { relations } from "drizzle-orm"; import { boolean, decimal, int, json, + mysqlEnum, mysqlTable, serial, text, - uniqueIndex, + timestamp, varchar } from "drizzle-orm/mysql-core"; -export const stores = mysqlTable( - "stores", - { - id: serial("id").primaryKey(), - name: varchar("store_name", { length: 40 }), - industry: text("industry"), - description: text("description"), - slug: varchar("slug", { length: 50 }) - }, - (table) => { - return { - storeNameIndex: uniqueIndex("store_name_index").on(table.name), - storeSlugIndex: uniqueIndex("store_slug_index").on(table.slug) - }; - } -); +export const stores = mysqlTable("stores", { + id: serial("id").primaryKey(), + userId: varchar("userId", { length: 191 }).notNull(), + name: varchar("name", { length: 191 }).notNull(), + description: text("description"), + slug: text("slug"), + active: boolean("active").notNull().default(true), + stripeAccountId: varchar("stripeAccountId", { length: 191 }), + createdAt: timestamp("createdAt").defaultNow() +}); + export type Store = InferModel; +export const storesRelations = relations(stores, ({ many }) => ({ + products: many(products) +})); + export const products = mysqlTable("products", { id: serial("id").primaryKey(), - name: text("name"), - price: decimal("price", { precision: 10, scale: 2 }).default("0"), + name: varchar("name", { length: 191 }).notNull(), description: text("description"), - inventory: decimal("inventory").default("0"), - images: json("images"), - storeId: int("store_id") + images: json("images").$type().default(null), + category: mysqlEnum("category", [ + "skateboards", + "clothing", + "shoes", + "accessories" + ]) + .notNull() + .default("skateboards"), + subcategory: varchar("subcategory", { length: 191 }), + price: decimal("price", { precision: 10, scale: 2 }).notNull().default("0"), + inventory: int("inventory").notNull().default(0), + rating: int("rating").notNull().default(0), + tags: json("tags").$type().default(null), + storeId: int("storeId").notNull(), + createdAt: timestamp("createdAt").defaultNow() }); + export type Product = InferModel; +export const productsRelations = relations(products, ({ one }) => ({ + store: one(stores, { fields: [products.storeId], references: [stores.id] }) +})); + export const carts = mysqlTable("carts", { id: serial("id").primaryKey(), - items: json("items"), - paymentIntentId: text("payment_intent_id"), - clientSecret: text("client_secret"), - isClosed: boolean("is_closed").default(false) + userId: varchar("userId", { length: 191 }), + paymentIntentId: varchar("paymentIntentId", { length: 191 }), + clientSecret: varchar("clientSecret", { length: 191 }), + items: json("items").$type().default(null), + createdAt: timestamp("createdAt").defaultNow() }); + export type Cart = InferModel; +export const emailPreferences = mysqlTable("email_preferences", { + id: serial("id").primaryKey(), + userId: varchar("userId", { length: 191 }), + email: varchar("email", { length: 191 }).notNull(), + token: varchar("token", { length: 191 }).notNull(), + newsletter: boolean("newsletter").notNull().default(false), + marketing: boolean("marketing").notNull().default(false), + transactional: boolean("transactional").notNull().default(false), + createdAt: timestamp("createdAt").defaultNow() +}); + +export type EmailPreference = InferModel; + export const payments = mysqlTable("payments", { id: serial("id").primaryKey(), - storeId: int("store_id"), - stripeAccountId: text("stripe_account_id"), - stripeAccountCreatedAt: int("stripe_account_created_at"), - stripeAccountExpiresAt: int("stripe_account_expires_at"), - details_submitted: boolean("details_submitted").default(false) + userId: varchar("userId", { length: 191 }), + storeId: int("storeId").notNull(), + stripeAccountId: varchar("stripeAccountId", { length: 191 }).notNull(), + stripeAccountCreatedAt: int("stripeAccountCreatedAt").notNull(), + stripeAccountExpiresAt: int("stripeAccountExpiresAt").notNull(), + detailsSubmitted: boolean("detailsSubmitted").notNull().default(false), + createdAt: timestamp("createdAt").defaultNow() }); + export type Payment = InferModel; -export const orders = mysqlTable( - "orders", - { - id: serial("id").primaryKey(), - prettyOrderId: int("pretty_order_id"), - storeId: int("store_id"), - items: json("items"), - total: decimal("total", { precision: 10, scale: 2 }).default("0"), - stripePaymentIntentId: varchar("stripe_payment_intent_id", { length: 256 }), // text field is valid for uniqueIndex in MySQL - stripePaymentIntentStatus: text("stripe_payment_intent_status"), - name: text("name"), - email: text("email"), - createdAt: int("created_at"), - addressId: int("address") - }, - (table) => { - return { - stripePaymentIntentIdIndex: uniqueIndex( - "stripe_payment_intent_id_index" - ).on(table.stripePaymentIntentId) - }; - } -); +export const orders = mysqlTable("orders", { + id: serial("id").primaryKey(), + userId: varchar("userId", { length: 191 }), + storeId: int("storeId").notNull(), + items: json("items").$type().default(null), + total: decimal("total", { precision: 10, scale: 2 }).notNull().default("0"), + stripePaymentIntentId: varchar("stripePaymentIntentId", { + length: 191 + }).notNull(), + stripePaymentIntentStatus: varchar("stripePaymentIntentStatus", { + length: 191 + }).notNull(), + name: varchar("name", { length: 191 }), + email: varchar("email", { length: 191 }), + addressId: int("addressId"), + createdAt: timestamp("createdAt").defaultNow() +}); + export type Order = InferModel; export const addresses = mysqlTable("addresses", { id: serial("id").primaryKey(), - line1: text("line1"), - line2: text("line2"), - city: text("city"), - state: text("state"), - postal_code: text("postal_code"), - country: text("country") + line1: varchar("line1", { length: 191 }), + line2: varchar("line2", { length: 191 }), + city: varchar("city", { length: 191 }), + state: varchar("state", { length: 191 }), + postalCode: varchar("postalCode", { length: 191 }), + country: varchar("country", { length: 191 }), + createdAt: timestamp("createdAt").defaultNow() }); + export type Address = InferModel; diff --git a/src/env.mjs b/src/env.mjs new file mode 100644 index 0000000..872bfd6 --- /dev/null +++ b/src/env.mjs @@ -0,0 +1,79 @@ +import { createEnv } from "@t3-oss/env-nextjs"; +import { z } from "zod"; + +export const env = createEnv({ + server: { + /** + * Specify your server-side environment variables schema here. This way you can ensure the app + * isn't built with invalid env vars. + */ + NEXT_SECRET_URL_ORM_DRIZZLE: z.string(), + NODE_ENV: z.enum(["development", "test", "production"]), + CLERK_SECRET_KEY: z.string(), + RESEND_API_KEY: z.string(), + EMAIL_FROM_ADDRESS: z.string(), + UPLOADTHING_SECRET: z.string(), + UPLOADTHING_APP_ID: z.string(), + STRIPE_API_KEY: z.string(), + STRIPE_WEBHOOK_SECRET: z.string(), + STRIPE_STD_MONTHLY_PRICE_ID: z.string(), + STRIPE_PRO_MONTHLY_PRICE_ID: z.string() + }, + // !! =========================================================================================== + client: { + /** + * Specify your client-side environment variables schema here. This way you can ensure the app + * isn't built with invalid env vars. To expose them to the client, prefix them with + * `NEXT_PUBLIC_`. + */ + NEXT_PUBLIC_URL_AUTHJS: z.string().min(1), + NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: z.string() + }, + // !! =========================================================================================== + runtimeEnv: { + /** + * You can't destruct `process.env` as a regular object during the Next.js edge runtime (e.g. + * with middleware) or client-side, so we need to destruct it manually. + */ + NEXT_SECRET_URL_ORM_DRIZZLE: process.env.NEXT_SECRET_URL_ORM_DRIZZLE, + NEXT_PUBLIC_URL_AUTHJS: process.env.NEXT_PUBLIC_URL_AUTHJS, + NODE_ENV: process.env.NODE_ENV, + NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: + process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, + CLERK_SECRET_KEY: process.env.CLERK_SECRET_KEY, + RESEND_API_KEY: process.env.RESEND_API_KEY, + EMAIL_FROM_ADDRESS: process.env.EMAIL_FROM_ADDRESS, + UPLOADTHING_SECRET: process.env.UPLOADTHING_SECRET, + UPLOADTHING_APP_ID: process.env.UPLOADTHING_APP_ID, + STRIPE_API_KEY: process.env.STRIPE_API_KEY, + STRIPE_WEBHOOK_SECRET: process.env.STRIPE_WEBHOOK_SECRET, + STRIPE_STD_MONTHLY_PRICE_ID: process.env.STRIPE_STD_MONTHLY_PRICE_ID, + STRIPE_PRO_MONTHLY_PRICE_ID: process.env.STRIPE_PRO_MONTHLY_PRICE_ID + }, + // !! =========================================================================================== + /** + * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. + * This is especially useful for Docker builds. + */ + skipValidation: !!process.env.SKIP_ENV_VALIDATION +}); + +/* // ?? [ TODO: CONVERT ZOD TO VALIDABOT ] ======================================================= + +import { object, string, url, minLength } from "valibot"; + +const msg = "error -> Please check your env."; + +export const createEnv = object({ + server: object({ + NEXT_SECRET_URL_ORM_DRIZZLE: string([minLength(1, msg), url(msg)]), + }), + + client: object({ + NEXT_PUBLIC_URL_AUTHJS: string([minLength(1, msg), url(msg)]), + }), + + runtimeEnv: object({}), +}); + +// ============================================================================================= */ diff --git a/src/islands/common/providers.tsx b/src/islands/common/providers.tsx index 45cead7..d64846c 100644 --- a/src/islands/common/providers.tsx +++ b/src/islands/common/providers.tsx @@ -7,6 +7,7 @@ import { ThemeProvider as NextThemeProvider } from "next-themes"; import { I18nProviderClient } from "~/utils/client/i18n"; import { queryClient } from "~/utils/server/query"; +import { WithChildren } from "~/utils/types/with-children"; import en from "~/data/i18n/en"; import { Toaster } from "~/islands/primitives/toast/toaster"; diff --git a/src/islands/sections/hero.tsx b/src/islands/sections/hero.tsx index 8866606..fc4bf25 100644 --- a/src/islands/sections/hero.tsx +++ b/src/islands/sections/hero.tsx @@ -8,7 +8,6 @@ import { getScopedI18n } from "~/utils/server/i18n"; import { Button } from "~/islands/primitives/button"; export default async function HeroHeader() { - // @ts-expect-error unstable implementation const scopedT = await getScopedI18n("pages.home"); return ( @@ -25,7 +24,6 @@ export default async function HeroHeader() {
); } diff --git a/src/utils/appts/socials.ts b/src/utils/appts/socials.ts index 7d6753f..cee89d3 100644 --- a/src/utils/appts/socials.ts +++ b/src/utils/appts/socials.ts @@ -61,7 +61,7 @@ export const networks = ( const invalidKeys: string[] = []; // Construct the networks array by matching input with our default settings. - const networks = Object.entries(input) + const networks: any = Object.entries(input) // !?! .map(([key, value]) => { const networkConfig = networkDefaults[key as NetworkKey]; diff --git a/src/utils/types/appts.d.ts b/src/utils/appts/types.ts similarity index 93% rename from src/utils/types/appts.d.ts rename to src/utils/appts/types.ts index 76419df..de55331 100644 --- a/src/utils/types/appts.d.ts +++ b/src/utils/appts/types.ts @@ -1,4 +1,4 @@ -import { Network } from "~/utils/server/app/socials"; +import { Network } from "./socials"; export type Config = { social: Network[]; diff --git a/src/utils/types/metadata.d.ts b/src/utils/types/metadata.ts similarity index 73% rename from src/utils/types/metadata.d.ts rename to src/utils/types/metadata.ts index 50102ee..ea9afb9 100644 --- a/src/utils/types/metadata.d.ts +++ b/src/utils/types/metadata.ts @@ -1,5 +1,7 @@ import { Metadata } from "next"; +import { PageParams } from "./page-params"; + export type GenerateMetadata = ( params: PageParams ) => Metadata | Promise; diff --git a/src/utils/types/page-params.d.ts b/src/utils/types/page-params.d.ts deleted file mode 100644 index f6510a1..0000000 --- a/src/utils/types/page-params.d.ts +++ /dev/null @@ -1 +0,0 @@ -type PageParams = { params: { locale: string } }; diff --git a/src/utils/types/page-params.ts b/src/utils/types/page-params.ts new file mode 100644 index 0000000..a0da313 --- /dev/null +++ b/src/utils/types/page-params.ts @@ -0,0 +1 @@ +export type PageParams = { params: { locale: string } }; diff --git a/src/utils/types/store-main.ts b/src/utils/types/store-main.ts new file mode 100644 index 0000000..47bc19c --- /dev/null +++ b/src/utils/types/store-main.ts @@ -0,0 +1,97 @@ +import type { cartItemSchema, checkoutItemSchema } from "~/schema/zod/cart"; +import { type userPrivateMetadataSchema } from "~/schema/zod/auth"; +import { type FileWithPath } from "react-dropzone"; +import { type z } from "zod"; + +import { type Product } from "~/data/db/schema"; + +import { type Icons } from "~/islands/wrappers/icons"; + +export interface NavItem { + title: string; + href?: string; + disabled?: boolean; + external?: boolean; + icon?: keyof typeof Icons; + label?: string; + description?: string; +} + +export interface NavItemWithChildren extends NavItem { + items: NavItemWithChildren[]; +} + +export interface NavItemWithOptionalChildren extends NavItem { + items?: NavItemWithChildren[]; +} + +export interface FooterItem { + title: string; + items: { + title: string; + href: string; + external?: boolean; + }[]; +} + +export type MainNavItem = NavItemWithOptionalChildren; + +export type SidebarNavItem = NavItemWithChildren; + +export type UserRole = z.infer; + +export interface Option { + label: string; + value: string; + icon?: React.ComponentType<{ className?: string }>; +} + +export type FileWithPreview = FileWithPath & { + preview: string; +}; + +export interface StoredFile { + id: string; + name: string; + url: string; +} + +export interface DataTableSearchableColumn { + id: keyof TData; + title: string; +} + +export interface DataTableFilterableColumn + extends DataTableSearchableColumn { + options: Option[]; +} + +export type CartItem = z.infer; + +export type CheckoutItem = z.infer; + +export interface CartLineItem + extends Pick< + Product, + | "id" + | "name" + | "images" + | "category" + | "subcategory" + | "price" + | "inventory" + | "storeId" + > { + quantity?: number; + storeName: string | null; +} + +export interface SubscriptionPlan { + id: "basic" | "standard" | "pro"; + name: string; + description: string; + features: string[]; + stripePriceId: string; + price: number; + isCanceled?: boolean; +} diff --git a/src/utils/types/translate.d.ts b/src/utils/types/translate.ts similarity index 100% rename from src/utils/types/translate.d.ts rename to src/utils/types/translate.ts diff --git a/src/utils/types/with-children.d.ts b/src/utils/types/with-children.d.ts deleted file mode 100644 index d317d5c..0000000 --- a/src/utils/types/with-children.d.ts +++ /dev/null @@ -1 +0,0 @@ -type WithChildren = T & { children: React.ReactNode }; diff --git a/src/utils/types/with-children.ts b/src/utils/types/with-children.ts new file mode 100644 index 0000000..3af8319 --- /dev/null +++ b/src/utils/types/with-children.ts @@ -0,0 +1 @@ +export type WithChildren = T & { children: React.ReactNode }; diff --git a/tsconfig.json b/tsconfig.json index 6491a38..f1dc1f4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,28 +1,27 @@ { "compilerOptions": { - "target": "esnext", "lib": ["dom", "dom.iterable", "esnext"], + "moduleResolution": "bundler", + "target": "esnext", + "module": "esnext", + "jsx": "preserve", + "allowJs": true, "strict": true, "noEmit": true, - "allowJs": true, - "jsx": "preserve", - "module": "esnext", "incremental": true, "skipLibCheck": true, + "removeComments": true, "esModuleInterop": true, "isolatedModules": true, "resolveJsonModule": true, - "moduleResolution": "bundler", - // !! Turn Back on When Things are Stable !! - "strictPropertyInitialization": false, // !! + "strictPropertyInitialization": true, "forceConsistentCasingInFileNames": true, "allowSyntheticDefaultImports": true, "noUncheckedIndexedAccess": true, "downlevelIteration": true, - "strictNullChecks": false, // !! - "removeComments": true, - "noImplicitAny": false, // !! - "alwaysStrict": false, // !! + "strictNullChecks": true, + "noImplicitAny": true, + "alwaysStrict": true, "sourceMap": true, "checkJs": true, "baseUrl": ".", @@ -39,6 +38,7 @@ "include": [ ".next/types/**/*.ts", "next-env.d.ts", + "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.cjs",