diff --git a/drizzle.config.ts b/drizzle.config.ts deleted file mode 100644 index dd648ef..0000000 --- a/drizzle.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -// import { type Config } from "drizzle-kit" - -// import { env } from "@/env.mjs" - -// export default { -// schema: "./src/server/db/schema.ts", -// driver: "mysql2", -// dbCredentials: { -// uri: env.DATABASE_URL, -// }, -// tablesFilter: ["shreyans.sh_*"], -// } satisfies Config diff --git a/next.config.mjs b/next.config.mjs index ae0e3f8..139fa1f 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -5,15 +5,13 @@ import { withContentlayer } from "next-contentlayer" * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful * for Docker builds. */ -await import("./src/env.mjs") +const { env } = await import("./src/env.mjs") /** @type {import("next").NextConfig} */ const config = { compiler: { removeConsole: - process.env.NODE_ENV === "production" - ? { exclude: ["error"] } - : false, + env.NODE_ENV === "production" ? { exclude: ["error"] } : false, }, experimental: { ppr: true, diff --git a/package.json b/package.json index 34823e0..916b977 100644 --- a/package.json +++ b/package.json @@ -1,79 +1,67 @@ { - "name": "shreyans.sh", - "version": "2.0.0", - "private": true, - "scripts": { - "build": "next build", - "db:push": "dotenv drizzle-kit push:mysql", - "db:studio": "dotenv drizzle-kit studio", - "dev": "next dev", - "lint": "next lint", - "start": "next start" - }, - "dependencies": { - "@ianvs/prettier-plugin-sort-imports": "^4.1.1", - "@js-temporal/polyfill": "^0.4.4", - "@radix-ui/react-avatar": "^1.0.4", - "@radix-ui/react-icons": "^1.3.0", - "@radix-ui/react-separator": "^1.0.3", - "@radix-ui/react-slot": "^1.0.2", - "@radix-ui/react-tooltip": "^1.0.7", - "@sentry/nextjs": "^7.85.0", - "@t3-oss/env-nextjs": "^0.7.1", - "@tanstack/react-query": "^5.12.2", - "@trpc/client": "^10.44.1", - "@trpc/next": "^10.44.1", - "@trpc/react-query": "^10.44.1", - "@trpc/server": "^10.44.1", - "@types/luxon": "^3.3.7", - "@unpic/react": "^0.1.4", - "@vercel/analytics": "^1.1.1", - "@vercel/kv": "^1.0.1", - "class-variance-authority": "^0.7.0", - "drizzle-orm": "^0.29.1", - "eslint-plugin-perfectionist": "^2.5.0", - "eslint-plugin-react": "^7.33.2", - "eslint-plugin-tailwindcss": "^3.13.0", - "geist": "^1.2.0", - "html-react-parser": "^5.0.7", - "lucide-react": "^0.294.0", - "luxon": "^3.4.4", - "next": "canary", - "next-contentlayer": "^0.3.4", - "next-themes": "^0.2.1", - "react": "18.2.0", - "react-dom": "18.2.0", - "react-spring": "^9.7.3", - "rehype-slug": "^6.0.0", - "remark-gfm": "^4.0.0", - "remark-hint": "^1.0.10", - "shiki": "^0.14.5", - "superjson": "^2.2.1", - "tailwind-merge": "^2.1.0", - "tailwindcss-animate": "^1.0.7", - "zod": "^3.22.4" - }, - "devDependencies": { - "@types/eslint": "^8.44.8", - "@types/node": "^20.10.4", - "@types/react": "^18.2.42", - "@types/react-dom": "^18.2.17", - "@typescript-eslint/eslint-plugin": "^6.13.2", - "@typescript-eslint/parser": "^6.13.2", - "autoprefixer": "^10.4.16", - "dotenv-cli": "^7.3.0", - "drizzle-kit": "^0.20.6", - "eslint": "^8.55.0", - "eslint-config-next": "^14.0.3", - "postcss": "^8.4.32", - "prettier": "^3.1.0", - "tailwindcss": "insiders", - "typescript": "^5.3.3" - }, - "nextBundleAnalysis": { - "budget": null, - "budgetPercentIncreaseRed": 20, - "minimumChangeThreshold": 0, - "showDetails": true - } -} \ No newline at end of file + "name": "shreyans.sh", + "version": "2.0.0", + "private": true, + "scripts": { + "build": "next build", + "db:push": "dotenv drizzle-kit push:mysql", + "db:studio": "dotenv drizzle-kit studio", + "dev": "next dev", + "lint": "next lint", + "start": "next start" + }, + "dependencies": { + "@ianvs/prettier-plugin-sort-imports": "^4.1.1", + "@radix-ui/react-avatar": "^1.0.4", + "@radix-ui/react-icons": "^1.3.0", + "@radix-ui/react-separator": "^1.0.3", + "@radix-ui/react-slot": "^1.0.2", + "@radix-ui/react-tooltip": "^1.0.7", + "@sentry/nextjs": "^7.85.0", + "@t3-oss/env-nextjs": "^0.7.1", + "@vercel/analytics": "^1.1.1", + "class-variance-authority": "^0.7.0", + "eslint-plugin-perfectionist": "^2.5.0", + "eslint-plugin-react": "^7.33.2", + "eslint-plugin-tailwindcss": "^3.13.0", + "geist": "^1.2.0", + "html-react-parser": "^5.0.7", + "lucide-react": "^0.294.0", + "next": "canary", + "next-contentlayer": "^0.3.4", + "next-themes": "^0.2.1", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-spring": "^9.7.3", + "rehype-slug": "^6.0.0", + "remark-gfm": "^4.0.0", + "remark-hint": "^1.0.10", + "shiki": "^0.14.5", + "tailwind-merge": "^2.1.0", + "tailwindcss-animate": "^1.0.7", + "zod": "^3.22.4" + }, + "devDependencies": { + "@types/eslint": "^8.44.8", + "@types/node": "^20.10.4", + "@types/react": "^18.2.42", + "@types/react-dom": "^18.2.17", + "@typescript-eslint/eslint-plugin": "^6.13.2", + "@typescript-eslint/parser": "^6.13.2", + "autoprefixer": "^10.4.16", + "dotenv-cli": "^7.3.0", + "drizzle-kit": "^0.20.6", + "eslint": "^8.55.0", + "eslint-config-next": "^14.0.3", + "postcss": "^8.4.32", + "prettier": "^3.1.0", + "tailwindcss": "insiders", + "typescript": "^5.3.3" + }, + "nextBundleAnalysis": { + "budget": null, + "budgetPercentIncreaseRed": 20, + "minimumChangeThreshold": 0, + "showDetails": true + } +} diff --git a/src/app/(pages)/blog/views.tsx b/src/app/(pages)/blog/views.tsx index eb4ed35..54b7d71 100644 --- a/src/app/(pages)/blog/views.tsx +++ b/src/app/(pages)/blog/views.tsx @@ -1,5 +1,6 @@ import { unstable_noStore } from "next/cache" +import { env } from "@/env.mjs" import { cn } from "@/lib/utils" type SentryResponse = { @@ -26,7 +27,7 @@ const getViews = async (slug: string) => { api.searchParams.set("query", `(transaction:/blog/${slug})`) const views = await fetch(api, { headers: { - Authorization: `Bearer ${process.env.SENTRY_TOKEN}`, + Authorization: `Bearer ${env.SENTRY_TOKEN}`, }, }) diff --git a/src/app/(pages)/layout.tsx b/src/app/(pages)/layout.tsx index 72aede5..bcd55f2 100644 --- a/src/app/(pages)/layout.tsx +++ b/src/app/(pages)/layout.tsx @@ -81,7 +81,6 @@ export default function RootLayout({ className="mx-auto flex h-fit min-h-screen max-w-xl flex-col items-center justify-between gap-2 px-4 text-base sm:max-w-[46rem]" id="body" > - {/* */}