diff --git a/app/(docs)/docs/[[...slug]]/page.tsx b/app/(docs)/docs/[[...slug]]/page.tsx index 051d1134..b6e525a8 100644 --- a/app/(docs)/docs/[[...slug]]/page.tsx +++ b/app/(docs)/docs/[[...slug]]/page.tsx @@ -10,6 +10,7 @@ import { DashboardTableOfContents } from "@/components/toc" import "@/styles/mdx.css" import { Metadata } from "next" +import { env } from "@/env.mjs" import { absoluteUrl } from "@/lib/utils" interface DocPageProps { @@ -38,7 +39,7 @@ export async function generateMetadata({ return {} } - const url = process.env.NEXT_PUBLIC_APP_URL + const url = env.NEXT_PUBLIC_APP_URL const ogUrl = new URL(`${url}/api/og`) ogUrl.searchParams.set("heading", doc.description ?? doc.title) diff --git a/app/(docs)/guides/[...slug]/page.tsx b/app/(docs)/guides/[...slug]/page.tsx index 11c49e13..d4016b46 100644 --- a/app/(docs)/guides/[...slug]/page.tsx +++ b/app/(docs)/guides/[...slug]/page.tsx @@ -11,6 +11,7 @@ import { DashboardTableOfContents } from "@/components/toc" import "@/styles/mdx.css" import { Metadata } from "next" +import { env } from "@/env.mjs" import { absoluteUrl, cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" @@ -40,7 +41,7 @@ export async function generateMetadata({ return {} } - const url = process.env.NEXT_PUBLIC_APP_URL + const url = env.NEXT_PUBLIC_APP_URL const ogUrl = new URL(`${url}/api/og`) ogUrl.searchParams.set("heading", guide.title) diff --git a/app/(marketing)/[...slug]/page.tsx b/app/(marketing)/[...slug]/page.tsx index 4a3bdb75..02797a11 100644 --- a/app/(marketing)/[...slug]/page.tsx +++ b/app/(marketing)/[...slug]/page.tsx @@ -6,6 +6,7 @@ import { Mdx } from "@/components/mdx-components" import "@/styles/mdx.css" import { Metadata } from "next" +import { env } from "@/env.mjs" import { siteConfig } from "@/config/site" import { absoluteUrl } from "@/lib/utils" @@ -35,7 +36,7 @@ export async function generateMetadata({ return {} } - const url = process.env.NEXT_PUBLIC_APP_URL + const url = env.NEXT_PUBLIC_APP_URL const ogUrl = new URL(`${url}/api/og`) ogUrl.searchParams.set("heading", page.title) diff --git a/app/(marketing)/blog/[...slug]/page.tsx b/app/(marketing)/blog/[...slug]/page.tsx index 0032ab8c..6889a585 100644 --- a/app/(marketing)/blog/[...slug]/page.tsx +++ b/app/(marketing)/blog/[...slug]/page.tsx @@ -8,6 +8,7 @@ import { Metadata } from "next" import Image from "next/image" import Link from "next/link" +import { env } from "@/env.mjs" import { absoluteUrl, cn, formatDate } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" import { Icons } from "@/components/icons" @@ -38,7 +39,7 @@ export async function generateMetadata({ return {} } - const url = process.env.NEXT_PUBLIC_APP_URL + const url = env.NEXT_PUBLIC_APP_URL const ogUrl = new URL(`${url}/api/og`) ogUrl.searchParams.set("heading", post.title) diff --git a/app/(marketing)/page.tsx b/app/(marketing)/page.tsx index d395c752..9b321bd1 100644 --- a/app/(marketing)/page.tsx +++ b/app/(marketing)/page.tsx @@ -1,5 +1,6 @@ import Link from "next/link" +import { env } from "@/env.mjs" import { siteConfig } from "@/config/site" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" @@ -11,7 +12,7 @@ async function getGitHubStars(): Promise { { headers: { Accept: "application/vnd.github+json", - Authorization: `Bearer ${process.env.GITHUB_ACCESS_TOKEN}`, + Authorization: `Bearer ${env.GITHUB_ACCESS_TOKEN}`, }, next: { revalidate: 60, diff --git a/app/api/webhooks/stripe/route.ts b/app/api/webhooks/stripe/route.ts index 18c00fbd..7d5d96a0 100644 --- a/app/api/webhooks/stripe/route.ts +++ b/app/api/webhooks/stripe/route.ts @@ -1,6 +1,7 @@ import { headers } from "next/headers" import Stripe from "stripe" +import { env } from "@/env.mjs" import { db } from "@/lib/db" import { stripe } from "@/lib/stripe" @@ -14,7 +15,7 @@ export async function POST(req: Request) { event = stripe.webhooks.constructEvent( body, signature, - process.env.STRIPE_WEBHOOK_SECRET || "" + env.STRIPE_WEBHOOK_SECRET ) } catch (error) { return new Response(`Webhook Error: ${error.message}`, { status: 400 }) diff --git a/config/subscriptions.ts b/config/subscriptions.ts index bd4e6294..235a95ac 100644 --- a/config/subscriptions.ts +++ b/config/subscriptions.ts @@ -1,4 +1,5 @@ import { SubscriptionPlan } from "types" +import { env } from "@/env.mjs" export const freePlan: SubscriptionPlan = { name: "Free", @@ -10,5 +11,5 @@ export const freePlan: SubscriptionPlan = { export const proPlan: SubscriptionPlan = { name: "PRO", description: "The PRO plan has unlimited posts.", - stripePriceId: process.env.STRIPE_PRO_MONTHLY_PLAN_ID || "", + stripePriceId: env.STRIPE_PRO_MONTHLY_PLAN_ID || "", } diff --git a/env.mjs b/env.mjs new file mode 100644 index 00000000..b3e960ab --- /dev/null +++ b/env.mjs @@ -0,0 +1,41 @@ +import { createEnv } from "@t3-oss/env-nextjs" +import { z } from "zod" + +export const env = createEnv({ + server: { + // This is optional because it's only used in development. + // See https://next-auth.js.org/deployment. + NEXTAUTH_URL: z.string().url().optional(), + NEXTAUTH_SECRET: z.string().min(1), + GITHUB_CLIENT_ID: z.string().min(1), + GITHUB_CLIENT_SECRET: z.string().min(1), + GITHUB_ACCESS_TOKEN: z.string().min(1), + DATABASE_URL: z.string().min(1), + SMTP_FROM: z.string().min(1), + POSTMARK_API_TOKEN: z.string().min(1), + POSTMARK_SIGN_IN_TEMPLATE: z.string().min(1), + POSTMARK_ACTIVATION_TEMPLATE: z.string().min(1), + STRIPE_API_KEY: z.string().min(1), + STRIPE_WEBHOOK_SECRET: z.string().min(1), + STRIPE_PRO_MONTHLY_PLAN_ID: z.string().min(1), + }, + client: { + NEXT_PUBLIC_APP_URL: z.string().min(1), + }, + runtimeEnv: { + NEXTAUTH_URL: process.env.NEXTAUTH_URL, + NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET, + GITHUB_CLIENT_ID: process.env.GITHUB_CLIENT_ID, + GITHUB_CLIENT_SECRET: process.env.GITHUB_CLIENT_SECRET, + GITHUB_ACCESS_TOKEN: process.env.GITHUB_ACCESS_TOKEN, + DATABASE_URL: process.env.DATABASE_URL, + SMTP_FROM: process.env.SMTP_FROM, + POSTMARK_API_TOKEN: process.env.POSTMARK_API_TOKEN, + POSTMARK_SIGN_IN_TEMPLATE: process.env.POSTMARK_SIGN_IN_TEMPLATE, + POSTMARK_ACTIVATION_TEMPLATE: process.env.POSTMARK_ACTIVATION_TEMPLATE, + STRIPE_API_KEY: process.env.STRIPE_API_KEY, + STRIPE_WEBHOOK_SECRET: process.env.STRIPE_WEBHOOK_SECRET, + STRIPE_PRO_MONTHLY_PLAN_ID: process.env.STRIPE_PRO_MONTHLY_PLAN_ID, + NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL, + }, +}) diff --git a/lib/auth.ts b/lib/auth.ts index 885adf50..f4fbd794 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -4,11 +4,11 @@ import EmailProvider from "next-auth/providers/email" import GitHubProvider from "next-auth/providers/github" import { Client } from "postmark" +import { env } from "@/env.mjs" import { siteConfig } from "@/config/site" import { db } from "@/lib/db" -// TODO: Move env vars to env a la t3. -const postmarkClient = new Client(process.env.POSTMARK_API_TOKEN || "") +const postmarkClient = new Client(env.POSTMARK_API_TOKEN) export const authOptions: NextAuthOptions = { // huh any! I know. @@ -23,11 +23,11 @@ export const authOptions: NextAuthOptions = { }, providers: [ GitHubProvider({ - clientId: process.env.GITHUB_CLIENT_ID || "", - clientSecret: process.env.GITHUB_CLIENT_SECRET || "", + clientId: env.GITHUB_CLIENT_ID, + clientSecret: env.GITHUB_CLIENT_SECRET, }), EmailProvider({ - from: process.env.SMTP_FROM, + from: env.SMTP_FROM, sendVerificationRequest: async ({ identifier, url, provider }) => { const user = await db.user.findUnique({ where: { @@ -39,8 +39,8 @@ export const authOptions: NextAuthOptions = { }) const templateId = user?.emailVerified - ? process.env.POSTMARK_SIGN_IN_TEMPLATE - : process.env.POSTMARK_ACTIVATION_TEMPLATE + ? env.POSTMARK_SIGN_IN_TEMPLATE + : env.POSTMARK_ACTIVATION_TEMPLATE if (!templateId) { throw new Error("Missing template id") } diff --git a/lib/stripe.ts b/lib/stripe.ts index 506b13f4..f1128229 100644 --- a/lib/stripe.ts +++ b/lib/stripe.ts @@ -1,6 +1,8 @@ import Stripe from "stripe" -export const stripe = new Stripe(process.env.STRIPE_API_KEY || "", { +import { env } from "@/env.mjs" + +export const stripe = new Stripe(env.STRIPE_API_KEY, { apiVersion: "2022-11-15", typescript: true, }) diff --git a/lib/utils.ts b/lib/utils.ts index a17582e2..2d1675ac 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -1,6 +1,8 @@ import { ClassValue, clsx } from "clsx" import { twMerge } from "tailwind-merge" +import { env } from "@/env.mjs" + export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) } @@ -15,5 +17,5 @@ export function formatDate(input: string | number): string { } export function absoluteUrl(path: string) { - return `${process.env.NEXT_PUBLIC_APP_URL}${path}` + return `${env.NEXT_PUBLIC_APP_URL}${path}` } diff --git a/next.config.mjs b/next.config.mjs index b661ac22..b2078dc2 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,5 +1,7 @@ import { withContentlayer } from "next-contentlayer" +import "./env.mjs" + /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, diff --git a/package.json b/package.json index ccee13f7..00460d22 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "@radix-ui/react-toggle": "^1.0.2", "@radix-ui/react-toggle-group": "^1.0.3", "@radix-ui/react-tooltip": "^1.0.5", + "@t3-oss/env-nextjs": "^0.2.2", "@typescript-eslint/parser": "^5.59.0", "@vercel/analytics": "^1.0.0", "@vercel/og": "^0.0.21", @@ -66,7 +67,7 @@ "contentlayer": "^0.3.1", "date-fns": "^2.29.3", "lucide-react": "^0.92.0", - "next": "^13.3.1", + "next": "13.3.2-canary.13", "next-auth": "4.22.1", "next-contentlayer": "^0.3.1", "next-themes": "^0.2.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 050ffa57..61214310 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -121,6 +121,9 @@ dependencies: '@radix-ui/react-tooltip': specifier: ^1.0.5 version: 1.0.5(@types/react@18.0.15)(react-dom@18.2.0)(react@18.2.0) + '@t3-oss/env-nextjs': + specifier: ^0.2.2 + version: 0.2.2(zod@3.21.4) '@typescript-eslint/parser': specifier: ^5.59.0 version: 5.59.0(eslint@8.39.0)(typescript@4.7.4) @@ -152,17 +155,17 @@ dependencies: specifier: ^0.92.0 version: 0.92.0(prop-types@15.8.1)(react@18.2.0) next: - specifier: ^13.3.1 - version: 13.3.1(@babel/core@7.21.4)(@opentelemetry/api@1.1.0)(react-dom@18.2.0)(react@18.2.0) + specifier: 13.3.2-canary.13 + version: 13.3.2-canary.13(@babel/core@7.21.4)(@opentelemetry/api@1.1.0)(react-dom@18.2.0)(react@18.2.0) next-auth: specifier: 4.22.1 - version: 4.22.1(next@13.3.1)(nodemailer@6.9.1)(react-dom@18.2.0)(react@18.2.0) + version: 4.22.1(next@13.3.2-canary.13)(nodemailer@6.9.1)(react-dom@18.2.0)(react@18.2.0) next-contentlayer: specifier: ^0.3.1 - version: 0.3.1(esbuild@0.17.18)(next@13.3.1)(react-dom@18.2.0)(react@18.2.0) + version: 0.3.1(esbuild@0.17.18)(next@13.3.2-canary.13)(react-dom@18.2.0)(react@18.2.0) next-themes: specifier: ^0.2.1 - version: 0.2.1(next@13.3.1)(react-dom@18.2.0)(react@18.2.0) + version: 0.2.1(next@13.3.2-canary.13)(react-dom@18.2.0)(react@18.2.0) nodemailer: specifier: ^6.9.1 version: 6.9.1 @@ -1358,11 +1361,11 @@ packages: next-auth: ^4 dependencies: '@prisma/client': 4.13.0(prisma@4.13.0) - next-auth: 4.22.1(next@13.3.1)(nodemailer@6.9.1)(react-dom@18.2.0)(react@18.2.0) + next-auth: 4.22.1(next@13.3.2-canary.13)(nodemailer@6.9.1)(react-dom@18.2.0)(react@18.2.0) dev: false - /@next/env@13.3.1: - resolution: {integrity: sha512-EDtCoedIZC7JlUQ3uaQpSc4aVmyhbLHmQVALg7pFfQgOTjgSnn7mKtA0DiCMkYvvsx6aFb5octGMtWrOtGXW9A==} + /@next/env@13.3.2-canary.13: + resolution: {integrity: sha512-5An4FW4riPxsNDOwaFKT8JX0wP++sKB5hHSVUqmwcqxmtNeyg6Ax86TdvWFQGBdi9evDBngMJptRaZKC1eHoFg==} dev: false /@next/eslint-plugin-next@13.0.0: @@ -1371,8 +1374,8 @@ packages: glob: 7.1.7 dev: true - /@next/swc-darwin-arm64@13.3.1: - resolution: {integrity: sha512-UXPtriEc/pBP8luSLSCZBcbzPeVv+SSjs9cH/KygTbhmACye8/OOXRZO13Z2Wq1G0gLmEAIHQAOuF+vafPd2lw==} + /@next/swc-darwin-arm64@13.3.2-canary.13: + resolution: {integrity: sha512-VcSa2+gEOPMfzHoAamkH25wxTit3kOoXeTXJEKDbTIGuUovyY41/l5GLAv+rqY7Pp4moUmpFivOk4CbdbXBaNw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1380,8 +1383,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64@13.3.1: - resolution: {integrity: sha512-lT36yYxosCfLtplFzJWgo0hrPu6/do8+msgM7oQkPeohDNdhjtjFUgOOwdSnPublLR6Mo2Ym4P/wl5OANuD2bw==} + /@next/swc-darwin-x64@13.3.2-canary.13: + resolution: {integrity: sha512-ve8p/7Y45GzEZ5mCgeMxf6tJAk5ZLmztnvmVHiQjoOLYvkhoz7rSJVi7z+bt5yv8/QQUlXF90/naSD35rm2RYw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1389,8 +1392,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu@13.3.1: - resolution: {integrity: sha512-wRb76nLWJhonH8s3kxC/1tFguEkeOPayIwe9mkaz1G/yeS3OrjeyKMJsb4+Kdg0zbTo53bNCOl59NNtDM7yyyw==} + /@next/swc-linux-arm64-gnu@13.3.2-canary.13: + resolution: {integrity: sha512-OtAk9KQp0pG0qCduRMmABhGKoXyjc+9Jn5vRpEEWbbFHL0kx8gHpJbkeiohfm493wpY5XB3JQAlEVcpiHkQFRg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1398,8 +1401,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl@13.3.1: - resolution: {integrity: sha512-qz3BzjJRZ16Iq/jrp+pjiYOc0jTjHlfmxQmZk9x/+5uhRP6/eWQSTAPVJ33BMo6oK5O5N4644OgTAbzXzorecg==} + /@next/swc-linux-arm64-musl@13.3.2-canary.13: + resolution: {integrity: sha512-B3+0YSoDteMlVwUhfurMoWZjw8WFJztkXq7Uono+2EhHjLP1uqv+DJMVcorQO3x13oD3kqCgSa+tlFwjKDqeQw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1407,8 +1410,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu@13.3.1: - resolution: {integrity: sha512-6mgkLmwlyWlomQmpl21I3hxgqE5INoW4owTlcLpNsd1V4wP+J46BlI/5zV5KWWbzjfncIqzXoeGs5Eg+1GHODA==} + /@next/swc-linux-x64-gnu@13.3.2-canary.13: + resolution: {integrity: sha512-e/tO3Woq/fyBR+Q/3O8yDdatT64inzrFt/nh/KWG6xZV+Nda0y4dKYPTKfTEuOK9hbMT+/0vbeSMtH98BeesXA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1416,8 +1419,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl@13.3.1: - resolution: {integrity: sha512-uqm5sielhQmKJM+qayIhgZv1KlS5pqTdQ99b+Z7hMWryXS96qE0DftTmMZowBcUL6x7s2vSXyH5wPtO1ON7LBg==} + /@next/swc-linux-x64-musl@13.3.2-canary.13: + resolution: {integrity: sha512-BlXeIpG1ZAldsdU1K7VmI7V+65PU3DL5mGzhxkNrhLJZUwvMuq354oo77gwxzbJzVxvwZ1bRGJ/eZOWIs+Gjxw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1425,8 +1428,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc@13.3.1: - resolution: {integrity: sha512-WomIiTj/v3LevltlibNQKmvrOymNRYL+a0dp5R73IwPWN5FvXWwSELN/kiNALig/+T3luc4qHNTyvMCp9L6U5Q==} + /@next/swc-win32-arm64-msvc@13.3.2-canary.13: + resolution: {integrity: sha512-AHUxH2aRF0MoHGjGkQydqD1LU9RMIdREMD9A7Tf2bCcMvdFYlyfKP8DfW9T3bh+YBnGlFo1/HlSy1mBGHbUTfA==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -1434,8 +1437,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc@13.3.1: - resolution: {integrity: sha512-M+PoH+0+q658wRUbs285RIaSTYnGBSTdweH/0CdzDgA6Q4rBM0sQs4DHmO3BPP0ltCO/vViIoyG7ks66XmCA5g==} + /@next/swc-win32-ia32-msvc@13.3.2-canary.13: + resolution: {integrity: sha512-qD9rMFLeyEVNSMsRgrpB5p8mrCt2Nsw7F57qe4Z72H6w9anJJOfU1Y0gm+c//J/Q0Vo8hcnnwLEbThBtR0GtLQ==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -1443,8 +1446,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc@13.3.1: - resolution: {integrity: sha512-Sl1F4Vp5Z1rNXWZYqJwMuWRRol4bqOB6+/d7KqkgQ4AcafKPN1PZmpkCoxv4UFHtFNIB7EotnuIhtXu3zScicQ==} + /@next/swc-win32-x64-msvc@13.3.2-canary.13: + resolution: {integrity: sha512-ZfOwe3hLtp94XL1bZn3kw4I5tQtXPYf47oGx4Uk5GhVWWMHMXEfuWKb4ACNYnX041V1HVDAyfHh/dmqsiUSKZQ==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -2708,12 +2711,29 @@ packages: string.prototype.codepointat: 0.2.1 dev: false - /@swc/helpers@0.5.0: - resolution: {integrity: sha512-SjY/p4MmECVVEWspzSRpQEM3sjR17sP8PbGxELWrT+YZMBfiUyt1MRUNjMV23zohwlG2HYtCQOsCwsTHguXkyg==} + /@swc/helpers@0.5.1: + resolution: {integrity: sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==} dependencies: tslib: 2.5.0 dev: false + /@t3-oss/env-core@0.2.2(zod@3.21.4): + resolution: {integrity: sha512-Jiuph14/L3L9EDaU0O0YiLeaKUcWA9c3mWYuKem8+L64i3Iwz+IbKdl5Jp4cx+JbOsS/aptwGZplnxSHhm2gMQ==} + peerDependencies: + zod: ^3.0.0 + dependencies: + zod: 3.21.4 + dev: false + + /@t3-oss/env-nextjs@0.2.2(zod@3.21.4): + resolution: {integrity: sha512-9LnVpTkf/8WkggyVN6Liz9Ma9a7fLzV00b5BngWj3HI3iWDfddsWaqCf/H0f46Bgu29NubP3Bwajf1JieVrxFA==} + peerDependencies: + zod: ^3.0.0 + dependencies: + '@t3-oss/env-core': 0.2.2(zod@3.21.4) + zod: 3.21.4 + dev: false + /@tailwindcss/line-clamp@0.4.4(tailwindcss@3.3.1): resolution: {integrity: sha512-5U6SY5z8N42VtrCrKlsTAA35gy2VSyYtHWCsg1H87NU1SXnEfekTVlrga9fzUDrrHcGi2Lb5KenUWb4lRQT5/g==} peerDependencies: @@ -5999,7 +6019,7 @@ packages: /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - /next-auth@4.22.1(next@13.3.1)(nodemailer@6.9.1)(react-dom@18.2.0)(react@18.2.0): + /next-auth@4.22.1(next@13.3.2-canary.13)(nodemailer@6.9.1)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-NTR3f6W7/AWXKw8GSsgSyQcDW6jkslZLH8AiZa5PQ09w1kR8uHtR9rez/E9gAq/o17+p0JYHE8QjF3RoniiObA==} peerDependencies: next: ^12.2.5 || ^13 @@ -6014,7 +6034,7 @@ packages: '@panva/hkdf': 1.0.4 cookie: 0.5.0 jose: 4.14.1 - next: 13.3.1(@babel/core@7.21.4)(@opentelemetry/api@1.1.0)(react-dom@18.2.0)(react@18.2.0) + next: 13.3.2-canary.13(@babel/core@7.21.4)(@opentelemetry/api@1.1.0)(react-dom@18.2.0)(react@18.2.0) nodemailer: 6.9.1 oauth: 0.9.15 openid-client: 5.4.1 @@ -6025,7 +6045,7 @@ packages: uuid: 8.3.2 dev: false - /next-contentlayer@0.3.1(esbuild@0.17.18)(next@13.3.1)(react-dom@18.2.0)(react@18.2.0): + /next-contentlayer@0.3.1(esbuild@0.17.18)(next@13.3.2-canary.13)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-wqt4H+yq7Hw8vEKpTux1l8zXd/1dyHLY5M9SICctxupn0Tvd1jDmUSTnhQxqUYK9XspL6UYuGqHL3qQ05tnjBQ==} peerDependencies: next: ^12 || ^13 @@ -6034,7 +6054,7 @@ packages: dependencies: '@contentlayer/core': 0.3.1(esbuild@0.17.18) '@contentlayer/utils': 0.3.1 - next: 13.3.1(@babel/core@7.21.4)(@opentelemetry/api@1.1.0)(react-dom@18.2.0)(react@18.2.0) + next: 13.3.2-canary.13(@babel/core@7.21.4)(@opentelemetry/api@1.1.0)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) transitivePeerDependencies: @@ -6044,21 +6064,21 @@ packages: - supports-color dev: false - /next-themes@0.2.1(next@13.3.1)(react-dom@18.2.0)(react@18.2.0): + /next-themes@0.2.1(next@13.3.2-canary.13)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==} peerDependencies: next: '*' react: '*' react-dom: '*' dependencies: - next: 13.3.1(@babel/core@7.21.4)(@opentelemetry/api@1.1.0)(react-dom@18.2.0)(react@18.2.0) + next: 13.3.2-canary.13(@babel/core@7.21.4)(@opentelemetry/api@1.1.0)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /next@13.3.1(@babel/core@7.21.4)(@opentelemetry/api@1.1.0)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-eByWRxPzKHs2oQz1yE41LX35umhz86ZSZ+mYyXBqn2IBi2hyUqxBA88avywdr4uyH+hCJczegGsDGWbzQA5Rqw==} - engines: {node: '>=14.18.0'} + /next@13.3.2-canary.13(@babel/core@7.21.4)(@opentelemetry/api@1.1.0)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-bz3TkzSdiY+ABBW0/aqOl0EvQTQapQtkvsPYCR5LGAM0eeQ8V6ZPrH+4RhkHJMN48qNU9MQZQlP7SsKCabGciw==} + engines: {node: '>=16.8.0'} hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 @@ -6077,9 +6097,9 @@ packages: sass: optional: true dependencies: - '@next/env': 13.3.1 + '@next/env': 13.3.2-canary.13 '@opentelemetry/api': 1.1.0 - '@swc/helpers': 0.5.0 + '@swc/helpers': 0.5.1 busboy: 1.6.0 caniuse-lite: 1.0.30001481 postcss: 8.4.14 @@ -6087,15 +6107,15 @@ packages: react-dom: 18.2.0(react@18.2.0) styled-jsx: 5.1.1(@babel/core@7.21.4)(react@18.2.0) optionalDependencies: - '@next/swc-darwin-arm64': 13.3.1 - '@next/swc-darwin-x64': 13.3.1 - '@next/swc-linux-arm64-gnu': 13.3.1 - '@next/swc-linux-arm64-musl': 13.3.1 - '@next/swc-linux-x64-gnu': 13.3.1 - '@next/swc-linux-x64-musl': 13.3.1 - '@next/swc-win32-arm64-msvc': 13.3.1 - '@next/swc-win32-ia32-msvc': 13.3.1 - '@next/swc-win32-x64-msvc': 13.3.1 + '@next/swc-darwin-arm64': 13.3.2-canary.13 + '@next/swc-darwin-x64': 13.3.2-canary.13 + '@next/swc-linux-arm64-gnu': 13.3.2-canary.13 + '@next/swc-linux-arm64-musl': 13.3.2-canary.13 + '@next/swc-linux-x64-gnu': 13.3.2-canary.13 + '@next/swc-linux-x64-musl': 13.3.2-canary.13 + '@next/swc-win32-arm64-msvc': 13.3.2-canary.13 + '@next/swc-win32-ia32-msvc': 13.3.2-canary.13 + '@next/swc-win32-x64-msvc': 13.3.2-canary.13 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros diff --git a/prettier.config.js b/prettier.config.js index 83bb10be..c72df582 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -11,6 +11,7 @@ module.exports = { "", "", "^types$", + "^@/env(.*)$", "^@/types/(.*)$", "^@/config/(.*)$", "^@/lib/(.*)$",