From df11fe010022b23e46558cf766de8d8d98226520 Mon Sep 17 00:00:00 2001 From: "Sakamoto, Kazunori" Date: Fri, 12 Jan 2024 19:41:10 +0900 Subject: [PATCH] feat: update supertokens (#10) --- package.json | 20 +- src/app/(withAuth)/layout.tsx | 6 +- .../molecules/HomeClientComponent.tsx | 27 -- ...thForNext.tsx => SessionAuthForNextJs.tsx} | 2 +- src/utils/session.ts | 89 ++----- yarn.lock | 242 +++++++++--------- 6 files changed, 151 insertions(+), 235 deletions(-) delete mode 100644 src/components/molecules/HomeClientComponent.tsx rename src/components/molecules/{SessionAuthForNext.tsx => SessionAuthForNextJs.tsx} (73%) diff --git a/package.json b/package.json index 689407c5..c46fe6de 100644 --- a/package.json +++ b/package.json @@ -33,10 +33,10 @@ "@chakra-ui/react": "2.8.2", "@emotion/react": "11.11.3", "@emotion/styled": "11.11.0", - "@prisma/client": "5.7.1", + "@prisma/client": "5.8.0", "@tanstack/react-query": "5.17.9", "@willbooster/shared-lib-react": "3.0.5", - "framer-motion": "10.17.9", + "framer-motion": "10.18.0", "next": "14.0.4", "nextjs-cors": "2.2.0", "pino": "8.17.2", @@ -44,9 +44,9 @@ "pm2": "5.3.0", "react": "18.2.0", "react-dom": "18.2.0", - "react-icons": "4.12.0", + "react-icons": "5.0.1", "supertokens-auth-react": "0.36.1", - "supertokens-node": "16.6.8", + "supertokens-node": "16.7.1", "supertokens-web-js": "0.8.0", "zod": "3.22.4", "zod-form-data": "2.0.2" @@ -54,16 +54,16 @@ "devDependencies": { "@chakra-ui/cli": "2.4.1", "@types/cookie": "0.6.0", - "@types/eslint": "8.56.1", + "@types/eslint": "8.56.2", "@types/micromatch": "4.0.6", - "@types/node": "20.10.7", + "@types/node": "20.11.0", "@types/react-dom": "18.2.18", - "@typescript-eslint/eslint-plugin": "6.18.0", - "@typescript-eslint/parser": "6.18.0", + "@typescript-eslint/eslint-plugin": "6.18.1", + "@typescript-eslint/parser": "6.18.1", "@willbooster/eslint-config-next": "1.1.0", "@willbooster/prettier-config": "9.1.2", "@willbooster/wb": "6.1.15", - "build-ts": "12.0.1", + "build-ts": "12.0.2", "eslint": "8.56.0", "eslint-config-next": "14.0.4", "eslint-config-prettier": "9.1.0", @@ -79,7 +79,7 @@ "micromatch": "4.0.5", "pinst": "3.0.0", "prettier": "3.1.1", - "prisma": "5.7.1", + "prisma": "5.8.0", "sort-package-json": "2.6.0", "typescript": "5.3.3" }, diff --git a/src/app/(withAuth)/layout.tsx b/src/app/(withAuth)/layout.tsx index 0c1712a6..ebaa09c8 100644 --- a/src/app/(withAuth)/layout.tsx +++ b/src/app/(withAuth)/layout.tsx @@ -3,7 +3,7 @@ import type { NextPage } from 'next'; import { redirect } from 'next/navigation'; import React, { Suspense } from 'react'; -import { SessionAuthForNext } from '../../components/molecules/SessionAuthForNext'; +import { SessionAuthForNextJs } from '../../components/molecules/SessionAuthForNextJs'; import { TryRefreshComponent } from '../../components/molecules/TryRefreshComponent'; import { DefaultFooter } from '../../components/organisms/DefaultFooter'; import { DefaultHeader } from '../../components/organisms/DefaultHeader'; @@ -35,7 +35,7 @@ const DefaultLayout: NextPage = async ({ children }) => { * We pass in no children in this case to prevent hydration issues and still be able to redirect the * user. */ - + ) : ( /** * This means that the session does not exist, but we have session tokens for the user. @@ -51,7 +51,7 @@ const DefaultLayout: NextPage = async ({ children }) => { */ return ( <> - + }> diff --git a/src/components/molecules/HomeClientComponent.tsx b/src/components/molecules/HomeClientComponent.tsx deleted file mode 100644 index a0244ce0..00000000 --- a/src/components/molecules/HomeClientComponent.tsx +++ /dev/null @@ -1,27 +0,0 @@ -'use client'; - -import React from 'react'; -import { useSessionContext } from 'supertokens-auth-react/recipe/session'; - -export const HomeClientComponent: React.FC = () => { - const session = useSessionContext(); - - if (session.loading) { - return
Loading...
; - } - - if (session.doesSessionExist === false) { - return
Session does not exist
; - } - - return ( -
-
-

- Client side component got userId: {session.userId} -
-

-
-
- ); -}; diff --git a/src/components/molecules/SessionAuthForNext.tsx b/src/components/molecules/SessionAuthForNextJs.tsx similarity index 73% rename from src/components/molecules/SessionAuthForNext.tsx rename to src/components/molecules/SessionAuthForNextJs.tsx index 8b5a58d6..9527857f 100644 --- a/src/components/molecules/SessionAuthForNext.tsx +++ b/src/components/molecules/SessionAuthForNextJs.tsx @@ -5,6 +5,6 @@ import { SessionAuth } from 'supertokens-auth-react/recipe/session'; type Props = Parameters[0]; -export const SessionAuthForNext: React.FC = (props: Props) => { +export const SessionAuthForNextJs: React.FC = (props: Props) => { return ; }; diff --git a/src/utils/session.ts b/src/utils/session.ts index e6f0ef8d..1c49a1e8 100644 --- a/src/utils/session.ts +++ b/src/utils/session.ts @@ -1,10 +1,6 @@ import { cookies, headers } from 'next/headers'; -import type { NextRequest } from 'next/server'; -import { NextResponse } from 'next/server'; -import { CollectingResponse, PreParsedRequest } from 'supertokens-node/framework/custom'; -import type { SessionContainer, VerifySessionOptions } from 'supertokens-node/recipe/session'; -import Session from 'supertokens-node/recipe/session'; -import type { HTTPMethod } from 'supertokens-node/types'; +import { getSSRSession } from 'supertokens-node/nextjs'; +import type { SessionContainer } from 'supertokens-node/recipe/session'; import { logger } from '../infrastructures/pino'; import { prisma } from '../infrastructures/prisma'; @@ -20,88 +16,35 @@ export interface SessionOnServerLayout { * For example this will be true if email verification is required but the user has not verified their email. */ hasInvalidClaims: boolean; - baseResponse: CollectingResponse; - nextResponse?: NextResponse; + error: unknown | undefined; } -export async function getNullableSessionOnServer( - req?: NextRequest, - options?: VerifySessionOptions -): Promise { - const baseRequest = getBaseRequest(req); - - // Collecting response is a wrapper exposed by SuperTokens. In this case we are using an empty - // CollectingResponse when calling `getSession`. If the request contains valid session tokens - // the SuperTokens SDK will attach all the relevant tokens to the collecting response object which - // we can then use to return those session tokens in the final result (refer to `withSession` in this file) - const baseResponse = new CollectingResponse(); +export async function getNullableSessionOnServer(): Promise { + let session: SessionContainer | undefined; + let hasToken = false; + let hasInvalidClaims = false; + let error: unknown | undefined = undefined; try { - // `getSession` will throw if session is required and there is no valid session. You can use - // `options` to configure whether or not you want to require sessions when calling `getSSRSession` - const session = await Session.getSession(baseRequest, baseResponse, options); - - // Update User table with Prisma + ({ hasInvalidClaims, hasToken, session } = await getSSRSession(cookies().getAll(), headers())); if (session) { - await upsertUserToPrisma(session.getUserId()); - } - - return { - session, - hasInvalidClaims: false, - hasToken: session !== undefined, - baseResponse, - }; - } catch (error) { - if (Session.Error.isErrorFromSuperTokens(error)) { - return { - hasToken: error.type !== Session.Error.UNAUTHORISED, - hasInvalidClaims: error.type === Session.Error.INVALID_CLAIMS, - session: undefined, - baseResponse, - nextResponse: new NextResponse('Authentication required', { - status: error.type === Session.Error.INVALID_CLAIMS ? 403 : 401, - }), - }; - } else { - throw error; + void upsertUserToPrisma(session.getUserId()); } + } catch (error_: unknown) { + error = error_; } + return { session, hasToken, hasInvalidClaims, error }; } -export async function getNonNullableSessionOnServer( - req?: NextRequest, - options?: VerifySessionOptions -): Promise { - const baseRequest = getBaseRequest(req); - const baseResponse = new CollectingResponse(); - const session = await Session.getSession(baseRequest, baseResponse, options); +export async function getNonNullableSessionOnServer(): Promise { + const { session } = await getSSRSession(cookies().getAll(), headers()); if (!session) { throw new Error('Failed to get a session.'); } + void upsertUserToPrisma(session.getUserId()); return session; } -function getBaseRequest(req: NextRequest | undefined): PreParsedRequest { - const query = req === undefined ? {} : Object.fromEntries(new URL(req.url).searchParams.entries()); - const parsedCookies: Record = Object.fromEntries( - (req === undefined ? cookies() : req.cookies).getAll().map((cookie) => [cookie.name, cookie.value]) - ); - - // Pre parsed request is a wrapper exposed by SuperTokens. It is used as a helper to detect if the - // original request contains session tokens. We then use this pre parsed request to call `getSession` - // to check if there is a valid session. - return new PreParsedRequest({ - method: req === undefined ? 'get' : (req.method as HTTPMethod), - url: req === undefined ? '' : req.url, - query, - headers: req === undefined ? headers() : req.headers, - cookies: parsedCookies, - getFormBody: () => req!.formData(), - getJSONBody: () => req!.json(), - }); -} - const upsertedUserIds = new Set(); async function upsertUserToPrisma(id: string): Promise { diff --git a/yarn.lock b/yarn.lock index 15dcd7ca..d808e05e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3462,61 +3462,61 @@ __metadata: languageName: node linkType: hard -"@prisma/client@npm:5.7.1": - version: 5.7.1 - resolution: "@prisma/client@npm:5.7.1" +"@prisma/client@npm:5.8.0": + version: 5.8.0 + resolution: "@prisma/client@npm:5.8.0" peerDependencies: prisma: "*" peerDependenciesMeta: prisma: optional: true - checksum: 5eafbe3955de13620c7b661282c79e85211bb0cba950559f87e7a679ff06f5242864b0cbe6e76316eb35366ac3df9b2b02ced7cbedc238bcbc4e412d7acf3b72 + checksum: 50df2ab4c611896227ba29861edb338c4f1fd4f1b5075b7ac363a80f696ec93d88d81faa4028b3f0837b00ddb925faf1b0bb9d793a4197be5a0e135dd68c610c languageName: node linkType: hard -"@prisma/debug@npm:5.7.1": - version: 5.7.1 - resolution: "@prisma/debug@npm:5.7.1" - checksum: 6bad1effecd938f6dd50c65d49bb095b8f6e565357c96e93a41c904a5c83879b7282c368b46eb2cbf56d2d7b1aea5d4e98699bb551422146c082f48593fa44d6 +"@prisma/debug@npm:5.8.0": + version: 5.8.0 + resolution: "@prisma/debug@npm:5.8.0" + checksum: 1a754e3f1f589b502788c7c17a1c345e2a032ff28b6268e9641c476eaddff0dff4f249d787aaf2259ff109777b075a10025e04d28d3015d9500ba5260a737a62 languageName: node linkType: hard -"@prisma/engines-version@npm:5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5": - version: 5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5 - resolution: "@prisma/engines-version@npm:5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5" - checksum: 1975674f3c4df0917a6647f5e216d6df7d478797253e75729ea64b9ad9aa6ce80aef5c4d05c610e5342d15e83e1f9c501ca0a9c523669bc0018af3e1b2d63289 +"@prisma/engines-version@npm:5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848": + version: 5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848 + resolution: "@prisma/engines-version@npm:5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848" + checksum: d7d0509fc820f6fc8dc9083d2683e99853fce13e8338e6cb615cab09e826fca84e12d6a57daef8116ba1f2e897a1daeb3a19bb3c87e3a4d7a166da4522ad0346 languageName: node linkType: hard -"@prisma/engines@npm:5.7.1": - version: 5.7.1 - resolution: "@prisma/engines@npm:5.7.1" +"@prisma/engines@npm:5.8.0": + version: 5.8.0 + resolution: "@prisma/engines@npm:5.8.0" dependencies: - "@prisma/debug": "npm:5.7.1" - "@prisma/engines-version": "npm:5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5" - "@prisma/fetch-engine": "npm:5.7.1" - "@prisma/get-platform": "npm:5.7.1" - checksum: 1d231405c0606292c819ff38504dec66274032b1ba7e560418042e88109b72d934c8fca0f0763647250b2e03c26556a13209969ad8f495d7f90b272cdd6152de + "@prisma/debug": "npm:5.8.0" + "@prisma/engines-version": "npm:5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848" + "@prisma/fetch-engine": "npm:5.8.0" + "@prisma/get-platform": "npm:5.8.0" + checksum: 196990cfa65d49b71473a035d20d6084da2a6c59c0cc154b36a967391174e7988eb5e8fb455604e191f655d868a32caa625e7834ebb4f75cddbea30867543536 languageName: node linkType: hard -"@prisma/fetch-engine@npm:5.7.1": - version: 5.7.1 - resolution: "@prisma/fetch-engine@npm:5.7.1" +"@prisma/fetch-engine@npm:5.8.0": + version: 5.8.0 + resolution: "@prisma/fetch-engine@npm:5.8.0" dependencies: - "@prisma/debug": "npm:5.7.1" - "@prisma/engines-version": "npm:5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5" - "@prisma/get-platform": "npm:5.7.1" - checksum: eb91db30c1378d1aedb6f42eddc616ab7eb9c33ba7f5f4ccca8908c774827216efecc3e40a55b66211bfaa81be89f2dac9adbe809d3e591ac4d39ed049825291 + "@prisma/debug": "npm:5.8.0" + "@prisma/engines-version": "npm:5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848" + "@prisma/get-platform": "npm:5.8.0" + checksum: 3c9b0cbd5d45836b60e375e9d93d98bb2278c881134eae6afc328806ec247e27a688cf2ad040007458a25629dd26fee8c86d0a7d34e1ecece0d3e7b0e43e9e81 languageName: node linkType: hard -"@prisma/get-platform@npm:5.7.1": - version: 5.7.1 - resolution: "@prisma/get-platform@npm:5.7.1" +"@prisma/get-platform@npm:5.8.0": + version: 5.8.0 + resolution: "@prisma/get-platform@npm:5.8.0" dependencies: - "@prisma/debug": "npm:5.7.1" - checksum: 0b0cf9e36994786fc59ef4294e9b3504ec4daa130340b0187f2f86af76936c33c20d812fb4d86956827299230a1c56656818caa73996614affec7c957b17d94d + "@prisma/debug": "npm:5.8.0" + checksum: 376b3aa08240a14cf66e1384a100d243d7ebd3582da5c474e48807d4327b98a41563b55e7d650cd4e71d67cb70a2592dae40c7e0e42b647bd80be598e04500aa languageName: node linkType: hard @@ -3812,13 +3812,13 @@ __metadata: languageName: node linkType: hard -"@types/eslint@npm:8.56.1": - version: 8.56.1 - resolution: "@types/eslint@npm:8.56.1" +"@types/eslint@npm:8.56.2": + version: 8.56.2 + resolution: "@types/eslint@npm:8.56.2" dependencies: "@types/estree": "npm:*" "@types/json-schema": "npm:*" - checksum: a2aa5e2ec16f07944a60b825d6447d66f83369783e31c014ccf582fa92df963aa8d62c447a8fdc4fbfcd7299ad74ed1a753e06e560ce184eab4efceccfa66262 + checksum: e33ca87a30a9454ba9943e1270ac759996f5fe598a1c1afbaec1d1e7346a339e20bf2a9d81f177067116bbaa6cfa4f748993cb338f57978ae862ad38ffae56fe languageName: node linkType: hard @@ -3868,12 +3868,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:20.10.7": - version: 20.10.7 - resolution: "@types/node@npm:20.10.7" +"@types/node@npm:20.11.0": + version: 20.11.0 + resolution: "@types/node@npm:20.11.0" dependencies: undici-types: "npm:~5.26.4" - checksum: d626cea1b7da4784ee7b335dcc54e64adba9725dab7ca51a690167de502ef89fec07b05ad8e25845d188d7ad7f72c192ec92964d456321ed5b9452113bf9351f + checksum: 560aa850dfccb83326f9cba125459f6c3fb0c71ec78f22c61e4d248f1df78bd25fd6792cef573dfbdc49c882f8e38bb1a82ca87e0e28ff2513629c704c2b02af languageName: node linkType: hard @@ -3960,15 +3960,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:6.18.0": - version: 6.18.0 - resolution: "@typescript-eslint/eslint-plugin@npm:6.18.0" +"@typescript-eslint/eslint-plugin@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/eslint-plugin@npm:6.18.1" dependencies: "@eslint-community/regexpp": "npm:^4.5.1" - "@typescript-eslint/scope-manager": "npm:6.18.0" - "@typescript-eslint/type-utils": "npm:6.18.0" - "@typescript-eslint/utils": "npm:6.18.0" - "@typescript-eslint/visitor-keys": "npm:6.18.0" + "@typescript-eslint/scope-manager": "npm:6.18.1" + "@typescript-eslint/type-utils": "npm:6.18.1" + "@typescript-eslint/utils": "npm:6.18.1" + "@typescript-eslint/visitor-keys": "npm:6.18.1" debug: "npm:^4.3.4" graphemer: "npm:^1.4.0" ignore: "npm:^5.2.4" @@ -3981,25 +3981,25 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: b89fae0d075be717dc4f9bed451bc5fb3416c5cc8ec519dae14d85dd8a7c4b60e21c87f91441cde1d84cd85d32253adc205a06dab7a33556152cc3a059bb5899 + checksum: fbcfae9b92f35ce10212f44f43f93c43f6eb3e28a571da7ed0d424396916aaf080f16ce91a5bffb9e1b42ca2d6003a3e2ad65131b4ef72ed2f94a4bedb35a735 languageName: node linkType: hard -"@typescript-eslint/parser@npm:6.18.0": - version: 6.18.0 - resolution: "@typescript-eslint/parser@npm:6.18.0" +"@typescript-eslint/parser@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/parser@npm:6.18.1" dependencies: - "@typescript-eslint/scope-manager": "npm:6.18.0" - "@typescript-eslint/types": "npm:6.18.0" - "@typescript-eslint/typescript-estree": "npm:6.18.0" - "@typescript-eslint/visitor-keys": "npm:6.18.0" + "@typescript-eslint/scope-manager": "npm:6.18.1" + "@typescript-eslint/types": "npm:6.18.1" + "@typescript-eslint/typescript-estree": "npm:6.18.1" + "@typescript-eslint/visitor-keys": "npm:6.18.1" debug: "npm:^4.3.4" peerDependencies: eslint: ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 5ae2c541157056d9d55fba66a2ecff7c870860579aaf8c33a89133e0bd35aaff3c1e923648417d66791f75fe39795bdaa31fc82d44613dc5872e1ce4640b608a + checksum: 78cf87c49be224a7fc7c9b1580b015b79e6f6b78d3db60843825b9657e6c5b852566ca7fcb9a51e7b781e910a89a73cdc36dfcd180ccb34febc535ad9b5a0be1 languageName: node linkType: hard @@ -4031,22 +4031,22 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:6.18.0": - version: 6.18.0 - resolution: "@typescript-eslint/scope-manager@npm:6.18.0" +"@typescript-eslint/scope-manager@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/scope-manager@npm:6.18.1" dependencies: - "@typescript-eslint/types": "npm:6.18.0" - "@typescript-eslint/visitor-keys": "npm:6.18.0" - checksum: 688de3cffa894ef402ee5f4ba265bcd26e21aac5e98b265dbc77eb0dbaf690602ddce6c56df0973764c560fcff290304e54d86620f11fc45394d3b556d4bfcf8 + "@typescript-eslint/types": "npm:6.18.1" + "@typescript-eslint/visitor-keys": "npm:6.18.1" + checksum: 66ef86688a2eb69988a15d6c0176e5e1ec3994ab96526ca525226a1815eef63366e10e3e6a041ceb2cd63d1cced27874d2313045b785418330af68a288e50771 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:6.18.0": - version: 6.18.0 - resolution: "@typescript-eslint/type-utils@npm:6.18.0" +"@typescript-eslint/type-utils@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/type-utils@npm:6.18.1" dependencies: - "@typescript-eslint/typescript-estree": "npm:6.18.0" - "@typescript-eslint/utils": "npm:6.18.0" + "@typescript-eslint/typescript-estree": "npm:6.18.1" + "@typescript-eslint/utils": "npm:6.18.1" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.0.1" peerDependencies: @@ -4054,7 +4054,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 121ab9846cdcfeb385502f816a01a2d97cff9f13d320ebd265662ec66a58f4639483cf5a9c790db3e5dbab20c13c21e8506096174d83d6971e359f1272ec94fc + checksum: 5198752a51649afd960205708c4d765e0170a46a1eb96c97e706890fecb2642933a6377337cf3632f9737915da0201607872a46c9c551d1accf9176b0e025023 languageName: node linkType: hard @@ -4065,10 +4065,10 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:6.18.0": - version: 6.18.0 - resolution: "@typescript-eslint/types@npm:6.18.0" - checksum: 7bdbbd3ab040d10505c06e6cd3ac0eaf3f0450aa3098eb30f0b1706e06c9a1f9637c9e98ff67e05af235c55a7ccb0053368de072cd4a4f830c9b048d2575f91f +"@typescript-eslint/types@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/types@npm:6.18.1" + checksum: 58c1a1bcf2403891a4fcb0d21aac643a6f9d06119423230dad74ef2b95adf94201da7cf48617b0c27b51695225b622e48c739cf4186ef5f99294887d2d536557 languageName: node linkType: hard @@ -4091,12 +4091,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:6.18.0": - version: 6.18.0 - resolution: "@typescript-eslint/typescript-estree@npm:6.18.0" +"@typescript-eslint/typescript-estree@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/typescript-estree@npm:6.18.1" dependencies: - "@typescript-eslint/types": "npm:6.18.0" - "@typescript-eslint/visitor-keys": "npm:6.18.0" + "@typescript-eslint/types": "npm:6.18.1" + "@typescript-eslint/visitor-keys": "npm:6.18.1" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" @@ -4106,24 +4106,24 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 67d377dbf66bae4d40b60cc838cc0f0337a8532925c5e2da5b1a08d882077276ff4bb1a41270179a0fa46bbf3840a284d65f5b97a69832444d4d0609c0b9b31e + checksum: 5bca8f58d3134c5296c7e6cbeef512feb3918cdc88b5b22e656a7978277278e7a86187690e7e3be3f3708feb98c952a6ab4d8bbc197fff3826e3afa8bc1e287e languageName: node linkType: hard -"@typescript-eslint/utils@npm:6.18.0": - version: 6.18.0 - resolution: "@typescript-eslint/utils@npm:6.18.0" +"@typescript-eslint/utils@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/utils@npm:6.18.1" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" "@types/json-schema": "npm:^7.0.12" "@types/semver": "npm:^7.5.0" - "@typescript-eslint/scope-manager": "npm:6.18.0" - "@typescript-eslint/types": "npm:6.18.0" - "@typescript-eslint/typescript-estree": "npm:6.18.0" + "@typescript-eslint/scope-manager": "npm:6.18.1" + "@typescript-eslint/types": "npm:6.18.1" + "@typescript-eslint/typescript-estree": "npm:6.18.1" semver: "npm:^7.5.4" peerDependencies: eslint: ^7.0.0 || ^8.0.0 - checksum: 1dc0b133fb061065ec9da9cb18ae4147c5d1656f2c0c9aca7390448802b912d1935b5e85f879de884466737cc5153a1acb370eee32b27be57302cf6a9d0b382a + checksum: b9dcb2fa7cc8c46254c22fee190032320a5dd8ce282fb01e99cb35da6c00e33b157f4285b062d841942e9aad1d7ce1a16aaa46dd05ca7d81de706aedbbfff396 languageName: node linkType: hard @@ -4137,13 +4137,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:6.18.0": - version: 6.18.0 - resolution: "@typescript-eslint/visitor-keys@npm:6.18.0" +"@typescript-eslint/visitor-keys@npm:6.18.1": + version: 6.18.1 + resolution: "@typescript-eslint/visitor-keys@npm:6.18.1" dependencies: - "@typescript-eslint/types": "npm:6.18.0" + "@typescript-eslint/types": "npm:6.18.1" eslint-visitor-keys: "npm:^3.4.1" - checksum: ef5697fdae84eafe4835919352d6e2a6ccd654942fa45d5980518fab291c176ac19d97e3579ed3462988bcf9d5c4ba7edeaca979378ab2e81dfa0fef0ce346e2 + checksum: f3dacdd1db7347908ac207968da4fa72efb31e38a6dde652651633c5283f054832045f2ad00b4ca7478e7f2e09fe4ae6e3a32b76580c036b9e5c7b8dd55af9f3 languageName: node linkType: hard @@ -4864,9 +4864,9 @@ __metadata: languageName: node linkType: hard -"build-ts@npm:12.0.1": - version: 12.0.1 - resolution: "build-ts@npm:12.0.1" +"build-ts@npm:12.0.2": + version: 12.0.2 + resolution: "build-ts@npm:12.0.2" dependencies: "@babel/core": "npm:7.23.7" "@babel/plugin-proposal-decorators": "npm:7.23.7" @@ -4904,7 +4904,7 @@ __metadata: yargs: "npm:17.7.2" bin: build-ts: bin/index.js - checksum: 0377858e355eab63f9aed2d68f775f32ee9f48e1a260a0b5f73da8368d1f502b6d1d0c556a134555d58dfe9cf3a31c16bfbf7c5ee0a4940dde83582332d7e534 + checksum: 081317ef68198715f9b4b34b24809e2331c6712629b496b5038c235367bd580fa169c7955313763707e57aac9d0dee6449bfec4e2a9ea8d394d1ab474a37662a languageName: node linkType: hard @@ -6560,9 +6560,9 @@ __metadata: languageName: node linkType: hard -"framer-motion@npm:10.17.9": - version: 10.17.9 - resolution: "framer-motion@npm:10.17.9" +"framer-motion@npm:10.18.0": + version: 10.18.0 + resolution: "framer-motion@npm:10.18.0" dependencies: "@emotion/is-prop-valid": "npm:^0.8.2" tslib: "npm:^2.4.0" @@ -6577,7 +6577,7 @@ __metadata: optional: true react-dom: optional: true - checksum: c27932b62c2d1971ba1117d54946b3bdafdd2b7fff5e932753ad130c7de8d5c746cd5b2eadb260f0a2718af52f0faed6dc55161b22202b26712a79d13e223a3f + checksum: 0aea1b3dc5cf06687e31f3b6c0b6b1a2cd070afdd4a9d38ebf15715c662ca1d6d1c25e6778695e5ebff37a6ce92b031d036c02570370e6057e66aa9de9f9370f languageName: node linkType: hard @@ -9084,14 +9084,14 @@ __metadata: languageName: node linkType: hard -"prisma@npm:5.7.1": - version: 5.7.1 - resolution: "prisma@npm:5.7.1" +"prisma@npm:5.8.0": + version: 5.8.0 + resolution: "prisma@npm:5.8.0" dependencies: - "@prisma/engines": "npm:5.7.1" + "@prisma/engines": "npm:5.8.0" bin: prisma: build/index.js - checksum: 16dd6a5c48d834556ae13fd3138500b10373e93398e3c3bc7111ec3359b5a42c74edf1929c024308086a2f36a871d557ce169e241b9c36177ef62be494fa8fd4 + checksum: 5a1499158ea23e9a0ea4d638fbe89c68e945a4f189087e088bd40083313351ac52214260eabf5bf5887545584ac6c9c1577d0698df95cf16da4309f5b6535439 languageName: node linkType: hard @@ -9282,12 +9282,12 @@ __metadata: languageName: node linkType: hard -"react-icons@npm:4.12.0": - version: 4.12.0 - resolution: "react-icons@npm:4.12.0" +"react-icons@npm:5.0.1": + version: 5.0.1 + resolution: "react-icons@npm:5.0.1" peerDependencies: react: "*" - checksum: 2170f43031ee7365539f72d4075cbe6c7fbf9a66d6cf4494aa9393b194272da0564f5b19d1b24dbfc567c0ac89f5fe5b8974d92dd83f61e252388dde6a226fb8 + checksum: 717022d93a3b2b30082f86fbb3c725a94a603b3fa1c611533439cc886f691a13b1833c30446d257a177667779239eac57411fa7516d8a4787bd735e965c9f63d languageName: node linkType: hard @@ -10406,9 +10406,9 @@ __metadata: languageName: node linkType: hard -"supertokens-node@npm:16.6.8": - version: 16.6.8 - resolution: "supertokens-node@npm:16.6.8" +"supertokens-node@npm:16.7.1": + version: 16.7.1 + resolution: "supertokens-node@npm:16.7.1" dependencies: content-type: "npm:^1.0.5" cookie: "npm:0.4.0" @@ -10422,7 +10422,7 @@ __metadata: psl: "npm:1.8.0" supertokens-js-override: "npm:^0.0.4" twilio: "npm:^4.19.3" - checksum: e0ca889b44548a21a56e39a79340dbf8b2556cdbcf760584aa7ee4d75f3ea76f82ef9b35e4a8ddcd345ae7502525189dbb277c66e9e012416c94eb80727831a3 + checksum: bf7e61cafe7c780a15ef4fca9a6e40c3afd5f2ee77880e3c841b16af0081d8c3ec2ff09aba5f0ff26da0d1d918d5213ba3cee51ce473aecdfa8c9704b9fcd321 languageName: node linkType: hard @@ -10584,20 +10584,20 @@ __metadata: "@chakra-ui/react": "npm:2.8.2" "@emotion/react": "npm:11.11.3" "@emotion/styled": "npm:11.11.0" - "@prisma/client": "npm:5.7.1" + "@prisma/client": "npm:5.8.0" "@tanstack/react-query": "npm:5.17.9" "@types/cookie": "npm:0.6.0" - "@types/eslint": "npm:8.56.1" + "@types/eslint": "npm:8.56.2" "@types/micromatch": "npm:4.0.6" - "@types/node": "npm:20.10.7" + "@types/node": "npm:20.11.0" "@types/react-dom": "npm:18.2.18" - "@typescript-eslint/eslint-plugin": "npm:6.18.0" - "@typescript-eslint/parser": "npm:6.18.0" + "@typescript-eslint/eslint-plugin": "npm:6.18.1" + "@typescript-eslint/parser": "npm:6.18.1" "@willbooster/eslint-config-next": "npm:1.1.0" "@willbooster/prettier-config": "npm:9.1.2" "@willbooster/shared-lib-react": "npm:3.0.5" "@willbooster/wb": "npm:6.1.15" - build-ts: "npm:12.0.1" + build-ts: "npm:12.0.2" eslint: "npm:8.56.0" eslint-config-next: "npm:14.0.4" eslint-config-prettier: "npm:9.1.0" @@ -10608,7 +10608,7 @@ __metadata: eslint-plugin-sort-class-members: "npm:1.19.0" eslint-plugin-sort-destructure-keys: "npm:1.5.0" eslint-plugin-unicorn: "npm:50.0.1" - framer-motion: "npm:10.17.9" + framer-motion: "npm:10.18.0" husky: "npm:8.0.3" lint-staged: "npm:15.2.0" micromatch: "npm:4.0.5" @@ -10619,13 +10619,13 @@ __metadata: pinst: "npm:3.0.0" pm2: "npm:5.3.0" prettier: "npm:3.1.1" - prisma: "npm:5.7.1" + prisma: "npm:5.8.0" react: "npm:18.2.0" react-dom: "npm:18.2.0" - react-icons: "npm:4.12.0" + react-icons: "npm:5.0.1" sort-package-json: "npm:2.6.0" supertokens-auth-react: "npm:0.36.1" - supertokens-node: "npm:16.6.8" + supertokens-node: "npm:16.7.1" supertokens-web-js: "npm:0.8.0" typescript: "npm:5.3.3" zod: "npm:3.22.4"