Fix env imports

This commit is contained in:
Fergal Moran
2024-02-02 20:20:21 +00:00
parent fcfd23ccdd
commit d3b86b1313
9 changed files with 25 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
import "dotenv/config"; import "dotenv/config";
import type { Config } from "drizzle-kit"; import type { Config } from "drizzle-kit";
import { env } from "@/env"; import { env } from "@/env.cjs";
export default { export default {
schema: "./src/server/db/schema", schema: "./src/server/db/schema",

View File

@@ -2,7 +2,7 @@
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds. * for Docker builds.
*/ */
await import("./src/env.js"); await import("./src/env.cjs");
/** @type {import("next").NextConfig} */ /** @type {import("next").NextConfig} */
const config = {}; const config = {};

View File

@@ -1,7 +1,7 @@
import { fetchRequestHandler } from "@trpc/server/adapters/fetch"; import { fetchRequestHandler } from "@trpc/server/adapters/fetch";
import { type NextRequest } from "next/server"; import { type NextRequest } from "next/server";
import { env } from "@/env"; import { env } from "@/env.cjs";
import { appRouter } from "@/server/api/root"; import { appRouter } from "@/server/api/root";
import { createTRPCContext } from "@/server/api/trpc"; import { createTRPCContext } from "@/server/api/trpc";

View File

@@ -1,18 +1,18 @@
"use client"; "use client"
import * as React from "react"; import * as React from "react"
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"; import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"
import { type VariantProps } from "class-variance-authority"; import { type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils"
import { toggleVariants } from "@/components/ui/toggle"; import { toggleVariants } from "@/components/ui/toggle"
const ToggleGroupContext = React.createContext< const ToggleGroupContext = React.createContext<
VariantProps<typeof toggleVariants> VariantProps<typeof toggleVariants>
>({ >({
size: "default", size: "default",
variant: "default", variant: "default",
}); })
const ToggleGroup = React.forwardRef< const ToggleGroup = React.forwardRef<
React.ElementRef<typeof ToggleGroupPrimitive.Root>, React.ElementRef<typeof ToggleGroupPrimitive.Root>,
@@ -28,34 +28,34 @@ const ToggleGroup = React.forwardRef<
{children} {children}
</ToggleGroupContext.Provider> </ToggleGroupContext.Provider>
</ToggleGroupPrimitive.Root> </ToggleGroupPrimitive.Root>
)); ))
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName; ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName
const ToggleGroupItem = React.forwardRef< const ToggleGroupItem = React.forwardRef<
React.ElementRef<typeof ToggleGroupPrimitive.Item>, React.ElementRef<typeof ToggleGroupPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> & React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &
VariantProps<typeof toggleVariants> VariantProps<typeof toggleVariants>
>(({ className, children, variant, size, ...props }, ref) => { >(({ className, children, variant, size, ...props }, ref) => {
const context = React.useContext(ToggleGroupContext); const context = React.useContext(ToggleGroupContext)
return ( return (
<ToggleGroupPrimitive.Item <ToggleGroupPrimitive.Item
ref={ref} ref={ref}
className={cn( className={cn(
toggleVariants({ toggleVariants({
variant: context.variant ?? variant, variant: context.variant || variant,
size: context.size ?? size, size: context.size || size,
}), }),
className, className
)} )}
{...props} {...props}
> >
{children} {children}
</ToggleGroupPrimitive.Item> </ToggleGroupPrimitive.Item>
); )
}); })
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName; ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName
export { ToggleGroup, ToggleGroupItem }; export { ToggleGroup, ToggleGroupItem }

View File

@@ -2,7 +2,7 @@ import { type Session } from "next-auth";
import { type ReadonlyHeaders } from "next/dist/server/web/spec-extension/adapters/headers"; import { type ReadonlyHeaders } from "next/dist/server/web/spec-extension/adapters/headers";
import React from "react"; import React from "react";
import { Card, CardContent, CardHeader } from "@/components/ui/card"; import { Card, CardContent, CardHeader } from "@/components/ui/card";
import { env } from "@/env"; import { env } from "@/env.cjs";
type PrintEnvProps = { type PrintEnvProps = {
session: Session | null; session: Session | null;

View File

@@ -4,7 +4,7 @@ import { type DefaultSession, getServerSession, type NextAuthOptions } from "nex
import { redirect } from "next/navigation"; import { redirect } from "next/navigation";
import GoogleProvider from "next-auth/providers/google"; import GoogleProvider from "next-auth/providers/google";
import { type Adapter } from "next-auth/adapters"; import { type Adapter } from "next-auth/adapters";
import { env } from "@/env"; import { env } from "@/env.cjs";
declare module "next-auth" { declare module "next-auth" {
interface Session { interface Session {

View File

@@ -7,7 +7,7 @@ import {
import { type Adapter } from "next-auth/adapters"; import { type Adapter } from "next-auth/adapters";
import DiscordProvider from "next-auth/providers/discord"; import DiscordProvider from "next-auth/providers/discord";
import { env } from "@/env"; import { env } from "@/env.cjs";
import { db } from "@/server/db"; import { db } from "@/server/db";
/** /**

View File

@@ -1,6 +1,6 @@
import { drizzle } from "drizzle-orm/postgres-js"; import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres"; import postgres from "postgres";
import { env } from "@/env"; import { env } from "@/env.cjs";
import { import {
users, users,
accounts, accounts,

View File

@@ -1,4 +1,4 @@
import { env } from "@/env"; import { env } from "@/env.cjs";
import { drizzle } from "drizzle-orm/postgres-js"; import { drizzle } from "drizzle-orm/postgres-js";
import { migrate } from "drizzle-orm/postgres-js/migrator"; import { migrate } from "drizzle-orm/postgres-js/migrator";