diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58a0c7be..80926dcf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - name: Setup node uses: actions/setup-node@v1 with: - node-version: 16 + node-version: 18 - name: Install dependencies run: yarn @@ -31,4 +31,6 @@ jobs: run: yarn lint - name: Build project + env: + TURSO_DATABASE_URL: ${{ secrets.TURSO_DATABASE_URL }} run: yarn build diff --git a/.gitignore b/.gitignore index 849425fe..f5337031 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ yarn-error.log* # turbo .turbo +.vercel diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 339eba75..3e92a147 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -11,10 +11,10 @@ const withPWA = require('next-pwa')({ module.exports = withPWA({ reactStrictMode: true, - compiler: { - removeConsole: process.env.NODE_ENV === 'production', - }, - transpilePackages: ['@umamin/db', '@umamin/generated'], + // compiler: { + // removeConsole: process.env.NODE_ENV === 'production', + // }, + transpilePackages: ['@umamin/generated'], modularizeImports: { 'date-fns': { transform: 'date-fns/{{member}}', diff --git a/apps/web/package.json b/apps/web/package.json index 21caf04f..aa923a33 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -8,7 +8,8 @@ "start": "next start", "lint": "next lint", "clean": "rimraf .next/ .turbo/ node_modules/", - "clean:cache": "rimraf .next/ .turbo/" + "clean:cache": "rimraf .next/ .turbo/", + "postinstall": "prisma generate" }, "dependencies": { "@apollo/server": "^4.9.4", @@ -16,9 +17,11 @@ "@as-integrations/next": "^2.0.2", "@hcaptcha/react-hcaptcha": "^1.4.4", "@headlessui/react": "^1.7.15", + "@libsql/client": "^0.6.0", "@next-auth/prisma-adapter": "^1.0.5", + "@prisma/adapter-libsql": "^5.12.1", + "@prisma/client": "^5.12.1", "@tanstack/react-query": "^5.4.3", - "@umamin/db": "*", "@umamin/generated": "*", "@vercel/og": "^0.5.20", "bcrypt": "^5.1.0", @@ -34,7 +37,7 @@ "lru-cache": "^10.0.0", "nanoid": "^4.0.0", "next": "13.4.12", - "next-auth": "^4.18.8", + "next-auth": "4.24.6", "next-pwa": "^5.6.0", "next-seo": "^5.4.0", "nprogress": "^0.2.0", @@ -74,6 +77,7 @@ "postcss": "^8.4.14", "prettier": "^2.7.1", "prettier-plugin-tailwindcss": "^0.1.11", + "prisma": "^5.12.1", "tailwindcss": "^3.1.4", "typescript": "4.7.4" } diff --git a/apps/web/prisma/dev.db b/apps/web/prisma/dev.db new file mode 100644 index 00000000..c5600955 Binary files /dev/null and b/apps/web/prisma/dev.db differ diff --git a/apps/web/prisma/dev.db-journal b/apps/web/prisma/dev.db-journal new file mode 100644 index 00000000..6e9f97fd Binary files /dev/null and b/apps/web/prisma/dev.db-journal differ diff --git a/apps/web/prisma/migrations/20240407070104_init/migration.sql b/apps/web/prisma/migrations/20240407070104_init/migration.sql new file mode 100644 index 00000000..dbca6d49 --- /dev/null +++ b/apps/web/prisma/migrations/20240407070104_init/migration.sql @@ -0,0 +1,90 @@ +-- CreateTable +CREATE TABLE "Account" ( + "id" TEXT NOT NULL PRIMARY KEY, + "userId" TEXT NOT NULL, + "type" TEXT NOT NULL, + "provider" TEXT NOT NULL, + "providerAccountId" TEXT NOT NULL, + "refresh_token" TEXT, + "access_token" TEXT, + "expires_at" INTEGER, + "token_type" TEXT, + "scope" TEXT, + "id_token" TEXT, + "session_state" TEXT +); + +-- CreateTable +CREATE TABLE "User" ( + "id" TEXT NOT NULL PRIMARY KEY, + "name" TEXT, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "email" TEXT, + "emailVerified" DATETIME, + "username" TEXT, + "password" TEXT, + "image" TEXT, + "message" TEXT NOT NULL DEFAULT 'Send me an anonymous message!' +); + +-- CreateTable +CREATE TABLE "VerificationToken" ( + "identifier" TEXT NOT NULL, + "token" TEXT NOT NULL, + "expires" DATETIME NOT NULL +); + +-- CreateTable +CREATE TABLE "Message" ( + "id" TEXT NOT NULL PRIMARY KEY, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL, + "content" TEXT NOT NULL, + "receiverMsg" TEXT NOT NULL, + "isOpened" BOOLEAN NOT NULL DEFAULT false, + "reply" TEXT, + "clue" TEXT, + "senderId" TEXT, + "receiverUsername" TEXT, + "receiverId" TEXT NOT NULL +); + +-- CreateTable +CREATE TABLE "GlobalMessage" ( + "id" TEXT NOT NULL PRIMARY KEY, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL, + "content" TEXT NOT NULL, + "isAnonymous" BOOLEAN NOT NULL DEFAULT true, + "userId" TEXT +); + +-- CreateIndex +CREATE INDEX "Account_userId_idx" ON "Account"("userId"); + +-- CreateIndex +CREATE UNIQUE INDEX "Account_provider_providerAccountId_key" ON "Account"("provider", "providerAccountId"); + +-- CreateIndex +CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); + +-- CreateIndex +CREATE UNIQUE INDEX "User_username_key" ON "User"("username"); + +-- CreateIndex +CREATE INDEX "User_email_username_idx" ON "User"("email", "username"); + +-- CreateIndex +CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"("token"); + +-- CreateIndex +CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "VerificationToken"("identifier", "token"); + +-- CreateIndex +CREATE INDEX "Message_senderId_createdAt_idx" ON "Message"("senderId", "createdAt" DESC); + +-- CreateIndex +CREATE INDEX "Message_receiverId_createdAt_idx" ON "Message"("receiverId", "createdAt" DESC); + +-- CreateIndex +CREATE INDEX "GlobalMessage_userId_updatedAt_idx" ON "GlobalMessage"("userId", "updatedAt" DESC); diff --git a/apps/web/prisma/migrations/20240408052932_add_global_msg_index/migration.sql b/apps/web/prisma/migrations/20240408052932_add_global_msg_index/migration.sql new file mode 100644 index 00000000..0c99db31 --- /dev/null +++ b/apps/web/prisma/migrations/20240408052932_add_global_msg_index/migration.sql @@ -0,0 +1,8 @@ +-- DropIndex +DROP INDEX "GlobalMessage_userId_updatedAt_idx"; + +-- CreateIndex +CREATE INDEX "GlobalMessage_userId_idx" ON "GlobalMessage"("userId"); + +-- CreateIndex +CREATE INDEX "GlobalMessage_updatedAt_idx" ON "GlobalMessage"("updatedAt" DESC); diff --git a/apps/web/prisma/migrations/migration_lock.toml b/apps/web/prisma/migrations/migration_lock.toml new file mode 100644 index 00000000..e5e5c470 --- /dev/null +++ b/apps/web/prisma/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "sqlite" \ No newline at end of file diff --git a/apps/web/prisma/schema.prisma b/apps/web/prisma/schema.prisma new file mode 100644 index 00000000..5444d152 --- /dev/null +++ b/apps/web/prisma/schema.prisma @@ -0,0 +1,94 @@ +// This is your Prisma schema file, +// learn more about it in the docs: https://pris.ly/d/prisma-schema + +generator client { + provider = "prisma-client-js" + previewFeatures = ["driverAdapters"] +} + +datasource db { + provider = "sqlite" + url = "file:./dev.db" + relationMode = "prisma" +} + +model Account { + id String @id @default(cuid()) + userId String + type String + provider String + providerAccountId String + refresh_token String? + access_token String? + expires_at Int? + token_type String? + scope String? + id_token String? + session_state String? + + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + + @@unique([provider, providerAccountId]) + @@index([userId]) +} + +model User { + id String @id @default(cuid()) + name String? + createdAt DateTime @default(now()) + email String? @unique + emailVerified DateTime? + username String? @unique + password String? + image String? + message String @default("Send me an anonymous message!") + + accounts Account[] + sentMessages Message[] @relation("sentMessages") + sentGlobalMessages GlobalMessage[] @relation("sentGlobalMessages") + receivedMessages Message[] @relation("receivedMessages") + + @@index([email, username]) +} + +model VerificationToken { + identifier String + token String @unique + expires DateTime + + @@unique([identifier, token]) +} + +model Message { + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + content String + receiverMsg String + isOpened Boolean @default(false) + reply String? + clue String? + + senderId String? + sender User? @relation(name: "sentMessages", fields: [senderId], references: [id]) + receiverUsername String? + receiverId String + receiver User @relation(name: "receivedMessages", fields: [receiverId], references: [id], onDelete: Cascade) + + @@index([senderId, createdAt(sort: Desc)]) + @@index([receiverId, createdAt(sort: Desc)]) +} + +model GlobalMessage { + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + content String + isAnonymous Boolean @default(true) + + userId String? + user User? @relation(name: "sentGlobalMessages", fields: [userId], references: [id], onDelete: Cascade) + + @@index([userId]) + @@index([updatedAt(sort: Desc)]) +} diff --git a/apps/web/src/components/Create.tsx b/apps/web/src/components/Create.tsx index 561f80cd..a29f5180 100644 --- a/apps/web/src/components/Create.tsx +++ b/apps/web/src/components/Create.tsx @@ -12,26 +12,28 @@ const AdContainer = dynamic(() => import('@/components/AdContainer'), { }); export const Create = () => { - const { refetchUser } = useInboxContext(); + const { user, refetchUser } = useInboxContext(); const { mutate } = useMutation({ mutationFn: editUsername }); const [username, setUsername] = useState(''); const handleSubmit: React.FormEventHandler = (e) => { e.preventDefault(); - mutate( - { username }, - { - onSuccess: (data) => { - if (data.editUsername.error) { - toast.error(data.editUsername.error); - return; - } - - refetchUser(); - }, - } - ); + if (user?.id) { + mutate( + { userId: user.id, username }, + { + onSuccess: (data) => { + if (data.editUsername.error) { + toast.error(data.editUsername.error); + return; + } + + refetchUser(); + }, + } + ); + } setUsername(''); }; diff --git a/apps/web/src/components/Dialog/SendGlobal.tsx b/apps/web/src/components/Dialog/SendGlobal.tsx index 95a9f1f3..19a5ec15 100644 --- a/apps/web/src/components/Dialog/SendGlobal.tsx +++ b/apps/web/src/components/Dialog/SendGlobal.tsx @@ -29,24 +29,27 @@ export const SendGlobalModal = ({ const handleSend: React.FormEventHandler = (e) => { e.preventDefault(); - mutate( - { input: { content: message, isAnonymous } }, - { - onSuccess: (data) => { - if (data.sendGlobalMessage.error) { - toast.error(data.sendGlobalMessage.error); - return; - } - setMessageData(data.sendGlobalMessage.data); - toast.success('Message posted'); + if (user?.id) { + mutate( + { input: { userId: user.id, content: message, isAnonymous } }, + { + onSuccess: (data) => { + if (data.sendGlobalMessage.error) { + toast.error(data.sendGlobalMessage.error); + return; + } - setTimeout(() => { - setMessage(''); - }, 500); - }, - } - ); + setMessageData(data.sendGlobalMessage.data); + toast.success('Message posted'); + + setTimeout(() => { + setMessage(''); + }, 500); + }, + } + ); + } setIsOpen(false); }; @@ -58,12 +61,12 @@ export const SendGlobalModal = ({ className='msg-card flex flex-col space-y-4 p-6' >
-
+

