nicoalbanese / kirimase

Build full-stack Next.js apps, incredibly fast
https://kirimase.dev
MIT License
2.39k stars 107 forks source link

Double env validation files when using T3 #121

Closed thecmdrunner closed 5 months ago

thecmdrunner commented 5 months ago

Config File

{
  "hasSrc": true,
  "packages": [
    "drizzle",
    "trpc",
    "next-auth",
    "shadcn-ui",
    "stripe"
  ],
  "preferredPackageManager": "pnpm",
  "t3": true,
  "alias": "@",
  "rootPath": "src/",
  "orm": "drizzle",
  "auth": "next-auth",
  "provider": "planetscale",
  "driver": "mysql",
  "componentLib": "shadcn-ui"
}

Describe the bug T3 now uses env.js instead of env.mjs file to store env validations, but Kirimase CLI creates an env.mjs anyway, instead of adding the required variables in the existing env.js.

To Reproduce Steps to reproduce the behavior:

  1. Init with T3 - next-auth and Drizzle
  2. Init kirimase with Stripe
  3. See multiple env files - env.js (made by T3) and env.mjs (made by Kirimase)

Expected behavior Kirimase should add the required variables in the existing env.js file if it exists

Screenshots image

Desktop (please complete the following information):

nicoalbanese commented 5 months ago

Thanks for flagging! Do you have any documentation on the new .js format as opposed to .mjs as the documentation I've found still uses that format.

thecmdrunner commented 5 months ago

@nicoalbanese It's there in the T3 docs 😄 https://create.t3.gg/en/usage/env-variables#envjs