From 7caebd0dad36d5395b1954c9e310682e92fcb185 Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Fri, 8 Nov 2024 20:50:03 +0530
Subject: [PATCH 01/16] add mail service
---
apps/www/app/(auth)/sign-in/page.tsx | 5 ++---
apps/www/app/(auth)/sign-up/page.tsx | 4 ++--
.../components/custom/{Sign-In.tsx => signinComponent.tsx} | 2 +-
.../components/custom/{Sign-up.tsx => signupComponent.tsx} | 2 +-
4 files changed, 6 insertions(+), 7 deletions(-)
rename apps/www/components/custom/{Sign-In.tsx => signinComponent.tsx} (97%)
rename apps/www/components/custom/{Sign-up.tsx => signupComponent.tsx} (98%)
diff --git a/apps/www/app/(auth)/sign-in/page.tsx b/apps/www/app/(auth)/sign-in/page.tsx
index 45b475f..3c16bea 100644
--- a/apps/www/app/(auth)/sign-in/page.tsx
+++ b/apps/www/app/(auth)/sign-in/page.tsx
@@ -1,10 +1,9 @@
-import SignIn from "@/components/custom/Sign-In";
+import SignInComponent from "@/components/custom/signinComponent";
export default function page() {
return (
- {" "}
-
+
);
}
diff --git a/apps/www/app/(auth)/sign-up/page.tsx b/apps/www/app/(auth)/sign-up/page.tsx
index 9354fcb..7a96bc3 100644
--- a/apps/www/app/(auth)/sign-up/page.tsx
+++ b/apps/www/app/(auth)/sign-up/page.tsx
@@ -1,9 +1,9 @@
-import SignUp from "../../../components/custom/Sign-up";
+import SignUpComponent from "@/components/custom/signupComponent";
export default function page() {
return (
-
+
);
}
diff --git a/apps/www/components/custom/Sign-In.tsx b/apps/www/components/custom/signinComponent.tsx
similarity index 97%
rename from apps/www/components/custom/Sign-In.tsx
rename to apps/www/components/custom/signinComponent.tsx
index 132f323..b958a64 100644
--- a/apps/www/components/custom/Sign-In.tsx
+++ b/apps/www/components/custom/signinComponent.tsx
@@ -21,7 +21,7 @@ const formSchema = z.object({
password: z.string().min(8),
});
-export default function SignIn() {
+export default function SignInComponent() {
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
diff --git a/apps/www/components/custom/Sign-up.tsx b/apps/www/components/custom/signupComponent.tsx
similarity index 98%
rename from apps/www/components/custom/Sign-up.tsx
rename to apps/www/components/custom/signupComponent.tsx
index 56729a0..888387a 100644
--- a/apps/www/components/custom/Sign-up.tsx
+++ b/apps/www/components/custom/signupComponent.tsx
@@ -23,7 +23,7 @@ const formSchema = z.object({
password: z.string().min(8),
});
-export default function SignUp() {
+export default function SignUpComponent() {
const form = useForm>({
resolver: zodResolver(formSchema),
defaultValues: {
From 0e0003035e8280f8a0f910e82b4090dca6241836 Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Sun, 10 Nov 2024 15:02:13 +0530
Subject: [PATCH 02/16] fix error
---
apps/www/app/(auth)/dashboard/page.tsx | 12 ++
apps/www/app/(auth)/sign-in/page.tsx | 8 ++
apps/www/app/(auth)/sign-up/page.tsx | 13 ++
apps/www/components/custom/Sign-In.tsx | 82 ++++++++++++
apps/www/components/custom/Sign-up.tsx | 98 ++++++++++++++
.../components/custom/account-switcher.tsx | 30 +++++
apps/www/components/ui/button.tsx | 26 ++--
apps/www/components/ui/form.tsx | 121 ++++++++++++++++++
apps/www/components/ui/label.tsx | 21 +++
apps/www/lib/auth-client.ts | 9 ++
apps/www/lib/server.ts | 8 ++
apps/www/middleware.ts | 24 ++++
apps/www/package.json | 7 +
13 files changed, 446 insertions(+), 13 deletions(-)
create mode 100644 apps/www/components/custom/Sign-In.tsx
create mode 100644 apps/www/components/custom/Sign-up.tsx
create mode 100644 apps/www/middleware.ts
diff --git a/apps/www/app/(auth)/dashboard/page.tsx b/apps/www/app/(auth)/dashboard/page.tsx
index bb407d0..7c2a04f 100644
--- a/apps/www/app/(auth)/dashboard/page.tsx
+++ b/apps/www/app/(auth)/dashboard/page.tsx
@@ -2,6 +2,7 @@ import AccountSwitcher from "@/components/custom/account-switcher";
import { getMultipleSessions, getSession } from "@/lib/server";
export default async function page() {
+<<<<<<< HEAD
const session = await getSession();
const multipleSessions = await getMultipleSessions();
return (
@@ -11,4 +12,15 @@ export default async function page() {
{/* {JSON.stringify(multipleSessions,null,2)}
*/}
);
+=======
+ const session = await getSession()
+ const multipleSessions = await getMultipleSessions()
+ return (
+
+
+
{JSON.stringify(session,null,1)}
+ {/*
{JSON.stringify(multipleSessions,null,2)}
*/}
+
+ )
+>>>>>>> 5b4aadf (add better-auth in hono)
}
diff --git a/apps/www/app/(auth)/sign-in/page.tsx b/apps/www/app/(auth)/sign-in/page.tsx
index 3c16bea..1436750 100644
--- a/apps/www/app/(auth)/sign-in/page.tsx
+++ b/apps/www/app/(auth)/sign-in/page.tsx
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
import SignInComponent from "@/components/custom/signinComponent";
export default function page() {
@@ -7,3 +8,10 @@ export default function page() {
);
}
+=======
+import SignIn from "@/components/custom/Sign-In";
+
+export default function page() {
+ return
+}
+>>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/app/(auth)/sign-up/page.tsx b/apps/www/app/(auth)/sign-up/page.tsx
index 7a96bc3..e509f83 100644
--- a/apps/www/app/(auth)/sign-up/page.tsx
+++ b/apps/www/app/(auth)/sign-up/page.tsx
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
import SignUpComponent from "@/components/custom/signupComponent";
export default function page() {
@@ -7,3 +8,15 @@ export default function page() {
);
}
+=======
+import SignUp from "../../../components/custom/Sign-up";
+
+
+export default function page() {
+ return (
+
+
+
+ )
+}
+>>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/components/custom/Sign-In.tsx b/apps/www/components/custom/Sign-In.tsx
new file mode 100644
index 0000000..f83b9c5
--- /dev/null
+++ b/apps/www/components/custom/Sign-In.tsx
@@ -0,0 +1,82 @@
+"use client";
+
+import { zodResolver } from "@hookform/resolvers/zod";
+import { useForm } from "react-hook-form";
+import { z } from "zod";
+
+import { Button } from "@/components/ui/button";
+import {
+ Form,
+ FormControl,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "@/components/ui/form";
+import { Input } from "@/components/ui/input";
+import { authClient } from "@/lib/auth-client";
+
+const formSchema = z.object({
+ email: z.string().email(),
+ password: z.string().min(8),
+});
+
+export default function SignIn() {
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ email: "",
+ password: "",
+ },
+ });
+ const onSubmit = async (SignInData: z.infer) => {
+ const { data, error } = await authClient.signIn.email(
+ {
+ email: SignInData.email,
+ password: SignInData.password,
+ callbackURL: "/dashboard"
+ },
+ {
+ onRequest: (ctx) => {},
+ onSuccess: (ctx) => {},
+ onError: (ctx) => {
+ alert(ctx.error.message);
+ },
+ }
+ );
+ };
+
+ return (
+
+
+ );
+}
diff --git a/apps/www/components/custom/Sign-up.tsx b/apps/www/components/custom/Sign-up.tsx
new file mode 100644
index 0000000..0f0eda7
--- /dev/null
+++ b/apps/www/components/custom/Sign-up.tsx
@@ -0,0 +1,98 @@
+"use client";
+
+import { zodResolver } from "@hookform/resolvers/zod";
+import { useForm } from "react-hook-form";
+import { z } from "zod";
+
+import { Button } from "@/components/ui/button";
+import {
+ Form,
+ FormControl,
+ FormDescription,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "@/components/ui/form";
+import { Input } from "@/components/ui/input";
+import { authClient } from "@/lib/auth-client";
+
+const formSchema = z.object({
+ name: z.string(),
+ email: z.string().email(),
+ password: z.string().min(8),
+});
+
+export default function SignUp() {
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ email: "",
+ password: "",
+ },
+ });
+ const onSubmit = async(SignInData: z.infer) => {
+ const { data, error } = await authClient.signUp.email({
+ name: SignInData.name,
+ email: SignInData.email,
+ password: SignInData.password
+ }, {
+ onRequest: (ctx) => {
+
+ },
+ onSuccess: (ctx) => {
+
+ },
+ onError: (ctx) => {
+ alert(ctx.error.message);
+ },
+ });
+ };
+
+ return (
+
+
+ );
+}
diff --git a/apps/www/components/custom/account-switcher.tsx b/apps/www/components/custom/account-switcher.tsx
index be794c9..170d1a7 100644
--- a/apps/www/components/custom/account-switcher.tsx
+++ b/apps/www/components/custom/account-switcher.tsx
@@ -1,9 +1,14 @@
"use client";
+<<<<<<< HEAD
import { authClient } from "../../lib/auth-client";
+=======
+import { authClient } from "@/lib/auth-client";
+>>>>>>> 5b4aadf (add better-auth in hono)
import { Session } from "@repo/auth";
import { useRouter } from "next/navigation";
interface Props {
session: Session[];
+<<<<<<< HEAD
activeSession: Session;
}
export default function AccountSwitcher({ session, activeSession }: Props) {
@@ -35,3 +40,28 @@ export default function AccountSwitcher({ session, activeSession }: Props) {
);
}
+=======
+ activeSession : Session;
+}
+export default function AccountSwitcher({session,activeSession}:Props) {
+ const router = useRouter()
+ const onSelect = async (sessionId: string) => {
+ console.log(sessionId)
+ const active = await authClient.multiSession.setActive({
+ sessionId: sessionId,
+ });
+
+ console.log(active)
+ router.refresh();
+ };
+ return (
+
+
+
+ )
+}
+>>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/components/ui/button.tsx b/apps/www/components/ui/button.tsx
index d09a695..65d4fcd 100644
--- a/apps/www/components/ui/button.tsx
+++ b/apps/www/components/ui/button.tsx
@@ -1,8 +1,8 @@
-import * as React from "react";
-import { Slot } from "@radix-ui/react-slot";
-import { cva, type VariantProps } from "class-variance-authority";
+import * as React from "react"
+import { Slot } from "@radix-ui/react-slot"
+import { cva, type VariantProps } from "class-variance-authority"
-import { cn } from "@/lib/utils";
+import { cn } from "@/lib/utils"
const buttonVariants = cva(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
@@ -31,27 +31,27 @@ const buttonVariants = cva(
variant: "default",
size: "default",
},
- },
-);
+ }
+)
export interface ButtonProps
extends React.ButtonHTMLAttributes,
VariantProps {
- asChild?: boolean;
+ asChild?: boolean
}
const Button = React.forwardRef(
({ className, variant, size, asChild = false, ...props }, ref) => {
- const Comp = asChild ? Slot : "button";
+ const Comp = asChild ? Slot : "button"
return (
- );
- },
-);
-Button.displayName = "Button";
+ )
+ }
+)
+Button.displayName = "Button"
-export { Button, buttonVariants };
+export { Button, buttonVariants }
diff --git a/apps/www/components/ui/form.tsx b/apps/www/components/ui/form.tsx
index c3daa38..cf2a56d 100644
--- a/apps/www/components/ui/form.tsx
+++ b/apps/www/components/ui/form.tsx
@@ -1,8 +1,16 @@
+<<<<<<< HEAD
"use client";
import * as React from "react";
import * as LabelPrimitive from "@radix-ui/react-label";
import { Slot } from "@radix-ui/react-slot";
+=======
+"use client"
+
+import * as React from "react"
+import * as LabelPrimitive from "@radix-ui/react-label"
+import { Slot } from "@radix-ui/react-slot"
+>>>>>>> 5b4aadf (add better-auth in hono)
import {
Controller,
ControllerProps,
@@ -10,6 +18,7 @@ import {
FieldValues,
FormProvider,
useFormContext,
+<<<<<<< HEAD
} from "react-hook-form";
import { cn } from "@/lib/utils";
@@ -31,6 +40,29 @@ const FormFieldContext = React.createContext(
const FormField = <
TFieldValues extends FieldValues = FieldValues,
TName extends FieldPath = FieldPath,
+=======
+} from "react-hook-form"
+
+import { cn } from "@/lib/utils"
+import { Label } from "@/components/ui/label"
+
+const Form = FormProvider
+
+type FormFieldContextValue<
+ TFieldValues extends FieldValues = FieldValues,
+ TName extends FieldPath = FieldPath
+> = {
+ name: TName
+}
+
+const FormFieldContext = React.createContext(
+ {} as FormFieldContextValue
+)
+
+const FormField = <
+ TFieldValues extends FieldValues = FieldValues,
+ TName extends FieldPath = FieldPath
+>>>>>>> 5b4aadf (add better-auth in hono)
>({
...props
}: ControllerProps) => {
@@ -38,6 +70,7 @@ const FormField = <
+<<<<<<< HEAD
);
};
@@ -53,6 +86,23 @@ const useFormField = () => {
}
const { id } = itemContext;
+=======
+ )
+}
+
+const useFormField = () => {
+ const fieldContext = React.useContext(FormFieldContext)
+ const itemContext = React.useContext(FormItemContext)
+ const { getFieldState, formState } = useFormContext()
+
+ const fieldState = getFieldState(fieldContext.name, formState)
+
+ if (!fieldContext) {
+ throw new Error("useFormField should be used within ")
+ }
+
+ const { id } = itemContext
+>>>>>>> 5b4aadf (add better-auth in hono)
return {
id,
@@ -61,6 +111,7 @@ const useFormField = () => {
formDescriptionId: `${id}-form-item-description`,
formMessageId: `${id}-form-item-message`,
...fieldState,
+<<<<<<< HEAD
};
};
@@ -71,26 +122,52 @@ type FormItemContextValue = {
const FormItemContext = React.createContext(
{} as FormItemContextValue,
);
+=======
+ }
+}
+
+type FormItemContextValue = {
+ id: string
+}
+
+const FormItemContext = React.createContext(
+ {} as FormItemContextValue
+)
+>>>>>>> 5b4aadf (add better-auth in hono)
const FormItem = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes
>(({ className, ...props }, ref) => {
+<<<<<<< HEAD
const id = React.useId();
+=======
+ const id = React.useId()
+>>>>>>> 5b4aadf (add better-auth in hono)
return (
+<<<<<<< HEAD
);
});
FormItem.displayName = "FormItem";
+=======
+ )
+})
+FormItem.displayName = "FormItem"
+>>>>>>> 5b4aadf (add better-auth in hono)
const FormLabel = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef
>(({ className, ...props }, ref) => {
+<<<<<<< HEAD
const { error, formItemId } = useFormField();
+=======
+ const { error, formItemId } = useFormField()
+>>>>>>> 5b4aadf (add better-auth in hono)
return (
+<<<<<<< HEAD
);
});
FormLabel.displayName = "FormLabel";
+=======
+ )
+})
+FormLabel.displayName = "FormLabel"
+>>>>>>> 5b4aadf (add better-auth in hono)
const FormControl = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef
>(({ ...props }, ref) => {
+<<<<<<< HEAD
const { error, formItemId, formDescriptionId, formMessageId } =
useFormField();
+=======
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
+>>>>>>> 5b4aadf (add better-auth in hono)
return (
+<<<<<<< HEAD
);
});
FormControl.displayName = "FormControl";
+=======
+ )
+})
+FormControl.displayName = "FormControl"
+>>>>>>> 5b4aadf (add better-auth in hono)
const FormDescription = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes
>(({ className, ...props }, ref) => {
+<<<<<<< HEAD
const { formDescriptionId } = useFormField();
+=======
+ const { formDescriptionId } = useFormField()
+>>>>>>> 5b4aadf (add better-auth in hono)
return (
+<<<<<<< HEAD
);
});
FormDescription.displayName = "FormDescription";
+=======
+ )
+})
+FormDescription.displayName = "FormDescription"
+>>>>>>> 5b4aadf (add better-auth in hono)
const FormMessage = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes
>(({ className, children, ...props }, ref) => {
+<<<<<<< HEAD
const { error, formMessageId } = useFormField();
const body = error ? String(error?.message) : children;
if (!body) {
return null;
+=======
+ const { error, formMessageId } = useFormField()
+ const body = error ? String(error?.message) : children
+
+ if (!body) {
+ return null
+>>>>>>> 5b4aadf (add better-auth in hono)
}
return (
@@ -163,9 +274,15 @@ const FormMessage = React.forwardRef<
>
{body}
+<<<<<<< HEAD
);
});
FormMessage.displayName = "FormMessage";
+=======
+ )
+})
+FormMessage.displayName = "FormMessage"
+>>>>>>> 5b4aadf (add better-auth in hono)
export {
useFormField,
@@ -176,4 +293,8 @@ export {
FormDescription,
FormMessage,
FormField,
+<<<<<<< HEAD
};
+=======
+}
+>>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/components/ui/label.tsx b/apps/www/components/ui/label.tsx
index 84f8b0c..8b904d1 100644
--- a/apps/www/components/ui/label.tsx
+++ b/apps/www/components/ui/label.tsx
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
"use client";
import * as React from "react";
@@ -9,6 +10,19 @@ import { cn } from "@/lib/utils";
const labelVariants = cva(
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
);
+=======
+"use client"
+
+import * as React from "react"
+import * as LabelPrimitive from "@radix-ui/react-label"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@/lib/utils"
+
+const labelVariants = cva(
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
+)
+>>>>>>> 5b4aadf (add better-auth in hono)
const Label = React.forwardRef<
React.ElementRef,
@@ -20,7 +34,14 @@ const Label = React.forwardRef<
className={cn(labelVariants(), className)}
{...props}
/>
+<<<<<<< HEAD
));
Label.displayName = LabelPrimitive.Root.displayName;
export { Label };
+=======
+))
+Label.displayName = LabelPrimitive.Root.displayName
+
+export { Label }
+>>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/lib/auth-client.ts b/apps/www/lib/auth-client.ts
index c2257d2..408fc0e 100644
--- a/apps/www/lib/auth-client.ts
+++ b/apps/www/lib/auth-client.ts
@@ -1,5 +1,6 @@
import { createAuthClient } from "better-auth/react";
import { multiSessionClient } from "better-auth/client/plugins";
+<<<<<<< HEAD
import { Http2ServerRequest } from "http2";
const BaseDomain =
process.env.NODE_ENV === "production"
@@ -11,3 +12,11 @@ export const authClient = createAuthClient({
});
export const { signIn, signUp, useSession, signOut, multiSession } = authClient;
+=======
+export const authClient = createAuthClient({
+ baseURL: "http://localhost:3001",
+ plugins:[multiSessionClient()]
+});
+
+export const { signIn, signUp, useSession,signOut,multiSession} = authClient;
+>>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/lib/server.ts b/apps/www/lib/server.ts
index 7b3a442..789ce4a 100644
--- a/apps/www/lib/server.ts
+++ b/apps/www/lib/server.ts
@@ -1,4 +1,8 @@
"use server";
+<<<<<<< HEAD
+=======
+import { auth } from "@repo/auth";
+>>>>>>> 5b4aadf (add better-auth in hono)
import { headers } from "next/headers";
export const getMultipleSessions = async () => {
@@ -13,4 +17,8 @@ export const getSession = async () => {
headers: await headers(),
});
return res.json();
+<<<<<<< HEAD
};
+=======
+}
+>>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/middleware.ts b/apps/www/middleware.ts
new file mode 100644
index 0000000..ac4e9cc
--- /dev/null
+++ b/apps/www/middleware.ts
@@ -0,0 +1,24 @@
+import { betterFetch } from "@better-fetch/fetch";
+import { NextRequest, NextResponse } from "next/server";
+import type { Session } from "@repo/auth"
+
+export async function middleware(request: NextRequest) {
+ console.log(request.nextUrl.origin)
+ const { data: session } = await betterFetch(
+ "http://localhost:3001/api/session",
+ {
+ baseURL: request.nextUrl.origin,
+ headers: {
+ cookie: request.headers.get("cookie") || "",
+ },
+ }
+ );
+ console.log(session)
+
+
+ return NextResponse.next();
+}
+
+export const config = {
+ matcher: ["/dashboard"],
+};
diff --git a/apps/www/package.json b/apps/www/package.json
index deccdb9..ba911c0 100644
--- a/apps/www/package.json
+++ b/apps/www/package.json
@@ -18,7 +18,10 @@
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-icons": "^1.3.1",
"@radix-ui/react-label": "^2.1.0",
+<<<<<<< HEAD
"@radix-ui/react-scroll-area": "^1.2.0",
+=======
+>>>>>>> 5b4aadf (add better-auth in hono)
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.3",
@@ -36,9 +39,13 @@
"next-themes": "^0.4.3",
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028",
+<<<<<<< HEAD
"react-hook-form": "^7.53.2",
"react-icons": "^5.3.0",
+=======
+ "react-hook-form": "^7.53.2",
+>>>>>>> 5b4aadf (add better-auth in hono)
"tailwind-merge": "^2.5.4",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.23.8"
From 8ff61906a5eff4bf90064beb5c1dbdc2b82cd633 Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Sat, 9 Nov 2024 23:43:10 +0530
Subject: [PATCH 03/16] add auth in client and server
---
apps/api/app/api/[[...route]]/mail.ts | 8 +-
apps/api/app/api/[[...route]]/route.ts | 101 +++++++++++++-------
apps/api/package.json | 4 +
apps/www/components/ui/form.tsx | 122 -------------------------
apps/www/components/ui/label.tsx | 21 -----
apps/www/lib/auth-client.ts | 14 ---
apps/www/lib/server.ts | 7 --
apps/www/package.json | 10 --
packages/auth/src/auth.ts | 19 +---
pnpm-lock.yaml | 63 +++----------
10 files changed, 89 insertions(+), 280 deletions(-)
diff --git a/apps/api/app/api/[[...route]]/mail.ts b/apps/api/app/api/[[...route]]/mail.ts
index 1db0248..49d78d6 100644
--- a/apps/api/app/api/[[...route]]/mail.ts
+++ b/apps/api/app/api/[[...route]]/mail.ts
@@ -14,7 +14,7 @@ app
{
message: "Email sent failed",
},
- 400,
+ 400
);
}
return c.json(
@@ -22,7 +22,7 @@ app
message: "Email sent successfully",
data,
},
- 200,
+ 200
);
})
.get((c) => {
@@ -41,7 +41,7 @@ app
{
message: "Email sent failed",
},
- 400,
+ 400
);
}
return c.json(
@@ -49,7 +49,7 @@ app
message: "All Emails sent successfully",
data,
},
- 200,
+ 200
);
})
.get((c) => {
diff --git a/apps/api/app/api/[[...route]]/route.ts b/apps/api/app/api/[[...route]]/route.ts
index be4f596..412be07 100644
--- a/apps/api/app/api/[[...route]]/route.ts
+++ b/apps/api/app/api/[[...route]]/route.ts
@@ -1,59 +1,50 @@
import { prisma } from "@repo/db";
import { handle } from "hono/vercel";
import { Hono } from "hono";
-import { auth } from "@repo/auth";
+import {auth} from "@repo/auth"
import { cors } from "hono/cors";
import mail from "./mail";
-import hello from "./hello";
-const allowedOrigins = [
- "http://localhost:3003",
- "https://www.plura.pro",
- "http://app.plura.pro",
-];
+
export const runtime = "nodejs";
+
const app = new Hono<{
Variables: {
user: typeof auth.$Infer.Session.user | null;
- session: typeof auth.$Infer.Session.session | null;
+ session: typeof auth.$Infer.Session.session | null;
};
}>().basePath("/api");
+
app.use(
"/auth/**",
cors({
- origin: allowedOrigins,
+ origin: "http://localhost:3003",
allowHeaders: ["Content-Type", "Authorization"],
allowMethods: ["POST", "GET", "OPTIONS"],
exposeHeaders: ["Content-Length"],
maxAge: 600,
- credentials: true,
- }),
+ credentials: true
+ })
);
app.options("/auth/**", (c) => {
- const origin = c.req.raw.headers.get("origin") ?? "";
-
- if (allowedOrigins.includes(origin)) {
- return new Response(null, {
- status: 204,
- headers: {
- "Access-Control-Allow-Origin": origin,
- "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
- "Access-Control-Allow-Headers": "Content-Type, Authorization",
- "Access-Control-Allow-Credentials": "true",
- "Access-Control-Max-Age": "600",
- },
- });
- }
-
- return new Response("Forbidden", {
- status: 403,
+ return new Response(null, {
+ status: 204,
+ headers: {
+ "Access-Control-Allow-Origin": "http://localhost:3003",
+ "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
+ "Access-Control-Allow-Headers": "Content-Type, Authorization",
+ "Access-Control-Allow-Credentials": "true",
+ "Access-Control-Max-Age": "600",
+ },
});
});
+
app.use("*", async (c, next) => {
const session = await auth.api.getSession({ headers: c.req.raw.headers });
+ console.log(session)
if (!session) {
c.set("user", null);
@@ -66,6 +57,47 @@ app.use("*", async (c, next) => {
return next();
});
+app
+ .get("/hello", async (c) => {
+ const test = await prisma.user.findMany();
+ return c.json({
+ test,
+ });
+ })
+ .patch(async (c) => {
+ const name = await c.req.json();
+ const test = await prisma.user.update({
+ where: {
+ id: "123",
+ },
+ data: {
+ name: name.name,
+ },
+ });
+ return c.json({
+ test,
+ });
+ })
+ .delete(async (c) => {
+ const test = await prisma.user.delete({
+ where: {
+ id: "2",
+ },
+ });
+ return c.json({
+ test,
+ });
+ })
+ .post(async (c) => {
+ const body = await c.req.json();
+ console.log(body);
+ const test = await prisma.user.create({
+ data: body,
+ });
+ return c.json({
+ test,
+ });
+ });
app.get("/health", async (c) => {
return c.json({
message: "i am alive",
@@ -83,22 +115,23 @@ app.get("/session", async (c) => {
user,
});
});
-app.route("/hello", hello);
-app.route("/mail", mail);
+app.route("/mail", mail)
app.on(["POST", "GET"], "/auth/**", (c) => {
return auth.handler(c.req.raw);
});
-app.get("/multi-sessions", async (c) => {
+app.get("/multi-sessions",async (c)=>{
const res = await auth.api.listDeviceSessions({
headers: c.req.raw.headers,
- });
+ })
+ console.log(c.req.raw.headers)
+ console.log(res.length)
return c.json(res);
-});
+})
const GET = handle(app);
const POST = handle(app);
const PATCH = handle(app);
const DELETE = handle(app);
-export const OPTIONS = handle(app);
+export const OPTIONS = handle(app);;
export { GET, PATCH, POST, DELETE };
diff --git a/apps/api/package.json b/apps/api/package.json
index 50bc7fd..6b72189 100644
--- a/apps/api/package.json
+++ b/apps/api/package.json
@@ -17,6 +17,10 @@
"@hono/zod-validator": "^0.4.1",
"@repo/auth": "workspace:*",
"@repo/db": "workspace:*",
+ "@repo/mail": "workspace:*",
+ "@repo/types": "workspace:*",
+ "better-auth": "0.8.1-beta.1",
+ "contentlayer2": "^0.5.3",
"hono": "^4.6.9",
"next": "15.0.2",
"react": "19.0.0-rc-02c0e824-20241028",
diff --git a/apps/www/components/ui/form.tsx b/apps/www/components/ui/form.tsx
index cf2a56d..b6daa65 100644
--- a/apps/www/components/ui/form.tsx
+++ b/apps/www/components/ui/form.tsx
@@ -1,16 +1,8 @@
-<<<<<<< HEAD
-"use client";
-
-import * as React from "react";
-import * as LabelPrimitive from "@radix-ui/react-label";
-import { Slot } from "@radix-ui/react-slot";
-=======
"use client"
import * as React from "react"
import * as LabelPrimitive from "@radix-ui/react-label"
import { Slot } from "@radix-ui/react-slot"
->>>>>>> 5b4aadf (add better-auth in hono)
import {
Controller,
ControllerProps,
@@ -18,29 +10,6 @@ import {
FieldValues,
FormProvider,
useFormContext,
-<<<<<<< HEAD
-} from "react-hook-form";
-
-import { cn } from "@/lib/utils";
-import { Label } from "@/components/ui/label";
-
-const Form = FormProvider;
-
-type FormFieldContextValue<
- TFieldValues extends FieldValues = FieldValues,
- TName extends FieldPath = FieldPath,
-> = {
- name: TName;
-};
-
-const FormFieldContext = React.createContext(
- {} as FormFieldContextValue,
-);
-
-const FormField = <
- TFieldValues extends FieldValues = FieldValues,
- TName extends FieldPath = FieldPath,
-=======
} from "react-hook-form"
import { cn } from "@/lib/utils"
@@ -62,7 +31,6 @@ const FormFieldContext = React.createContext(
const FormField = <
TFieldValues extends FieldValues = FieldValues,
TName extends FieldPath = FieldPath
->>>>>>> 5b4aadf (add better-auth in hono)
>({
...props
}: ControllerProps) => {
@@ -70,23 +38,6 @@ const FormField = <
-<<<<<<< HEAD
- );
-};
-
-const useFormField = () => {
- const fieldContext = React.useContext(FormFieldContext);
- const itemContext = React.useContext(FormItemContext);
- const { getFieldState, formState } = useFormContext();
-
- const fieldState = getFieldState(fieldContext.name, formState);
-
- if (!fieldContext) {
- throw new Error("useFormField should be used within ");
- }
-
- const { id } = itemContext;
-=======
)
}
@@ -102,7 +53,6 @@ const useFormField = () => {
}
const { id } = itemContext
->>>>>>> 5b4aadf (add better-auth in hono)
return {
id,
@@ -111,18 +61,6 @@ const useFormField = () => {
formDescriptionId: `${id}-form-item-description`,
formMessageId: `${id}-form-item-message`,
...fieldState,
-<<<<<<< HEAD
- };
-};
-
-type FormItemContextValue = {
- id: string;
-};
-
-const FormItemContext = React.createContext(
- {} as FormItemContextValue,
-);
-=======
}
}
@@ -133,41 +71,26 @@ type FormItemContextValue = {
const FormItemContext = React.createContext(
{} as FormItemContextValue
)
->>>>>>> 5b4aadf (add better-auth in hono)
const FormItem = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes
>(({ className, ...props }, ref) => {
-<<<<<<< HEAD
- const id = React.useId();
-=======
const id = React.useId()
->>>>>>> 5b4aadf (add better-auth in hono)
return (
-<<<<<<< HEAD
- );
-});
-FormItem.displayName = "FormItem";
-=======
)
})
FormItem.displayName = "FormItem"
->>>>>>> 5b4aadf (add better-auth in hono)
const FormLabel = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef
>(({ className, ...props }, ref) => {
-<<<<<<< HEAD
- const { error, formItemId } = useFormField();
-=======
const { error, formItemId } = useFormField()
->>>>>>> 5b4aadf (add better-auth in hono)
return (
-<<<<<<< HEAD
- );
-});
-FormLabel.displayName = "FormLabel";
-=======
)
})
FormLabel.displayName = "FormLabel"
->>>>>>> 5b4aadf (add better-auth in hono)
const FormControl = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef
>(({ ...props }, ref) => {
-<<<<<<< HEAD
- const { error, formItemId, formDescriptionId, formMessageId } =
- useFormField();
-=======
const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
->>>>>>> 5b4aadf (add better-auth in hono)
return (
-<<<<<<< HEAD
- );
-});
-FormControl.displayName = "FormControl";
-=======
)
})
FormControl.displayName = "FormControl"
->>>>>>> 5b4aadf (add better-auth in hono)
const FormDescription = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes
>(({ className, ...props }, ref) => {
-<<<<<<< HEAD
- const { formDescriptionId } = useFormField();
-=======
const { formDescriptionId } = useFormField()
->>>>>>> 5b4aadf (add better-auth in hono)
return (
-<<<<<<< HEAD
- );
-});
-FormDescription.displayName = "FormDescription";
-=======
)
})
FormDescription.displayName = "FormDescription"
->>>>>>> 5b4aadf (add better-auth in hono)
const FormMessage = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes
>(({ className, children, ...props }, ref) => {
-<<<<<<< HEAD
- const { error, formMessageId } = useFormField();
- const body = error ? String(error?.message) : children;
-
- if (!body) {
- return null;
-=======
const { error, formMessageId } = useFormField()
const body = error ? String(error?.message) : children
if (!body) {
return null
->>>>>>> 5b4aadf (add better-auth in hono)
}
return (
@@ -274,15 +162,9 @@ const FormMessage = React.forwardRef<
>
{body}
-<<<<<<< HEAD
- );
-});
-FormMessage.displayName = "FormMessage";
-=======
)
})
FormMessage.displayName = "FormMessage"
->>>>>>> 5b4aadf (add better-auth in hono)
export {
useFormField,
@@ -293,8 +175,4 @@ export {
FormDescription,
FormMessage,
FormField,
-<<<<<<< HEAD
-};
-=======
}
->>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/components/ui/label.tsx b/apps/www/components/ui/label.tsx
index 8b904d1..5341821 100644
--- a/apps/www/components/ui/label.tsx
+++ b/apps/www/components/ui/label.tsx
@@ -1,16 +1,3 @@
-<<<<<<< HEAD
-"use client";
-
-import * as React from "react";
-import * as LabelPrimitive from "@radix-ui/react-label";
-import { cva, type VariantProps } from "class-variance-authority";
-
-import { cn } from "@/lib/utils";
-
-const labelVariants = cva(
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
-);
-=======
"use client"
import * as React from "react"
@@ -22,7 +9,6 @@ import { cn } from "@/lib/utils"
const labelVariants = cva(
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
)
->>>>>>> 5b4aadf (add better-auth in hono)
const Label = React.forwardRef<
React.ElementRef,
@@ -34,14 +20,7 @@ const Label = React.forwardRef<
className={cn(labelVariants(), className)}
{...props}
/>
-<<<<<<< HEAD
-));
-Label.displayName = LabelPrimitive.Root.displayName;
-
-export { Label };
-=======
))
Label.displayName = LabelPrimitive.Root.displayName
export { Label }
->>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/lib/auth-client.ts b/apps/www/lib/auth-client.ts
index 408fc0e..cdc22d9 100644
--- a/apps/www/lib/auth-client.ts
+++ b/apps/www/lib/auth-client.ts
@@ -1,22 +1,8 @@
import { createAuthClient } from "better-auth/react";
import { multiSessionClient } from "better-auth/client/plugins";
-<<<<<<< HEAD
-import { Http2ServerRequest } from "http2";
-const BaseDomain =
- process.env.NODE_ENV === "production"
- ? "https://api.plura.pro"
- : "http://localhost:3001";
-export const authClient = createAuthClient({
- baseURL: BaseDomain,
- plugins: [multiSessionClient()],
-});
-
-export const { signIn, signUp, useSession, signOut, multiSession } = authClient;
-=======
export const authClient = createAuthClient({
baseURL: "http://localhost:3001",
plugins:[multiSessionClient()]
});
export const { signIn, signUp, useSession,signOut,multiSession} = authClient;
->>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/lib/server.ts b/apps/www/lib/server.ts
index 789ce4a..8d20ccf 100644
--- a/apps/www/lib/server.ts
+++ b/apps/www/lib/server.ts
@@ -1,8 +1,5 @@
"use server";
-<<<<<<< HEAD
-=======
import { auth } from "@repo/auth";
->>>>>>> 5b4aadf (add better-auth in hono)
import { headers } from "next/headers";
export const getMultipleSessions = async () => {
@@ -17,8 +14,4 @@ export const getSession = async () => {
headers: await headers(),
});
return res.json();
-<<<<<<< HEAD
-};
-=======
}
->>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/package.json b/apps/www/package.json
index ba911c0..74cd727 100644
--- a/apps/www/package.json
+++ b/apps/www/package.json
@@ -18,10 +18,6 @@
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-icons": "^1.3.1",
"@radix-ui/react-label": "^2.1.0",
-<<<<<<< HEAD
- "@radix-ui/react-scroll-area": "^1.2.0",
-=======
->>>>>>> 5b4aadf (add better-auth in hono)
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.3",
@@ -39,13 +35,7 @@
"next-themes": "^0.4.3",
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028",
-<<<<<<< HEAD
-
"react-hook-form": "^7.53.2",
- "react-icons": "^5.3.0",
-=======
- "react-hook-form": "^7.53.2",
->>>>>>> 5b4aadf (add better-auth in hono)
"tailwind-merge": "^2.5.4",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.23.8"
diff --git a/packages/auth/src/auth.ts b/packages/auth/src/auth.ts
index a69660f..8f6f53d 100644
--- a/packages/auth/src/auth.ts
+++ b/packages/auth/src/auth.ts
@@ -2,18 +2,10 @@ import { betterAuth, BetterAuthOptions } from "better-auth";
import { prismaAdapter } from "better-auth/adapters/prisma";
import { prisma } from "@repo/db";
import { multiSession } from "better-auth/plugins";
-const BaseDomain =
- process.env.NODE_ENV === "production"
- ? process.env.API_DOMAIN as string
- : "http://localhost:3001";
- const AppDomain =
- process.env.NODE_ENV === "production"
- ? process.env.APP_DOMAIN as string
- : "http://localhost:3003";
export const config = {
- trustedOrigins: [AppDomain],
- baseURL: BaseDomain,
+ trustedOrigins: ["http://localhost:3003"],
+ baseURL: "http://localhost:3001",
database: prismaAdapter(prisma, {
provider: "postgresql",
}),
@@ -22,13 +14,6 @@ export const config = {
emailAndPassword: {
enabled: true,
},
- ...(process.env.NODE_ENV === "production" && {
- advanced: {
- crossSubDomainCookies: {
- enabled: true,
- },
- },
- }),
} satisfies BetterAuthOptions;
export const auth = betterAuth(config);
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index fba17ef..2951e81 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -84,6 +84,18 @@ importers:
'@repo/db':
specifier: workspace:*
version: link:../../packages/database
+ '@repo/mail':
+ specifier: workspace:*
+ version: link:../../packages/mail
+ '@repo/types':
+ specifier: workspace:*
+ version: link:../../packages/types
+ better-auth:
+ specifier: 0.8.1-beta.1
+ version: 0.8.1-beta.1
+ contentlayer2:
+ specifier: ^0.5.3
+ version: 0.5.3(acorn@8.14.0)(esbuild@0.21.5)
hono:
specifier: ^4.6.9
version: 4.6.9
@@ -266,12 +278,6 @@ importers:
'@radix-ui/react-label':
specifier: ^2.1.0
version: 2.1.0(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@19.0.0-rc-02c0e824-20241028(react@19.0.0-rc-02c0e824-20241028))(react@19.0.0-rc-02c0e824-20241028)
-<<<<<<< HEAD
-=======
- '@radix-ui/react-scroll-area':
- specifier: ^1.2.0
- version: 1.2.0(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@19.0.0-rc-02c0e824-20241028(react@19.0.0-rc-02c0e824-20241028))(react@19.0.0-rc-02c0e824-20241028)
->>>>>>> de57e71218a23c5aa88daca4de838f766d21b596
'@radix-ui/react-separator':
specifier: ^1.1.0
version: 1.1.0(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@19.0.0-rc-02c0e824-20241028(react@19.0.0-rc-02c0e824-20241028))(react@19.0.0-rc-02c0e824-20241028)
@@ -326,12 +332,6 @@ importers:
react-hook-form:
specifier: ^7.53.2
version: 7.53.2(react@19.0.0-rc-02c0e824-20241028)
-<<<<<<< HEAD
-=======
- react-icons:
- specifier: ^5.3.0
- version: 5.3.0(react@19.0.0-rc-02c0e824-20241028)
->>>>>>> de57e71218a23c5aa88daca4de838f766d21b596
tailwind-merge:
specifier: ^2.5.4
version: 2.5.4
@@ -5373,14 +5373,6 @@ packages:
peerDependencies:
react: ^16.8.0 || ^17 || ^18 || ^19
-<<<<<<< HEAD
-=======
- react-icons@5.3.0:
- resolution: {integrity: sha512-DnUk8aFbTyQPSkCfF8dbX6kQjXA9DktMeJqfjrg6cK9vwQVMxmcA3BfP4QoiztVmEHtwlTgLFsPuH2NskKT6eg==}
- peerDependencies:
- react: '*'
-
->>>>>>> de57e71218a23c5aa88daca4de838f766d21b596
react-is@16.13.1:
resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==}
@@ -8787,11 +8779,7 @@ snapshots:
eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.31.0)
eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.5.4))(eslint-plugin-import@2.31.0)(eslint@8.57.1)
eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1)
-<<<<<<< HEAD
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
-=======
- eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1)
->>>>>>> de57e71218a23c5aa88daca4de838f766d21b596
eslint-plugin-jest: 27.9.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1)(typescript@5.5.4)
eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1)
eslint-plugin-playwright: 0.16.0(eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1)
@@ -9784,11 +9772,7 @@ snapshots:
eslint: 8.57.1
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1)
-<<<<<<< HEAD
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
-=======
- eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1)
->>>>>>> de57e71218a23c5aa88daca4de838f766d21b596
eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1)
eslint-plugin-react: 7.37.2(eslint@8.57.1)
eslint-plugin-react-hooks: 5.0.0(eslint@8.57.1)
@@ -9810,11 +9794,7 @@ snapshots:
eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.31.0):
dependencies:
-<<<<<<< HEAD
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
-=======
- eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1)
->>>>>>> de57e71218a23c5aa88daca4de838f766d21b596
eslint-import-resolver-node@0.3.9:
dependencies:
@@ -9836,11 +9816,7 @@ snapshots:
is-bun-module: 1.2.1
is-glob: 4.0.3
optionalDependencies:
-<<<<<<< HEAD
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
-=======
- eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1)
->>>>>>> de57e71218a23c5aa88daca4de838f766d21b596
transitivePeerDependencies:
- '@typescript-eslint/parser'
- eslint-import-resolver-node
@@ -9859,11 +9835,7 @@ snapshots:
is-bun-module: 1.2.1
is-glob: 4.0.3
optionalDependencies:
-<<<<<<< HEAD
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
-=======
- eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1)
->>>>>>> de57e71218a23c5aa88daca4de838f766d21b596
transitivePeerDependencies:
- '@typescript-eslint/parser'
- eslint-import-resolver-node
@@ -9898,11 +9870,7 @@ snapshots:
eslint: 8.57.1
ignore: 5.3.2
-<<<<<<< HEAD
eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1):
-=======
- eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1):
->>>>>>> de57e71218a23c5aa88daca4de838f766d21b596
dependencies:
'@rtsao/scc': 1.1.0
array-includes: 3.1.8
@@ -11928,13 +11896,6 @@ snapshots:
dependencies:
react: 19.0.0-rc-02c0e824-20241028
-<<<<<<< HEAD
-=======
- react-icons@5.3.0(react@19.0.0-rc-02c0e824-20241028):
- dependencies:
- react: 19.0.0-rc-02c0e824-20241028
-
->>>>>>> de57e71218a23c5aa88daca4de838f766d21b596
react-is@16.13.1: {}
react-is@18.3.1: {}
From 22be6c4a33d734a5de19b8641dc57fb11f67843b Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Sun, 10 Nov 2024 12:35:02 +0530
Subject: [PATCH 04/16] add auth to production
---
apps/api/app/api/[[...route]]/hello.ts | 6 +-
apps/api/app/api/[[...route]]/route.ts | 81 +++++++++-----------------
apps/www/lib/auth-client.ts | 7 ++-
apps/www/lib/server.ts | 1 -
apps/www/middleware.ts | 24 --------
packages/auth/src/auth.ts | 19 +++++-
6 files changed, 52 insertions(+), 86 deletions(-)
delete mode 100644 apps/www/middleware.ts
diff --git a/apps/api/app/api/[[...route]]/hello.ts b/apps/api/app/api/[[...route]]/hello.ts
index 9788240..e297afa 100644
--- a/apps/api/app/api/[[...route]]/hello.ts
+++ b/apps/api/app/api/[[...route]]/hello.ts
@@ -2,10 +2,10 @@ import { Hono } from "hono";
const app = new Hono();
import { prisma } from "@repo/db";
app
- .get("/", async (c) => {
- const user = await prisma.user.findMany();
+ .get("/hello", async (c) => {
+ const test = await prisma.user.findMany();
return c.json({
- user,
+ test,
});
})
.patch(async (c) => {
diff --git a/apps/api/app/api/[[...route]]/route.ts b/apps/api/app/api/[[...route]]/route.ts
index 412be07..0233d16 100644
--- a/apps/api/app/api/[[...route]]/route.ts
+++ b/apps/api/app/api/[[...route]]/route.ts
@@ -5,7 +5,11 @@ import {auth} from "@repo/auth"
import { cors } from "hono/cors";
import mail from "./mail";
-
+const allowedOrigins = [
+ "http://localhost:3003",
+ "https://www.plura.pro",
+ "http://app.plura.pro",
+];
export const runtime = "nodejs";
@@ -21,7 +25,7 @@ const app = new Hono<{
app.use(
"/auth/**",
cors({
- origin: "http://localhost:3003",
+ origin: ["http://localhost:3003", "https://www.plura.pro"],
allowHeaders: ["Content-Type", "Authorization"],
allowMethods: ["POST", "GET", "OPTIONS"],
exposeHeaders: ["Content-Length"],
@@ -30,21 +34,28 @@ app.use(
})
);
app.options("/auth/**", (c) => {
- return new Response(null, {
- status: 204,
- headers: {
- "Access-Control-Allow-Origin": "http://localhost:3003",
- "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
- "Access-Control-Allow-Headers": "Content-Type, Authorization",
- "Access-Control-Allow-Credentials": "true",
- "Access-Control-Max-Age": "600",
- },
+ const origin = c.req.raw.headers.get("origin") ?? "";
+
+ if (allowedOrigins.includes(origin)) {
+ return new Response(null, {
+ status: 204,
+ headers: {
+ "Access-Control-Allow-Origin": origin,
+ "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
+ "Access-Control-Allow-Headers": "Content-Type, Authorization",
+ "Access-Control-Allow-Credentials": "true",
+ "Access-Control-Max-Age": "600",
+ },
+ });
+ }
+
+ return new Response("Forbidden", {
+ status: 403,
});
});
-
app.use("*", async (c, next) => {
const session = await auth.api.getSession({ headers: c.req.raw.headers });
- console.log(session)
+
if (!session) {
c.set("user", null);
@@ -57,47 +68,6 @@ app.use("*", async (c, next) => {
return next();
});
-app
- .get("/hello", async (c) => {
- const test = await prisma.user.findMany();
- return c.json({
- test,
- });
- })
- .patch(async (c) => {
- const name = await c.req.json();
- const test = await prisma.user.update({
- where: {
- id: "123",
- },
- data: {
- name: name.name,
- },
- });
- return c.json({
- test,
- });
- })
- .delete(async (c) => {
- const test = await prisma.user.delete({
- where: {
- id: "2",
- },
- });
- return c.json({
- test,
- });
- })
- .post(async (c) => {
- const body = await c.req.json();
- console.log(body);
- const test = await prisma.user.create({
- data: body,
- });
- return c.json({
- test,
- });
- });
app.get("/health", async (c) => {
return c.json({
message: "i am alive",
@@ -118,13 +88,14 @@ app.get("/session", async (c) => {
app.route("/mail", mail)
app.on(["POST", "GET"], "/auth/**", (c) => {
+ console.log(c.req.raw.headers.get("origin"));
return auth.handler(c.req.raw);
});
app.get("/multi-sessions",async (c)=>{
const res = await auth.api.listDeviceSessions({
headers: c.req.raw.headers,
})
- console.log(c.req.raw.headers)
+ console.log(c.req.raw.headers.get("origin"));
console.log(res.length)
return c.json(res);
})
diff --git a/apps/www/lib/auth-client.ts b/apps/www/lib/auth-client.ts
index cdc22d9..56e4ca3 100644
--- a/apps/www/lib/auth-client.ts
+++ b/apps/www/lib/auth-client.ts
@@ -1,7 +1,12 @@
import { createAuthClient } from "better-auth/react";
import { multiSessionClient } from "better-auth/client/plugins";
+import { Http2ServerRequest } from "http2";
+ const BaseDomain =
+ process.env.NODE_ENV === "production"
+ ? "https://api.plura.pro"
+ : "http://localhost:3001";
export const authClient = createAuthClient({
- baseURL: "http://localhost:3001",
+ baseURL: BaseDomain,
plugins:[multiSessionClient()]
});
diff --git a/apps/www/lib/server.ts b/apps/www/lib/server.ts
index 8d20ccf..3591bd2 100644
--- a/apps/www/lib/server.ts
+++ b/apps/www/lib/server.ts
@@ -1,5 +1,4 @@
"use server";
-import { auth } from "@repo/auth";
import { headers } from "next/headers";
export const getMultipleSessions = async () => {
diff --git a/apps/www/middleware.ts b/apps/www/middleware.ts
deleted file mode 100644
index ac4e9cc..0000000
--- a/apps/www/middleware.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { betterFetch } from "@better-fetch/fetch";
-import { NextRequest, NextResponse } from "next/server";
-import type { Session } from "@repo/auth"
-
-export async function middleware(request: NextRequest) {
- console.log(request.nextUrl.origin)
- const { data: session } = await betterFetch(
- "http://localhost:3001/api/session",
- {
- baseURL: request.nextUrl.origin,
- headers: {
- cookie: request.headers.get("cookie") || "",
- },
- }
- );
- console.log(session)
-
-
- return NextResponse.next();
-}
-
-export const config = {
- matcher: ["/dashboard"],
-};
diff --git a/packages/auth/src/auth.ts b/packages/auth/src/auth.ts
index 8f6f53d..a69660f 100644
--- a/packages/auth/src/auth.ts
+++ b/packages/auth/src/auth.ts
@@ -2,10 +2,18 @@ import { betterAuth, BetterAuthOptions } from "better-auth";
import { prismaAdapter } from "better-auth/adapters/prisma";
import { prisma } from "@repo/db";
import { multiSession } from "better-auth/plugins";
+const BaseDomain =
+ process.env.NODE_ENV === "production"
+ ? process.env.API_DOMAIN as string
+ : "http://localhost:3001";
+ const AppDomain =
+ process.env.NODE_ENV === "production"
+ ? process.env.APP_DOMAIN as string
+ : "http://localhost:3003";
export const config = {
- trustedOrigins: ["http://localhost:3003"],
- baseURL: "http://localhost:3001",
+ trustedOrigins: [AppDomain],
+ baseURL: BaseDomain,
database: prismaAdapter(prisma, {
provider: "postgresql",
}),
@@ -14,6 +22,13 @@ export const config = {
emailAndPassword: {
enabled: true,
},
+ ...(process.env.NODE_ENV === "production" && {
+ advanced: {
+ crossSubDomainCookies: {
+ enabled: true,
+ },
+ },
+ }),
} satisfies BetterAuthOptions;
export const auth = betterAuth(config);
From fe0f1f7b2f2cf8ead4e25afd48a79af0f3f4ea35 Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Sun, 10 Nov 2024 12:39:04 +0530
Subject: [PATCH 05/16] fix route
---
apps/api/app/api/[[...route]]/hello.ts | 6 +++---
apps/api/app/api/[[...route]]/route.ts | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/apps/api/app/api/[[...route]]/hello.ts b/apps/api/app/api/[[...route]]/hello.ts
index e297afa..0cc67dd 100644
--- a/apps/api/app/api/[[...route]]/hello.ts
+++ b/apps/api/app/api/[[...route]]/hello.ts
@@ -2,10 +2,10 @@ import { Hono } from "hono";
const app = new Hono();
import { prisma } from "@repo/db";
app
- .get("/hello", async (c) => {
- const test = await prisma.user.findMany();
+ .get("/", async (c) => {
+ const user = await prisma.user.findMany();
return c.json({
- test,
+ user
});
})
.patch(async (c) => {
diff --git a/apps/api/app/api/[[...route]]/route.ts b/apps/api/app/api/[[...route]]/route.ts
index 0233d16..6d66fca 100644
--- a/apps/api/app/api/[[...route]]/route.ts
+++ b/apps/api/app/api/[[...route]]/route.ts
@@ -4,6 +4,7 @@ import { Hono } from "hono";
import {auth} from "@repo/auth"
import { cors } from "hono/cors";
import mail from "./mail";
+import hello from "./hello";
const allowedOrigins = [
"http://localhost:3003",
@@ -25,7 +26,7 @@ const app = new Hono<{
app.use(
"/auth/**",
cors({
- origin: ["http://localhost:3003", "https://www.plura.pro"],
+ origin: allowedOrigins,
allowHeaders: ["Content-Type", "Authorization"],
allowMethods: ["POST", "GET", "OPTIONS"],
exposeHeaders: ["Content-Length"],
@@ -85,18 +86,17 @@ app.get("/session", async (c) => {
user,
});
});
+app.route("/hello", hello);
app.route("/mail", mail)
app.on(["POST", "GET"], "/auth/**", (c) => {
- console.log(c.req.raw.headers.get("origin"));
+
return auth.handler(c.req.raw);
});
app.get("/multi-sessions",async (c)=>{
const res = await auth.api.listDeviceSessions({
headers: c.req.raw.headers,
})
- console.log(c.req.raw.headers.get("origin"));
- console.log(res.length)
return c.json(res);
})
const GET = handle(app);
From a38a5d16b3cbcc97dda2ca69e9961fd6fd2ef901 Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Sun, 10 Nov 2024 13:24:29 +0530
Subject: [PATCH 06/16] fix lockfile
---
pnpm-lock.yaml | 116 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 115 insertions(+), 1 deletion(-)
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2951e81..05f298c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -53,9 +53,11 @@ importers:
vite-tsconfig-paths:
specifier: ^5.1.0
version: 5.1.1(typescript@5.5.4)(vite@5.4.10(@types/node@20.17.6))
+ version: 5.1.1(typescript@5.5.4)(vite@5.4.10(@types/node@20.17.6))
vitest:
specifier: ^2.1.4
version: 2.1.4(@types/node@20.17.6)
+ version: 2.1.4(@types/node@20.17.6)
zod:
specifier: ^3.23.8
version: 3.23.8
@@ -369,6 +371,7 @@ importers:
vitest:
specifier: ^2.1.4
version: 2.1.4(@types/node@20.17.6)
+ version: 2.1.4(@types/node@20.17.6)
packages/auth:
dependencies:
@@ -2433,91 +2436,127 @@ packages:
peerDependencies:
react: ^18.0 || ^19.0 || ^19.0.0-rc
+ '@rollup/rollup-android-arm-eabi@4.25.0':
+ resolution: {integrity: sha512-CC/ZqFZwlAIbU1wUPisHyV/XRc5RydFrNLtgl3dGYskdwPZdt4HERtKm50a/+DtTlKeCq9IXFEWR+P6blwjqBA==}
'@rollup/rollup-android-arm-eabi@4.25.0':
resolution: {integrity: sha512-CC/ZqFZwlAIbU1wUPisHyV/XRc5RydFrNLtgl3dGYskdwPZdt4HERtKm50a/+DtTlKeCq9IXFEWR+P6blwjqBA==}
cpu: [arm]
os: [android]
+ '@rollup/rollup-android-arm64@4.25.0':
+ resolution: {integrity: sha512-/Y76tmLGUJqVBXXCfVS8Q8FJqYGhgH4wl4qTA24E9v/IJM0XvJCGQVSW1QZ4J+VURO9h8YCa28sTFacZXwK7Rg==}
'@rollup/rollup-android-arm64@4.25.0':
resolution: {integrity: sha512-/Y76tmLGUJqVBXXCfVS8Q8FJqYGhgH4wl4qTA24E9v/IJM0XvJCGQVSW1QZ4J+VURO9h8YCa28sTFacZXwK7Rg==}
cpu: [arm64]
os: [android]
+ '@rollup/rollup-darwin-arm64@4.25.0':
+ resolution: {integrity: sha512-YVT6L3UrKTlC0FpCZd0MGA7NVdp7YNaEqkENbWQ7AOVOqd/7VzyHpgIpc1mIaxRAo1ZsJRH45fq8j4N63I/vvg==}
'@rollup/rollup-darwin-arm64@4.25.0':
resolution: {integrity: sha512-YVT6L3UrKTlC0FpCZd0MGA7NVdp7YNaEqkENbWQ7AOVOqd/7VzyHpgIpc1mIaxRAo1ZsJRH45fq8j4N63I/vvg==}
cpu: [arm64]
os: [darwin]
+ '@rollup/rollup-darwin-x64@4.25.0':
+ resolution: {integrity: sha512-ZRL+gexs3+ZmmWmGKEU43Bdn67kWnMeWXLFhcVv5Un8FQcx38yulHBA7XR2+KQdYIOtD0yZDWBCudmfj6lQJoA==}
'@rollup/rollup-darwin-x64@4.25.0':
resolution: {integrity: sha512-ZRL+gexs3+ZmmWmGKEU43Bdn67kWnMeWXLFhcVv5Un8FQcx38yulHBA7XR2+KQdYIOtD0yZDWBCudmfj6lQJoA==}
cpu: [x64]
os: [darwin]
+ '@rollup/rollup-freebsd-arm64@4.25.0':
+ resolution: {integrity: sha512-xpEIXhiP27EAylEpreCozozsxWQ2TJbOLSivGfXhU4G1TBVEYtUPi2pOZBnvGXHyOdLAUUhPnJzH3ah5cqF01g==}
'@rollup/rollup-freebsd-arm64@4.25.0':
resolution: {integrity: sha512-xpEIXhiP27EAylEpreCozozsxWQ2TJbOLSivGfXhU4G1TBVEYtUPi2pOZBnvGXHyOdLAUUhPnJzH3ah5cqF01g==}
cpu: [arm64]
os: [freebsd]
+ '@rollup/rollup-freebsd-x64@4.25.0':
+ resolution: {integrity: sha512-sC5FsmZGlJv5dOcURrsnIK7ngc3Kirnx3as2XU9uER+zjfyqIjdcMVgzy4cOawhsssqzoAX19qmxgJ8a14Qrqw==}
'@rollup/rollup-freebsd-x64@4.25.0':
resolution: {integrity: sha512-sC5FsmZGlJv5dOcURrsnIK7ngc3Kirnx3as2XU9uER+zjfyqIjdcMVgzy4cOawhsssqzoAX19qmxgJ8a14Qrqw==}
cpu: [x64]
os: [freebsd]
+ '@rollup/rollup-linux-arm-gnueabihf@4.25.0':
+ resolution: {integrity: sha512-uD/dbLSs1BEPzg564TpRAQ/YvTnCds2XxyOndAO8nJhaQcqQGFgv/DAVko/ZHap3boCvxnzYMa3mTkV/B/3SWA==}
'@rollup/rollup-linux-arm-gnueabihf@4.25.0':
resolution: {integrity: sha512-uD/dbLSs1BEPzg564TpRAQ/YvTnCds2XxyOndAO8nJhaQcqQGFgv/DAVko/ZHap3boCvxnzYMa3mTkV/B/3SWA==}
cpu: [arm]
os: [linux]
+ '@rollup/rollup-linux-arm-musleabihf@4.25.0':
+ resolution: {integrity: sha512-ZVt/XkrDlQWegDWrwyC3l0OfAF7yeJUF4fq5RMS07YM72BlSfn2fQQ6lPyBNjt+YbczMguPiJoCfaQC2dnflpQ==}
'@rollup/rollup-linux-arm-musleabihf@4.25.0':
resolution: {integrity: sha512-ZVt/XkrDlQWegDWrwyC3l0OfAF7yeJUF4fq5RMS07YM72BlSfn2fQQ6lPyBNjt+YbczMguPiJoCfaQC2dnflpQ==}
cpu: [arm]
os: [linux]
+ '@rollup/rollup-linux-arm64-gnu@4.25.0':
+ resolution: {integrity: sha512-qboZ+T0gHAW2kkSDPHxu7quaFaaBlynODXpBVnPxUgvWYaE84xgCKAPEYE+fSMd3Zv5PyFZR+L0tCdYCMAtG0A==}
'@rollup/rollup-linux-arm64-gnu@4.25.0':
resolution: {integrity: sha512-qboZ+T0gHAW2kkSDPHxu7quaFaaBlynODXpBVnPxUgvWYaE84xgCKAPEYE+fSMd3Zv5PyFZR+L0tCdYCMAtG0A==}
cpu: [arm64]
os: [linux]
+ '@rollup/rollup-linux-arm64-musl@4.25.0':
+ resolution: {integrity: sha512-ndWTSEmAaKr88dBuogGH2NZaxe7u2rDoArsejNslugHZ+r44NfWiwjzizVS1nUOHo+n1Z6qV3X60rqE/HlISgw==}
'@rollup/rollup-linux-arm64-musl@4.25.0':
resolution: {integrity: sha512-ndWTSEmAaKr88dBuogGH2NZaxe7u2rDoArsejNslugHZ+r44NfWiwjzizVS1nUOHo+n1Z6qV3X60rqE/HlISgw==}
cpu: [arm64]
os: [linux]
+ '@rollup/rollup-linux-powerpc64le-gnu@4.25.0':
+ resolution: {integrity: sha512-BVSQvVa2v5hKwJSy6X7W1fjDex6yZnNKy3Kx1JGimccHft6HV0THTwNtC2zawtNXKUu+S5CjXslilYdKBAadzA==}
'@rollup/rollup-linux-powerpc64le-gnu@4.25.0':
resolution: {integrity: sha512-BVSQvVa2v5hKwJSy6X7W1fjDex6yZnNKy3Kx1JGimccHft6HV0THTwNtC2zawtNXKUu+S5CjXslilYdKBAadzA==}
cpu: [ppc64]
os: [linux]
+ '@rollup/rollup-linux-riscv64-gnu@4.25.0':
+ resolution: {integrity: sha512-G4hTREQrIdeV0PE2JruzI+vXdRnaK1pg64hemHq2v5fhv8C7WjVaeXc9P5i4Q5UC06d/L+zA0mszYIKl+wY8oA==}
'@rollup/rollup-linux-riscv64-gnu@4.25.0':
resolution: {integrity: sha512-G4hTREQrIdeV0PE2JruzI+vXdRnaK1pg64hemHq2v5fhv8C7WjVaeXc9P5i4Q5UC06d/L+zA0mszYIKl+wY8oA==}
cpu: [riscv64]
os: [linux]
+ '@rollup/rollup-linux-s390x-gnu@4.25.0':
+ resolution: {integrity: sha512-9T/w0kQ+upxdkFL9zPVB6zy9vWW1deA3g8IauJxojN4bnz5FwSsUAD034KpXIVX5j5p/rn6XqumBMxfRkcHapQ==}
'@rollup/rollup-linux-s390x-gnu@4.25.0':
resolution: {integrity: sha512-9T/w0kQ+upxdkFL9zPVB6zy9vWW1deA3g8IauJxojN4bnz5FwSsUAD034KpXIVX5j5p/rn6XqumBMxfRkcHapQ==}
cpu: [s390x]
os: [linux]
+ '@rollup/rollup-linux-x64-gnu@4.25.0':
+ resolution: {integrity: sha512-ThcnU0EcMDn+J4B9LD++OgBYxZusuA7iemIIiz5yzEcFg04VZFzdFjuwPdlURmYPZw+fgVrFzj4CA64jSTG4Ig==}
'@rollup/rollup-linux-x64-gnu@4.25.0':
resolution: {integrity: sha512-ThcnU0EcMDn+J4B9LD++OgBYxZusuA7iemIIiz5yzEcFg04VZFzdFjuwPdlURmYPZw+fgVrFzj4CA64jSTG4Ig==}
cpu: [x64]
os: [linux]
+ '@rollup/rollup-linux-x64-musl@4.25.0':
+ resolution: {integrity: sha512-zx71aY2oQxGxAT1JShfhNG79PnjYhMC6voAjzpu/xmMjDnKNf6Nl/xv7YaB/9SIa9jDYf8RBPWEnjcdlhlv1rQ==}
'@rollup/rollup-linux-x64-musl@4.25.0':
resolution: {integrity: sha512-zx71aY2oQxGxAT1JShfhNG79PnjYhMC6voAjzpu/xmMjDnKNf6Nl/xv7YaB/9SIa9jDYf8RBPWEnjcdlhlv1rQ==}
cpu: [x64]
os: [linux]
+ '@rollup/rollup-win32-arm64-msvc@4.25.0':
+ resolution: {integrity: sha512-JT8tcjNocMs4CylWY/CxVLnv8e1lE7ff1fi6kbGocWwxDq9pj30IJ28Peb+Y8yiPNSF28oad42ApJB8oUkwGww==}
'@rollup/rollup-win32-arm64-msvc@4.25.0':
resolution: {integrity: sha512-JT8tcjNocMs4CylWY/CxVLnv8e1lE7ff1fi6kbGocWwxDq9pj30IJ28Peb+Y8yiPNSF28oad42ApJB8oUkwGww==}
cpu: [arm64]
os: [win32]
+ '@rollup/rollup-win32-ia32-msvc@4.25.0':
+ resolution: {integrity: sha512-dRLjLsO3dNOfSN6tjyVlG+Msm4IiZnGkuZ7G5NmpzwF9oOc582FZG05+UdfTbz5Jd4buK/wMb6UeHFhG18+OEg==}
'@rollup/rollup-win32-ia32-msvc@4.25.0':
resolution: {integrity: sha512-dRLjLsO3dNOfSN6tjyVlG+Msm4IiZnGkuZ7G5NmpzwF9oOc582FZG05+UdfTbz5Jd4buK/wMb6UeHFhG18+OEg==}
cpu: [ia32]
os: [win32]
+ '@rollup/rollup-win32-x64-msvc@4.25.0':
+ resolution: {integrity: sha512-/RqrIFtLB926frMhZD0a5oDa4eFIbyNEwLLloMTEjmqfwZWXywwVVOVmwTsuyhC9HKkVEZcOOi+KV4U9wmOdlg==}
'@rollup/rollup-win32-x64-msvc@4.25.0':
resolution: {integrity: sha512-/RqrIFtLB926frMhZD0a5oDa4eFIbyNEwLLloMTEjmqfwZWXywwVVOVmwTsuyhC9HKkVEZcOOi+KV4U9wmOdlg==}
cpu: [x64]
@@ -3160,6 +3199,8 @@ packages:
resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==}
engines: {node: '>= 6'}
+ caniuse-lite@1.0.30001679:
+ resolution: {integrity: sha512-j2YqID/YwpLnKzCmBOS4tlZdWprXm3ZmQLBH9ZBXFOhoxLA46fwyBvx6toCBWBmnuwUY/qB3kEU6gFx8qgCroA==}
caniuse-lite@1.0.30001679:
resolution: {integrity: sha512-j2YqID/YwpLnKzCmBOS4tlZdWprXm3ZmQLBH9ZBXFOhoxLA46fwyBvx6toCBWBmnuwUY/qB3kEU6gFx8qgCroA==}
@@ -3366,6 +3407,8 @@ packages:
cross-fetch@4.0.0:
resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==}
+ cross-spawn@7.0.5:
+ resolution: {integrity: sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==}
cross-spawn@7.0.5:
resolution: {integrity: sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==}
engines: {node: '>= 8'}
@@ -3591,6 +3634,8 @@ packages:
engines: {node: '>=14'}
hasBin: true
+ electron-to-chromium@1.5.55:
+ resolution: {integrity: sha512-6maZ2ASDOTBtjt9FhqYPRnbvKU5tjG0IN9SztUOWYw2AzNDNpKJYLJmlK0/En4Hs/aiWnB+JZ+gW19PIGszgKg==}
electron-to-chromium@1.5.55:
resolution: {integrity: sha512-6maZ2ASDOTBtjt9FhqYPRnbvKU5tjG0IN9SztUOWYw2AzNDNpKJYLJmlK0/En4Hs/aiWnB+JZ+gW19PIGszgKg==}
@@ -5058,6 +5103,8 @@ packages:
resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==}
engines: {node: '>= 6'}
+ object-inspect@1.13.3:
+ resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==}
object-inspect@1.13.3:
resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==}
engines: {node: '>= 0.4'}
@@ -5577,6 +5624,8 @@ packages:
deprecated: Rimraf versions prior to v4 are no longer supported
hasBin: true
+ rollup@4.25.0:
+ resolution: {integrity: sha512-uVbClXmR6wvx5R1M3Od4utyLUxrmOcEm3pAtMphn73Apq19PDtHpgZoEvqH2YnnaNUuvKmg2DgRd2Sqv+odyqg==}
rollup@4.25.0:
resolution: {integrity: sha512-uVbClXmR6wvx5R1M3Od4utyLUxrmOcEm3pAtMphn73Apq19PDtHpgZoEvqH2YnnaNUuvKmg2DgRd2Sqv+odyqg==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
@@ -5765,6 +5814,8 @@ packages:
stackback@0.0.2:
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
+ std-env@3.8.0:
+ resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==}
std-env@3.8.0:
resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==}
@@ -6241,6 +6292,8 @@ packages:
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
+ vite-tsconfig-paths@5.1.1:
+ resolution: {integrity: sha512-0nLY3qQI4GlYw3We4rps16ntW+nAZYCUrJwsuvqxIUCY9Bk3VnSeJDm/VPCmjOcAJ9Kud4k+CK2ZEnf9pbzK9Q==}
vite-tsconfig-paths@5.1.1:
resolution: {integrity: sha512-0nLY3qQI4GlYw3We4rps16ntW+nAZYCUrJwsuvqxIUCY9Bk3VnSeJDm/VPCmjOcAJ9Kud4k+CK2ZEnf9pbzK9Q==}
peerDependencies:
@@ -6443,6 +6496,7 @@ snapshots:
'@babel/helper-module-transforms': 7.26.0(@babel/core@7.24.5)
'@babel/helpers': 7.26.0
'@babel/parser': 7.24.5
+ '@babel/parser': 7.24.5
'@babel/template': 7.25.9
'@babel/traverse': 7.25.9
'@babel/types': 7.26.0
@@ -8261,57 +8315,75 @@ snapshots:
dependencies:
react: 18.3.1
+ '@rollup/rollup-android-arm-eabi@4.25.0':
'@rollup/rollup-android-arm-eabi@4.25.0':
optional: true
+ '@rollup/rollup-android-arm64@4.25.0':
'@rollup/rollup-android-arm64@4.25.0':
optional: true
+ '@rollup/rollup-darwin-arm64@4.25.0':
'@rollup/rollup-darwin-arm64@4.25.0':
optional: true
+ '@rollup/rollup-darwin-x64@4.25.0':
'@rollup/rollup-darwin-x64@4.25.0':
optional: true
+ '@rollup/rollup-freebsd-arm64@4.25.0':
'@rollup/rollup-freebsd-arm64@4.25.0':
optional: true
+ '@rollup/rollup-freebsd-x64@4.25.0':
'@rollup/rollup-freebsd-x64@4.25.0':
optional: true
+ '@rollup/rollup-linux-arm-gnueabihf@4.25.0':
'@rollup/rollup-linux-arm-gnueabihf@4.25.0':
optional: true
+ '@rollup/rollup-linux-arm-musleabihf@4.25.0':
'@rollup/rollup-linux-arm-musleabihf@4.25.0':
optional: true
+ '@rollup/rollup-linux-arm64-gnu@4.25.0':
'@rollup/rollup-linux-arm64-gnu@4.25.0':
optional: true
+ '@rollup/rollup-linux-arm64-musl@4.25.0':
'@rollup/rollup-linux-arm64-musl@4.25.0':
optional: true
+ '@rollup/rollup-linux-powerpc64le-gnu@4.25.0':
'@rollup/rollup-linux-powerpc64le-gnu@4.25.0':
optional: true
+ '@rollup/rollup-linux-riscv64-gnu@4.25.0':
'@rollup/rollup-linux-riscv64-gnu@4.25.0':
optional: true
+ '@rollup/rollup-linux-s390x-gnu@4.25.0':
'@rollup/rollup-linux-s390x-gnu@4.25.0':
optional: true
+ '@rollup/rollup-linux-x64-gnu@4.25.0':
'@rollup/rollup-linux-x64-gnu@4.25.0':
optional: true
+ '@rollup/rollup-linux-x64-musl@4.25.0':
'@rollup/rollup-linux-x64-musl@4.25.0':
optional: true
+ '@rollup/rollup-win32-arm64-msvc@4.25.0':
'@rollup/rollup-win32-arm64-msvc@4.25.0':
optional: true
+ '@rollup/rollup-win32-ia32-msvc@4.25.0':
'@rollup/rollup-win32-ia32-msvc@4.25.0':
optional: true
+ '@rollup/rollup-win32-x64-msvc@4.25.0':
'@rollup/rollup-win32-x64-msvc@4.25.0':
optional: true
@@ -9074,6 +9146,8 @@ snapshots:
browserslist@4.24.2:
dependencies:
+ caniuse-lite: 1.0.30001679
+ electron-to-chromium: 1.5.55
caniuse-lite: 1.0.30001679
electron-to-chromium: 1.5.55
node-releases: 2.0.18
@@ -9116,6 +9190,7 @@ snapshots:
camelcase-css@2.0.1: {}
+ caniuse-lite@1.0.30001679: {}
caniuse-lite@1.0.30001679: {}
ccount@2.0.1: {}
@@ -9343,6 +9418,7 @@ snapshots:
transitivePeerDependencies:
- encoding
+ cross-spawn@7.0.5:
cross-spawn@7.0.5:
dependencies:
path-key: 3.1.1
@@ -9553,6 +9629,7 @@ snapshots:
semver: 7.6.3
electron-to-chromium@1.5.55: {}
+ electron-to-chromium@1.5.55: {}
emoji-regex@8.0.0: {}
@@ -9622,6 +9699,7 @@ snapshots:
is-typed-array: 1.1.13
is-weakref: 1.0.2
object-inspect: 1.13.3
+ object-inspect: 1.13.3
object-keys: 1.1.1
object.assign: 4.1.5
regexp.prototype.flags: 1.5.3
@@ -9772,7 +9850,7 @@ snapshots:
eslint: 8.57.1
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1)
- eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
+ eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1)
eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1)
eslint-plugin-react: 7.37.2(eslint@8.57.1)
eslint-plugin-react-hooks: 5.0.0(eslint@8.57.1)
@@ -9823,6 +9901,7 @@ snapshots:
- eslint-import-resolver-webpack
- supports-color
+ eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1):
eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1):
dependencies:
'@nolyfill/is-core-module': 1.0.39
@@ -9830,6 +9909,7 @@ snapshots:
enhanced-resolve: 5.17.1
eslint: 8.57.1
eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
+ eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
fast-glob: 3.3.2
get-tsconfig: 4.8.1
is-bun-module: 1.2.1
@@ -9853,6 +9933,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ eslint-module-utils@2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1):
eslint-module-utils@2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1):
dependencies:
debug: 3.2.7
@@ -9861,6 +9942,7 @@ snapshots:
eslint: 8.57.1
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1)
+ eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1)
transitivePeerDependencies:
- supports-color
@@ -9882,6 +9964,7 @@ snapshots:
eslint: 8.57.1
eslint-import-resolver-node: 0.3.9
eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
+ eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
hasown: 2.0.2
is-core-module: 2.15.1
is-glob: 4.0.3
@@ -10030,6 +10113,7 @@ snapshots:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.5
+ cross-spawn: 7.0.5
debug: 4.3.7
doctrine: 3.0.0
escape-string-regexp: 4.0.0
@@ -10123,6 +10207,7 @@ snapshots:
execa@5.1.1:
dependencies:
+ cross-spawn: 7.0.5
cross-spawn: 7.0.5
get-stream: 6.0.1
human-signals: 2.1.0
@@ -10219,6 +10304,7 @@ snapshots:
foreground-child@3.3.0:
dependencies:
+ cross-spawn: 7.0.5
cross-spawn: 7.0.5
signal-exit: 4.1.0
@@ -11419,6 +11505,7 @@ snapshots:
'@swc/helpers': 0.5.5
busboy: 1.6.0
caniuse-lite: 1.0.30001679
+ caniuse-lite: 1.0.30001679
graceful-fs: 4.2.11
postcss: 8.4.31
react: 18.3.1
@@ -11446,6 +11533,7 @@ snapshots:
'@swc/helpers': 0.5.13
busboy: 1.6.0
caniuse-lite: 1.0.30001679
+ caniuse-lite: 1.0.30001679
postcss: 8.4.31
react: 19.0.0-rc-02c0e824-20241028
react-dom: 19.0.0-rc-02c0e824-20241028(react@19.0.0-rc-02c0e824-20241028)
@@ -11517,6 +11605,7 @@ snapshots:
object-hash@3.0.0: {}
+ object-inspect@1.13.3: {}
object-inspect@1.13.3: {}
object-keys@1.1.1: {}
@@ -12175,10 +12264,29 @@ snapshots:
dependencies:
glob: 7.2.3
+ rollup@4.25.0:
rollup@4.25.0:
dependencies:
'@types/estree': 1.0.6
optionalDependencies:
+ '@rollup/rollup-android-arm-eabi': 4.25.0
+ '@rollup/rollup-android-arm64': 4.25.0
+ '@rollup/rollup-darwin-arm64': 4.25.0
+ '@rollup/rollup-darwin-x64': 4.25.0
+ '@rollup/rollup-freebsd-arm64': 4.25.0
+ '@rollup/rollup-freebsd-x64': 4.25.0
+ '@rollup/rollup-linux-arm-gnueabihf': 4.25.0
+ '@rollup/rollup-linux-arm-musleabihf': 4.25.0
+ '@rollup/rollup-linux-arm64-gnu': 4.25.0
+ '@rollup/rollup-linux-arm64-musl': 4.25.0
+ '@rollup/rollup-linux-powerpc64le-gnu': 4.25.0
+ '@rollup/rollup-linux-riscv64-gnu': 4.25.0
+ '@rollup/rollup-linux-s390x-gnu': 4.25.0
+ '@rollup/rollup-linux-x64-gnu': 4.25.0
+ '@rollup/rollup-linux-x64-musl': 4.25.0
+ '@rollup/rollup-win32-arm64-msvc': 4.25.0
+ '@rollup/rollup-win32-ia32-msvc': 4.25.0
+ '@rollup/rollup-win32-x64-msvc': 4.25.0
'@rollup/rollup-android-arm-eabi': 4.25.0
'@rollup/rollup-android-arm64': 4.25.0
'@rollup/rollup-darwin-arm64': 4.25.0
@@ -12311,6 +12419,7 @@ snapshots:
es-errors: 1.3.0
get-intrinsic: 1.2.4
object-inspect: 1.13.3
+ object-inspect: 1.13.3
siginfo@2.0.0: {}
@@ -12427,6 +12536,7 @@ snapshots:
stackback@0.0.2: {}
+ std-env@3.8.0: {}
std-env@3.8.0: {}
streamsearch@1.1.0: {}
@@ -12956,6 +13066,7 @@ snapshots:
- supports-color
- terser
+ vite-tsconfig-paths@5.1.1(typescript@5.5.4)(vite@5.4.10(@types/node@20.17.6)):
vite-tsconfig-paths@5.1.1(typescript@5.5.4)(vite@5.4.10(@types/node@20.17.6)):
dependencies:
debug: 4.3.7
@@ -12972,10 +13083,12 @@ snapshots:
esbuild: 0.21.5
postcss: 8.4.47
rollup: 4.25.0
+ rollup: 4.25.0
optionalDependencies:
'@types/node': 20.17.6
fsevents: 2.3.3
+ vitest@2.1.4(@types/node@20.17.6):
vitest@2.1.4(@types/node@20.17.6):
dependencies:
'@vitest/expect': 2.1.4
@@ -12991,6 +13104,7 @@ snapshots:
magic-string: 0.30.12
pathe: 1.1.2
std-env: 3.8.0
+ std-env: 3.8.0
tinybench: 2.9.0
tinyexec: 0.3.1
tinypool: 1.0.1
From 00df11ba66d9152d6f6ac7a22d958e988089a084 Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Sun, 10 Nov 2024 13:47:07 +0530
Subject: [PATCH 07/16] fix
---
apps/api/package.json | 4 --
.../components/custom/account-switcher.tsx | 38 -------------------
2 files changed, 42 deletions(-)
diff --git a/apps/api/package.json b/apps/api/package.json
index 6b72189..50bc7fd 100644
--- a/apps/api/package.json
+++ b/apps/api/package.json
@@ -17,10 +17,6 @@
"@hono/zod-validator": "^0.4.1",
"@repo/auth": "workspace:*",
"@repo/db": "workspace:*",
- "@repo/mail": "workspace:*",
- "@repo/types": "workspace:*",
- "better-auth": "0.8.1-beta.1",
- "contentlayer2": "^0.5.3",
"hono": "^4.6.9",
"next": "15.0.2",
"react": "19.0.0-rc-02c0e824-20241028",
diff --git a/apps/www/components/custom/account-switcher.tsx b/apps/www/components/custom/account-switcher.tsx
index 170d1a7..b321595 100644
--- a/apps/www/components/custom/account-switcher.tsx
+++ b/apps/www/components/custom/account-switcher.tsx
@@ -1,46 +1,9 @@
"use client";
-<<<<<<< HEAD
import { authClient } from "../../lib/auth-client";
-=======
-import { authClient } from "@/lib/auth-client";
->>>>>>> 5b4aadf (add better-auth in hono)
import { Session } from "@repo/auth";
import { useRouter } from "next/navigation";
interface Props {
session: Session[];
-<<<<<<< HEAD
- activeSession: Session;
-}
-export default function AccountSwitcher({ session, activeSession }: Props) {
- const router = useRouter();
- const onSelect = async (sessionId: string) => {
- console.log(sessionId);
- const active = await authClient.multiSession.setActive({
- sessionId: sessionId,
- });
-
- console.log(active);
- router.refresh();
- };
- return (
-
-
-
- );
-}
-=======
activeSession : Session;
}
export default function AccountSwitcher({session,activeSession}:Props) {
@@ -64,4 +27,3 @@ export default function AccountSwitcher({session,activeSession}:Props) {
)
}
->>>>>>> 5b4aadf (add better-auth in hono)
From 637143a663aec18cfa061244c977cd34a0de7ade Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Sun, 10 Nov 2024 16:15:31 +0530
Subject: [PATCH 08/16] route
---
apps/api/app/api/[[...route]]/hello.ts | 2 +-
apps/api/app/api/[[...route]]/mail.ts | 2 +-
apps/api/app/api/[[...route]]/route.ts | 20 ++++++++------------
3 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/apps/api/app/api/[[...route]]/hello.ts b/apps/api/app/api/[[...route]]/hello.ts
index 0cc67dd..9788240 100644
--- a/apps/api/app/api/[[...route]]/hello.ts
+++ b/apps/api/app/api/[[...route]]/hello.ts
@@ -5,7 +5,7 @@ app
.get("/", async (c) => {
const user = await prisma.user.findMany();
return c.json({
- user
+ user,
});
})
.patch(async (c) => {
diff --git a/apps/api/app/api/[[...route]]/mail.ts b/apps/api/app/api/[[...route]]/mail.ts
index 49d78d6..b70582d 100644
--- a/apps/api/app/api/[[...route]]/mail.ts
+++ b/apps/api/app/api/[[...route]]/mail.ts
@@ -46,7 +46,7 @@ app
}
return c.json(
{
- message: "All Emails sent successfully",
+ message: "All Email sent successfully",
data,
},
200
diff --git a/apps/api/app/api/[[...route]]/route.ts b/apps/api/app/api/[[...route]]/route.ts
index 6d66fca..0d9dbfc 100644
--- a/apps/api/app/api/[[...route]]/route.ts
+++ b/apps/api/app/api/[[...route]]/route.ts
@@ -1,7 +1,7 @@
import { prisma } from "@repo/db";
import { handle } from "hono/vercel";
import { Hono } from "hono";
-import {auth} from "@repo/auth"
+import { auth } from "@repo/auth";
import { cors } from "hono/cors";
import mail from "./mail";
import hello from "./hello";
@@ -14,15 +14,13 @@ const allowedOrigins = [
export const runtime = "nodejs";
-
const app = new Hono<{
Variables: {
user: typeof auth.$Infer.Session.user | null;
- session: typeof auth.$Infer.Session.session | null;
+ session: typeof auth.$Infer.Session.session | null;
};
}>().basePath("/api");
-
app.use(
"/auth/**",
cors({
@@ -31,7 +29,7 @@ app.use(
allowMethods: ["POST", "GET", "OPTIONS"],
exposeHeaders: ["Content-Length"],
maxAge: 600,
- credentials: true
+ credentials: true,
})
);
app.options("/auth/**", (c) => {
@@ -57,7 +55,6 @@ app.options("/auth/**", (c) => {
app.use("*", async (c, next) => {
const session = await auth.api.getSession({ headers: c.req.raw.headers });
-
if (!session) {
c.set("user", null);
c.set("session", null);
@@ -87,22 +84,21 @@ app.get("/session", async (c) => {
});
});
app.route("/hello", hello);
-app.route("/mail", mail)
+app.route("/mail", mail);
app.on(["POST", "GET"], "/auth/**", (c) => {
-
return auth.handler(c.req.raw);
});
-app.get("/multi-sessions",async (c)=>{
+app.get("/multi-sessions", async (c) => {
const res = await auth.api.listDeviceSessions({
headers: c.req.raw.headers,
- })
+ });
return c.json(res);
-})
+});
const GET = handle(app);
const POST = handle(app);
const PATCH = handle(app);
const DELETE = handle(app);
-export const OPTIONS = handle(app);;
+export const OPTIONS = handle(app);
export { GET, PATCH, POST, DELETE };
From 4a615ebe919e87e09a4b7bb730a6352a26154054 Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Sun, 10 Nov 2024 16:35:36 +0530
Subject: [PATCH 09/16] ui
---
apps/www/app/(auth)/dashboard/page.tsx | 12 ---
apps/www/app/(auth)/sign-in/page.tsx | 8 --
apps/www/app/(auth)/sign-up/page.tsx | 13 ---
.../www/app/sign-in/[[...sign-in]]/layout.tsx | 16 ---
apps/www/app/sign-in/[[...sign-in]]/page.tsx | 63 ------------
apps/www/components/custom/Sign-In.tsx | 82 ----------------
apps/www/components/custom/Sign-up.tsx | 98 -------------------
7 files changed, 292 deletions(-)
delete mode 100644 apps/www/app/sign-in/[[...sign-in]]/layout.tsx
delete mode 100644 apps/www/app/sign-in/[[...sign-in]]/page.tsx
delete mode 100644 apps/www/components/custom/Sign-In.tsx
delete mode 100644 apps/www/components/custom/Sign-up.tsx
diff --git a/apps/www/app/(auth)/dashboard/page.tsx b/apps/www/app/(auth)/dashboard/page.tsx
index 7c2a04f..bb407d0 100644
--- a/apps/www/app/(auth)/dashboard/page.tsx
+++ b/apps/www/app/(auth)/dashboard/page.tsx
@@ -2,7 +2,6 @@ import AccountSwitcher from "@/components/custom/account-switcher";
import { getMultipleSessions, getSession } from "@/lib/server";
export default async function page() {
-<<<<<<< HEAD
const session = await getSession();
const multipleSessions = await getMultipleSessions();
return (
@@ -12,15 +11,4 @@ export default async function page() {
{/* {JSON.stringify(multipleSessions,null,2)}
*/}
);
-=======
- const session = await getSession()
- const multipleSessions = await getMultipleSessions()
- return (
-
-
-
{JSON.stringify(session,null,1)}
- {/*
{JSON.stringify(multipleSessions,null,2)}
*/}
-
- )
->>>>>>> 5b4aadf (add better-auth in hono)
}
diff --git a/apps/www/app/(auth)/sign-in/page.tsx b/apps/www/app/(auth)/sign-in/page.tsx
index 1436750..3c16bea 100644
--- a/apps/www/app/(auth)/sign-in/page.tsx
+++ b/apps/www/app/(auth)/sign-in/page.tsx
@@ -1,4 +1,3 @@
-<<<<<<< HEAD
import SignInComponent from "@/components/custom/signinComponent";
export default function page() {
@@ -8,10 +7,3 @@ export default function page() {
);
}
-=======
-import SignIn from "@/components/custom/Sign-In";
-
-export default function page() {
- return
-}
->>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/app/(auth)/sign-up/page.tsx b/apps/www/app/(auth)/sign-up/page.tsx
index e509f83..7a96bc3 100644
--- a/apps/www/app/(auth)/sign-up/page.tsx
+++ b/apps/www/app/(auth)/sign-up/page.tsx
@@ -1,4 +1,3 @@
-<<<<<<< HEAD
import SignUpComponent from "@/components/custom/signupComponent";
export default function page() {
@@ -8,15 +7,3 @@ export default function page() {
);
}
-=======
-import SignUp from "../../../components/custom/Sign-up";
-
-
-export default function page() {
- return (
-
-
-
- )
-}
->>>>>>> 5b4aadf (add better-auth in hono)
diff --git a/apps/www/app/sign-in/[[...sign-in]]/layout.tsx b/apps/www/app/sign-in/[[...sign-in]]/layout.tsx
deleted file mode 100644
index 6425796..0000000
--- a/apps/www/app/sign-in/[[...sign-in]]/layout.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { SiteFooter } from "@/components/custom/site/footer";
-import { SiteHeader } from "@/components/custom/site/header";
-
-interface AppLayoutProps {
- children: React.ReactNode;
-}
-
-export default function AppLayout({ children }: AppLayoutProps) {
- return (
-
-
- {children}
-
-
- );
-}
diff --git a/apps/www/app/sign-in/[[...sign-in]]/page.tsx b/apps/www/app/sign-in/[[...sign-in]]/page.tsx
deleted file mode 100644
index 76e5c85..0000000
--- a/apps/www/app/sign-in/[[...sign-in]]/page.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import { Button } from "@/components/ui/button";
-import { PiGithubLogoBold } from "react-icons/pi";
-import { SiDiscord } from "react-icons/si";
-import { FcGoogle } from "react-icons/fc";
-import { Input } from "@/components/ui/input";
-import Link from "next/link";
-export default function SignInPage() {
- return (
-
-
-
-
-
- Transform how you work.
-
-
- Log In Your Plura Account
-
-
-
-
-
-
-
-
-
-
-
-
- Email
-
-
-
-
- already a member
-
-
-
- {/* experiment here*/}
-
-
-
- );
-}
diff --git a/apps/www/components/custom/Sign-In.tsx b/apps/www/components/custom/Sign-In.tsx
deleted file mode 100644
index f83b9c5..0000000
--- a/apps/www/components/custom/Sign-In.tsx
+++ /dev/null
@@ -1,82 +0,0 @@
-"use client";
-
-import { zodResolver } from "@hookform/resolvers/zod";
-import { useForm } from "react-hook-form";
-import { z } from "zod";
-
-import { Button } from "@/components/ui/button";
-import {
- Form,
- FormControl,
- FormField,
- FormItem,
- FormLabel,
- FormMessage,
-} from "@/components/ui/form";
-import { Input } from "@/components/ui/input";
-import { authClient } from "@/lib/auth-client";
-
-const formSchema = z.object({
- email: z.string().email(),
- password: z.string().min(8),
-});
-
-export default function SignIn() {
- const form = useForm>({
- resolver: zodResolver(formSchema),
- defaultValues: {
- email: "",
- password: "",
- },
- });
- const onSubmit = async (SignInData: z.infer) => {
- const { data, error } = await authClient.signIn.email(
- {
- email: SignInData.email,
- password: SignInData.password,
- callbackURL: "/dashboard"
- },
- {
- onRequest: (ctx) => {},
- onSuccess: (ctx) => {},
- onError: (ctx) => {
- alert(ctx.error.message);
- },
- }
- );
- };
-
- return (
-
-
- );
-}
diff --git a/apps/www/components/custom/Sign-up.tsx b/apps/www/components/custom/Sign-up.tsx
deleted file mode 100644
index 0f0eda7..0000000
--- a/apps/www/components/custom/Sign-up.tsx
+++ /dev/null
@@ -1,98 +0,0 @@
-"use client";
-
-import { zodResolver } from "@hookform/resolvers/zod";
-import { useForm } from "react-hook-form";
-import { z } from "zod";
-
-import { Button } from "@/components/ui/button";
-import {
- Form,
- FormControl,
- FormDescription,
- FormField,
- FormItem,
- FormLabel,
- FormMessage,
-} from "@/components/ui/form";
-import { Input } from "@/components/ui/input";
-import { authClient } from "@/lib/auth-client";
-
-const formSchema = z.object({
- name: z.string(),
- email: z.string().email(),
- password: z.string().min(8),
-});
-
-export default function SignUp() {
- const form = useForm>({
- resolver: zodResolver(formSchema),
- defaultValues: {
- email: "",
- password: "",
- },
- });
- const onSubmit = async(SignInData: z.infer) => {
- const { data, error } = await authClient.signUp.email({
- name: SignInData.name,
- email: SignInData.email,
- password: SignInData.password
- }, {
- onRequest: (ctx) => {
-
- },
- onSuccess: (ctx) => {
-
- },
- onError: (ctx) => {
- alert(ctx.error.message);
- },
- });
- };
-
- return (
-
-
- );
-}
From b322450bb0e5dcad5b6f99b1096643f2e5a76e26 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sun, 10 Nov 2024 11:06:58 +0000
Subject: [PATCH 10/16] chore: format code with Prettier
---
apps/api/app/api/[[...route]]/mail.ts | 8 +-
apps/api/app/api/[[...route]]/route.ts | 2 +-
apps/www/app/(auth)/sign-up/page.tsx | 2 +-
.../components/custom/account-switcher.tsx | 38 ++++--
apps/www/components/ui/button.tsx | 26 ++--
apps/www/components/ui/form.tsx | 103 +++++++-------
apps/www/components/ui/label.tsx | 20 +--
apps/www/lib/auth-client.ts | 12 +-
apps/www/lib/server.ts | 2 +-
pnpm-lock.yaml | 128 +-----------------
10 files changed, 112 insertions(+), 229 deletions(-)
diff --git a/apps/api/app/api/[[...route]]/mail.ts b/apps/api/app/api/[[...route]]/mail.ts
index b70582d..48b8ddd 100644
--- a/apps/api/app/api/[[...route]]/mail.ts
+++ b/apps/api/app/api/[[...route]]/mail.ts
@@ -14,7 +14,7 @@ app
{
message: "Email sent failed",
},
- 400
+ 400,
);
}
return c.json(
@@ -22,7 +22,7 @@ app
message: "Email sent successfully",
data,
},
- 200
+ 200,
);
})
.get((c) => {
@@ -41,7 +41,7 @@ app
{
message: "Email sent failed",
},
- 400
+ 400,
);
}
return c.json(
@@ -49,7 +49,7 @@ app
message: "All Email sent successfully",
data,
},
- 200
+ 200,
);
})
.get((c) => {
diff --git a/apps/api/app/api/[[...route]]/route.ts b/apps/api/app/api/[[...route]]/route.ts
index 0d9dbfc..be4f596 100644
--- a/apps/api/app/api/[[...route]]/route.ts
+++ b/apps/api/app/api/[[...route]]/route.ts
@@ -30,7 +30,7 @@ app.use(
exposeHeaders: ["Content-Length"],
maxAge: 600,
credentials: true,
- })
+ }),
);
app.options("/auth/**", (c) => {
const origin = c.req.raw.headers.get("origin") ?? "";
diff --git a/apps/www/app/(auth)/sign-up/page.tsx b/apps/www/app/(auth)/sign-up/page.tsx
index 7a96bc3..b6dcfaf 100644
--- a/apps/www/app/(auth)/sign-up/page.tsx
+++ b/apps/www/app/(auth)/sign-up/page.tsx
@@ -1,4 +1,4 @@
-import SignUpComponent from "@/components/custom/signupComponent";
+import SignUpComponent from "@/components/custom/signupComponent";
export default function page() {
return (
diff --git a/apps/www/components/custom/account-switcher.tsx b/apps/www/components/custom/account-switcher.tsx
index b321595..be794c9 100644
--- a/apps/www/components/custom/account-switcher.tsx
+++ b/apps/www/components/custom/account-switcher.tsx
@@ -4,26 +4,34 @@ import { Session } from "@repo/auth";
import { useRouter } from "next/navigation";
interface Props {
session: Session[];
- activeSession : Session;
+ activeSession: Session;
}
-export default function AccountSwitcher({session,activeSession}:Props) {
- const router = useRouter()
+export default function AccountSwitcher({ session, activeSession }: Props) {
+ const router = useRouter();
const onSelect = async (sessionId: string) => {
- console.log(sessionId)
+ console.log(sessionId);
const active = await authClient.multiSession.setActive({
- sessionId: sessionId,
+ sessionId: sessionId,
});
-
- console.log(active)
- router.refresh();
- };
+
+ console.log(active);
+ router.refresh();
+ };
return (
-
+
- )
+ );
}
diff --git a/apps/www/components/ui/button.tsx b/apps/www/components/ui/button.tsx
index 65d4fcd..d09a695 100644
--- a/apps/www/components/ui/button.tsx
+++ b/apps/www/components/ui/button.tsx
@@ -1,8 +1,8 @@
-import * as React from "react"
-import { Slot } from "@radix-ui/react-slot"
-import { cva, type VariantProps } from "class-variance-authority"
+import * as React from "react";
+import { Slot } from "@radix-ui/react-slot";
+import { cva, type VariantProps } from "class-variance-authority";
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
const buttonVariants = cva(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
@@ -31,27 +31,27 @@ const buttonVariants = cva(
variant: "default",
size: "default",
},
- }
-)
+ },
+);
export interface ButtonProps
extends React.ButtonHTMLAttributes,
VariantProps {
- asChild?: boolean
+ asChild?: boolean;
}
const Button = React.forwardRef(
({ className, variant, size, asChild = false, ...props }, ref) => {
- const Comp = asChild ? Slot : "button"
+ const Comp = asChild ? Slot : "button";
return (
- )
- }
-)
-Button.displayName = "Button"
+ );
+ },
+);
+Button.displayName = "Button";
-export { Button, buttonVariants }
+export { Button, buttonVariants };
diff --git a/apps/www/components/ui/form.tsx b/apps/www/components/ui/form.tsx
index b6daa65..c3daa38 100644
--- a/apps/www/components/ui/form.tsx
+++ b/apps/www/components/ui/form.tsx
@@ -1,8 +1,8 @@
-"use client"
+"use client";
-import * as React from "react"
-import * as LabelPrimitive from "@radix-ui/react-label"
-import { Slot } from "@radix-ui/react-slot"
+import * as React from "react";
+import * as LabelPrimitive from "@radix-ui/react-label";
+import { Slot } from "@radix-ui/react-slot";
import {
Controller,
ControllerProps,
@@ -10,27 +10,27 @@ import {
FieldValues,
FormProvider,
useFormContext,
-} from "react-hook-form"
+} from "react-hook-form";
-import { cn } from "@/lib/utils"
-import { Label } from "@/components/ui/label"
+import { cn } from "@/lib/utils";
+import { Label } from "@/components/ui/label";
-const Form = FormProvider
+const Form = FormProvider;
type FormFieldContextValue<
TFieldValues extends FieldValues = FieldValues,
- TName extends FieldPath = FieldPath
+ TName extends FieldPath = FieldPath,
> = {
- name: TName
-}
+ name: TName;
+};
const FormFieldContext = React.createContext(
- {} as FormFieldContextValue
-)
+ {} as FormFieldContextValue,
+);
const FormField = <
TFieldValues extends FieldValues = FieldValues,
- TName extends FieldPath = FieldPath
+ TName extends FieldPath = FieldPath,
>({
...props
}: ControllerProps) => {
@@ -38,21 +38,21 @@ const FormField = <
- )
-}
+ );
+};
const useFormField = () => {
- const fieldContext = React.useContext(FormFieldContext)
- const itemContext = React.useContext(FormItemContext)
- const { getFieldState, formState } = useFormContext()
+ const fieldContext = React.useContext(FormFieldContext);
+ const itemContext = React.useContext(FormItemContext);
+ const { getFieldState, formState } = useFormContext();
- const fieldState = getFieldState(fieldContext.name, formState)
+ const fieldState = getFieldState(fieldContext.name, formState);
if (!fieldContext) {
- throw new Error("useFormField should be used within ")
+ throw new Error("useFormField should be used within ");
}
- const { id } = itemContext
+ const { id } = itemContext;
return {
id,
@@ -61,36 +61,36 @@ const useFormField = () => {
formDescriptionId: `${id}-form-item-description`,
formMessageId: `${id}-form-item-message`,
...fieldState,
- }
-}
+ };
+};
type FormItemContextValue = {
- id: string
-}
+ id: string;
+};
const FormItemContext = React.createContext(
- {} as FormItemContextValue
-)
+ {} as FormItemContextValue,
+);
const FormItem = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes
>(({ className, ...props }, ref) => {
- const id = React.useId()
+ const id = React.useId();
return (
- )
-})
-FormItem.displayName = "FormItem"
+ );
+});
+FormItem.displayName = "FormItem";
const FormLabel = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef
>(({ className, ...props }, ref) => {
- const { error, formItemId } = useFormField()
+ const { error, formItemId } = useFormField();
return (
- )
-})
-FormLabel.displayName = "FormLabel"
+ );
+});
+FormLabel.displayName = "FormLabel";
const FormControl = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef
>(({ ...props }, ref) => {
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
+ const { error, formItemId, formDescriptionId, formMessageId } =
+ useFormField();
return (
- )
-})
-FormControl.displayName = "FormControl"
+ );
+});
+FormControl.displayName = "FormControl";
const FormDescription = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes
>(({ className, ...props }, ref) => {
- const { formDescriptionId } = useFormField()
+ const { formDescriptionId } = useFormField();
return (
- )
-})
-FormDescription.displayName = "FormDescription"
+ );
+});
+FormDescription.displayName = "FormDescription";
const FormMessage = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes
>(({ className, children, ...props }, ref) => {
- const { error, formMessageId } = useFormField()
- const body = error ? String(error?.message) : children
+ const { error, formMessageId } = useFormField();
+ const body = error ? String(error?.message) : children;
if (!body) {
- return null
+ return null;
}
return (
@@ -162,9 +163,9 @@ const FormMessage = React.forwardRef<
>
{body}
- )
-})
-FormMessage.displayName = "FormMessage"
+ );
+});
+FormMessage.displayName = "FormMessage";
export {
useFormField,
@@ -175,4 +176,4 @@ export {
FormDescription,
FormMessage,
FormField,
-}
+};
diff --git a/apps/www/components/ui/label.tsx b/apps/www/components/ui/label.tsx
index 5341821..84f8b0c 100644
--- a/apps/www/components/ui/label.tsx
+++ b/apps/www/components/ui/label.tsx
@@ -1,14 +1,14 @@
-"use client"
+"use client";
-import * as React from "react"
-import * as LabelPrimitive from "@radix-ui/react-label"
-import { cva, type VariantProps } from "class-variance-authority"
+import * as React from "react";
+import * as LabelPrimitive from "@radix-ui/react-label";
+import { cva, type VariantProps } from "class-variance-authority";
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
const labelVariants = cva(
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
-)
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
+);
const Label = React.forwardRef<
React.ElementRef,
@@ -20,7 +20,7 @@ const Label = React.forwardRef<
className={cn(labelVariants(), className)}
{...props}
/>
-))
-Label.displayName = LabelPrimitive.Root.displayName
+));
+Label.displayName = LabelPrimitive.Root.displayName;
-export { Label }
+export { Label };
diff --git a/apps/www/lib/auth-client.ts b/apps/www/lib/auth-client.ts
index 56e4ca3..c2257d2 100644
--- a/apps/www/lib/auth-client.ts
+++ b/apps/www/lib/auth-client.ts
@@ -1,13 +1,13 @@
import { createAuthClient } from "better-auth/react";
import { multiSessionClient } from "better-auth/client/plugins";
import { Http2ServerRequest } from "http2";
- const BaseDomain =
- process.env.NODE_ENV === "production"
- ? "https://api.plura.pro"
- : "http://localhost:3001";
+const BaseDomain =
+ process.env.NODE_ENV === "production"
+ ? "https://api.plura.pro"
+ : "http://localhost:3001";
export const authClient = createAuthClient({
baseURL: BaseDomain,
- plugins:[multiSessionClient()]
+ plugins: [multiSessionClient()],
});
-export const { signIn, signUp, useSession,signOut,multiSession} = authClient;
+export const { signIn, signUp, useSession, signOut, multiSession } = authClient;
diff --git a/apps/www/lib/server.ts b/apps/www/lib/server.ts
index 3591bd2..7b3a442 100644
--- a/apps/www/lib/server.ts
+++ b/apps/www/lib/server.ts
@@ -13,4 +13,4 @@ export const getSession = async () => {
headers: await headers(),
});
return res.json();
-}
+};
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 05f298c..87b2156 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -53,11 +53,9 @@ importers:
vite-tsconfig-paths:
specifier: ^5.1.0
version: 5.1.1(typescript@5.5.4)(vite@5.4.10(@types/node@20.17.6))
- version: 5.1.1(typescript@5.5.4)(vite@5.4.10(@types/node@20.17.6))
vitest:
specifier: ^2.1.4
version: 2.1.4(@types/node@20.17.6)
- version: 2.1.4(@types/node@20.17.6)
zod:
specifier: ^3.23.8
version: 3.23.8
@@ -86,18 +84,6 @@ importers:
'@repo/db':
specifier: workspace:*
version: link:../../packages/database
- '@repo/mail':
- specifier: workspace:*
- version: link:../../packages/mail
- '@repo/types':
- specifier: workspace:*
- version: link:../../packages/types
- better-auth:
- specifier: 0.8.1-beta.1
- version: 0.8.1-beta.1
- contentlayer2:
- specifier: ^0.5.3
- version: 0.5.3(acorn@8.14.0)(esbuild@0.21.5)
hono:
specifier: ^4.6.9
version: 4.6.9
@@ -371,7 +357,6 @@ importers:
vitest:
specifier: ^2.1.4
version: 2.1.4(@types/node@20.17.6)
- version: 2.1.4(@types/node@20.17.6)
packages/auth:
dependencies:
@@ -2436,127 +2421,91 @@ packages:
peerDependencies:
react: ^18.0 || ^19.0 || ^19.0.0-rc
- '@rollup/rollup-android-arm-eabi@4.25.0':
- resolution: {integrity: sha512-CC/ZqFZwlAIbU1wUPisHyV/XRc5RydFrNLtgl3dGYskdwPZdt4HERtKm50a/+DtTlKeCq9IXFEWR+P6blwjqBA==}
'@rollup/rollup-android-arm-eabi@4.25.0':
resolution: {integrity: sha512-CC/ZqFZwlAIbU1wUPisHyV/XRc5RydFrNLtgl3dGYskdwPZdt4HERtKm50a/+DtTlKeCq9IXFEWR+P6blwjqBA==}
cpu: [arm]
os: [android]
- '@rollup/rollup-android-arm64@4.25.0':
- resolution: {integrity: sha512-/Y76tmLGUJqVBXXCfVS8Q8FJqYGhgH4wl4qTA24E9v/IJM0XvJCGQVSW1QZ4J+VURO9h8YCa28sTFacZXwK7Rg==}
'@rollup/rollup-android-arm64@4.25.0':
resolution: {integrity: sha512-/Y76tmLGUJqVBXXCfVS8Q8FJqYGhgH4wl4qTA24E9v/IJM0XvJCGQVSW1QZ4J+VURO9h8YCa28sTFacZXwK7Rg==}
cpu: [arm64]
os: [android]
- '@rollup/rollup-darwin-arm64@4.25.0':
- resolution: {integrity: sha512-YVT6L3UrKTlC0FpCZd0MGA7NVdp7YNaEqkENbWQ7AOVOqd/7VzyHpgIpc1mIaxRAo1ZsJRH45fq8j4N63I/vvg==}
'@rollup/rollup-darwin-arm64@4.25.0':
resolution: {integrity: sha512-YVT6L3UrKTlC0FpCZd0MGA7NVdp7YNaEqkENbWQ7AOVOqd/7VzyHpgIpc1mIaxRAo1ZsJRH45fq8j4N63I/vvg==}
cpu: [arm64]
os: [darwin]
- '@rollup/rollup-darwin-x64@4.25.0':
- resolution: {integrity: sha512-ZRL+gexs3+ZmmWmGKEU43Bdn67kWnMeWXLFhcVv5Un8FQcx38yulHBA7XR2+KQdYIOtD0yZDWBCudmfj6lQJoA==}
'@rollup/rollup-darwin-x64@4.25.0':
resolution: {integrity: sha512-ZRL+gexs3+ZmmWmGKEU43Bdn67kWnMeWXLFhcVv5Un8FQcx38yulHBA7XR2+KQdYIOtD0yZDWBCudmfj6lQJoA==}
cpu: [x64]
os: [darwin]
- '@rollup/rollup-freebsd-arm64@4.25.0':
- resolution: {integrity: sha512-xpEIXhiP27EAylEpreCozozsxWQ2TJbOLSivGfXhU4G1TBVEYtUPi2pOZBnvGXHyOdLAUUhPnJzH3ah5cqF01g==}
'@rollup/rollup-freebsd-arm64@4.25.0':
resolution: {integrity: sha512-xpEIXhiP27EAylEpreCozozsxWQ2TJbOLSivGfXhU4G1TBVEYtUPi2pOZBnvGXHyOdLAUUhPnJzH3ah5cqF01g==}
cpu: [arm64]
os: [freebsd]
- '@rollup/rollup-freebsd-x64@4.25.0':
- resolution: {integrity: sha512-sC5FsmZGlJv5dOcURrsnIK7ngc3Kirnx3as2XU9uER+zjfyqIjdcMVgzy4cOawhsssqzoAX19qmxgJ8a14Qrqw==}
'@rollup/rollup-freebsd-x64@4.25.0':
resolution: {integrity: sha512-sC5FsmZGlJv5dOcURrsnIK7ngc3Kirnx3as2XU9uER+zjfyqIjdcMVgzy4cOawhsssqzoAX19qmxgJ8a14Qrqw==}
cpu: [x64]
os: [freebsd]
- '@rollup/rollup-linux-arm-gnueabihf@4.25.0':
- resolution: {integrity: sha512-uD/dbLSs1BEPzg564TpRAQ/YvTnCds2XxyOndAO8nJhaQcqQGFgv/DAVko/ZHap3boCvxnzYMa3mTkV/B/3SWA==}
'@rollup/rollup-linux-arm-gnueabihf@4.25.0':
resolution: {integrity: sha512-uD/dbLSs1BEPzg564TpRAQ/YvTnCds2XxyOndAO8nJhaQcqQGFgv/DAVko/ZHap3boCvxnzYMa3mTkV/B/3SWA==}
cpu: [arm]
os: [linux]
- '@rollup/rollup-linux-arm-musleabihf@4.25.0':
- resolution: {integrity: sha512-ZVt/XkrDlQWegDWrwyC3l0OfAF7yeJUF4fq5RMS07YM72BlSfn2fQQ6lPyBNjt+YbczMguPiJoCfaQC2dnflpQ==}
'@rollup/rollup-linux-arm-musleabihf@4.25.0':
resolution: {integrity: sha512-ZVt/XkrDlQWegDWrwyC3l0OfAF7yeJUF4fq5RMS07YM72BlSfn2fQQ6lPyBNjt+YbczMguPiJoCfaQC2dnflpQ==}
cpu: [arm]
os: [linux]
- '@rollup/rollup-linux-arm64-gnu@4.25.0':
- resolution: {integrity: sha512-qboZ+T0gHAW2kkSDPHxu7quaFaaBlynODXpBVnPxUgvWYaE84xgCKAPEYE+fSMd3Zv5PyFZR+L0tCdYCMAtG0A==}
'@rollup/rollup-linux-arm64-gnu@4.25.0':
resolution: {integrity: sha512-qboZ+T0gHAW2kkSDPHxu7quaFaaBlynODXpBVnPxUgvWYaE84xgCKAPEYE+fSMd3Zv5PyFZR+L0tCdYCMAtG0A==}
cpu: [arm64]
os: [linux]
- '@rollup/rollup-linux-arm64-musl@4.25.0':
- resolution: {integrity: sha512-ndWTSEmAaKr88dBuogGH2NZaxe7u2rDoArsejNslugHZ+r44NfWiwjzizVS1nUOHo+n1Z6qV3X60rqE/HlISgw==}
'@rollup/rollup-linux-arm64-musl@4.25.0':
resolution: {integrity: sha512-ndWTSEmAaKr88dBuogGH2NZaxe7u2rDoArsejNslugHZ+r44NfWiwjzizVS1nUOHo+n1Z6qV3X60rqE/HlISgw==}
cpu: [arm64]
os: [linux]
- '@rollup/rollup-linux-powerpc64le-gnu@4.25.0':
- resolution: {integrity: sha512-BVSQvVa2v5hKwJSy6X7W1fjDex6yZnNKy3Kx1JGimccHft6HV0THTwNtC2zawtNXKUu+S5CjXslilYdKBAadzA==}
'@rollup/rollup-linux-powerpc64le-gnu@4.25.0':
resolution: {integrity: sha512-BVSQvVa2v5hKwJSy6X7W1fjDex6yZnNKy3Kx1JGimccHft6HV0THTwNtC2zawtNXKUu+S5CjXslilYdKBAadzA==}
cpu: [ppc64]
os: [linux]
- '@rollup/rollup-linux-riscv64-gnu@4.25.0':
- resolution: {integrity: sha512-G4hTREQrIdeV0PE2JruzI+vXdRnaK1pg64hemHq2v5fhv8C7WjVaeXc9P5i4Q5UC06d/L+zA0mszYIKl+wY8oA==}
'@rollup/rollup-linux-riscv64-gnu@4.25.0':
resolution: {integrity: sha512-G4hTREQrIdeV0PE2JruzI+vXdRnaK1pg64hemHq2v5fhv8C7WjVaeXc9P5i4Q5UC06d/L+zA0mszYIKl+wY8oA==}
cpu: [riscv64]
os: [linux]
- '@rollup/rollup-linux-s390x-gnu@4.25.0':
- resolution: {integrity: sha512-9T/w0kQ+upxdkFL9zPVB6zy9vWW1deA3g8IauJxojN4bnz5FwSsUAD034KpXIVX5j5p/rn6XqumBMxfRkcHapQ==}
'@rollup/rollup-linux-s390x-gnu@4.25.0':
resolution: {integrity: sha512-9T/w0kQ+upxdkFL9zPVB6zy9vWW1deA3g8IauJxojN4bnz5FwSsUAD034KpXIVX5j5p/rn6XqumBMxfRkcHapQ==}
cpu: [s390x]
os: [linux]
- '@rollup/rollup-linux-x64-gnu@4.25.0':
- resolution: {integrity: sha512-ThcnU0EcMDn+J4B9LD++OgBYxZusuA7iemIIiz5yzEcFg04VZFzdFjuwPdlURmYPZw+fgVrFzj4CA64jSTG4Ig==}
'@rollup/rollup-linux-x64-gnu@4.25.0':
resolution: {integrity: sha512-ThcnU0EcMDn+J4B9LD++OgBYxZusuA7iemIIiz5yzEcFg04VZFzdFjuwPdlURmYPZw+fgVrFzj4CA64jSTG4Ig==}
cpu: [x64]
os: [linux]
- '@rollup/rollup-linux-x64-musl@4.25.0':
- resolution: {integrity: sha512-zx71aY2oQxGxAT1JShfhNG79PnjYhMC6voAjzpu/xmMjDnKNf6Nl/xv7YaB/9SIa9jDYf8RBPWEnjcdlhlv1rQ==}
'@rollup/rollup-linux-x64-musl@4.25.0':
resolution: {integrity: sha512-zx71aY2oQxGxAT1JShfhNG79PnjYhMC6voAjzpu/xmMjDnKNf6Nl/xv7YaB/9SIa9jDYf8RBPWEnjcdlhlv1rQ==}
cpu: [x64]
os: [linux]
- '@rollup/rollup-win32-arm64-msvc@4.25.0':
- resolution: {integrity: sha512-JT8tcjNocMs4CylWY/CxVLnv8e1lE7ff1fi6kbGocWwxDq9pj30IJ28Peb+Y8yiPNSF28oad42ApJB8oUkwGww==}
'@rollup/rollup-win32-arm64-msvc@4.25.0':
resolution: {integrity: sha512-JT8tcjNocMs4CylWY/CxVLnv8e1lE7ff1fi6kbGocWwxDq9pj30IJ28Peb+Y8yiPNSF28oad42ApJB8oUkwGww==}
cpu: [arm64]
os: [win32]
- '@rollup/rollup-win32-ia32-msvc@4.25.0':
- resolution: {integrity: sha512-dRLjLsO3dNOfSN6tjyVlG+Msm4IiZnGkuZ7G5NmpzwF9oOc582FZG05+UdfTbz5Jd4buK/wMb6UeHFhG18+OEg==}
'@rollup/rollup-win32-ia32-msvc@4.25.0':
resolution: {integrity: sha512-dRLjLsO3dNOfSN6tjyVlG+Msm4IiZnGkuZ7G5NmpzwF9oOc582FZG05+UdfTbz5Jd4buK/wMb6UeHFhG18+OEg==}
cpu: [ia32]
os: [win32]
- '@rollup/rollup-win32-x64-msvc@4.25.0':
- resolution: {integrity: sha512-/RqrIFtLB926frMhZD0a5oDa4eFIbyNEwLLloMTEjmqfwZWXywwVVOVmwTsuyhC9HKkVEZcOOi+KV4U9wmOdlg==}
'@rollup/rollup-win32-x64-msvc@4.25.0':
resolution: {integrity: sha512-/RqrIFtLB926frMhZD0a5oDa4eFIbyNEwLLloMTEjmqfwZWXywwVVOVmwTsuyhC9HKkVEZcOOi+KV4U9wmOdlg==}
cpu: [x64]
@@ -3199,8 +3148,6 @@ packages:
resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==}
engines: {node: '>= 6'}
- caniuse-lite@1.0.30001679:
- resolution: {integrity: sha512-j2YqID/YwpLnKzCmBOS4tlZdWprXm3ZmQLBH9ZBXFOhoxLA46fwyBvx6toCBWBmnuwUY/qB3kEU6gFx8qgCroA==}
caniuse-lite@1.0.30001679:
resolution: {integrity: sha512-j2YqID/YwpLnKzCmBOS4tlZdWprXm3ZmQLBH9ZBXFOhoxLA46fwyBvx6toCBWBmnuwUY/qB3kEU6gFx8qgCroA==}
@@ -3407,8 +3354,6 @@ packages:
cross-fetch@4.0.0:
resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==}
- cross-spawn@7.0.5:
- resolution: {integrity: sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==}
cross-spawn@7.0.5:
resolution: {integrity: sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==}
engines: {node: '>= 8'}
@@ -3634,8 +3579,6 @@ packages:
engines: {node: '>=14'}
hasBin: true
- electron-to-chromium@1.5.55:
- resolution: {integrity: sha512-6maZ2ASDOTBtjt9FhqYPRnbvKU5tjG0IN9SztUOWYw2AzNDNpKJYLJmlK0/En4Hs/aiWnB+JZ+gW19PIGszgKg==}
electron-to-chromium@1.5.55:
resolution: {integrity: sha512-6maZ2ASDOTBtjt9FhqYPRnbvKU5tjG0IN9SztUOWYw2AzNDNpKJYLJmlK0/En4Hs/aiWnB+JZ+gW19PIGszgKg==}
@@ -5103,8 +5046,6 @@ packages:
resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==}
engines: {node: '>= 6'}
- object-inspect@1.13.3:
- resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==}
object-inspect@1.13.3:
resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==}
engines: {node: '>= 0.4'}
@@ -5624,8 +5565,6 @@ packages:
deprecated: Rimraf versions prior to v4 are no longer supported
hasBin: true
- rollup@4.25.0:
- resolution: {integrity: sha512-uVbClXmR6wvx5R1M3Od4utyLUxrmOcEm3pAtMphn73Apq19PDtHpgZoEvqH2YnnaNUuvKmg2DgRd2Sqv+odyqg==}
rollup@4.25.0:
resolution: {integrity: sha512-uVbClXmR6wvx5R1M3Od4utyLUxrmOcEm3pAtMphn73Apq19PDtHpgZoEvqH2YnnaNUuvKmg2DgRd2Sqv+odyqg==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
@@ -5814,8 +5753,6 @@ packages:
stackback@0.0.2:
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
- std-env@3.8.0:
- resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==}
std-env@3.8.0:
resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==}
@@ -6292,8 +6229,6 @@ packages:
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
- vite-tsconfig-paths@5.1.1:
- resolution: {integrity: sha512-0nLY3qQI4GlYw3We4rps16ntW+nAZYCUrJwsuvqxIUCY9Bk3VnSeJDm/VPCmjOcAJ9Kud4k+CK2ZEnf9pbzK9Q==}
vite-tsconfig-paths@5.1.1:
resolution: {integrity: sha512-0nLY3qQI4GlYw3We4rps16ntW+nAZYCUrJwsuvqxIUCY9Bk3VnSeJDm/VPCmjOcAJ9Kud4k+CK2ZEnf9pbzK9Q==}
peerDependencies:
@@ -6496,7 +6431,6 @@ snapshots:
'@babel/helper-module-transforms': 7.26.0(@babel/core@7.24.5)
'@babel/helpers': 7.26.0
'@babel/parser': 7.24.5
- '@babel/parser': 7.24.5
'@babel/template': 7.25.9
'@babel/traverse': 7.25.9
'@babel/types': 7.26.0
@@ -8315,75 +8249,57 @@ snapshots:
dependencies:
react: 18.3.1
- '@rollup/rollup-android-arm-eabi@4.25.0':
'@rollup/rollup-android-arm-eabi@4.25.0':
optional: true
- '@rollup/rollup-android-arm64@4.25.0':
'@rollup/rollup-android-arm64@4.25.0':
optional: true
- '@rollup/rollup-darwin-arm64@4.25.0':
'@rollup/rollup-darwin-arm64@4.25.0':
optional: true
- '@rollup/rollup-darwin-x64@4.25.0':
'@rollup/rollup-darwin-x64@4.25.0':
optional: true
- '@rollup/rollup-freebsd-arm64@4.25.0':
'@rollup/rollup-freebsd-arm64@4.25.0':
optional: true
- '@rollup/rollup-freebsd-x64@4.25.0':
'@rollup/rollup-freebsd-x64@4.25.0':
optional: true
- '@rollup/rollup-linux-arm-gnueabihf@4.25.0':
'@rollup/rollup-linux-arm-gnueabihf@4.25.0':
optional: true
- '@rollup/rollup-linux-arm-musleabihf@4.25.0':
'@rollup/rollup-linux-arm-musleabihf@4.25.0':
optional: true
- '@rollup/rollup-linux-arm64-gnu@4.25.0':
'@rollup/rollup-linux-arm64-gnu@4.25.0':
optional: true
- '@rollup/rollup-linux-arm64-musl@4.25.0':
'@rollup/rollup-linux-arm64-musl@4.25.0':
optional: true
- '@rollup/rollup-linux-powerpc64le-gnu@4.25.0':
'@rollup/rollup-linux-powerpc64le-gnu@4.25.0':
optional: true
- '@rollup/rollup-linux-riscv64-gnu@4.25.0':
'@rollup/rollup-linux-riscv64-gnu@4.25.0':
optional: true
- '@rollup/rollup-linux-s390x-gnu@4.25.0':
'@rollup/rollup-linux-s390x-gnu@4.25.0':
optional: true
- '@rollup/rollup-linux-x64-gnu@4.25.0':
'@rollup/rollup-linux-x64-gnu@4.25.0':
optional: true
- '@rollup/rollup-linux-x64-musl@4.25.0':
'@rollup/rollup-linux-x64-musl@4.25.0':
optional: true
- '@rollup/rollup-win32-arm64-msvc@4.25.0':
'@rollup/rollup-win32-arm64-msvc@4.25.0':
optional: true
- '@rollup/rollup-win32-ia32-msvc@4.25.0':
'@rollup/rollup-win32-ia32-msvc@4.25.0':
optional: true
- '@rollup/rollup-win32-x64-msvc@4.25.0':
'@rollup/rollup-win32-x64-msvc@4.25.0':
optional: true
@@ -9146,8 +9062,6 @@ snapshots:
browserslist@4.24.2:
dependencies:
- caniuse-lite: 1.0.30001679
- electron-to-chromium: 1.5.55
caniuse-lite: 1.0.30001679
electron-to-chromium: 1.5.55
node-releases: 2.0.18
@@ -9190,7 +9104,6 @@ snapshots:
camelcase-css@2.0.1: {}
- caniuse-lite@1.0.30001679: {}
caniuse-lite@1.0.30001679: {}
ccount@2.0.1: {}
@@ -9418,7 +9331,6 @@ snapshots:
transitivePeerDependencies:
- encoding
- cross-spawn@7.0.5:
cross-spawn@7.0.5:
dependencies:
path-key: 3.1.1
@@ -9629,7 +9541,6 @@ snapshots:
semver: 7.6.3
electron-to-chromium@1.5.55: {}
- electron-to-chromium@1.5.55: {}
emoji-regex@8.0.0: {}
@@ -9699,7 +9610,6 @@ snapshots:
is-typed-array: 1.1.13
is-weakref: 1.0.2
object-inspect: 1.13.3
- object-inspect: 1.13.3
object-keys: 1.1.1
object.assign: 4.1.5
regexp.prototype.flags: 1.5.3
@@ -9850,7 +9760,7 @@ snapshots:
eslint: 8.57.1
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1)
- eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1)
+ eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1)
eslint-plugin-react: 7.37.2(eslint@8.57.1)
eslint-plugin-react-hooks: 5.0.0(eslint@8.57.1)
@@ -9901,7 +9811,6 @@ snapshots:
- eslint-import-resolver-webpack
- supports-color
- eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1):
eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1):
dependencies:
'@nolyfill/is-core-module': 1.0.39
@@ -9909,7 +9818,6 @@ snapshots:
enhanced-resolve: 5.17.1
eslint: 8.57.1
eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
- eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
fast-glob: 3.3.2
get-tsconfig: 4.8.1
is-bun-module: 1.2.1
@@ -9933,7 +9841,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- eslint-module-utils@2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1):
eslint-module-utils@2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1):
dependencies:
debug: 3.2.7
@@ -9942,7 +9849,6 @@ snapshots:
eslint: 8.57.1
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1)
- eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1)
transitivePeerDependencies:
- supports-color
@@ -9964,7 +9870,6 @@ snapshots:
eslint: 8.57.1
eslint-import-resolver-node: 0.3.9
eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
- eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.5.4))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1)
hasown: 2.0.2
is-core-module: 2.15.1
is-glob: 4.0.3
@@ -10113,7 +10018,6 @@ snapshots:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.5
- cross-spawn: 7.0.5
debug: 4.3.7
doctrine: 3.0.0
escape-string-regexp: 4.0.0
@@ -10207,7 +10111,6 @@ snapshots:
execa@5.1.1:
dependencies:
- cross-spawn: 7.0.5
cross-spawn: 7.0.5
get-stream: 6.0.1
human-signals: 2.1.0
@@ -10304,7 +10207,6 @@ snapshots:
foreground-child@3.3.0:
dependencies:
- cross-spawn: 7.0.5
cross-spawn: 7.0.5
signal-exit: 4.1.0
@@ -11505,7 +11407,6 @@ snapshots:
'@swc/helpers': 0.5.5
busboy: 1.6.0
caniuse-lite: 1.0.30001679
- caniuse-lite: 1.0.30001679
graceful-fs: 4.2.11
postcss: 8.4.31
react: 18.3.1
@@ -11533,7 +11434,6 @@ snapshots:
'@swc/helpers': 0.5.13
busboy: 1.6.0
caniuse-lite: 1.0.30001679
- caniuse-lite: 1.0.30001679
postcss: 8.4.31
react: 19.0.0-rc-02c0e824-20241028
react-dom: 19.0.0-rc-02c0e824-20241028(react@19.0.0-rc-02c0e824-20241028)
@@ -11605,7 +11505,6 @@ snapshots:
object-hash@3.0.0: {}
- object-inspect@1.13.3: {}
object-inspect@1.13.3: {}
object-keys@1.1.1: {}
@@ -12264,29 +12163,10 @@ snapshots:
dependencies:
glob: 7.2.3
- rollup@4.25.0:
rollup@4.25.0:
dependencies:
'@types/estree': 1.0.6
optionalDependencies:
- '@rollup/rollup-android-arm-eabi': 4.25.0
- '@rollup/rollup-android-arm64': 4.25.0
- '@rollup/rollup-darwin-arm64': 4.25.0
- '@rollup/rollup-darwin-x64': 4.25.0
- '@rollup/rollup-freebsd-arm64': 4.25.0
- '@rollup/rollup-freebsd-x64': 4.25.0
- '@rollup/rollup-linux-arm-gnueabihf': 4.25.0
- '@rollup/rollup-linux-arm-musleabihf': 4.25.0
- '@rollup/rollup-linux-arm64-gnu': 4.25.0
- '@rollup/rollup-linux-arm64-musl': 4.25.0
- '@rollup/rollup-linux-powerpc64le-gnu': 4.25.0
- '@rollup/rollup-linux-riscv64-gnu': 4.25.0
- '@rollup/rollup-linux-s390x-gnu': 4.25.0
- '@rollup/rollup-linux-x64-gnu': 4.25.0
- '@rollup/rollup-linux-x64-musl': 4.25.0
- '@rollup/rollup-win32-arm64-msvc': 4.25.0
- '@rollup/rollup-win32-ia32-msvc': 4.25.0
- '@rollup/rollup-win32-x64-msvc': 4.25.0
'@rollup/rollup-android-arm-eabi': 4.25.0
'@rollup/rollup-android-arm64': 4.25.0
'@rollup/rollup-darwin-arm64': 4.25.0
@@ -12419,7 +12299,6 @@ snapshots:
es-errors: 1.3.0
get-intrinsic: 1.2.4
object-inspect: 1.13.3
- object-inspect: 1.13.3
siginfo@2.0.0: {}
@@ -12536,7 +12415,6 @@ snapshots:
stackback@0.0.2: {}
- std-env@3.8.0: {}
std-env@3.8.0: {}
streamsearch@1.1.0: {}
@@ -13066,7 +12944,6 @@ snapshots:
- supports-color
- terser
- vite-tsconfig-paths@5.1.1(typescript@5.5.4)(vite@5.4.10(@types/node@20.17.6)):
vite-tsconfig-paths@5.1.1(typescript@5.5.4)(vite@5.4.10(@types/node@20.17.6)):
dependencies:
debug: 4.3.7
@@ -13083,12 +12960,10 @@ snapshots:
esbuild: 0.21.5
postcss: 8.4.47
rollup: 4.25.0
- rollup: 4.25.0
optionalDependencies:
'@types/node': 20.17.6
fsevents: 2.3.3
- vitest@2.1.4(@types/node@20.17.6):
vitest@2.1.4(@types/node@20.17.6):
dependencies:
'@vitest/expect': 2.1.4
@@ -13104,7 +12979,6 @@ snapshots:
magic-string: 0.30.12
pathe: 1.1.2
std-env: 3.8.0
- std-env: 3.8.0
tinybench: 2.9.0
tinyexec: 0.3.1
tinypool: 1.0.1
From cbc25b49e66341497072b206989a0974528abcb9 Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Sun, 10 Nov 2024 16:43:22 +0530
Subject: [PATCH 11/16] fix mail
---
apps/api/app/api/[[...route]]/mail.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/api/app/api/[[...route]]/mail.ts b/apps/api/app/api/[[...route]]/mail.ts
index b70582d..49d78d6 100644
--- a/apps/api/app/api/[[...route]]/mail.ts
+++ b/apps/api/app/api/[[...route]]/mail.ts
@@ -46,7 +46,7 @@ app
}
return c.json(
{
- message: "All Email sent successfully",
+ message: "All Emails sent successfully",
data,
},
200
From 935cd00e5bceafab28ee66c7d5a9c943316ebe4a Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Sun, 10 Nov 2024 16:46:32 +0530
Subject: [PATCH 12/16] fix mail route
---
apps/api/app/api/[[...route]]/route.ts | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/apps/api/app/api/[[...route]]/route.ts b/apps/api/app/api/[[...route]]/route.ts
index be4f596..1d84813 100644
--- a/apps/api/app/api/[[...route]]/route.ts
+++ b/apps/api/app/api/[[...route]]/route.ts
@@ -1,4 +1,3 @@
-import { prisma } from "@repo/db";
import { handle } from "hono/vercel";
import { Hono } from "hono";
import { auth } from "@repo/auth";
@@ -99,6 +98,6 @@ const GET = handle(app);
const POST = handle(app);
const PATCH = handle(app);
const DELETE = handle(app);
-export const OPTIONS = handle(app);
+const OPTIONS = handle(app);
-export { GET, PATCH, POST, DELETE };
+export { GET, PATCH, POST, DELETE ,OPTIONS };
From 690c6fcdba3b1b8051ae3f7ef62fc28743f468e9 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sun, 10 Nov 2024 11:17:12 +0000
Subject: [PATCH 13/16] chore: format code with Prettier
---
apps/api/app/api/[[...route]]/route.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/api/app/api/[[...route]]/route.ts b/apps/api/app/api/[[...route]]/route.ts
index 1d84813..f26676f 100644
--- a/apps/api/app/api/[[...route]]/route.ts
+++ b/apps/api/app/api/[[...route]]/route.ts
@@ -100,4 +100,4 @@ const PATCH = handle(app);
const DELETE = handle(app);
const OPTIONS = handle(app);
-export { GET, PATCH, POST, DELETE ,OPTIONS };
+export { GET, PATCH, POST, DELETE, OPTIONS };
From d081448f49ab1beef287a7d57c825b8e0a18a1f3 Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Sun, 10 Nov 2024 16:58:09 +0530
Subject: [PATCH 14/16] fix route 2
---
apps/api/app/api/[[...route]]/mail.ts | 8 ++++----
apps/api/app/api/[[...route]]/route.ts | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/apps/api/app/api/[[...route]]/mail.ts b/apps/api/app/api/[[...route]]/mail.ts
index 1db0248..49d78d6 100644
--- a/apps/api/app/api/[[...route]]/mail.ts
+++ b/apps/api/app/api/[[...route]]/mail.ts
@@ -14,7 +14,7 @@ app
{
message: "Email sent failed",
},
- 400,
+ 400
);
}
return c.json(
@@ -22,7 +22,7 @@ app
message: "Email sent successfully",
data,
},
- 200,
+ 200
);
})
.get((c) => {
@@ -41,7 +41,7 @@ app
{
message: "Email sent failed",
},
- 400,
+ 400
);
}
return c.json(
@@ -49,7 +49,7 @@ app
message: "All Emails sent successfully",
data,
},
- 200,
+ 200
);
})
.get((c) => {
diff --git a/apps/api/app/api/[[...route]]/route.ts b/apps/api/app/api/[[...route]]/route.ts
index 1d84813..2fbeafc 100644
--- a/apps/api/app/api/[[...route]]/route.ts
+++ b/apps/api/app/api/[[...route]]/route.ts
@@ -98,6 +98,6 @@ const GET = handle(app);
const POST = handle(app);
const PATCH = handle(app);
const DELETE = handle(app);
-const OPTIONS = handle(app);
+export const OPTIONS = handle(app);
-export { GET, PATCH, POST, DELETE ,OPTIONS };
+export { GET, PATCH, POST, DELETE };
From 6a49fa12784da55d98090c4fc4178dc60b35c9dd Mon Sep 17 00:00:00 2001
From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com>
Date: Sun, 10 Nov 2024 16:59:33 +0530
Subject: [PATCH 15/16] error
---
apps/api/app/api/[[...route]]/route.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/api/app/api/[[...route]]/route.ts b/apps/api/app/api/[[...route]]/route.ts
index 3064294..f26676f 100644
--- a/apps/api/app/api/[[...route]]/route.ts
+++ b/apps/api/app/api/[[...route]]/route.ts
@@ -98,6 +98,6 @@ const GET = handle(app);
const POST = handle(app);
const PATCH = handle(app);
const DELETE = handle(app);
-export const OPTIONS = handle(app);
+const OPTIONS = handle(app);
export { GET, PATCH, POST, DELETE, OPTIONS };
From 09dfa97cff7e44565e30961efc72348b78ec4db1 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Sun, 10 Nov 2024 11:30:19 +0000
Subject: [PATCH 16/16] chore: format code with Prettier
---
apps/api/app/api/[[...route]]/mail.ts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/apps/api/app/api/[[...route]]/mail.ts b/apps/api/app/api/[[...route]]/mail.ts
index 49d78d6..1db0248 100644
--- a/apps/api/app/api/[[...route]]/mail.ts
+++ b/apps/api/app/api/[[...route]]/mail.ts
@@ -14,7 +14,7 @@ app
{
message: "Email sent failed",
},
- 400
+ 400,
);
}
return c.json(
@@ -22,7 +22,7 @@ app
message: "Email sent successfully",
data,
},
- 200
+ 200,
);
})
.get((c) => {
@@ -41,7 +41,7 @@ app
{
message: "Email sent failed",
},
- 400
+ 400,
);
}
return c.json(
@@ -49,7 +49,7 @@ app
message: "All Emails sent successfully",
data,
},
- 200
+ 200,
);
})
.get((c) => {