{user?.username}

@@ -84,7 +87,7 @@ export const SendGlobalModal = ({ />
- diff --git a/apps/web/src/components/Dialog/Settings.tsx b/apps/web/src/components/Dialog/Settings.tsx index 2b96f060..1eee5bff 100644 --- a/apps/web/src/components/Dialog/Settings.tsx +++ b/apps/web/src/components/Dialog/Settings.tsx @@ -65,6 +65,7 @@ export const SettingsDialog = ({ setIsOpen, ...rest }: Props) => { if (currentOption === 'message' && message !== user.message) { editUserMessageMutate( { + userId: user.id, message, }, { @@ -82,6 +83,7 @@ export const SettingsDialog = ({ setIsOpen, ...rest }: Props) => { if (currentOption === 'username' && username !== user.username) { editUsernameMutate( { + userId: user.id, username, }, { @@ -118,6 +120,7 @@ export const SettingsDialog = ({ setIsOpen, ...rest }: Props) => { } else { changePasswordMutate( { + userId: user.id, newPassword: newPass, }, { @@ -135,7 +138,7 @@ export const SettingsDialog = ({ setIsOpen, ...rest }: Props) => { const handleDeleteUser = () => { if (user?.id) { deleteUserMutate( - {}, + { userId: user.id }, { onSuccess: async () => { toast.success('User deleted'); diff --git a/apps/web/src/components/InboxTabs/InboxTab.tsx b/apps/web/src/components/InboxTabs/InboxTab.tsx index cabca85a..d374e841 100644 --- a/apps/web/src/components/InboxTabs/InboxTab.tsx +++ b/apps/web/src/components/InboxTabs/InboxTab.tsx @@ -2,7 +2,6 @@ import React from 'react'; import dynamic from 'next/dynamic'; import toast from 'react-hot-toast'; import { IoIosCopy } from 'react-icons/io'; -import { useSession } from 'next-auth/react'; import { useInfiniteQuery } from '@tanstack/react-query'; import { getMessages } from '@/api'; @@ -22,7 +21,6 @@ interface Props { } export const InboxTab = ({ type }: Props) => { - const { data: session } = useSession(); const { user } = useInboxContext(); const triggerEvent = useLogEvent(); @@ -35,7 +33,8 @@ export const InboxTab = ({ type }: Props) => { isFetchingNextPage, } = useInfiniteQuery({ queryKey: [`${type}_messages`, { type, userId: user?.id }], - queryFn: ({ pageParam }) => getMessages({ cursorId: pageParam, type }), + queryFn: ({ pageParam }) => + getMessages({ cursorId: pageParam, userId: user?.id!, type }), initialPageParam: '', getNextPageParam: (lastPage) => lastPage.getMessages?.cursorId, select: (data) => data.pages.flatMap((page) => page.getMessages?.data), @@ -73,7 +72,7 @@ export const InboxTab = ({ type }: Props) => {
@@ -109,7 +108,9 @@ export const InboxTab = ({ type }: Props) => {
{messages?.map((m, i) => (
- {(i + 1) % 3 === 0 && } + {(i + 1) % 3 === 0 && ( + + )} diff --git a/apps/web/src/components/Maintenance.tsx b/apps/web/src/components/Maintenance.tsx index 228412f8..ad73b2e9 100644 --- a/apps/web/src/components/Maintenance.tsx +++ b/apps/web/src/components/Maintenance.tsx @@ -1,13 +1,13 @@ import React from 'react'; import Image from 'next/image'; -import { FaDiscord, FaFacebook } from 'react-icons/fa'; +import { FaFacebook, FaInstagram } from 'react-icons/fa'; import { Footer } from '.'; export const Maintenance = () => { return ( <> -
+
logo { />
-

+

{process.env.NEXT_PUBLIC_MAINTENANCE_TITLE}

@@ -27,13 +27,13 @@ export const Maintenance = () => {

- -

Join Discord Server

+ +

Instagram

{ className='btn flex items-center space-x-2 rounded bg-[#2374e1] hover:bg-[#2374e1]/80' > -

Like Facebook Page

+

Facebook

{process.env.NEXT_PUBLIC_MAINTENANCE_URL && ( diff --git a/apps/web/src/lib/db.ts b/apps/web/src/lib/db.ts index 7e1e25a2..a83795be 100644 --- a/apps/web/src/lib/db.ts +++ b/apps/web/src/lib/db.ts @@ -1,17 +1,25 @@ -import { PrismaClient } from '@umamin/db'; +/* eslint-disable */ +import { PrismaClient } from '@prisma/client'; +import { PrismaLibSQL } from '@prisma/adapter-libsql'; +import { createClient } from '@libsql/client'; + +const libsql = createClient({ + url: process.env.TURSO_DATABASE_URL!, + authToken: process.env.TURSO_AUTH_TOKEN, +}); const prismaClientSingleton = () => { - return new PrismaClient(); + const adapter = new PrismaLibSQL(libsql); + const prisma = new PrismaClient({ adapter }); + return prisma; }; -type PrismaClientSingleton = ReturnType; - -const globalForPrisma = globalThis as unknown as { - prisma: PrismaClientSingleton | undefined; -}; +declare global { + var prismaGlobal: undefined | ReturnType; +} -const prisma = globalForPrisma.prisma ?? prismaClientSingleton(); +const prisma = globalThis.prismaGlobal ?? prismaClientSingleton(); export default prisma; -if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma; +if (process.env.NODE_ENV !== 'production') globalThis.prismaGlobal = prisma; diff --git a/apps/web/src/pages/_app.tsx b/apps/web/src/pages/_app.tsx index dbbf1df0..398b72c6 100644 --- a/apps/web/src/pages/_app.tsx +++ b/apps/web/src/pages/_app.tsx @@ -53,8 +53,10 @@ function MyApp({ queryCache: new QueryCache({ onError: (err: any) => { if (err.response?.errors?.length) { + console.log(err); toast.error(err.response.errors[0].message); } else { + console.log(err); toast.error(err.message); } }, @@ -63,8 +65,10 @@ function MyApp({ mutationCache: new MutationCache({ onError: (err: any) => { if (err.response?.errors?.length) { + console.log(err); toast.error(err.response.errors[0].message); } else { + console.log(err); toast.error(err.message); } }, diff --git a/apps/web/src/pages/api/graphql.ts b/apps/web/src/pages/api/graphql.ts index 6be364d6..d27cbd67 100644 --- a/apps/web/src/pages/api/graphql.ts +++ b/apps/web/src/pages/api/graphql.ts @@ -3,7 +3,6 @@ import { startServerAndCreateNextHandler } from '@as-integrations/next'; import responseCachePlugin from '@apollo/server-plugin-response-cache'; import { NextApiRequest, NextApiResponse } from 'next/types'; import { ApolloServer } from '@apollo/server'; -import { getSession } from 'next-auth/react'; import { buildSchema } from 'type-graphql'; import prisma from '@/lib/db'; @@ -13,7 +12,6 @@ import { GlobalMessageResolver } from '@/schema/global-message'; export interface TContext { prisma: typeof prisma; - id?: string; req: NextApiRequest; } @@ -28,17 +26,16 @@ const server = new ApolloServer({ const _handler = startServerAndCreateNextHandler(server, { context: async (req) => { - const session = await getSession({ req }); - const id = session?.user?.id; - return { prisma, id, req }; + return { prisma, req }; }, }); export default function handler(req: NextApiRequest, res: NextApiResponse) { res.setHeader( 'Access-Control-Allow-Origin', - process.env.NEXT_PUBLIC_GQL_ENDPOINT as string + process.env.NEXTAUTH_URL ?? 'http://localhost:3000' ); + res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS'); res.setHeader('Content-Type', 'application/json'); res.setHeader('Cache-Control', 's-maxage=86400'); diff --git a/apps/web/src/pages/to/[username].tsx b/apps/web/src/pages/to/[username].tsx index 983c0989..0e95fc90 100644 --- a/apps/web/src/pages/to/[username].tsx +++ b/apps/web/src/pages/to/[username].tsx @@ -59,6 +59,7 @@ const SendTo: NextPageWithLayout< mutate( { input: { + userId: user.id, receiverUsername: username, content: message, receiverMsg: user?.message, @@ -158,7 +159,7 @@ const SendTo: NextPageWithLayout< {username}

-

+

umamin

diff --git a/apps/web/src/schema/global-message/global-message.resolvers.ts b/apps/web/src/schema/global-message/global-message.resolvers.ts index 108d990c..78213cbc 100644 --- a/apps/web/src/schema/global-message/global-message.resolvers.ts +++ b/apps/web/src/schema/global-message/global-message.resolvers.ts @@ -57,7 +57,7 @@ export class GlobalMessageResolver { cursorId: messages[messages.length - 1].id, }; } catch (err) { - console.error(err); + console.log(err); throw err; } } @@ -66,14 +66,14 @@ export class GlobalMessageResolver { @Mutation(() => SendGlobalMessage) async sendGlobalMessage( @Arg('input', () => SendGlobalMessageInput) - { content, isAnonymous }: SendGlobalMessageInput, - @Ctx() { prisma, id }: TContext + { userId, content, isAnonymous }: SendGlobalMessageInput, + @Ctx() { prisma }: TContext ): Promise { let latestMessage: Omit | null; try { latestMessage = await prisma.globalMessage.findFirst({ - where: { userId: id }, + where: { userId }, orderBy: { updatedAt: 'desc' }, }); @@ -87,7 +87,7 @@ export class GlobalMessageResolver { } } } catch (err) { - console.error(err); + console.log(err); throw err; } @@ -99,7 +99,7 @@ export class GlobalMessageResolver { data: { content, isAnonymous, - user: id ? { connect: { id } } : undefined, + user: userId ? { connect: { id: userId } } : undefined, }, include: { user: { @@ -117,7 +117,7 @@ export class GlobalMessageResolver { data: { content, isAnonymous, - user: id ? { connect: { id } } : undefined, + user: userId ? { connect: { id: userId } } : undefined, }, include: { user: { @@ -133,7 +133,7 @@ export class GlobalMessageResolver { return { data: message }; } catch (err) { - console.error(err); + console.log(err); throw err; } } diff --git a/apps/web/src/schema/global-message/global-message.types.ts b/apps/web/src/schema/global-message/global-message.types.ts index c4a09974..3701b571 100644 --- a/apps/web/src/schema/global-message/global-message.types.ts +++ b/apps/web/src/schema/global-message/global-message.types.ts @@ -53,6 +53,9 @@ export class SendGlobalMessage extends ErrorResponse { @InputType() export class SendGlobalMessageInput { + @Field(() => ID) + userId: string; + @IsNotEmpty() @MinLength(1) @MaxLength(500) diff --git a/apps/web/src/schema/message/message.resolvers.ts b/apps/web/src/schema/message/message.resolvers.ts index 5e848dd3..3b582133 100644 --- a/apps/web/src/schema/message/message.resolvers.ts +++ b/apps/web/src/schema/message/message.resolvers.ts @@ -16,12 +16,14 @@ export class MessageResolver { @Query(() => MessagesData, { nullable: true }) async getMessages( @Arg('type', () => String) type: 'recent' | 'sent', + @Arg('userId', () => ID) userId: string, @Arg('cursorId', () => ID, { nullable: true }) cursorId: string, - @Ctx() { prisma, id }: TContext + @Ctx() { prisma }: TContext ): Promise { try { const messages = await prisma.message.findMany({ - where: type === 'recent' ? { receiverId: id } : { senderId: id }, + where: + type === 'recent' ? { receiverId: userId } : { senderId: userId }, orderBy: { createdAt: 'desc' }, take: 5, select: { @@ -56,7 +58,7 @@ export class MessageResolver { cursorId: messages[messages.length - 1].id, }; } catch (err) { - console.error(err); + console.log(err); throw err; } } @@ -64,8 +66,8 @@ export class MessageResolver { @Mutation(() => String) async sendMessage( @Arg('input', () => SendMessageInput) - { clue, content, receiverMsg, receiverUsername }: SendMessageInput, - @Ctx() { prisma, id }: TContext + { userId, clue, content, receiverMsg, receiverUsername }: SendMessageInput, + @Ctx() { prisma }: TContext ): Promise { try { const message = await prisma.message.create({ @@ -73,7 +75,7 @@ export class MessageResolver { clue, content, receiverMsg, - sender: id ? { connect: { id } } : undefined, + sender: userId ? { connect: { id: userId } } : undefined, receiver: { connect: { username: receiverUsername } }, receiverUsername, }, @@ -81,7 +83,7 @@ export class MessageResolver { return message.content; } catch (err) { - console.error(err); + console.log(err); throw err; } } @@ -94,7 +96,7 @@ export class MessageResolver { try { await prisma.message.delete({ where: { id } }); } catch (err) { - console.error(err); + console.log(err); throw err; } @@ -113,7 +115,7 @@ export class MessageResolver { data: { reply: content }, }); } catch (err) { - console.error(err); + console.log(err); throw err; } diff --git a/apps/web/src/schema/message/message.types.ts b/apps/web/src/schema/message/message.types.ts index df2aee12..62e167b3 100644 --- a/apps/web/src/schema/message/message.types.ts +++ b/apps/web/src/schema/message/message.types.ts @@ -37,6 +37,9 @@ export class MessagesData { @InputType() export class SendMessageInput { + @Field(() => ID) + userId: string; + @IsNotEmpty() @MinLength(1) @MaxLength(200) diff --git a/apps/web/src/schema/user/user.resolvers.ts b/apps/web/src/schema/user/user.resolvers.ts index f868ac4e..1c9ab06f 100644 --- a/apps/web/src/schema/user/user.resolvers.ts +++ b/apps/web/src/schema/user/user.resolvers.ts @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -import { Resolver, Query, Mutation, Arg, Ctx } from 'type-graphql'; +import { Resolver, Query, Mutation, Arg, Ctx, ID } from 'type-graphql'; import { hashPassword } from '@/utils/helpers'; import type { TContext } from '@/pages/api/graphql'; @@ -26,7 +26,7 @@ export class UserResolver { return data; } catch (err) { - console.error(err); + console.log(err); throw err; } } @@ -62,33 +62,35 @@ export class UserResolver { return { error: null }; } catch (err) { - console.error(err); + console.log(err); throw err; } } @Mutation(() => ErrorResponse) async editUserMessage( + @Arg('userId', () => ID) userId: string, @Arg('message', () => String) message: string, - @Ctx() { prisma, id }: TContext + @Ctx() { prisma }: TContext ): Promise { try { await prisma.user.update({ - where: { id }, + where: { id: userId }, data: { message }, }); return { error: null }; } catch (err) { - console.error(err); + console.log(err); throw err; } } @Mutation(() => ErrorResponse) async editUsername( + @Arg('userId', () => ID) userId: string, @Arg('username', () => String) username: string, - @Ctx() { prisma, id }: TContext + @Ctx() { prisma }: TContext ): Promise { const usernameRegex = /^[a-zA-Z0-9]+$/; @@ -104,31 +106,32 @@ export class UserResolver { } await prisma.user.update({ - where: { id }, + where: { id: userId }, data: { username }, }); return { error: null }; } catch (err) { - console.error(err); + console.log(err); throw err; } } @Mutation(() => ErrorResponse) async changePassword( + @Arg('userId', () => ID) userId: string, @Arg('newPassword', () => String) newPassword: string, - @Ctx() { prisma, id }: TContext + @Ctx() { prisma }: TContext ): Promise { const hashedPassword = hashPassword(newPassword); try { await prisma.user.findUnique({ - where: { id }, + where: { id: userId }, }); await prisma.user.update({ - where: { id }, + where: { id: userId }, data: { password: hashedPassword, }, @@ -136,21 +139,24 @@ export class UserResolver { return { error: null }; } catch (err) { - console.error(err); + console.log(err); throw err; } } @Mutation(() => ErrorResponse) - async deleteUser(@Ctx() { prisma, id }: TContext): Promise { + async deleteUser( + @Arg('userId', () => ID) userId: string, + @Ctx() { prisma }: TContext + ): Promise { try { await prisma.user.delete({ - where: { id }, + where: { id: userId }, }); return { error: null }; } catch (err) { - console.error(err); + console.log(err); throw err; } } diff --git a/package.json b/package.json index f73b2983..b0f9f4a9 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "engines": { "npm": ">=7.0.0", - "node": ">=14.0.0" + "node": ">=18.0.0" }, "packageManager": "yarn@1.22.19" } diff --git a/packages/db/.env.example b/packages/db/.env.example deleted file mode 100644 index c03ed2d9..00000000 --- a/packages/db/.env.example +++ /dev/null @@ -1 +0,0 @@ -DATABASE_URL="mysql://root:mysql@localhost:6033/umamin-db" diff --git a/packages/db/.gitignore b/packages/db/.gitignore deleted file mode 100644 index 8f9e781f..00000000 --- a/packages/db/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -dist/ -.turbo/ -node_modules/ - -.env diff --git a/packages/db/index.ts b/packages/db/index.ts deleted file mode 100644 index bf4e0f87..00000000 --- a/packages/db/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "@prisma/client" diff --git a/packages/db/package.json b/packages/db/package.json deleted file mode 100644 index d8c7e834..00000000 --- a/packages/db/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@umamin/db", - "version": "1.0.0", - "description": "", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "scripts": { - "dev": "prisma generate && tsc", - "build": "prisma generate && tsc", - "generate": "prisma generate && tsc", - "clean": "rimraf dist/ .turbo/ node_modules/", - "clean:cache": "rimraf dist/ .turbo/" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "@prisma/client": "^5.4.2" - }, - "devDependencies": { - "prisma": "^5.4.2", - "typescript": "^4.7.4" - } -} diff --git a/packages/db/prisma/schema.prisma b/packages/db/prisma/schema.prisma deleted file mode 100644 index 638b8574..00000000 --- a/packages/db/prisma/schema.prisma +++ /dev/null @@ -1,92 +0,0 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -generator client { - provider = "prisma-client-js" -} - -datasource db { - provider = "mysql" - url = env("DATABASE_URL") - relationMode = "prisma" -} - -model Account { - id String @id @default(cuid()) - userId String - type String - provider String - providerAccountId String - refresh_token String? @db.Text - access_token String? @db.Text - expires_at Int? - token_type String? - scope String? - id_token String? @db.Text - session_state String? - - user User @relation(fields: [userId], references: [id], onDelete: Cascade) - - @@unique([provider, providerAccountId]) - @@index([userId]) -} - -model User { - id String @id @default(cuid()) - name String? - createdAt DateTime @default(now()) - email String? @unique - emailVerified DateTime? - username String? @unique - password String? - image String? - message String @default("Send me an anonymous message!") @db.VarChar(100) - - accounts Account[] - sentMessages Message[] @relation("sentMessages") - sentGlobalMessages GlobalMessage[] @relation("sentGlobalMessages") - receivedMessages Message[] @relation("receivedMessages") - - @@index([email, username]) -} - -model VerificationToken { - identifier String - token String @unique - expires DateTime - - @@unique([identifier, token]) -} - -model Message { - id String @id @default(cuid()) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - content String @db.VarChar(255) - receiverMsg String @db.VarChar(255) - isOpened Boolean @default(false) - reply String? @db.VarChar(255) - clue String? @db.VarChar(255) - - senderId String? - sender User? @relation(name: "sentMessages", fields: [senderId], references: [id]) - receiverUsername String? - receiverId String - receiver User @relation(name: "receivedMessages", fields: [receiverId], references: [id], onDelete: Cascade) - - @@index([senderId, createdAt(sort: Desc)]) - @@index([receiverId, createdAt(sort: Desc)]) -} - -model GlobalMessage { - id String @id @default(cuid()) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - content String @db.VarChar(500) - isAnonymous Boolean @default(true) - - userId String? - user User? @relation(name: "sentGlobalMessages", fields: [userId], references: [id], onDelete: Cascade) - - @@index([userId, updatedAt(sort: Desc)]) -} diff --git a/packages/db/prisma/seed.js b/packages/db/prisma/seed.js deleted file mode 100644 index 81755cb9..00000000 --- a/packages/db/prisma/seed.js +++ /dev/null @@ -1,41 +0,0 @@ -const { PrismaClient } = require('@prisma/client'); - -const prisma = new PrismaClient(); - -const reset = async () => { - await prisma.user.deleteMany(); - await prisma.message.deleteMany(); -}; - -const main = async () => { - console.log('resetting db...'); - await reset(); - - console.log('seeding...'); - const sender = await prisma.user.create({ - data: { password: 'sender', username: 'sender' }, - }); - const receiver = await prisma.user.create({ - data: { password: 'receiver', username: 'receiver' }, - }); - - const message = await prisma.message.create({ - data: { - content: 'test message', - /** - * OR use username to connect - * sender: { connect: { username: sender.username } }, - * receiver : { connect: { username: receiver.username } }, - */ - senderId: sender.id, - receiverId: receiver.id, - }, - }); - - console.log( - `${sender.username} sent "${message.content}" to ${receiver.username}` - ); -}; - -// eslint-disable-next-line no-console -main().catch(console.error); diff --git a/packages/db/tsconfig.json b/packages/db/tsconfig.json deleted file mode 100644 index 1da9b1ee..00000000 --- a/packages/db/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "@umamin/db", - "compilerOptions": { - "target": "ES6", - "lib": ["ESNext"], - "declaration": true, - "declarationMap": true, - "esModuleInterop": true, - "esModuleInterop": true, - "module": "commonjs", - "outDir": "dist", - "skipLibCheck": true, - "strict": true - }, - "exclude": ["node_modules", "dist"] -} diff --git a/packages/generated/graphql/message.graphql b/packages/generated/graphql/message.graphql index 601680e6..63b34df6 100644 --- a/packages/generated/graphql/message.graphql +++ b/packages/generated/graphql/message.graphql @@ -16,8 +16,8 @@ query getGlobalMessages($cursorId: ID) { } } -query getMessages($type: String!, $cursorId: ID) { - getMessages(type: $type, cursorId: $cursorId) { +query getMessages($type: String!, $userId: ID!, $cursorId: ID) { + getMessages(type: $type, userId: $userId, cursorId: $cursorId) { data { id clue diff --git a/packages/generated/graphql/user.graphql b/packages/generated/graphql/user.graphql index 4c5b9a49..a2c00d53 100644 --- a/packages/generated/graphql/user.graphql +++ b/packages/generated/graphql/user.graphql @@ -15,26 +15,26 @@ mutation createUser($username: String!, $password: String!) { } } -mutation editUsername($username: String!) { - editUsername(username: $username) { +mutation editUsername($userId: ID!, $username: String!) { + editUsername(userId: $userId, username: $username) { error } } -mutation editUserMessage($message: String!) { - editUserMessage(message: $message) { - error +mutation editUserMessage($userId: ID!, $message: String!) { + editUserMessage(userId: $userId, message: $message) { + error } } -mutation changePassword($newPassword: String!) { - changePassword(newPassword: $newPassword) { +mutation changePassword($userId: ID!, $newPassword: String!) { + changePassword(userId: $userId, newPassword: $newPassword) { error } } -mutation deleteUser { - deleteUser { +mutation deleteUser($userId: ID!) { + deleteUser(userId: $userId) { error } } diff --git a/packages/generated/index.ts b/packages/generated/index.ts index f24af880..2624ee5c 100644 --- a/packages/generated/index.ts +++ b/packages/generated/index.ts @@ -85,6 +85,7 @@ export type MutationAddReplyArgs = { export type MutationChangePasswordArgs = { newPassword: Scalars['String']['input']; + userId: Scalars['ID']['input']; }; @@ -99,12 +100,19 @@ export type MutationDeleteMessageArgs = { }; +export type MutationDeleteUserArgs = { + userId: Scalars['ID']['input']; +}; + + export type MutationEditUserMessageArgs = { message: Scalars['String']['input']; + userId: Scalars['ID']['input']; }; export type MutationEditUsernameArgs = { + userId: Scalars['ID']['input']; username: Scalars['String']['input']; }; @@ -135,6 +143,7 @@ export type QueryGetGlobalMessagesArgs = { export type QueryGetMessagesArgs = { cursorId?: InputMaybe; type: Scalars['String']['input']; + userId: Scalars['ID']['input']; }; @@ -152,6 +161,7 @@ export type SendGlobalMessage = { export type SendGlobalMessageInput = { content: Scalars['String']['input']; isAnonymous: Scalars['Boolean']['input']; + userId: Scalars['ID']['input']; }; export type SendMessageInput = { @@ -159,6 +169,7 @@ export type SendMessageInput = { content: Scalars['String']['input']; receiverMsg: Scalars['String']['input']; receiverUsername: Scalars['String']['input']; + userId: Scalars['ID']['input']; }; export type User = { @@ -181,6 +192,7 @@ export type GetGlobalMessagesQuery = { __typename?: 'Query', getGlobalMessages?: export type GetMessagesQueryVariables = Exact<{ type: Scalars['String']['input']; + userId: Scalars['ID']['input']; cursorId?: InputMaybe; }>; @@ -233,6 +245,7 @@ export type CreateUserMutationVariables = Exact<{ export type CreateUserMutation = { __typename?: 'Mutation', createUser: { __typename?: 'ErrorResponse', error?: string | null } }; export type EditUsernameMutationVariables = Exact<{ + userId: Scalars['ID']['input']; username: Scalars['String']['input']; }>; @@ -240,6 +253,7 @@ export type EditUsernameMutationVariables = Exact<{ export type EditUsernameMutation = { __typename?: 'Mutation', editUsername: { __typename?: 'ErrorResponse', error?: string | null } }; export type EditUserMessageMutationVariables = Exact<{ + userId: Scalars['ID']['input']; message: Scalars['String']['input']; }>; @@ -247,13 +261,16 @@ export type EditUserMessageMutationVariables = Exact<{ export type EditUserMessageMutation = { __typename?: 'Mutation', editUserMessage: { __typename?: 'ErrorResponse', error?: string | null } }; export type ChangePasswordMutationVariables = Exact<{ + userId: Scalars['ID']['input']; newPassword: Scalars['String']['input']; }>; export type ChangePasswordMutation = { __typename?: 'Mutation', changePassword: { __typename?: 'ErrorResponse', error?: string | null } }; -export type DeleteUserMutationVariables = Exact<{ [key: string]: never; }>; +export type DeleteUserMutationVariables = Exact<{ + userId: Scalars['ID']['input']; +}>; export type DeleteUserMutation = { __typename?: 'Mutation', deleteUser: { __typename?: 'ErrorResponse', error?: string | null } }; @@ -279,8 +296,8 @@ export const GetGlobalMessagesDocument = gql` } `; export const GetMessagesDocument = gql` - query getMessages($type: String!, $cursorId: ID) { - getMessages(type: $type, cursorId: $cursorId) { + query getMessages($type: String!, $userId: ID!, $cursorId: ID) { + getMessages(type: $type, userId: $userId, cursorId: $cursorId) { data { id clue @@ -348,29 +365,29 @@ export const CreateUserDocument = gql` } `; export const EditUsernameDocument = gql` - mutation editUsername($username: String!) { - editUsername(username: $username) { + mutation editUsername($userId: ID!, $username: String!) { + editUsername(userId: $userId, username: $username) { error } } `; export const EditUserMessageDocument = gql` - mutation editUserMessage($message: String!) { - editUserMessage(message: $message) { + mutation editUserMessage($userId: ID!, $message: String!) { + editUserMessage(userId: $userId, message: $message) { error } } `; export const ChangePasswordDocument = gql` - mutation changePassword($newPassword: String!) { - changePassword(newPassword: $newPassword) { + mutation changePassword($userId: ID!, $newPassword: String!) { + changePassword(userId: $userId, newPassword: $newPassword) { error } } `; export const DeleteUserDocument = gql` - mutation deleteUser { - deleteUser { + mutation deleteUser($userId: ID!) { + deleteUser(userId: $userId) { error } } @@ -416,7 +433,7 @@ export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = changePassword(variables: ChangePasswordMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise { return withWrapper((wrappedRequestHeaders) => client.request(ChangePasswordDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'changePassword', 'mutation'); }, - deleteUser(variables?: DeleteUserMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise { + deleteUser(variables: DeleteUserMutationVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise { return withWrapper((wrappedRequestHeaders) => client.request(DeleteUserDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'deleteUser', 'mutation'); } }; diff --git a/yarn.lock b/yarn.lock index 8d86a282..deaca906 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1163,6 +1163,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.20.13": + version "7.24.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.4.tgz#de795accd698007a66ba44add6cc86542aff1edd" + integrity sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/runtime@^7.23.7": version "7.23.9" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7" @@ -2225,6 +2232,81 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@libsql/client@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@libsql/client/-/client-0.6.0.tgz#bbae2beba4e9c1a3d71ba2593e9e21d0858ae7d1" + integrity sha512-qhQzTG/y2IEVbL3+9PULDvlQFWJ/RnjFXECr/Nc3nRngGiiMysDaOV5VUzYk7DulUX98EA4wi+z3FspKrUplUA== + dependencies: + "@libsql/core" "^0.6.0" + "@libsql/hrana-client" "^0.6.0" + js-base64 "^3.7.5" + libsql "^0.3.10" + +"@libsql/core@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@libsql/core/-/core-0.6.0.tgz#8eb8468bf452efe73847d699a1a8238803eba9a1" + integrity sha512-affAB8vSqQwqI9NBDJ5uJCVaHoOAS2pOpbv1kWConh1SBbmJBnHHd4KG73RAJ2sgd2+NbT9WA+XJBqxgp28YSw== + dependencies: + js-base64 "^3.7.5" + +"@libsql/darwin-arm64@0.3.10": + version "0.3.10" + resolved "https://registry.yarnpkg.com/@libsql/darwin-arm64/-/darwin-arm64-0.3.10.tgz#50834ec7c2d9a5d92dd42a46bc99c1c82a11ab7a" + integrity sha512-RaexEFfPAFogd6dJlqkpCkTxdr6K14Z0286lodIJ8Ny77mWuWyBkWKxf70OYWXXAMxMJFUW+6al1F3/Osf/pTg== + +"@libsql/darwin-x64@0.3.10": + version "0.3.10" + resolved "https://registry.yarnpkg.com/@libsql/darwin-x64/-/darwin-x64-0.3.10.tgz#341d61b92e02c3c66ff14dc5b8a3c1a664f84512" + integrity sha512-SNVN6n4qNUdMW1fJMFmx4qn4n5RnXsxjFbczpkzG/V7m/5VeTFt1chhGcrahTHCr3+K6eRJWJUEQHRGqjBwPkw== + +"@libsql/hrana-client@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@libsql/hrana-client/-/hrana-client-0.6.0.tgz#051466f7e6c3d7402499de9af20a5deca6b82e9f" + integrity sha512-k+fqzdjqg3IvWfKmVJK5StsbjeTcyNAXFelUbXbGNz3yH1gEVT9mZ6kmhsIXP30ZSyVV0AE1Gi25p82mxC9hwg== + dependencies: + "@libsql/isomorphic-fetch" "^0.2.1" + "@libsql/isomorphic-ws" "^0.1.5" + js-base64 "^3.7.5" + node-fetch "^3.3.2" + +"@libsql/isomorphic-fetch@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@libsql/isomorphic-fetch/-/isomorphic-fetch-0.2.1.tgz#8dc17476cd1625efb0c0bd613857fd319b7e11b5" + integrity sha512-Sv07QP1Aw8A5OOrmKgRUBKe2fFhF2hpGJhtHe3d1aRnTESZCGkn//0zDycMKTGamVWb3oLYRroOsCV8Ukes9GA== + +"@libsql/isomorphic-ws@^0.1.5": + version "0.1.5" + resolved "https://registry.yarnpkg.com/@libsql/isomorphic-ws/-/isomorphic-ws-0.1.5.tgz#e2d1faf965ba0f3be9301fbf5640164d03c4e606" + integrity sha512-DtLWIH29onUYR00i0GlQ3UdcTRC6EP4u9w/h9LxpUZJWRMARk6dQwZ6Jkd+QdwVpuAOrdxt18v0K2uIYR3fwFg== + dependencies: + "@types/ws" "^8.5.4" + ws "^8.13.0" + +"@libsql/linux-arm64-gnu@0.3.10": + version "0.3.10" + resolved "https://registry.yarnpkg.com/@libsql/linux-arm64-gnu/-/linux-arm64-gnu-0.3.10.tgz#695a94bdca68722c3303c181a62f5193acc7af31" + integrity sha512-2uXpi9d8qtyIOr7pyG4a88j6YXgemyIHEs2Wbp+PPletlCIPsFS+E7IQHbz8VwTohchOzcokGUm1Bc5QC+A7wg== + +"@libsql/linux-arm64-musl@0.3.10": + version "0.3.10" + resolved "https://registry.yarnpkg.com/@libsql/linux-arm64-musl/-/linux-arm64-musl-0.3.10.tgz#4ae8badda2869974589198bc2bd3cba1cc6cc27c" + integrity sha512-72SN1FUavLvzHddCS861ynSpQndcW5oLGKA3U8CyMfgIZIwJAPc7+48Uj1plW00htXBx4GBpcntFp68KKIx3YQ== + +"@libsql/linux-x64-gnu@0.3.10": + version "0.3.10" + resolved "https://registry.yarnpkg.com/@libsql/linux-x64-gnu/-/linux-x64-gnu-0.3.10.tgz#a0c7852087e2b0ac6bedda3d1c9d7d5f864c3ef6" + integrity sha512-hXyNqVRi7ONuyWZ1SX6setxL0QaQ7InyS3bHLupsi9s7NpOGD5vcpTaYicJOqmIIm+6kt8vJfmo7ZxlarIHy7Q== + +"@libsql/linux-x64-musl@0.3.10": + version "0.3.10" + resolved "https://registry.yarnpkg.com/@libsql/linux-x64-musl/-/linux-x64-musl-0.3.10.tgz#fc46c27b94fff0a565f28cb7bbd8ca7a77e55364" + integrity sha512-kNmIRxomVwt9S+cLyYS497F/3gXFF4r8wW12YSBQgxG75JYft07AHVd8J7HINg+oqRkLzT0s+mVX5dM6nk68EQ== + +"@libsql/win32-x64-msvc@0.3.10": + version "0.3.10" + resolved "https://registry.yarnpkg.com/@libsql/win32-x64-msvc/-/win32-x64-msvc-0.3.10.tgz#32805c76c63f5ae3a1628f986bd56bcac1566aec" + integrity sha512-c/6rjdtGULKrJkLgfLobFefObfOtxjXGmCfPxv6pr0epPCeUEssfDbDIeEH9fQUgzogIMWEHwT8so52UJ/iT1Q== + "@mapbox/node-pre-gyp@^1.0.10": version "1.0.10" resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz#8e6735ccebbb1581e5a7e652244cadc8a844d03c" @@ -2240,6 +2322,11 @@ semver "^7.3.5" tar "^6.1.11" +"@neon-rs/load@^0.0.4": + version "0.0.4" + resolved "https://registry.yarnpkg.com/@neon-rs/load/-/load-0.0.4.tgz#2a2a3292c6f1fef043f49886712d3c96a547532e" + integrity sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw== + "@next-auth/prisma-adapter@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@next-auth/prisma-adapter/-/prisma-adapter-1.0.5.tgz#41a2fc7b44907054b81d456b426164e58becf4ed" @@ -2323,10 +2410,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@panva/hkdf@^1.0.1": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@panva/hkdf/-/hkdf-1.0.2.tgz#bab0f09d09de9fd83628220d496627681bc440d6" - integrity sha512-MSAs9t3Go7GUkMhpKC44T58DJ5KGk2vBo+h1cqQeqlMfdGkxaVB78ZWpv9gYi/g2fa4sopag9gJsNvS8XGgWJA== +"@panva/hkdf@^1.0.2": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@panva/hkdf/-/hkdf-1.1.1.tgz#ab9cd8755d1976e72fc77a00f7655a64efe6cd5d" + integrity sha512-dhPeilub1NuIG0X5Kvhh9lH4iW3ZsHlnzwgwbOlgwQ2wG1IqFzsgHqmKPk3WzsdWAeaxKJxgM0+W433RmN45GA== "@parcel/watcher-android-arm64@2.2.0": version "2.2.0" @@ -2426,22 +2513,61 @@ tslib "^2.4.0" webcrypto-core "^1.7.4" -"@prisma/client@^5.4.2": - version "5.4.2" - resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.4.2.tgz#786f9c1d8f06d955933004ac638d14da4bf14025" - integrity sha512-2xsPaz4EaMKj1WS9iW6MlPhmbqtBsXAOeVttSePp8vTFTtvzh2hZbDgswwBdSCgPzmmwF+tLB259QzggvCmJqA== +"@prisma/adapter-libsql@^5.12.1": + version "5.12.1" + resolved "https://registry.yarnpkg.com/@prisma/adapter-libsql/-/adapter-libsql-5.12.1.tgz#f359898cb5c1160fa56c4e630172d98910015f8d" + integrity sha512-tbXcgzS/xS8fD8gI1g6DJ483viNx4oWyk4vB2Ls9YYEyrZR25cSRCzFhNf5Tpg4+1C4WtHj9XoE9ZHk5km0dTg== + dependencies: + "@prisma/driver-adapter-utils" "5.12.1" + async-mutex "0.5.0" + +"@prisma/client@^5.12.1": + version "5.12.1" + resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.12.1.tgz#c26a674fea76754b3a9e8b90a11e617f90212f76" + integrity sha512-6/JnizEdlSBxDIdiLbrBdMW5NqDxOmhXAJaNXiPpgzAPr/nLZResT6MMpbOHLo5yAbQ1Vv5UU8PTPRzb0WIxdA== + +"@prisma/debug@5.12.1": + version "5.12.1" + resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-5.12.1.tgz#007c8ad2e466d565bcd0671b8846c27f8700c722" + integrity sha512-kd/wNsR0klrv79o1ITsbWxYyh4QWuBidvxsXSParPsYSu0ircUmNk3q4ojsgNc3/81b0ozg76iastOG43tbf8A== + +"@prisma/driver-adapter-utils@5.12.1": + version "5.12.1" + resolved "https://registry.yarnpkg.com/@prisma/driver-adapter-utils/-/driver-adapter-utils-5.12.1.tgz#2d6b26883d95feec3b7e5b7695bdbcc6a96041bd" + integrity sha512-s5EHANHIyWID/3WLNYn3wy1SUGC2OFH2thYriq+sKo4GZxEduX9oraOVlPruZZBt/roN9ojZcph4R2oecWzfXg== dependencies: - "@prisma/engines-version" "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574" + "@prisma/debug" "5.12.1" -"@prisma/engines-version@5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574": - version "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574" - resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574.tgz#ff14f2926890edee47e8f1d08df7b4f392ee34bf" - integrity sha512-wvupDL4AA1vf4TQNANg7kR7y98ITqPsk6aacfBxZKtrJKRIsWjURHkZCGcQliHdqCiW/hGreO6d6ZuSv9MhdAA== +"@prisma/engines-version@5.12.0-21.473ed3124229e22d881cb7addf559799debae1ab": + version "5.12.0-21.473ed3124229e22d881cb7addf559799debae1ab" + resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.12.0-21.473ed3124229e22d881cb7addf559799debae1ab.tgz#c78d099a3fe86d446db7442e64e56987e39e7f32" + integrity sha512-6yvO8s80Tym61aB4QNtYZfWVmE3pwqe807jEtzm8C5VDe7nw8O1FGX3TXUaXmWV0fQTIAfRbeL2Gwrndabp/0g== -"@prisma/engines@5.4.2": - version "5.4.2" - resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.4.2.tgz#ba2b7faeb227c76e423e88f962afe6a031319f3f" - integrity sha512-fqeucJ3LH0e1eyFdT0zRx+oETLancu5+n4lhiYECyEz6H2RDskPJHJYHkVc0LhkU4Uv7fuEnppKU3nVKNzMh8g== +"@prisma/engines@5.12.1": + version "5.12.1" + resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.12.1.tgz#a50649427d627a9af962a188a84c65d61c6e2b3f" + integrity sha512-HQDdglLw2bZR/TXD2Y+YfDMvi5Q8H+acbswqOsWyq9pPjBLYJ6gzM+ptlTU/AV6tl0XSZLU1/7F4qaWa8bqpJA== + dependencies: + "@prisma/debug" "5.12.1" + "@prisma/engines-version" "5.12.0-21.473ed3124229e22d881cb7addf559799debae1ab" + "@prisma/fetch-engine" "5.12.1" + "@prisma/get-platform" "5.12.1" + +"@prisma/fetch-engine@5.12.1": + version "5.12.1" + resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-5.12.1.tgz#c38e9fa17fdc535b4c83cbb7645569ad0a511fa9" + integrity sha512-qSs3KcX1HKcea1A+hlJVK/ljj0PNIUHDxAayGMvgJBqmaN32P9tCidlKz1EGv6WoRFICYnk3Dd/YFLBwnFIozA== + dependencies: + "@prisma/debug" "5.12.1" + "@prisma/engines-version" "5.12.0-21.473ed3124229e22d881cb7addf559799debae1ab" + "@prisma/get-platform" "5.12.1" + +"@prisma/get-platform@5.12.1": + version "5.12.1" + resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-5.12.1.tgz#33f427f6d744dee62a9e06858889691d78b50804" + integrity sha512-pgIR+pSvhYHiUcqXVEZS31NrFOTENC9yFUdEAcx7cdQBoZPmHVjtjN4Ss6NzVDMYPrKJJ51U14EhEoeuBlMioQ== + dependencies: + "@prisma/debug" "5.12.1" "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" @@ -2937,6 +3063,13 @@ dependencies: "@types/node" "*" +"@types/ws@^8.5.4": + version "8.5.10" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.10.tgz#4acfb517970853fa6574a3a6886791d04a396787" + integrity sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A== + dependencies: + "@types/node" "*" + "@typescript-eslint/parser@^5.21.0", "@typescript-eslint/parser@^5.30.5": version "5.31.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.31.0.tgz#7f42d7dcc68a0a6d80a0f3d9a65063aee7bb8d2c" @@ -3277,6 +3410,13 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== +async-mutex@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/async-mutex/-/async-mutex-0.5.0.tgz#353c69a0b9e75250971a64ac203b0ebfddd75482" + integrity sha512-1A94B18jkJ3DYq284ohPxoXbfTA5HsQ7/Mf4DEhcyLx3Bz27Rh59iScbB6EPiP+B+joue6YCxcMXSbFC1tZKwA== + dependencies: + tslib "^2.4.0" + async-retry@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.3.tgz#0e7f36c04d8478e7a58bdbed80cedf977785f280" @@ -4024,6 +4164,11 @@ damerau-levenshtein@^1.0.7, damerau-levenshtein@^1.0.8: resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA== +data-uri-to-buffer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== + dataloader@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-2.2.2.tgz#216dc509b5abe39d43a9b9d97e6e5e473dfbe3e0" @@ -4162,6 +4307,11 @@ detect-indent@^6.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== +detect-libc@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" + integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== + detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" @@ -4816,6 +4966,14 @@ fbjs@^3.0.0: setimmediate "^1.0.5" ua-parser-js "^0.7.30" +fetch-blob@^3.1.2, fetch-blob@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== + dependencies: + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" + fflate@^0.7.3: version "0.7.4" resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.7.4.tgz#61587e5d958fdabb5a9368a302c25363f4f69f50" @@ -4941,6 +5099,13 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +formdata-polyfill@^4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== + dependencies: + fetch-blob "^3.1.2" + forwarded@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" @@ -5739,20 +5904,20 @@ jiti@^1.17.1, jiti@^1.18.2: resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.18.2.tgz#80c3ef3d486ebf2450d9335122b32d121f2a83cd" integrity sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg== -jose@^4.1.4: - version "4.8.3" - resolved "https://registry.yarnpkg.com/jose/-/jose-4.8.3.tgz#5a754fb4aa5f2806608d083f438e6916b11087da" - integrity sha512-7rySkpW78d8LBp4YU70Wb7+OTgE3OwAALNVZxhoIhp4Kscp+p/fBkdpxGAMKxvCAMV4QfXBU9m6l9nX/vGwd2g== - jose@^4.11.4: version "4.14.4" resolved "https://registry.yarnpkg.com/jose/-/jose-4.14.4.tgz#59e09204e2670c3164ee24cbfe7115c6f8bff9ca" integrity sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g== -jose@^4.9.3: - version "4.11.2" - resolved "https://registry.yarnpkg.com/jose/-/jose-4.11.2.tgz#d9699307c02e18ff56825843ba90e2fae9f09e23" - integrity sha512-njj0VL2TsIxCtgzhO+9RRobBvws4oYyCM8TpvoUQwl/MbIM3NFJRR9+e6x0sS5xXaP1t6OCBkaBME98OV9zU5A== +jose@^4.15.5: + version "4.15.5" + resolved "https://registry.yarnpkg.com/jose/-/jose-4.15.5.tgz#6475d0f467ecd3c630a1b5dadd2735a7288df706" + integrity sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg== + +js-base64@^3.7.5: + version "3.7.7" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.7.tgz#e51b84bf78fbf5702b9541e2cb7bfcb893b43e79" + integrity sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw== "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" @@ -5900,6 +6065,22 @@ libphonenumber-js@^1.10.14: resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.37.tgz#185264130c9375f17d0c487a288223294579929c" integrity sha512-Z10PCaOCiAxbUxLyR31DNeeNugSVP6iv/m7UrSKS5JHziEMApJtgku4e9Q69pzzSC9LnQiM09sqsGf2ticZnMw== +libsql@^0.3.10: + version "0.3.10" + resolved "https://registry.yarnpkg.com/libsql/-/libsql-0.3.10.tgz#e4eebc7da5cfbbddcac15248df7442e13ff07942" + integrity sha512-/8YMTbwWFPmrDWY+YFK3kYqVPFkMgQre0DGmBaOmjogMdSe+7GHm1/q9AZ61AWkEub/vHmi+bA4tqIzVhKnqzg== + dependencies: + "@neon-rs/load" "^0.0.4" + detect-libc "2.0.2" + optionalDependencies: + "@libsql/darwin-arm64" "0.3.10" + "@libsql/darwin-x64" "0.3.10" + "@libsql/linux-arm64-gnu" "0.3.10" + "@libsql/linux-arm64-musl" "0.3.10" + "@libsql/linux-x64-gnu" "0.3.10" + "@libsql/linux-x64-musl" "0.3.10" + "@libsql/win32-x64-msvc" "0.3.10" + lie@~3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" @@ -6682,17 +6863,17 @@ negotiator@0.6.3, negotiator@^0.6.3: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -next-auth@^4.18.8: - version "4.18.8" - resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-4.18.8.tgz#34012ac107702b27779647e8787715cea948812a" - integrity sha512-USP8ihmvB7iCGtkS0+toe2QPrzdbZfkydQZX56JOI9Ft5n/BardOXh3D4wQ2An+vpq/jDKojGlgfv21wVElW7A== +next-auth@4.24.6: + version "4.24.6" + resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-4.24.6.tgz#8cb1848197fdb2479eac2f10e4efa1f1b6b0daaa" + integrity sha512-djQt3ZEaWEIxcsuh3HTW2uuzLfXMRjHH+ugAsichlQSbH4iA5MRcgMA2HvTNvsDTDLh44tyU72+/gWsxgTbAKg== dependencies: - "@babel/runtime" "^7.16.3" - "@panva/hkdf" "^1.0.1" + "@babel/runtime" "^7.20.13" + "@panva/hkdf" "^1.0.2" cookie "^0.5.0" - jose "^4.9.3" + jose "^4.11.4" oauth "^0.9.15" - openid-client "^5.1.0" + openid-client "^5.4.0" preact "^10.6.3" preact-render-to-string "^5.1.19" uuid "^8.3.2" @@ -6768,6 +6949,11 @@ node-addon-api@^7.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.0.0.tgz#8136add2f510997b3b94814f4af1cce0b0e3962e" integrity sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA== +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + node-fetch@2.6.7, node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -6775,6 +6961,15 @@ node-fetch@2.6.7, node-fetch@^2.6.1, node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" +node-fetch@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" + integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== + dependencies: + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -6839,7 +7034,7 @@ object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1 resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== -object-hash@^2.0.1: +object-hash@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== @@ -6904,10 +7099,10 @@ object.values@^1.1.5: define-properties "^1.1.3" es-abstract "^1.19.1" -oidc-token-hash@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/oidc-token-hash/-/oidc-token-hash-5.0.1.tgz#ae6beec3ec20f0fd885e5400d175191d6e2f10c6" - integrity sha512-EvoOtz6FIEBzE+9q253HsLCVRiK/0doEJ2HCvvqMQb3dHZrP3WlJKYtJ55CRTw4jmYomzH4wkPuCj/I3ZvpKxQ== +oidc-token-hash@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/oidc-token-hash/-/oidc-token-hash-5.0.3.tgz#9a229f0a1ce9d4fc89bcaee5478c97a889e7b7b6" + integrity sha512-IF4PcGgzAr6XXSff26Sk/+P4KZFJVuHAJZj3wgO3vX2bMdNVp/QXTP3P7CEm9V1IdG8lDLY3HhiqpsE/nOwpPw== on-finished@2.4.1: version "2.4.1" @@ -6930,15 +7125,15 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -openid-client@^5.1.0: - version "5.1.8" - resolved "https://registry.yarnpkg.com/openid-client/-/openid-client-5.1.8.tgz#3a24910288b32c32f548fb6e391f44178ce6370f" - integrity sha512-EPxJY6bT7YIYQEXSGxRC5flQ3GUhLy98ufdto6+BVBrFGPmwjUpy4xBcYuU/Wt9nPkO/3EgljBrr6Ezx4lp1RQ== +openid-client@^5.4.0: + version "5.6.5" + resolved "https://registry.yarnpkg.com/openid-client/-/openid-client-5.6.5.tgz#c149ad07b9c399476dc347097e297bbe288b8b00" + integrity sha512-5P4qO9nGJzB5PI0LFlhj4Dzg3m4odt0qsJTfyEtZyOlkgpILwEioOhVVJOrS1iVH494S4Ee5OCjjg6Bf5WOj3w== dependencies: - jose "^4.1.4" + jose "^4.15.5" lru-cache "^6.0.0" - object-hash "^2.0.1" - oidc-token-hash "^5.0.1" + object-hash "^2.2.0" + oidc-token-hash "^5.0.3" optionator@^0.9.1: version "0.9.1" @@ -7301,12 +7496,12 @@ pretty-format@^3.8.0: resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-3.8.0.tgz#bfbed56d5e9a776645f4b1ff7aa1a3ac4fa3c385" integrity sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew== -prisma@^5.4.2: - version "5.4.2" - resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.4.2.tgz#7eac9276439ec7073ec697c6c0dfa259d96e955e" - integrity sha512-GDMZwZy7mysB2oXU+angQqJ90iaPFdD0rHaZNkn+dio5NRkGLmMqmXs31//tg/qXT3iB0cTQwnGGQNuirhSTZg== +prisma@^5.12.1: + version "5.12.1" + resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.12.1.tgz#db4596253bb066afc9f08744642f200a398d8d51" + integrity sha512-SkMnb6wyIxTv9ACqiHBI2u9gD6y98qXRoCoLEnZsF6yee5Qg828G+ARrESN+lQHdw4maSZFFSBPPDpvSiVTo0Q== dependencies: - "@prisma/engines" "5.4.2" + "@prisma/engines" "5.12.1" process-nextick-args@~2.0.0: version "2.0.1" @@ -8976,6 +9171,11 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" +web-streams-polyfill@^3.0.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" + integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== + web-streams-polyfill@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6"