From d25be56fb97586261cc9678441f9adda5d090c2c Mon Sep 17 00:00:00 2001 From: Alex Grover Date: Thu, 9 Nov 2023 15:28:58 -0800 Subject: [PATCH 1/6] Add editor files to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 01fffb52..c14ed23a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,9 +19,10 @@ tsconfig.tsbuildinfo .env.development.local .env.test.local .env.production.local +.idea/ npm-debug.log* yarn-debug.log* yarn-error.log* .yarn/cache -.yarn/install-state.gz \ No newline at end of file +.yarn/install-state.gz From d9713503ee25e19b463a62e7026b95b43d2fe893 Mon Sep 17 00:00:00 2001 From: Alex Grover Date: Thu, 9 Nov 2023 17:42:11 -0800 Subject: [PATCH 2/6] Split client and server SIWE code --- packages/connectkit-next-siwe/src/client.tsx | 79 +++++++++++++++++++ .../{configureSIWE.tsx => configureSIWE.ts} | 77 ------------------ packages/connectkit-next-siwe/src/index.ts | 3 +- 3 files changed, 81 insertions(+), 78 deletions(-) create mode 100644 packages/connectkit-next-siwe/src/client.tsx rename packages/connectkit-next-siwe/src/{configureSIWE.tsx => configureSIWE.ts} (74%) diff --git a/packages/connectkit-next-siwe/src/client.tsx b/packages/connectkit-next-siwe/src/client.tsx new file mode 100644 index 00000000..a4e7a43c --- /dev/null +++ b/packages/connectkit-next-siwe/src/client.tsx @@ -0,0 +1,79 @@ +import { SIWEProvider } from 'connectkit'; +import { ComponentProps, FunctionComponent } from 'react'; +import { SiweMessage } from 'siwe'; + +type NextClientSIWEConfig = { + apiRoutePrefix: string; + statement?: string; +}; + +type NextSIWEProviderProps = Omit< + ComponentProps, + | 'getNonce' + | 'createMessage' + | 'verifyMessage' + | 'getSession' + | 'signOut' + | 'data' + | 'signIn' + | 'status' + | 'resetStatus' +>; + +type ConfigureClientSIWEResult = { + Provider: FunctionComponent; +}; + +export const configureClientSIWE = ({ + apiRoutePrefix, + statement = 'Sign In With Ethereum.', +}: NextClientSIWEConfig): ConfigureClientSIWEResult => { + const NextSIWEProvider = (props: NextSIWEProviderProps) => { + return ( + { + const res = await fetch(`${apiRoutePrefix}/nonce`); + if (!res.ok) { + throw new Error('Failed to fetch SIWE nonce'); + } + const nonce = await res.text(); + return nonce; + }} + createMessage={({ nonce, address, chainId }) => + new SiweMessage({ + version: '1', + domain: window.location.host, + uri: window.location.origin, + address, + chainId, + nonce, + statement, + }).prepareMessage() + } + verifyMessage={({ message, signature }) => + fetch(`${apiRoutePrefix}/verify`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ message, signature }), + }).then((res) => res.ok) + } + getSession={async () => { + const res = await fetch(`${apiRoutePrefix}/session`); + if (!res.ok) { + throw new Error('Failed to fetch SIWE session'); + } + const { address, chainId } = await res.json(); + return address && chainId ? { address, chainId } : null; + }} + signOut={() => fetch(`${apiRoutePrefix}/logout`).then((res) => res.ok)} + {...props} + /> + ); + }; + + return { + Provider: NextSIWEProvider, + }; +}; diff --git a/packages/connectkit-next-siwe/src/configureSIWE.tsx b/packages/connectkit-next-siwe/src/configureSIWE.ts similarity index 74% rename from packages/connectkit-next-siwe/src/configureSIWE.tsx rename to packages/connectkit-next-siwe/src/configureSIWE.ts index 723b9f16..027bec63 100644 --- a/packages/connectkit-next-siwe/src/configureSIWE.tsx +++ b/packages/connectkit-next-siwe/src/configureSIWE.ts @@ -1,5 +1,3 @@ -import { FunctionComponent, ComponentProps } from 'react'; -import { SIWEProvider } from 'connectkit'; import type { IncomingMessage, ServerResponse } from 'http'; import { getIronSession, IronSession, IronSessionOptions } from 'iron-session'; import { NextApiHandler, NextApiRequest, NextApiResponse } from 'next'; @@ -27,10 +25,6 @@ type NextServerSIWEConfig = { session?: Partial; options?: RouteHandlerOptions; }; -type NextClientSIWEConfig = { - apiRoutePrefix: string; - statement?: string; -}; type NextSIWESession = IronSession & TSessionData & { @@ -39,19 +33,6 @@ type NextSIWESession = IronSession & chainId?: number; }; -type NextSIWEProviderProps = Omit< - ComponentProps, - | 'getNonce' - | 'createMessage' - | 'verifyMessage' - | 'getSession' - | 'signOut' - | 'data' - | 'signIn' - | 'status' - | 'resetStatus' ->; - type ConfigureServerSIWEResult = { apiRouteHandler: NextApiHandler; getSession: ( @@ -60,10 +41,6 @@ type ConfigureServerSIWEResult = { ) => Promise>; }; -type ConfigureClientSIWEResult = { - Provider: FunctionComponent; -}; - const getSession = async ( req: IncomingMessage, res: any, // ServerResponse, @@ -236,57 +213,3 @@ export const configureServerSideSIWE = ({ await getSession(req, res, sessionConfig), }; }; - -export const configureClientSIWE = ({ - apiRoutePrefix, - statement = 'Sign In With Ethereum.', -}: NextClientSIWEConfig): ConfigureClientSIWEResult => { - const NextSIWEProvider = (props: NextSIWEProviderProps) => { - return ( - { - const res = await fetch(`${apiRoutePrefix}/nonce`); - if (!res.ok) { - throw new Error('Failed to fetch SIWE nonce'); - } - const nonce = await res.text(); - return nonce; - }} - createMessage={({ nonce, address, chainId }) => - new SiweMessage({ - version: '1', - domain: window.location.host, - uri: window.location.origin, - address, - chainId, - nonce, - statement, - }).prepareMessage() - } - verifyMessage={({ message, signature }) => - fetch(`${apiRoutePrefix}/verify`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ message, signature }), - }).then((res) => res.ok) - } - getSession={async () => { - const res = await fetch(`${apiRoutePrefix}/session`); - if (!res.ok) { - throw new Error('Failed to fetch SIWE session'); - } - const { address, chainId } = await res.json(); - return address && chainId ? { address, chainId } : null; - }} - signOut={() => fetch(`${apiRoutePrefix}/logout`).then((res) => res.ok)} - {...props} - /> - ); - }; - - return { - Provider: NextSIWEProvider, - }; -}; diff --git a/packages/connectkit-next-siwe/src/index.ts b/packages/connectkit-next-siwe/src/index.ts index c92f554c..935ddc3d 100644 --- a/packages/connectkit-next-siwe/src/index.ts +++ b/packages/connectkit-next-siwe/src/index.ts @@ -1 +1,2 @@ -export { configureClientSIWE, configureServerSideSIWE } from './configureSIWE'; +export { configureClientSIWE } from './client' +export { configureServerSideSIWE } from './configureSIWE'; From d1b6b06d0d29e3d2f25527972e1e3c80bcfbb7b9 Mon Sep 17 00:00:00 2001 From: Alex Grover Date: Thu, 9 Nov 2023 17:46:19 -0800 Subject: [PATCH 3/6] Bump next.js version --- examples/nextjs-siwe/package.json | 4 +- examples/nextjs/package.json | 2 +- examples/testbench/package.json | 2 +- packages/connectkit-next-siwe/package.json | 2 +- yarn.lock | 1520 +++++++++++++++++--- 5 files changed, 1296 insertions(+), 234 deletions(-) diff --git a/examples/nextjs-siwe/package.json b/examples/nextjs-siwe/package.json index af8678e6..2b3d5a4a 100644 --- a/examples/nextjs-siwe/package.json +++ b/examples/nextjs-siwe/package.json @@ -11,7 +11,7 @@ "dependencies": { "connectkit": "workspace:packages/connectkit", "connectkit-next-siwe": "workspace:packages/connectkit-next-siwe", - "next": "12.3.0", + "next": "^13.4.4", "react": "^18.0.0", "react-dom": "^18.0.0", "siwe": "^2.1.4", @@ -23,7 +23,7 @@ "@types/react": "^18.0.6", "@types/react-dom": "^18.0.2", "eslint": "8.23.1", - "eslint-config-next": "12.3.0", + "eslint-config-next": "^13", "typescript": "^4.9.5" } } diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 5a0b76d5..3c1a9830 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "connectkit": "workspace:packages/connectkit", - "next": "12.3.0", + "next": "13.4.4", "react": "^18.0.0", "react-dom": "^18.0.0", "viem": "^1.0.0", diff --git a/examples/testbench/package.json b/examples/testbench/package.json index 5687a986..becc92bd 100644 --- a/examples/testbench/package.json +++ b/examples/testbench/package.json @@ -12,7 +12,7 @@ "connectkit": "workspace:packages/connectkit", "connectkit-next-siwe": "workspace:packages/connectkit-next-siwe", "local-ssl-proxy": "^1.3.0", - "next": "13.0.0", + "next": "13.4.4", "react": "^18.0.0", "react-dom": "^18.0.0", "viem": "^1.0.0", diff --git a/packages/connectkit-next-siwe/package.json b/packages/connectkit-next-siwe/package.json index c99e1aa7..d656b3aa 100644 --- a/packages/connectkit-next-siwe/package.json +++ b/packages/connectkit-next-siwe/package.json @@ -41,7 +41,7 @@ }, "peerDependencies": { "connectkit": ">=1.2.0", - "next": ">=12.x", + "next": ">=13.x", "react": "17.x || 18.x", "react-dom": "17.x || 18.x", "siwe": ">=2" diff --git a/yarn.lock b/yarn.lock index 005b1d00..5cf7d829 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1498,6 +1498,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.23.2": + version: 7.23.2 + resolution: "@babel/runtime@npm:7.23.2" + dependencies: + regenerator-runtime: ^0.14.0 + checksum: 6c4df4839ec75ca10175f636d6362f91df8a3137f86b38f6cd3a4c90668a0fe8e9281d320958f4fbd43b394988958585a17c3aab2a4ea6bf7316b22916a371fb + languageName: node + linkType: hard + "@babel/template@npm:^7.18.10, @babel/template@npm:^7.3.3": version: 7.18.10 resolution: "@babel/template@npm:7.18.10" @@ -3131,17 +3140,17 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:12.3.0": - version: 12.3.0 - resolution: "@next/env@npm:12.3.0" - checksum: 9f5d0894de00f8827f887dc737b0beebc1f268cc6809dc0f49acbcc035f4398f2af1dccb2c2f470f2ac31ef450ff5214a1a63ddd5c906b3ea52960824a2552be +"@next/env@npm:13.4.4": + version: 13.4.4 + resolution: "@next/env@npm:13.4.4" + checksum: 9ab9b9ac4e5920cb9911273a776a5e2564844ac735a9c483bf584e090a7f534ce4a8fcda313132d338837e634513f680885c6b4ee811d5175db1b98b0bba4b35 languageName: node linkType: hard -"@next/env@npm:13.0.0": - version: 13.0.0 - resolution: "@next/env@npm:13.0.0" - checksum: 3146f10324366283c22bce0b700a8ae6c7dffad63cb81d698300c1795e7121d1fa0c2b6e0cbf7f7614117b0c3aa15556e88a7727a7b0e59aed054c2dfecb7d58 +"@next/env@npm:13.5.6": + version: 13.5.6 + resolution: "@next/env@npm:13.5.6" + checksum: 5e8f3f6f987a15dad3cd7b2bcac64a6382c2ec372d95d0ce6ab295eb59c9731222017eebf71ff3005932de2571f7543bce7e5c6a8c90030207fb819404138dc2 languageName: node linkType: hard @@ -3154,184 +3163,137 @@ __metadata: languageName: node linkType: hard -"@next/swc-android-arm-eabi@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-android-arm-eabi@npm:12.3.0" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@next/swc-android-arm-eabi@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-android-arm-eabi@npm:13.0.0" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@next/swc-android-arm64@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-android-arm64@npm:12.3.0" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@next/swc-android-arm64@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-android-arm64@npm:13.0.0" - conditions: os=android & cpu=arm64 +"@next/eslint-plugin-next@npm:13.5.6": + version: 13.5.6 + resolution: "@next/eslint-plugin-next@npm:13.5.6" + dependencies: + glob: 7.1.7 + checksum: 58b5ef15d8298c112c72bbbc34a7a5f63637b5a02af7937d86f26223d370c6bd7c8de0eab737851a17dff52c620068a72179eb72b565add071841b720110490f languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-darwin-arm64@npm:12.3.0" +"@next/swc-darwin-arm64@npm:13.4.4": + version: 13.4.4 + resolution: "@next/swc-darwin-arm64@npm:13.4.4" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-darwin-arm64@npm:13.0.0" +"@next/swc-darwin-arm64@npm:13.5.6": + version: 13.5.6 + resolution: "@next/swc-darwin-arm64@npm:13.5.6" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-darwin-x64@npm:12.3.0" +"@next/swc-darwin-x64@npm:13.4.4": + version: 13.4.4 + resolution: "@next/swc-darwin-x64@npm:13.4.4" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-darwin-x64@npm:13.0.0" +"@next/swc-darwin-x64@npm:13.5.6": + version: 13.5.6 + resolution: "@next/swc-darwin-x64@npm:13.5.6" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@next/swc-freebsd-x64@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-freebsd-x64@npm:12.3.0" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@next/swc-freebsd-x64@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-freebsd-x64@npm:13.0.0" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@next/swc-linux-arm-gnueabihf@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-linux-arm-gnueabihf@npm:12.3.0" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@next/swc-linux-arm-gnueabihf@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-linux-arm-gnueabihf@npm:13.0.0" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@next/swc-linux-arm64-gnu@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-linux-arm64-gnu@npm:12.3.0" +"@next/swc-linux-arm64-gnu@npm:13.4.4": + version: 13.4.4 + resolution: "@next/swc-linux-arm64-gnu@npm:13.4.4" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-linux-arm64-gnu@npm:13.0.0" +"@next/swc-linux-arm64-gnu@npm:13.5.6": + version: 13.5.6 + resolution: "@next/swc-linux-arm64-gnu@npm:13.5.6" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-linux-arm64-musl@npm:12.3.0" +"@next/swc-linux-arm64-musl@npm:13.4.4": + version: 13.4.4 + resolution: "@next/swc-linux-arm64-musl@npm:13.4.4" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-linux-arm64-musl@npm:13.0.0" +"@next/swc-linux-arm64-musl@npm:13.5.6": + version: 13.5.6 + resolution: "@next/swc-linux-arm64-musl@npm:13.5.6" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-linux-x64-gnu@npm:12.3.0" +"@next/swc-linux-x64-gnu@npm:13.4.4": + version: 13.4.4 + resolution: "@next/swc-linux-x64-gnu@npm:13.4.4" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-linux-x64-gnu@npm:13.0.0" +"@next/swc-linux-x64-gnu@npm:13.5.6": + version: 13.5.6 + resolution: "@next/swc-linux-x64-gnu@npm:13.5.6" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-linux-x64-musl@npm:12.3.0" +"@next/swc-linux-x64-musl@npm:13.4.4": + version: 13.4.4 + resolution: "@next/swc-linux-x64-musl@npm:13.4.4" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-linux-x64-musl@npm:13.0.0" +"@next/swc-linux-x64-musl@npm:13.5.6": + version: 13.5.6 + resolution: "@next/swc-linux-x64-musl@npm:13.5.6" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-win32-arm64-msvc@npm:12.3.0" +"@next/swc-win32-arm64-msvc@npm:13.4.4": + version: 13.4.4 + resolution: "@next/swc-win32-arm64-msvc@npm:13.4.4" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-win32-arm64-msvc@npm:13.0.0" +"@next/swc-win32-arm64-msvc@npm:13.5.6": + version: 13.5.6 + resolution: "@next/swc-win32-arm64-msvc@npm:13.5.6" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-win32-ia32-msvc@npm:12.3.0" +"@next/swc-win32-ia32-msvc@npm:13.4.4": + version: 13.4.4 + resolution: "@next/swc-win32-ia32-msvc@npm:13.4.4" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-win32-ia32-msvc@npm:13.0.0" +"@next/swc-win32-ia32-msvc@npm:13.5.6": + version: 13.5.6 + resolution: "@next/swc-win32-ia32-msvc@npm:13.5.6" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:12.3.0": - version: 12.3.0 - resolution: "@next/swc-win32-x64-msvc@npm:12.3.0" +"@next/swc-win32-x64-msvc@npm:13.4.4": + version: 13.4.4 + resolution: "@next/swc-win32-x64-msvc@npm:13.4.4" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:13.0.0": - version: 13.0.0 - resolution: "@next/swc-win32-x64-msvc@npm:13.0.0" +"@next/swc-win32-x64-msvc@npm:13.5.6": + version: 13.5.6 + resolution: "@next/swc-win32-x64-msvc@npm:13.5.6" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3599,6 +3561,13 @@ __metadata: languageName: node linkType: hard +"@rushstack/eslint-patch@npm:^1.3.3": + version: 1.5.1 + resolution: "@rushstack/eslint-patch@npm:1.5.1" + checksum: e4c25322312dbaa29e835a7ab4fbac53c8731dd0da65e46646e38945e296429e7fb91c2ef3da5af5d5938d44b0cde1d5290438ebb3dcb015e02b80b5e2530d24 + languageName: node + linkType: hard + "@safe-global/safe-apps-provider@npm:^0.15.2": version: 0.15.2 resolution: "@safe-global/safe-apps-provider@npm:0.15.2" @@ -4069,12 +4038,21 @@ __metadata: languageName: node linkType: hard -"@swc/helpers@npm:0.4.11": - version: 0.4.11 - resolution: "@swc/helpers@npm:0.4.11" +"@swc/helpers@npm:0.5.1": + version: 0.5.1 + resolution: "@swc/helpers@npm:0.5.1" + dependencies: + tslib: ^2.4.0 + checksum: 71e0e27234590435e4c62b97ef5e796f88e786841a38c7116a5e27a3eafa7b9ead7cdec5249b32165902076de78446945311c973e59bddf77c1e24f33a8f272a + languageName: node + linkType: hard + +"@swc/helpers@npm:0.5.2": + version: 0.5.2 + resolution: "@swc/helpers@npm:0.5.2" dependencies: tslib: ^2.4.0 - checksum: 736857d524b41a8a4db81094e9b027f554004e0fa3e86325d85bdb38f7e6459ce022db079edb6c61ba0f46fe8583b3e663e95f7acbd13e51b8da6c34e45bba2e + checksum: 51d7e3d8bd56818c49d6bfbd715f0dbeedc13cf723af41166e45c03e37f109336bbcb57a1f2020f4015957721aeb21e1a7fff281233d797ff7d3dd1f447fa258 languageName: node linkType: hard @@ -4800,6 +4778,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/parser@npm:^5.4.2 || ^6.0.0": + version: 6.10.0 + resolution: "@typescript-eslint/parser@npm:6.10.0" + dependencies: + "@typescript-eslint/scope-manager": 6.10.0 + "@typescript-eslint/types": 6.10.0 + "@typescript-eslint/typescript-estree": 6.10.0 + "@typescript-eslint/visitor-keys": 6.10.0 + debug: ^4.3.4 + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: c4b140932d639b3f3eac892497aa700bcc9101ef268285020757dc9bee670d122de107e936320af99a5c06569e4eb93bccf87f14a9970ceab708c432e748423a + languageName: node + linkType: hard + "@typescript-eslint/scope-manager@npm:5.38.1": version: 5.38.1 resolution: "@typescript-eslint/scope-manager@npm:5.38.1" @@ -4810,6 +4806,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:6.10.0": + version: 6.10.0 + resolution: "@typescript-eslint/scope-manager@npm:6.10.0" + dependencies: + "@typescript-eslint/types": 6.10.0 + "@typescript-eslint/visitor-keys": 6.10.0 + checksum: c9b9483082ae853f10b888cf04d4a14f666ac55e749bfdb7b7f726fc51127a6340b5e2f50d93f134a8854ddcc41f7b116b214753251a8b033d0d84c600439c54 + languageName: node + linkType: hard + "@typescript-eslint/type-utils@npm:5.38.1": version: 5.38.1 resolution: "@typescript-eslint/type-utils@npm:5.38.1" @@ -4834,6 +4840,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:6.10.0": + version: 6.10.0 + resolution: "@typescript-eslint/types@npm:6.10.0" + checksum: e63a9e05eb3d736d02a09131627d5cb89394bf0d9d6b46fb4b620be902d89d73554720be65acbc194787bff9ffcd518c9a6cf88fd63e418232b4181e8d8438df + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:5.38.1": version: 5.38.1 resolution: "@typescript-eslint/typescript-estree@npm:5.38.1" @@ -4852,6 +4865,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:6.10.0": + version: 6.10.0 + resolution: "@typescript-eslint/typescript-estree@npm:6.10.0" + dependencies: + "@typescript-eslint/types": 6.10.0 + "@typescript-eslint/visitor-keys": 6.10.0 + debug: ^4.3.4 + globby: ^11.1.0 + is-glob: ^4.0.3 + semver: ^7.5.4 + ts-api-utils: ^1.0.1 + peerDependenciesMeta: + typescript: + optional: true + checksum: 15bd8d9239a557071d6b03e7aa854b769fcc2dbdff587ed94be7ee8060dabdb05bcae4251df22432f625f82087e7f6986e9aab04f7eea35af694d4edd76a21af + languageName: node + linkType: hard + "@typescript-eslint/utils@npm:5.38.1, @typescript-eslint/utils@npm:^5.13.0": version: 5.38.1 resolution: "@typescript-eslint/utils@npm:5.38.1" @@ -4878,6 +4909,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:6.10.0": + version: 6.10.0 + resolution: "@typescript-eslint/visitor-keys@npm:6.10.0" + dependencies: + "@typescript-eslint/types": 6.10.0 + eslint-visitor-keys: ^3.4.1 + checksum: 9640bfae41e6109ffba31e68b1720382de0538d021261e2fc9e514c83c703084393c0818ca77ed26b950273e45e593371120281e8d4bbd09cb8c2d46c9fe4f03 + languageName: node + linkType: hard + "@vitejs/plugin-react@npm:^2.1.0": version: 2.1.0 resolution: "@vitejs/plugin-react@npm:2.1.0" @@ -6247,6 +6288,25 @@ __metadata: languageName: node linkType: hard +"aria-query@npm:^5.3.0": + version: 5.3.0 + resolution: "aria-query@npm:5.3.0" + dependencies: + dequal: ^2.0.3 + checksum: 305bd73c76756117b59aba121d08f413c7ff5e80fa1b98e217a3443fcddb9a232ee790e24e432b59ae7625aebcf4c47cb01c2cac872994f0b426f5bdfcd96ba9 + languageName: node + linkType: hard + +"array-buffer-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "array-buffer-byte-length@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + is-array-buffer: ^3.0.1 + checksum: 044e101ce150f4804ad19c51d6c4d4cfa505c5b2577bd179256e4aa3f3f6a0a5e9874c78cd428ee566ac574c8a04d7ce21af9fe52e844abfdccb82b33035a7c3 + languageName: node + linkType: hard + "array-flatten@npm:1.1.1": version: 1.1.1 resolution: "array-flatten@npm:1.1.1" @@ -6274,6 +6334,19 @@ __metadata: languageName: node linkType: hard +"array-includes@npm:^3.1.6, array-includes@npm:^3.1.7": + version: 3.1.7 + resolution: "array-includes@npm:3.1.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + is-string: ^1.0.7 + checksum: 06f9e4598fac12a919f7c59a3f04f010ea07f0b7f0585465ed12ef528a60e45f374e79d1bddbb34cdd4338357d00023ddbd0ac18b0be36964f5e726e8965d7fc + languageName: node + linkType: hard + "array-union@npm:^2.1.0": version: 2.1.0 resolution: "array-union@npm:2.1.0" @@ -6281,6 +6354,19 @@ __metadata: languageName: node linkType: hard +"array.prototype.findlastindex@npm:^1.2.3": + version: 1.2.3 + resolution: "array.prototype.findlastindex@npm:1.2.3" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + get-intrinsic: ^1.2.1 + checksum: 31f35d7b370c84db56484618132041a9af401b338f51899c2e78ef7690fbba5909ee7ca3c59a7192085b328cc0c68c6fd1f6d1553db01a689a589ae510f3966e + languageName: node + linkType: hard + "array.prototype.flat@npm:^1.2.3, array.prototype.flat@npm:^1.2.5": version: 1.3.0 resolution: "array.prototype.flat@npm:1.3.0" @@ -6293,6 +6379,18 @@ __metadata: languageName: node linkType: hard +"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2": + version: 1.3.2 + resolution: "array.prototype.flat@npm:1.3.2" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + checksum: 5d6b4bf102065fb3f43764bfff6feb3295d372ce89591e6005df3d0ce388527a9f03c909af6f2a973969a4d178ab232ffc9236654149173e0e187ec3a1a6b87b + languageName: node + linkType: hard + "array.prototype.flatmap@npm:^1.3.0": version: 1.3.0 resolution: "array.prototype.flatmap@npm:1.3.0" @@ -6305,6 +6403,18 @@ __metadata: languageName: node linkType: hard +"array.prototype.flatmap@npm:^1.3.1, array.prototype.flatmap@npm:^1.3.2": + version: 1.3.2 + resolution: "array.prototype.flatmap@npm:1.3.2" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + checksum: ce09fe21dc0bcd4f30271f8144083aa8c13d4639074d6c8dc82054b847c7fc9a0c97f857491f4da19d4003e507172a78f4bcd12903098adac8b9cd374f734be3 + languageName: node + linkType: hard + "array.prototype.reduce@npm:^1.0.4": version: 1.0.4 resolution: "array.prototype.reduce@npm:1.0.4" @@ -6318,6 +6428,34 @@ __metadata: languageName: node linkType: hard +"array.prototype.tosorted@npm:^1.1.1": + version: 1.1.2 + resolution: "array.prototype.tosorted@npm:1.1.2" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + es-shim-unscopables: ^1.0.0 + get-intrinsic: ^1.2.1 + checksum: 3607a7d6b117f0ffa6f4012457b7af0d47d38cf05e01d50e09682fd2fb782a66093a5e5fbbdbad77c8c824794a9d892a51844041641f719ad41e3a974f0764de + languageName: node + linkType: hard + +"arraybuffer.prototype.slice@npm:^1.0.2": + version: 1.0.2 + resolution: "arraybuffer.prototype.slice@npm:1.0.2" + dependencies: + array-buffer-byte-length: ^1.0.0 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + is-array-buffer: ^3.0.2 + is-shared-array-buffer: ^1.0.2 + checksum: c200faf437786f5b2c80d4564ff5481c886a16dee642ef02abdc7306c7edd523d1f01d1dd12b769c7eb42ac9bc53874510db19a92a2c035c0f6696172aafa5d3 + languageName: node + linkType: hard + "arrify@npm:^1.0.1": version: 1.0.1 resolution: "arrify@npm:1.0.1" @@ -6350,6 +6488,13 @@ __metadata: languageName: node linkType: hard +"ast-types-flow@npm:^0.0.8": + version: 0.0.8 + resolution: "ast-types-flow@npm:0.0.8" + checksum: 0a64706609a179233aac23817837abab614f3548c252a2d3d79ea1e10c74aa28a0846e11f466cf72771b6ed8713abc094dcf8c40c3ec4207da163efa525a94a8 + languageName: node + linkType: hard + "async-mutex@npm:^0.2.6": version: 0.2.6 resolution: "async-mutex@npm:0.2.6" @@ -6366,6 +6511,15 @@ __metadata: languageName: node linkType: hard +"asynciterator.prototype@npm:^1.0.0": + version: 1.0.0 + resolution: "asynciterator.prototype@npm:1.0.0" + dependencies: + has-symbols: ^1.0.3 + checksum: e8ebfd9493ac651cf9b4165e9d64030b3da1d17181bb1963627b59e240cdaf021d9b59d44b827dc1dde4e22387ec04c2d0f8720cf58a1c282e34e40cc12721b3 + languageName: node + linkType: hard + "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -6412,6 +6566,13 @@ __metadata: languageName: node linkType: hard +"axe-core@npm:=4.7.0": + version: 4.7.0 + resolution: "axe-core@npm:4.7.0" + checksum: f086bcab42be1761ba2b0b127dec350087f4c3a853bba8dd58f69d898cefaac31a1561da23146f6f3c07954c76171d1f2ce460e555e052d2b02cd79af628fa4a + languageName: node + linkType: hard + "axe-core@npm:^4.4.3": version: 4.4.3 resolution: "axe-core@npm:4.4.3" @@ -6435,6 +6596,15 @@ __metadata: languageName: node linkType: hard +"axobject-query@npm:^3.2.1": + version: 3.2.1 + resolution: "axobject-query@npm:3.2.1" + dependencies: + dequal: ^2.0.3 + checksum: a94047e702b57c91680e6a952ec4a1aaa2cfd0d80ead76bc8c954202980d8c51968a6ea18b4d8010e8e2cf95676533d8022a8ebba9abc1dfe25686721df26fd2 + languageName: node + linkType: hard + "babel-jest@npm:^27.4.2, babel-jest@npm:^27.5.1": version: 27.5.1 resolution: "babel-jest@npm:27.5.1" @@ -6941,6 +7111,15 @@ __metadata: languageName: node linkType: hard +"busboy@npm:1.6.0": + version: 1.6.0 + resolution: "busboy@npm:1.6.0" + dependencies: + streamsearch: ^1.1.0 + checksum: 32801e2c0164e12106bf236291a00795c3c4e4b709ae02132883fe8478ba2ae23743b11c5735a0aae8afe65ac4b6ca4568b91f0d9fed1fdbc32ede824a73746e + languageName: node + linkType: hard + "bytes@npm:3.0.0": version: 3.0.0 resolution: "bytes@npm:3.0.0" @@ -6991,6 +7170,17 @@ __metadata: languageName: node linkType: hard +"call-bind@npm:^1.0.4, call-bind@npm:^1.0.5": + version: 1.0.5 + resolution: "call-bind@npm:1.0.5" + dependencies: + function-bind: ^1.1.2 + get-intrinsic: ^1.2.1 + set-function-length: ^1.1.1 + checksum: 449e83ecbd4ba48e7eaac5af26fea3b50f8f6072202c2dd7c5a6e7a6308f2421abe5e13a3bbd55221087f76320c5e09f25a8fdad1bab2b77c68ae74d92234ea5 + languageName: node + linkType: hard + "callsites@npm:^3.0.0": version: 3.1.0 resolution: "callsites@npm:3.1.0" @@ -7059,7 +7249,7 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001332, caniuse-lite@npm:^1.0.30001400, caniuse-lite@npm:^1.0.30001407": +"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001400, caniuse-lite@npm:^1.0.30001407": version: 1.0.30001414 resolution: "caniuse-lite@npm:1.0.30001414" checksum: 97210cfd15ded093b20c33d35bef9711a88402c3345411dad420c991a41a3e38ad17fd66721e8334c86e9b2e4aa2c1851d3631f1441afb73b92d93b2b8ca890d @@ -7457,7 +7647,7 @@ __metadata: typescript: ^4.9.5 peerDependencies: connectkit: ">=1.2.0" - next: ">=12.x" + next: ">=13.x" react: 17.x || 18.x react-dom: 17.x || 18.x siwe: ">=2" @@ -8128,6 +8318,17 @@ __metadata: languageName: node linkType: hard +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.1": + version: 1.1.1 + resolution: "define-data-property@npm:1.1.1" + dependencies: + get-intrinsic: ^1.2.1 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + checksum: a29855ad3f0630ea82e3c5012c812efa6ca3078d5c2aa8df06b5f597c1cde6f7254692df41945851d903e05a1668607b6d34e778f402b9ff9ffb38111f1a3f0d + languageName: node + linkType: hard + "define-lazy-prop@npm:^2.0.0": version: 2.0.0 resolution: "define-lazy-prop@npm:2.0.0" @@ -8145,6 +8346,17 @@ __metadata: languageName: node linkType: hard +"define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" + dependencies: + define-data-property: ^1.0.1 + has-property-descriptors: ^1.0.0 + object-keys: ^1.1.1 + checksum: b4ccd00597dd46cb2d4a379398f5b19fca84a16f3374e2249201992f36b30f6835949a9429669ee6b41b6e837205a163eadd745e472069e70dfc10f03e5fcc12 + languageName: node + linkType: hard + "defined@npm:^1.0.0": version: 1.0.0 resolution: "defined@npm:1.0.0" @@ -8187,6 +8399,13 @@ __metadata: languageName: node linkType: hard +"dequal@npm:^2.0.3": + version: 2.0.3 + resolution: "dequal@npm:2.0.3" + checksum: 8679b850e1a3d0ebbc46ee780d5df7b478c23f335887464023a631d1b9af051ad4a6595a44220f9ff8ff95a8ddccf019b5ad778a976fd7bbf77383d36f412f90 + languageName: node + linkType: hard + "destroy@npm:1.2.0": version: 1.2.0 resolution: "destroy@npm:1.2.0" @@ -8585,6 +8804,16 @@ __metadata: languageName: node linkType: hard +"enhanced-resolve@npm:^5.12.0": + version: 5.15.0 + resolution: "enhanced-resolve@npm:5.15.0" + dependencies: + graceful-fs: ^4.2.4 + tapable: ^2.2.0 + checksum: fbd8cdc9263be71cc737aa8a7d6c57b43d6aa38f6cc75dde6fcd3598a130cc465f979d2f4d01bb3bf475acb43817749c79f8eef9be048683602ca91ab52e4f11 + languageName: node + linkType: hard + "enquirer@npm:^2.3.0": version: 2.3.6 resolution: "enquirer@npm:2.3.6" @@ -8665,6 +8894,53 @@ __metadata: languageName: node linkType: hard +"es-abstract@npm:^1.22.1": + version: 1.22.3 + resolution: "es-abstract@npm:1.22.3" + dependencies: + array-buffer-byte-length: ^1.0.0 + arraybuffer.prototype.slice: ^1.0.2 + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.5 + es-set-tostringtag: ^2.0.1 + es-to-primitive: ^1.2.1 + function.prototype.name: ^1.1.6 + get-intrinsic: ^1.2.2 + get-symbol-description: ^1.0.0 + globalthis: ^1.0.3 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + hasown: ^2.0.0 + internal-slot: ^1.0.5 + is-array-buffer: ^3.0.2 + is-callable: ^1.2.7 + is-negative-zero: ^2.0.2 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.2 + is-string: ^1.0.7 + is-typed-array: ^1.1.12 + is-weakref: ^1.0.2 + object-inspect: ^1.13.1 + object-keys: ^1.1.1 + object.assign: ^4.1.4 + regexp.prototype.flags: ^1.5.1 + safe-array-concat: ^1.0.1 + safe-regex-test: ^1.0.0 + string.prototype.trim: ^1.2.8 + string.prototype.trimend: ^1.0.7 + string.prototype.trimstart: ^1.0.7 + typed-array-buffer: ^1.0.0 + typed-array-byte-length: ^1.0.0 + typed-array-byte-offset: ^1.0.0 + typed-array-length: ^1.0.4 + unbox-primitive: ^1.0.2 + which-typed-array: ^1.1.13 + checksum: b1bdc962856836f6e72be10b58dc128282bdf33771c7a38ae90419d920fc3b36cc5d2b70a222ad8016e3fc322c367bf4e9e89fc2bc79b7e933c05b218e83d79a + languageName: node + linkType: hard + "es-array-method-boxes-properly@npm:^1.0.0": version: 1.0.0 resolution: "es-array-method-boxes-properly@npm:1.0.0" @@ -8672,6 +8948,28 @@ __metadata: languageName: node linkType: hard +"es-iterator-helpers@npm:^1.0.12, es-iterator-helpers@npm:^1.0.15": + version: 1.0.15 + resolution: "es-iterator-helpers@npm:1.0.15" + dependencies: + asynciterator.prototype: ^1.0.0 + call-bind: ^1.0.2 + define-properties: ^1.2.1 + es-abstract: ^1.22.1 + es-set-tostringtag: ^2.0.1 + function-bind: ^1.1.1 + get-intrinsic: ^1.2.1 + globalthis: ^1.0.3 + has-property-descriptors: ^1.0.0 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + internal-slot: ^1.0.5 + iterator.prototype: ^1.1.2 + safe-array-concat: ^1.0.1 + checksum: 50081ae5c549efe62e5c1d244df0194b40b075f7897fc2116b7e1aa437eb3c41f946d2afda18c33f9b31266ec544765932542765af839f76fa6d7b7855d1e0e1 + languageName: node + linkType: hard + "es-module-lexer@npm:^0.9.0": version: 0.9.3 resolution: "es-module-lexer@npm:0.9.3" @@ -8679,6 +8977,17 @@ __metadata: languageName: node linkType: hard +"es-set-tostringtag@npm:^2.0.1": + version: 2.0.2 + resolution: "es-set-tostringtag@npm:2.0.2" + dependencies: + get-intrinsic: ^1.2.2 + has-tostringtag: ^1.0.0 + hasown: ^2.0.0 + checksum: afcec3a4c9890ae14d7ec606204858441c801ff84f312538e1d1ccf1e5493c8b17bd672235df785f803756472cb4f2d49b87bde5237aef33411e74c22f194e07 + languageName: node + linkType: hard + "es-shim-unscopables@npm:^1.0.0": version: 1.0.0 resolution: "es-shim-unscopables@npm:1.0.0" @@ -9009,6 +9318,29 @@ __metadata: languageName: node linkType: hard +"eslint-config-next@npm:^13": + version: 13.5.6 + resolution: "eslint-config-next@npm:13.5.6" + dependencies: + "@next/eslint-plugin-next": 13.5.6 + "@rushstack/eslint-patch": ^1.3.3 + "@typescript-eslint/parser": ^5.4.2 || ^6.0.0 + eslint-import-resolver-node: ^0.3.6 + eslint-import-resolver-typescript: ^3.5.2 + eslint-plugin-import: ^2.28.1 + eslint-plugin-jsx-a11y: ^6.7.1 + eslint-plugin-react: ^7.33.2 + eslint-plugin-react-hooks: ^4.5.0 || 5.0.0-canary-7118f5dd7-20230705 + peerDependencies: + eslint: ^7.23.0 || ^8.0.0 + typescript: ">=3.3.1" + peerDependenciesMeta: + typescript: + optional: true + checksum: 3399d3c18d48d01a2e662b9da699d36641d32b859d5bc7541f9fb063de49f5fbefb8cb2226d3906c268cc667bc536e353fce6c7334953961eb030c73547fa0f9 + languageName: node + linkType: hard + "eslint-config-react-app@npm:^7.0.1": version: 7.0.1 resolution: "eslint-config-react-app@npm:7.0.1" @@ -9043,9 +9375,20 @@ __metadata: languageName: node linkType: hard -"eslint-import-resolver-typescript@npm:^2.7.1": - version: 2.7.1 - resolution: "eslint-import-resolver-typescript@npm:2.7.1" +"eslint-import-resolver-node@npm:^0.3.9": + version: 0.3.9 + resolution: "eslint-import-resolver-node@npm:0.3.9" + dependencies: + debug: ^3.2.7 + is-core-module: ^2.13.0 + resolve: ^1.22.4 + checksum: 439b91271236b452d478d0522a44482e8c8540bf9df9bd744062ebb89ab45727a3acd03366a6ba2bdbcde8f9f718bab7fe8db64688aca75acf37e04eafd25e22 + languageName: node + linkType: hard + +"eslint-import-resolver-typescript@npm:^2.7.1": + version: 2.7.1 + resolution: "eslint-import-resolver-typescript@npm:2.7.1" dependencies: debug: ^4.3.4 glob: ^7.2.0 @@ -9059,6 +9402,24 @@ __metadata: languageName: node linkType: hard +"eslint-import-resolver-typescript@npm:^3.5.2": + version: 3.6.1 + resolution: "eslint-import-resolver-typescript@npm:3.6.1" + dependencies: + debug: ^4.3.4 + enhanced-resolve: ^5.12.0 + eslint-module-utils: ^2.7.4 + fast-glob: ^3.3.1 + get-tsconfig: ^4.5.0 + is-core-module: ^2.11.0 + is-glob: ^4.0.3 + peerDependencies: + eslint: "*" + eslint-plugin-import: "*" + checksum: 454fa0646533050fb57f13d27daf8c71f51b0bb9156d6a461290ccb8576d892209fcc6702a89553f3f5ea8e5b407395ca2e5de169a952c953685f1f7c46b4496 + languageName: node + linkType: hard + "eslint-module-utils@npm:^2.7.3": version: 2.7.4 resolution: "eslint-module-utils@npm:2.7.4" @@ -9071,6 +9432,18 @@ __metadata: languageName: node linkType: hard +"eslint-module-utils@npm:^2.7.4, eslint-module-utils@npm:^2.8.0": + version: 2.8.0 + resolution: "eslint-module-utils@npm:2.8.0" + dependencies: + debug: ^3.2.7 + peerDependenciesMeta: + eslint: + optional: true + checksum: 74c6dfea7641ebcfe174be61168541a11a14aa8d72e515f5f09af55cd0d0862686104b0524aa4b8e0ce66418a44aa38a94d2588743db5fd07a6b49ffd16921d2 + languageName: node + linkType: hard + "eslint-plugin-flowtype@npm:^8.0.3": version: 8.0.3 resolution: "eslint-plugin-flowtype@npm:8.0.3" @@ -9108,6 +9481,33 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-import@npm:^2.28.1": + version: 2.29.0 + resolution: "eslint-plugin-import@npm:2.29.0" + dependencies: + array-includes: ^3.1.7 + array.prototype.findlastindex: ^1.2.3 + array.prototype.flat: ^1.3.2 + array.prototype.flatmap: ^1.3.2 + debug: ^3.2.7 + doctrine: ^2.1.0 + eslint-import-resolver-node: ^0.3.9 + eslint-module-utils: ^2.8.0 + hasown: ^2.0.0 + is-core-module: ^2.13.1 + is-glob: ^4.0.3 + minimatch: ^3.1.2 + object.fromentries: ^2.0.7 + object.groupby: ^1.0.1 + object.values: ^1.1.7 + semver: ^6.3.1 + tsconfig-paths: ^3.14.2 + peerDependencies: + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + checksum: 19ee541fb95eb7a796f3daebe42387b8d8262bbbcc4fd8a6e92f63a12035f3d2c6cb8bc0b6a70864fa14b1b50ed6b8e6eed5833e625e16cb6bb98b665beff269 + languageName: node + linkType: hard + "eslint-plugin-jest@npm:^25.3.0": version: 25.7.0 resolution: "eslint-plugin-jest@npm:25.7.0" @@ -9148,6 +9548,32 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-jsx-a11y@npm:^6.7.1": + version: 6.8.0 + resolution: "eslint-plugin-jsx-a11y@npm:6.8.0" + dependencies: + "@babel/runtime": ^7.23.2 + aria-query: ^5.3.0 + array-includes: ^3.1.7 + array.prototype.flatmap: ^1.3.2 + ast-types-flow: ^0.0.8 + axe-core: =4.7.0 + axobject-query: ^3.2.1 + damerau-levenshtein: ^1.0.8 + emoji-regex: ^9.2.2 + es-iterator-helpers: ^1.0.15 + hasown: ^2.0.0 + jsx-ast-utils: ^3.3.5 + language-tags: ^1.0.9 + minimatch: ^3.1.2 + object.entries: ^1.1.7 + object.fromentries: ^2.0.7 + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + checksum: 3dec00e2a3089c4c61ac062e4196a70985fb7eda1fd67fe035363d92578debde92fdb8ed2e472321fc0d71e75f4a1e8888c6a3218c14dd93c8e8d19eb6f51554 + languageName: node + linkType: hard + "eslint-plugin-react-hooks@npm:^4.3.0, eslint-plugin-react-hooks@npm:^4.5.0": version: 4.6.0 resolution: "eslint-plugin-react-hooks@npm:4.6.0" @@ -9157,6 +9583,15 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-react-hooks@npm:^4.5.0 || 5.0.0-canary-7118f5dd7-20230705": + version: 5.0.0-canary-7118f5dd7-20230705 + resolution: "eslint-plugin-react-hooks@npm:5.0.0-canary-7118f5dd7-20230705" + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + checksum: 20e334e60bf5e56cf9f760598411847525c3ff826e6ae7757c8efdc60b33d47a97ddbe1b94ce95956ea9f7bbef37995b19c716be50bd44e6a1e789cba08b6224 + languageName: node + linkType: hard + "eslint-plugin-react@npm:^7.27.1, eslint-plugin-react@npm:^7.29.4": version: 7.31.8 resolution: "eslint-plugin-react@npm:7.31.8" @@ -9181,6 +9616,32 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-react@npm:^7.33.2": + version: 7.33.2 + resolution: "eslint-plugin-react@npm:7.33.2" + dependencies: + array-includes: ^3.1.6 + array.prototype.flatmap: ^1.3.1 + array.prototype.tosorted: ^1.1.1 + doctrine: ^2.1.0 + es-iterator-helpers: ^1.0.12 + estraverse: ^5.3.0 + jsx-ast-utils: ^2.4.1 || ^3.0.0 + minimatch: ^3.1.2 + object.entries: ^1.1.6 + object.fromentries: ^2.0.6 + object.hasown: ^1.1.2 + object.values: ^1.1.6 + prop-types: ^15.8.1 + resolve: ^2.0.0-next.4 + semver: ^6.3.1 + string.prototype.matchall: ^4.0.8 + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + checksum: b4c3d76390b0ae6b6f9fed78170604cc2c04b48e6778a637db339e8e3911ec9ef22510b0ae77c429698151d0f1b245f282177f384105b6830e7b29b9c9b26610 + languageName: node + linkType: hard + "eslint-plugin-testing-library@npm:^5.0.1": version: 5.7.0 resolution: "eslint-plugin-testing-library@npm:5.7.0" @@ -9237,6 +9698,13 @@ __metadata: languageName: node linkType: hard +"eslint-visitor-keys@npm:^3.4.1": + version: 3.4.3 + resolution: "eslint-visitor-keys@npm:3.4.3" + checksum: 36e9ef87fca698b6fd7ca5ca35d7b2b6eeaaf106572e2f7fd31c12d3bfdaccdb587bba6d3621067e5aece31c8c3a348b93922ab8f7b2cbc6aaab5e1d89040c60 + languageName: node + linkType: hard + "eslint-webpack-plugin@npm:^3.1.1": version: 3.2.0 resolution: "eslint-webpack-plugin@npm:3.2.0" @@ -9690,6 +10158,19 @@ __metadata: languageName: node linkType: hard +"fast-glob@npm:^3.3.1": + version: 3.3.2 + resolution: "fast-glob@npm:3.3.2" + dependencies: + "@nodelib/fs.stat": ^2.0.2 + "@nodelib/fs.walk": ^1.2.3 + glob-parent: ^5.1.2 + merge2: ^1.3.0 + micromatch: ^4.0.4 + checksum: 900e4979f4dbc3313840078419245621259f349950411ca2fa445a2f9a1a6d98c3b5e7e0660c5ccd563aa61abe133a21765c6c0dec8e57da1ba71d8000b05ec1 + languageName: node + linkType: hard + "fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" @@ -10100,6 +10581,13 @@ __metadata: languageName: node linkType: hard +"function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 2b0ff4ce708d99715ad14a6d1f894e2a83242e4a52ccfcefaee5e40050562e5f6dafc1adbb4ce2d4ab47279a45dc736ab91ea5042d843c3c092820dfe032efb1 + languageName: node + linkType: hard + "function.prototype.name@npm:^1.1.5": version: 1.1.5 resolution: "function.prototype.name@npm:1.1.5" @@ -10112,7 +10600,19 @@ __metadata: languageName: node linkType: hard -"functions-have-names@npm:^1.2.2": +"function.prototype.name@npm:^1.1.6": + version: 1.1.6 + resolution: "function.prototype.name@npm:1.1.6" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + functions-have-names: ^1.2.3 + checksum: 7a3f9bd98adab09a07f6e1f03da03d3f7c26abbdeaeee15223f6c04a9fb5674792bdf5e689dac19b97ac71de6aad2027ba3048a9b883aa1b3173eed6ab07f479 + languageName: node + linkType: hard + +"functions-have-names@npm:^1.2.2, functions-have-names@npm:^1.2.3": version: 1.2.3 resolution: "functions-have-names@npm:1.2.3" checksum: c3f1f5ba20f4e962efb71344ce0a40722163e85bee2101ce25f88214e78182d2d2476aa85ef37950c579eb6cf6ee811c17b3101bb84004bb75655f3e33f3fdb5 @@ -10160,6 +10660,18 @@ __metadata: languageName: node linkType: hard +"get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": + version: 1.2.2 + resolution: "get-intrinsic@npm:1.2.2" + dependencies: + function-bind: ^1.1.2 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + hasown: ^2.0.0 + checksum: 447ff0724df26829908dc033b62732359596fcf66027bc131ab37984afb33842d9cd458fd6cecadfe7eac22fd8a54b349799ed334cf2726025c921c7250e7417 + languageName: node + linkType: hard + "get-own-enumerable-property-symbols@npm:^3.0.0": version: 3.0.2 resolution: "get-own-enumerable-property-symbols@npm:3.0.2" @@ -10191,6 +10703,15 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.5.0": + version: 4.7.2 + resolution: "get-tsconfig@npm:4.7.2" + dependencies: + resolve-pkg-maps: ^1.0.0 + checksum: 172358903250eff0103943f816e8a4e51d29b8e5449058bdf7266714a908a48239f6884308bd3a6ff28b09f692b9533dbebfd183ab63e4e14f073cda91f1bca9 + languageName: node + linkType: hard + "glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" @@ -10293,6 +10814,15 @@ __metadata: languageName: node linkType: hard +"globalthis@npm:^1.0.3": + version: 1.0.3 + resolution: "globalthis@npm:1.0.3" + dependencies: + define-properties: ^1.1.3 + checksum: fbd7d760dc464c886d0196166d92e5ffb4c84d0730846d6621a39fbbc068aeeb9c8d1421ad330e94b7bca4bb4ea092f5f21f3d36077812af5d098b4dc006c998 + languageName: node + linkType: hard + "globby@npm:^11.0.0, globby@npm:^11.0.4, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" @@ -10307,6 +10837,15 @@ __metadata: languageName: node linkType: hard +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" + dependencies: + get-intrinsic: ^1.1.3 + checksum: a5ccfb8806e0917a94e0b3de2af2ea4979c1da920bc381667c260e00e7cafdbe844e2cb9c5bcfef4e5412e8bf73bab837285bc35c7ba73aaaf0134d4583393a6 + languageName: node + linkType: hard + "graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.5, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.10 resolution: "graceful-fs@npm:4.2.10" @@ -10397,6 +10936,13 @@ __metadata: languageName: node linkType: hard +"has-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "has-proto@npm:1.0.1" + checksum: febc5b5b531de8022806ad7407935e2135f1cc9e64636c3916c6842bd7995994ca3b29871ecd7954bd35f9e2986c17b3b227880484d22259e2f8e6ce63fd383e + languageName: node + linkType: hard + "has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": version: 1.0.3 resolution: "has-symbols@npm:1.0.3" @@ -10439,6 +10985,15 @@ __metadata: languageName: node linkType: hard +"hasown@npm:^2.0.0": + version: 2.0.0 + resolution: "hasown@npm:2.0.0" + dependencies: + function-bind: ^1.1.2 + checksum: 6151c75ca12554565098641c98a40f4cc86b85b0fd5b6fe92360967e4605a4f9610f7757260b4e8098dd1c2ce7f4b095f2006fe72a570e3b6d2d28de0298c176 + languageName: node + linkType: hard + "he@npm:^1.2.0": version: 1.2.0 resolution: "he@npm:1.2.0" @@ -10847,6 +11402,17 @@ __metadata: languageName: node linkType: hard +"internal-slot@npm:^1.0.5": + version: 1.0.6 + resolution: "internal-slot@npm:1.0.6" + dependencies: + get-intrinsic: ^1.2.2 + hasown: ^2.0.0 + side-channel: ^1.0.4 + checksum: 7872454888047553ce97a3fa1da7cc054a28ec5400a9c2e9f4dbe4fe7c1d041cb8e8301467614b80d4246d50377aad2fb58860b294ed74d6700cc346b6f89549 + languageName: node + linkType: hard + "ip@npm:^2.0.0": version: 2.0.0 resolution: "ip@npm:2.0.0" @@ -10909,6 +11475,17 @@ __metadata: languageName: node linkType: hard +"is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": + version: 3.0.2 + resolution: "is-array-buffer@npm:3.0.2" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.0 + is-typed-array: ^1.1.10 + checksum: dcac9dda66ff17df9cabdc58214172bf41082f956eab30bb0d86bc0fab1e44b690fc8e1f855cf2481245caf4e8a5a006a982a71ddccec84032ed41f9d8da8c14 + languageName: node + linkType: hard + "is-arrayish@npm:^0.2.1": version: 0.2.1 resolution: "is-arrayish@npm:0.2.1" @@ -10916,6 +11493,15 @@ __metadata: languageName: node linkType: hard +"is-async-function@npm:^2.0.0": + version: 2.0.0 + resolution: "is-async-function@npm:2.0.0" + dependencies: + has-tostringtag: ^1.0.0 + checksum: e3471d95e6c014bf37cad8a93f2f4b6aac962178e0a5041e8903147166964fdc1c5c1d2ef87e86d77322c370ca18f2ea004fa7420581fa747bcaf7c223069dbd + languageName: node + linkType: hard + "is-bigint@npm:^1.0.1": version: 1.0.4 resolution: "is-bigint@npm:1.0.4" @@ -10953,7 +11539,7 @@ __metadata: languageName: node linkType: hard -"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.6": +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.6, is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" checksum: 61fd57d03b0d984e2ed3720fb1c7a897827ea174bd44402878e059542ea8c4aeedee0ea0985998aa5cc2736b2fa6e271c08587addb5b3959ac52cf665173d1ac @@ -10971,6 +11557,15 @@ __metadata: languageName: node linkType: hard +"is-core-module@npm:^2.11.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1": + version: 2.13.1 + resolution: "is-core-module@npm:2.13.1" + dependencies: + hasown: ^2.0.0 + checksum: 256559ee8a9488af90e4bad16f5583c6d59e92f0742e9e8bb4331e758521ee86b810b93bae44f390766ffbc518a0488b18d9dab7da9a5ff997d499efc9403f7c + languageName: node + linkType: hard + "is-core-module@npm:^2.8.1, is-core-module@npm:^2.9.0": version: 2.10.0 resolution: "is-core-module@npm:2.10.0" @@ -10980,7 +11575,7 @@ __metadata: languageName: node linkType: hard -"is-date-object@npm:^1.0.1": +"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": version: 1.0.5 resolution: "is-date-object@npm:1.0.5" dependencies: @@ -11005,6 +11600,15 @@ __metadata: languageName: node linkType: hard +"is-finalizationregistry@npm:^1.0.2": + version: 1.0.2 + resolution: "is-finalizationregistry@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + checksum: 4f243a8e06228cd45bdab8608d2cb7abfc20f6f0189c8ac21ea8d603f1f196eabd531ce0bb8e08cbab047e9845ef2c191a3761c9a17ad5cabf8b35499c4ad35d + languageName: node + linkType: hard + "is-fullwidth-code-point@npm:^3.0.0": version: 3.0.0 resolution: "is-fullwidth-code-point@npm:3.0.0" @@ -11019,7 +11623,7 @@ __metadata: languageName: node linkType: hard -"is-generator-function@npm:^1.0.7": +"is-generator-function@npm:^1.0.10, is-generator-function@npm:^1.0.7": version: 1.0.10 resolution: "is-generator-function@npm:1.0.10" dependencies: @@ -11044,6 +11648,13 @@ __metadata: languageName: node linkType: hard +"is-map@npm:^2.0.1": + version: 2.0.2 + resolution: "is-map@npm:2.0.2" + checksum: ace3d0ecd667bbdefdb1852de601268f67f2db725624b1958f279316e13fecb8fa7df91fd60f690d7417b4ec180712f5a7ee967008e27c65cfd475cc84337728 + languageName: node + linkType: hard + "is-module@npm:^1.0.0": version: 1.0.0 resolution: "is-module@npm:1.0.0" @@ -11126,6 +11737,13 @@ __metadata: languageName: node linkType: hard +"is-set@npm:^2.0.1": + version: 2.0.2 + resolution: "is-set@npm:2.0.2" + checksum: b64343faf45e9387b97a6fd32be632ee7b269bd8183701f3b3f5b71a7cf00d04450ed8669d0bd08753e08b968beda96fca73a10fd0ff56a32603f64deba55a57 + languageName: node + linkType: hard + "is-shared-array-buffer@npm:^1.0.2": version: 1.0.2 resolution: "is-shared-array-buffer@npm:1.0.2" @@ -11169,6 +11787,15 @@ __metadata: languageName: node linkType: hard +"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.12": + version: 1.1.12 + resolution: "is-typed-array@npm:1.1.12" + dependencies: + which-typed-array: ^1.1.11 + checksum: 4c89c4a3be07186caddadf92197b17fda663a9d259ea0d44a85f171558270d36059d1c386d34a12cba22dfade5aba497ce22778e866adc9406098c8fc4771796 + languageName: node + linkType: hard + "is-typed-array@npm:^1.1.3, is-typed-array@npm:^1.1.9": version: 1.1.9 resolution: "is-typed-array@npm:1.1.9" @@ -11189,6 +11816,13 @@ __metadata: languageName: node linkType: hard +"is-weakmap@npm:^2.0.1": + version: 2.0.1 + resolution: "is-weakmap@npm:2.0.1" + checksum: 1222bb7e90c32bdb949226e66d26cb7bce12e1e28e3e1b40bfa6b390ba3e08192a8664a703dff2a00a84825f4e022f9cd58c4599ff9981ab72b1d69479f4f7f6 + languageName: node + linkType: hard + "is-weakref@npm:^1.0.2": version: 1.0.2 resolution: "is-weakref@npm:1.0.2" @@ -11198,6 +11832,16 @@ __metadata: languageName: node linkType: hard +"is-weakset@npm:^2.0.1": + version: 2.0.2 + resolution: "is-weakset@npm:2.0.2" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.1 + checksum: 5d8698d1fa599a0635d7ca85be9c26d547b317ed8fd83fc75f03efbe75d50001b5eececb1e9971de85fcde84f69ae6f8346bc92d20d55d46201d328e4c74a367 + languageName: node + linkType: hard + "is-windows@npm:^1.0.0": version: 1.0.2 resolution: "is-windows@npm:1.0.2" @@ -11214,6 +11858,13 @@ __metadata: languageName: node linkType: hard +"isarray@npm:^2.0.5": + version: 2.0.5 + resolution: "isarray@npm:2.0.5" + checksum: bd5bbe4104438c4196ba58a54650116007fa0262eccef13a4c55b2e09a5b36b59f1e75b9fcc49883dd9d4953892e6fc007eef9e9155648ceea036e184b0f930a + languageName: node + linkType: hard + "isarray@npm:~1.0.0": version: 1.0.0 resolution: "isarray@npm:1.0.0" @@ -11298,6 +11949,19 @@ __metadata: languageName: node linkType: hard +"iterator.prototype@npm:^1.1.2": + version: 1.1.2 + resolution: "iterator.prototype@npm:1.1.2" + dependencies: + define-properties: ^1.2.1 + get-intrinsic: ^1.2.1 + has-symbols: ^1.0.3 + reflect.getprototypeof: ^1.0.4 + set-function-name: ^2.0.1 + checksum: d8a507e2ccdc2ce762e8a1d3f4438c5669160ac72b88b648e59a688eec6bc4e64b22338e74000518418d9e693faf2a092d2af21b9ec7dbf7763b037a54701168 + languageName: node + linkType: hard + "jake@npm:^10.8.5": version: 10.8.5 resolution: "jake@npm:10.8.5" @@ -12151,6 +12815,17 @@ __metadata: languageName: node linkType: hard +"json5@npm:^1.0.2": + version: 1.0.2 + resolution: "json5@npm:1.0.2" + dependencies: + minimist: ^1.2.0 + bin: + json5: lib/cli.js + checksum: 866458a8c58a95a49bef3adba929c625e82532bcff1fe93f01d29cb02cac7c3fe1f4b79951b7792c2da9de0b32871a8401a6e3c5b36778ad852bf5b8a61165d7 + languageName: node + linkType: hard + "json5@npm:^2.1.2, json5@npm:^2.2.0, json5@npm:^2.2.1": version: 2.2.1 resolution: "json5@npm:2.2.1" @@ -12209,6 +12884,18 @@ __metadata: languageName: node linkType: hard +"jsx-ast-utils@npm:^3.3.5": + version: 3.3.5 + resolution: "jsx-ast-utils@npm:3.3.5" + dependencies: + array-includes: ^3.1.6 + array.prototype.flat: ^1.3.1 + object.assign: ^4.1.4 + object.values: ^1.1.6 + checksum: f4b05fa4d7b5234230c905cfa88d36dc8a58a6666975a3891429b1a8cdc8a140bca76c297225cb7a499fad25a2c052ac93934449a2c31a44fc9edd06c773780a + languageName: node + linkType: hard + "keccak@npm:^3.0.1": version: 3.0.2 resolution: "keccak@npm:3.0.2" @@ -12256,7 +12943,7 @@ __metadata: languageName: node linkType: hard -"language-subtag-registry@npm:~0.3.2": +"language-subtag-registry@npm:^0.3.20, language-subtag-registry@npm:~0.3.2": version: 0.3.22 resolution: "language-subtag-registry@npm:0.3.22" checksum: 8ab70a7e0e055fe977ac16ea4c261faec7205ac43db5e806f72e5b59606939a3b972c4bd1e10e323b35d6ffa97c3e1c4c99f6553069dad2dfdd22020fa3eb56a @@ -12272,6 +12959,15 @@ __metadata: languageName: node linkType: hard +"language-tags@npm:^1.0.9": + version: 1.0.9 + resolution: "language-tags@npm:1.0.9" + dependencies: + language-subtag-registry: ^0.3.20 + checksum: 57c530796dc7179914dee71bc94f3747fd694612480241d0453a063777265dfe3a951037f7acb48f456bf167d6eb419d4c00263745326b3ba1cdcf4657070e78 + languageName: node + linkType: hard + "leven@npm:^3.1.0": version: 3.1.0 resolution: "leven@npm:3.1.0" @@ -12963,6 +13659,15 @@ __metadata: languageName: node linkType: hard +"nanoid@npm:^3.3.6": + version: 3.3.7 + resolution: "nanoid@npm:3.3.7" + bin: + nanoid: bin/nanoid.cjs + checksum: d36c427e530713e4ac6567d488b489a36582ef89da1d6d4e3b87eded11eb10d7042a877958c6f104929809b2ab0bafa17652b076cdf84324aa75b30b722204f2 + languageName: node + linkType: hard + "natural-compare@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare@npm:1.4.0" @@ -12984,48 +13689,37 @@ __metadata: languageName: node linkType: hard -"next@npm:12.3.0": - version: 12.3.0 - resolution: "next@npm:12.3.0" - dependencies: - "@next/env": 12.3.0 - "@next/swc-android-arm-eabi": 12.3.0 - "@next/swc-android-arm64": 12.3.0 - "@next/swc-darwin-arm64": 12.3.0 - "@next/swc-darwin-x64": 12.3.0 - "@next/swc-freebsd-x64": 12.3.0 - "@next/swc-linux-arm-gnueabihf": 12.3.0 - "@next/swc-linux-arm64-gnu": 12.3.0 - "@next/swc-linux-arm64-musl": 12.3.0 - "@next/swc-linux-x64-gnu": 12.3.0 - "@next/swc-linux-x64-musl": 12.3.0 - "@next/swc-win32-arm64-msvc": 12.3.0 - "@next/swc-win32-ia32-msvc": 12.3.0 - "@next/swc-win32-x64-msvc": 12.3.0 - "@swc/helpers": 0.4.11 - caniuse-lite: ^1.0.30001332 +"next@npm:13.4.4": + version: 13.4.4 + resolution: "next@npm:13.4.4" + dependencies: + "@next/env": 13.4.4 + "@next/swc-darwin-arm64": 13.4.4 + "@next/swc-darwin-x64": 13.4.4 + "@next/swc-linux-arm64-gnu": 13.4.4 + "@next/swc-linux-arm64-musl": 13.4.4 + "@next/swc-linux-x64-gnu": 13.4.4 + "@next/swc-linux-x64-musl": 13.4.4 + "@next/swc-win32-arm64-msvc": 13.4.4 + "@next/swc-win32-ia32-msvc": 13.4.4 + "@next/swc-win32-x64-msvc": 13.4.4 + "@swc/helpers": 0.5.1 + busboy: 1.6.0 + caniuse-lite: ^1.0.30001406 postcss: 8.4.14 - styled-jsx: 5.0.6 - use-sync-external-store: 1.2.0 + styled-jsx: 5.1.1 + zod: 3.21.4 peerDependencies: + "@opentelemetry/api": ^1.1.0 fibers: ">= 3.1.0" - node-sass: ^6.0.0 || ^7.0.0 - react: ^17.0.2 || ^18.0.0-0 - react-dom: ^17.0.2 || ^18.0.0-0 + react: ^18.2.0 + react-dom: ^18.2.0 sass: ^1.3.0 dependenciesMeta: - "@next/swc-android-arm-eabi": - optional: true - "@next/swc-android-arm64": - optional: true "@next/swc-darwin-arm64": optional: true "@next/swc-darwin-x64": optional: true - "@next/swc-freebsd-x64": - optional: true - "@next/swc-linux-arm-gnueabihf": - optional: true "@next/swc-linux-arm64-gnu": optional: true "@next/swc-linux-arm64-musl": @@ -13041,60 +13735,48 @@ __metadata: "@next/swc-win32-x64-msvc": optional: true peerDependenciesMeta: - fibers: + "@opentelemetry/api": optional: true - node-sass: + fibers: optional: true sass: optional: true bin: next: dist/bin/next - checksum: eafed4732d1d3cfdc4ccfdd6e1047d24b29f0d19587a03d46581e77988e4a081d206ad373de98858dfbc7109308fe1ad39d0b8443ea19276fb11fa5634080841 - languageName: node - linkType: hard - -"next@npm:13.0.0": - version: 13.0.0 - resolution: "next@npm:13.0.0" - dependencies: - "@next/env": 13.0.0 - "@next/swc-android-arm-eabi": 13.0.0 - "@next/swc-android-arm64": 13.0.0 - "@next/swc-darwin-arm64": 13.0.0 - "@next/swc-darwin-x64": 13.0.0 - "@next/swc-freebsd-x64": 13.0.0 - "@next/swc-linux-arm-gnueabihf": 13.0.0 - "@next/swc-linux-arm64-gnu": 13.0.0 - "@next/swc-linux-arm64-musl": 13.0.0 - "@next/swc-linux-x64-gnu": 13.0.0 - "@next/swc-linux-x64-musl": 13.0.0 - "@next/swc-win32-arm64-msvc": 13.0.0 - "@next/swc-win32-ia32-msvc": 13.0.0 - "@next/swc-win32-x64-msvc": 13.0.0 - "@swc/helpers": 0.4.11 + checksum: d84686f3ca313c57d283872a2946a5c18ecd656c4235ad879cbaa0f2f2886c9bcff94656ff07c4998fa672f40023978235150ce760e4c5b1edab6feaa7ed9fa9 + languageName: node + linkType: hard + +"next@npm:^13.4.4": + version: 13.5.6 + resolution: "next@npm:13.5.6" + dependencies: + "@next/env": 13.5.6 + "@next/swc-darwin-arm64": 13.5.6 + "@next/swc-darwin-x64": 13.5.6 + "@next/swc-linux-arm64-gnu": 13.5.6 + "@next/swc-linux-arm64-musl": 13.5.6 + "@next/swc-linux-x64-gnu": 13.5.6 + "@next/swc-linux-x64-musl": 13.5.6 + "@next/swc-win32-arm64-msvc": 13.5.6 + "@next/swc-win32-ia32-msvc": 13.5.6 + "@next/swc-win32-x64-msvc": 13.5.6 + "@swc/helpers": 0.5.2 + busboy: 1.6.0 caniuse-lite: ^1.0.30001406 - postcss: 8.4.14 - styled-jsx: 5.1.0 - use-sync-external-store: 1.2.0 + postcss: 8.4.31 + styled-jsx: 5.1.1 + watchpack: 2.4.0 peerDependencies: - fibers: ">= 3.1.0" - node-sass: ^6.0.0 || ^7.0.0 - react: ^18.0.0-0 - react-dom: ^18.0.0-0 + "@opentelemetry/api": ^1.1.0 + react: ^18.2.0 + react-dom: ^18.2.0 sass: ^1.3.0 dependenciesMeta: - "@next/swc-android-arm-eabi": - optional: true - "@next/swc-android-arm64": - optional: true "@next/swc-darwin-arm64": optional: true "@next/swc-darwin-x64": optional: true - "@next/swc-freebsd-x64": - optional: true - "@next/swc-linux-arm-gnueabihf": - optional: true "@next/swc-linux-arm64-gnu": optional: true "@next/swc-linux-arm64-musl": @@ -13110,15 +13792,13 @@ __metadata: "@next/swc-win32-x64-msvc": optional: true peerDependenciesMeta: - fibers: - optional: true - node-sass: + "@opentelemetry/api": optional: true sass: optional: true bin: next: dist/bin/next - checksum: 7b5c84728783433c07e3eac65d5d85434f6c056a3e55c417c7636e08d8e1af2532d83f75b8448ddc5c9525145a6a7c93e8482744ee3f2d647841b152306da939 + checksum: c869b0014ae921ada3bf22301985027ec320aebcd6aa9c16e8afbded68bb8def5874cca034c680e8c351a79578f1e514971d02777f6f0a5a1d7290f25970ac0d languageName: node linkType: hard @@ -13132,8 +13812,8 @@ __metadata: connectkit: "workspace:packages/connectkit" connectkit-next-siwe: "workspace:packages/connectkit-next-siwe" eslint: 8.23.1 - eslint-config-next: 12.3.0 - next: 12.3.0 + eslint-config-next: ^13 + next: ^13.4.4 react: ^18.0.0 react-dom: ^18.0.0 siwe: ^2.1.4 @@ -13153,7 +13833,7 @@ __metadata: connectkit: "workspace:packages/connectkit" eslint: 8.23.1 eslint-config-next: 12.3.0 - next: 12.3.0 + next: 13.4.4 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.5 @@ -13368,6 +14048,13 @@ __metadata: languageName: node linkType: hard +"object-inspect@npm:^1.13.1": + version: 1.13.1 + resolution: "object-inspect@npm:1.13.1" + checksum: 7d9fa9221de3311dcb5c7c307ee5dc011cdd31dc43624b7c184b3840514e118e05ef0002be5388304c416c0eb592feb46e983db12577fc47e47d5752fbbfb61f + languageName: node + linkType: hard + "object-keys@npm:^1.1.1": version: 1.1.1 resolution: "object-keys@npm:1.1.1" @@ -13398,6 +14085,17 @@ __metadata: languageName: node linkType: hard +"object.entries@npm:^1.1.6, object.entries@npm:^1.1.7": + version: 1.1.7 + resolution: "object.entries@npm:1.1.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: da287d434e7e32989586cd734382364ba826a2527f2bc82e6acbf9f9bfafa35d51018b66ec02543ffdfa2a5ba4af2b6f1ca6e588c65030cb4fd9c67d6ced594c + languageName: node + linkType: hard + "object.fromentries@npm:^2.0.5": version: 2.0.5 resolution: "object.fromentries@npm:2.0.5" @@ -13409,6 +14107,17 @@ __metadata: languageName: node linkType: hard +"object.fromentries@npm:^2.0.6, object.fromentries@npm:^2.0.7": + version: 2.0.7 + resolution: "object.fromentries@npm:2.0.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 7341ce246e248b39a431b87a9ddd331ff52a454deb79afebc95609f94b1f8238966cf21f52188f2a353f0fdf83294f32f1ebf1f7826aae915ebad21fd0678065 + languageName: node + linkType: hard + "object.getownpropertydescriptors@npm:^2.1.0": version: 2.1.4 resolution: "object.getownpropertydescriptors@npm:2.1.4" @@ -13421,6 +14130,18 @@ __metadata: languageName: node linkType: hard +"object.groupby@npm:^1.0.1": + version: 1.0.1 + resolution: "object.groupby@npm:1.0.1" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + checksum: d7959d6eaaba358b1608066fc67ac97f23ce6f573dc8fc661f68c52be165266fcb02937076aedb0e42722fdda0bdc0bbf74778196ac04868178888e9fd3b78b5 + languageName: node + linkType: hard + "object.hasown@npm:^1.1.1": version: 1.1.1 resolution: "object.hasown@npm:1.1.1" @@ -13431,6 +14152,16 @@ __metadata: languageName: node linkType: hard +"object.hasown@npm:^1.1.2": + version: 1.1.3 + resolution: "object.hasown@npm:1.1.3" + dependencies: + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 76bc17356f6124542fb47e5d0e78d531eafa4bba3fc2d6fc4b1a8ce8b6878912366c0d99f37ce5c84ada8fd79df7aa6ea1214fddf721f43e093ad2df51f27da1 + languageName: node + linkType: hard + "object.values@npm:^1.1.0, object.values@npm:^1.1.5": version: 1.1.5 resolution: "object.values@npm:1.1.5" @@ -13442,6 +14173,17 @@ __metadata: languageName: node linkType: hard +"object.values@npm:^1.1.6, object.values@npm:^1.1.7": + version: 1.1.7 + resolution: "object.values@npm:1.1.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: f3e4ae4f21eb1cc7cebb6ce036d4c67b36e1c750428d7b7623c56a0db90edced63d08af8a316d81dfb7c41a3a5fa81b05b7cc9426e98d7da986b1682460f0777 + languageName: node + linkType: hard + "obuf@npm:^1.0.0, obuf@npm:^1.1.2": version: 1.1.2 resolution: "obuf@npm:1.1.2" @@ -14701,6 +15443,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:8.4.31": + version: 8.4.31 + resolution: "postcss@npm:8.4.31" + dependencies: + nanoid: ^3.3.6 + picocolors: ^1.0.0 + source-map-js: ^1.0.2 + checksum: 1d8611341b073143ad90486fcdfeab49edd243377b1f51834dc4f6d028e82ce5190e4f11bb2633276864503654fb7cab28e67abdc0fbf9d1f88cad4a0ff0beea + languageName: node + linkType: hard + "postcss@npm:^7.0.35": version: 7.0.39 resolution: "postcss@npm:7.0.39" @@ -15389,6 +16142,20 @@ __metadata: languageName: node linkType: hard +"reflect.getprototypeof@npm:^1.0.4": + version: 1.0.4 + resolution: "reflect.getprototypeof@npm:1.0.4" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + globalthis: ^1.0.3 + which-builtin-type: ^1.1.3 + checksum: 16e2361988dbdd23274b53fb2b1b9cefeab876c3941a2543b4cadac6f989e3db3957b07a44aac46cfceb3e06e2871785ec2aac992d824f76292f3b5ee87f66f2 + languageName: node + linkType: hard + "regenerate-unicode-properties@npm:^10.1.0": version: 10.1.0 resolution: "regenerate-unicode-properties@npm:10.1.0" @@ -15412,6 +16179,13 @@ __metadata: languageName: node linkType: hard +"regenerator-runtime@npm:^0.14.0": + version: 0.14.0 + resolution: "regenerator-runtime@npm:0.14.0" + checksum: 1c977ad82a82a4412e4f639d65d22be376d3ebdd30da2c003eeafdaaacd03fc00c2320f18120007ee700900979284fc78a9f00da7fb593f6e6eeebc673fba9a3 + languageName: node + linkType: hard + "regenerator-transform@npm:^0.15.0": version: 0.15.0 resolution: "regenerator-transform@npm:0.15.0" @@ -15439,6 +16213,17 @@ __metadata: languageName: node linkType: hard +"regexp.prototype.flags@npm:^1.5.0, regexp.prototype.flags@npm:^1.5.1": + version: 1.5.1 + resolution: "regexp.prototype.flags@npm:1.5.1" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + set-function-name: ^2.0.0 + checksum: 869edff00288442f8d7fa4c9327f91d85f3b3acf8cbbef9ea7a220345cf23e9241b6def9263d2c1ebcf3a316b0aa52ad26a43a84aa02baca3381717b3e307f47 + languageName: node + linkType: hard + "regexpp@npm:^3.2.0": version: 3.2.0 resolution: "regexpp@npm:3.2.0" @@ -15556,6 +16341,13 @@ __metadata: languageName: node linkType: hard +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: 1012afc566b3fdb190a6309cc37ef3b2dcc35dff5fa6683a9d00cd25c3247edfbc4691b91078c97adc82a29b77a2660c30d791d65dab4fc78bfc473f60289977 + languageName: node + linkType: hard + "resolve-url-loader@npm:^4.0.0": version: 4.0.0 resolution: "resolve-url-loader@npm:4.0.0" @@ -15597,6 +16389,19 @@ __metadata: languageName: node linkType: hard +"resolve@npm:^1.22.4": + version: 1.22.8 + resolution: "resolve@npm:1.22.8" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: f8a26958aa572c9b064562750b52131a37c29d072478ea32e129063e2da7f83e31f7f11e7087a18225a8561cfe8d2f0df9dbea7c9d331a897571c0a2527dbb4c + languageName: node + linkType: hard + "resolve@npm:^2.0.0-next.3": version: 2.0.0-next.4 resolution: "resolve@npm:2.0.0-next.4" @@ -15610,6 +16415,19 @@ __metadata: languageName: node linkType: hard +"resolve@npm:^2.0.0-next.4": + version: 2.0.0-next.5 + resolution: "resolve@npm:2.0.0-next.5" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: a73ac69a1c4bd34c56b213d91f5b17ce390688fdb4a1a96ed3025cc7e08e7bfb90b3a06fcce461780cb0b589c958afcb0080ab802c71c01a7ecc8c64feafc89f + languageName: node + linkType: hard + "resolve@patch:resolve@^1.1.7#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin": version: 1.22.1 resolution: "resolve@patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b" @@ -15623,6 +16441,19 @@ __metadata: languageName: node linkType: hard +"resolve@patch:resolve@^1.22.4#~builtin": + version: 1.22.8 + resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin::version=1.22.8&hash=07638b" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: 5479b7d431cacd5185f8db64bfcb7286ae5e31eb299f4c4f404ad8aa6098b77599563ac4257cb2c37a42f59dfc06a1bec2bcf283bb448f319e37f0feb9a09847 + languageName: node + linkType: hard + "resolve@patch:resolve@^2.0.0-next.3#~builtin": version: 2.0.0-next.4 resolution: "resolve@patch:resolve@npm%3A2.0.0-next.4#~builtin::version=2.0.0-next.4&hash=07638b" @@ -15636,6 +16467,19 @@ __metadata: languageName: node linkType: hard +"resolve@patch:resolve@^2.0.0-next.4#~builtin": + version: 2.0.0-next.5 + resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#~builtin::version=2.0.0-next.5&hash=07638b" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: 064d09c1808d0c51b3d90b5d27e198e6d0c5dad0eb57065fd40803d6a20553e5398b07f76739d69cbabc12547058bec6b32106ea66622375fb0d7e8fca6a846c + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -15789,6 +16633,18 @@ __metadata: languageName: node linkType: hard +"safe-array-concat@npm:^1.0.1": + version: 1.0.1 + resolution: "safe-array-concat@npm:1.0.1" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.1 + has-symbols: ^1.0.3 + isarray: ^2.0.5 + checksum: 001ecf1d8af398251cbfabaf30ed66e3855127fbceee178179524b24160b49d15442f94ed6c0db0b2e796da76bb05b73bf3cc241490ec9c2b741b41d33058581 + languageName: node + linkType: hard + "safe-buffer@npm:5.1.2, safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": version: 5.1.2 resolution: "safe-buffer@npm:5.1.2" @@ -15978,6 +16834,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: ae47d06de28836adb9d3e25f22a92943477371292d9b665fb023fae278d345d508ca1958232af086d85e0155aee22e313e100971898bbb8d5d89b8b1d4054ca2 + languageName: node + linkType: hard + "semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7": version: 7.3.7 resolution: "semver@npm:7.3.7" @@ -16000,6 +16865,17 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.5.4": + version: 7.5.4 + resolution: "semver@npm:7.5.4" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3 + languageName: node + linkType: hard + "send@npm:0.18.0": version: 0.18.0 resolution: "send@npm:0.18.0" @@ -16073,6 +16949,29 @@ __metadata: languageName: node linkType: hard +"set-function-length@npm:^1.1.1": + version: 1.1.1 + resolution: "set-function-length@npm:1.1.1" + dependencies: + define-data-property: ^1.1.1 + get-intrinsic: ^1.2.1 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + checksum: c131d7569cd7e110cafdfbfbb0557249b538477624dfac4fc18c376d879672fa52563b74029ca01f8f4583a8acb35bb1e873d573a24edb80d978a7ee607c6e06 + languageName: node + linkType: hard + +"set-function-name@npm:^2.0.0, set-function-name@npm:^2.0.1": + version: 2.0.1 + resolution: "set-function-name@npm:2.0.1" + dependencies: + define-data-property: ^1.0.1 + functions-have-names: ^1.2.3 + has-property-descriptors: ^1.0.0 + checksum: 4975d17d90c40168eee2c7c9c59d023429f0a1690a89d75656306481ece0c3c1fb1ebcc0150ea546d1913e35fbd037bace91372c69e543e51fc5d1f31a9fa126 + languageName: node + linkType: hard + "setprototypeof@npm:1.1.0": version: 1.1.0 resolution: "setprototypeof@npm:1.1.0" @@ -16493,6 +17392,13 @@ __metadata: languageName: node linkType: hard +"streamsearch@npm:^1.1.0": + version: 1.1.0 + resolution: "streamsearch@npm:1.1.0" + checksum: 1cce16cea8405d7a233d32ca5e00a00169cc0e19fbc02aa839959985f267335d435c07f96e5e0edd0eadc6d39c98d5435fb5bbbdefc62c41834eadc5622ad942 + languageName: node + linkType: hard + "strict-uri-encode@npm:^2.0.0": version: 2.0.0 resolution: "strict-uri-encode@npm:2.0.0" @@ -16554,6 +17460,34 @@ __metadata: languageName: node linkType: hard +"string.prototype.matchall@npm:^4.0.8": + version: 4.0.10 + resolution: "string.prototype.matchall@npm:4.0.10" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + get-intrinsic: ^1.2.1 + has-symbols: ^1.0.3 + internal-slot: ^1.0.5 + regexp.prototype.flags: ^1.5.0 + set-function-name: ^2.0.0 + side-channel: ^1.0.4 + checksum: 3c78bdeff39360c8e435d7c4c6ea19f454aa7a63eda95fa6fadc3a5b984446a2f9f2c02d5c94171ce22268a573524263fbd0c8edbe3ce2e9890d7cc036cdc3ed + languageName: node + linkType: hard + +"string.prototype.trim@npm:^1.2.8": + version: 1.2.8 + resolution: "string.prototype.trim@npm:1.2.8" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 49eb1a862a53aba73c3fb6c2a53f5463173cb1f4512374b623bcd6b43ad49dd559a06fb5789bdec771a40fc4d2a564411c0a75d35fb27e76bbe738c211ecff07 + languageName: node + linkType: hard + "string.prototype.trimend@npm:^1.0.5": version: 1.0.5 resolution: "string.prototype.trimend@npm:1.0.5" @@ -16565,6 +17499,17 @@ __metadata: languageName: node linkType: hard +"string.prototype.trimend@npm:^1.0.7": + version: 1.0.7 + resolution: "string.prototype.trimend@npm:1.0.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 2375516272fd1ba75992f4c4aa88a7b5f3c7a9ca308d963bcd5645adf689eba6f8a04ebab80c33e30ec0aefc6554181a3a8416015c38da0aa118e60ec896310c + languageName: node + linkType: hard + "string.prototype.trimstart@npm:^1.0.5": version: 1.0.5 resolution: "string.prototype.trimstart@npm:1.0.5" @@ -16576,6 +17521,17 @@ __metadata: languageName: node linkType: hard +"string.prototype.trimstart@npm:^1.0.7": + version: 1.0.7 + resolution: "string.prototype.trimstart@npm:1.0.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + checksum: 13d0c2cb0d5ff9e926fa0bec559158b062eed2b68cd5be777ffba782c96b2b492944e47057274e064549b94dd27cf81f48b27a31fee8af5b574cff253e7eb613 + languageName: node + linkType: hard + "string_decoder@npm:^1.1.1": version: 1.3.0 resolution: "string_decoder@npm:1.3.0" @@ -16726,23 +17682,9 @@ __metadata: languageName: node linkType: hard -"styled-jsx@npm:5.0.6": - version: 5.0.6 - resolution: "styled-jsx@npm:5.0.6" - peerDependencies: - react: ">= 16.8.0 || 17.x.x || ^18.0.0-0" - peerDependenciesMeta: - "@babel/core": - optional: true - babel-plugin-macros: - optional: true - checksum: 9e41cb6958fcb980dbfcfee2fb133de61cc0873df9304d2476ab35930679fc3b3c1d968a503c9b0afa459f243c288119e35d0fd31cf3066c2ba0e130c4d2f87e - languageName: node - linkType: hard - -"styled-jsx@npm:5.1.0": - version: 5.1.0 - resolution: "styled-jsx@npm:5.1.0" +"styled-jsx@npm:5.1.1": + version: 5.1.1 + resolution: "styled-jsx@npm:5.1.1" dependencies: client-only: 0.0.1 peerDependencies: @@ -16752,7 +17694,7 @@ __metadata: optional: true babel-plugin-macros: optional: true - checksum: e5b70476fd9059147dfe35dd912e537e422a7f900cc88f80456c97da495c655598875d64de2199641d627770a7e55ed08be0fd82646bc386791fdb1d0e5af2b1 + checksum: 523a33b38603492547e861b98e29c873939b04e15fbe5ef16132c6f1e15958126647983c7d4675325038b428a5e91183d996e90141b18bdd1bbadf6e2c45b2fa languageName: node linkType: hard @@ -17045,7 +17987,7 @@ __metadata: eslint: 8.23.1 eslint-config-next: 12.3.0 local-ssl-proxy: ^1.3.0 - next: 13.0.0 + next: 13.4.4 react: ^18.0.0 react-dom: ^18.0.0 typescript: ^4.9.5 @@ -17195,6 +18137,15 @@ __metadata: languageName: node linkType: hard +"ts-api-utils@npm:^1.0.1": + version: 1.0.3 + resolution: "ts-api-utils@npm:1.0.3" + peerDependencies: + typescript: ">=4.2.0" + checksum: 441cc4489d65fd515ae6b0f4eb8690057add6f3b6a63a36073753547fb6ce0c9ea0e0530220a0b282b0eec535f52c4dfc315d35f8a4c9a91c0def0707a714ca6 + languageName: node + linkType: hard + "tsconfig-paths@npm:^3.14.1": version: 3.14.1 resolution: "tsconfig-paths@npm:3.14.1" @@ -17207,6 +18158,18 @@ __metadata: languageName: node linkType: hard +"tsconfig-paths@npm:^3.14.2": + version: 3.14.2 + resolution: "tsconfig-paths@npm:3.14.2" + dependencies: + "@types/json5": ^0.0.29 + json5: ^1.0.2 + minimist: ^1.2.6 + strip-bom: ^3.0.0 + checksum: a6162eaa1aed680537f93621b82399c7856afd10ec299867b13a0675e981acac4e0ec00896860480efc59fc10fd0b16fdc928c0b885865b52be62cadac692447 + languageName: node + linkType: hard + "tslib@npm:1.14.1, tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" @@ -17326,6 +18289,53 @@ __metadata: languageName: node linkType: hard +"typed-array-buffer@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-buffer@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.1 + is-typed-array: ^1.1.10 + checksum: 3e0281c79b2a40cd97fe715db803884301993f4e8c18e8d79d75fd18f796e8cd203310fec8c7fdb5e6c09bedf0af4f6ab8b75eb3d3a85da69328f28a80456bd3 + languageName: node + linkType: hard + +"typed-array-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-length@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + for-each: ^0.3.3 + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: b03db16458322b263d87a702ff25388293f1356326c8a678d7515767ef563ef80e1e67ce648b821ec13178dd628eb2afdc19f97001ceae7a31acf674c849af94 + languageName: node + linkType: hard + +"typed-array-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-offset@npm:1.0.0" + dependencies: + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.2 + for-each: ^0.3.3 + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: 04f6f02d0e9a948a95fbfe0d5a70b002191fae0b8fe0fe3130a9b2336f043daf7a3dda56a31333c35a067a97e13f539949ab261ca0f3692c41603a46a94e960b + languageName: node + linkType: hard + +"typed-array-length@npm:^1.0.4": + version: 1.0.4 + resolution: "typed-array-length@npm:1.0.4" + dependencies: + call-bind: ^1.0.2 + for-each: ^0.3.3 + is-typed-array: ^1.1.9 + checksum: 2228febc93c7feff142b8c96a58d4a0d7623ecde6c7a24b2b98eb3170e99f7c7eff8c114f9b283085cd59dcd2bd43aadf20e25bba4b034a53c5bb292f71f8956 + languageName: node + linkType: hard + "typedarray-to-buffer@npm:3.1.5, typedarray-to-buffer@npm:^3.1.5": version: 3.1.5 resolution: "typedarray-to-buffer@npm:3.1.5" @@ -17822,7 +18832,7 @@ __metadata: languageName: node linkType: hard -"watchpack@npm:^2.4.0": +"watchpack@npm:2.4.0, watchpack@npm:^2.4.0": version: 2.4.0 resolution: "watchpack@npm:2.4.0" dependencies: @@ -18119,6 +19129,38 @@ __metadata: languageName: node linkType: hard +"which-builtin-type@npm:^1.1.3": + version: 1.1.3 + resolution: "which-builtin-type@npm:1.1.3" + dependencies: + function.prototype.name: ^1.1.5 + has-tostringtag: ^1.0.0 + is-async-function: ^2.0.0 + is-date-object: ^1.0.5 + is-finalizationregistry: ^1.0.2 + is-generator-function: ^1.0.10 + is-regex: ^1.1.4 + is-weakref: ^1.0.2 + isarray: ^2.0.5 + which-boxed-primitive: ^1.0.2 + which-collection: ^1.0.1 + which-typed-array: ^1.1.9 + checksum: 43730f7d8660ff9e33d1d3f9f9451c4784265ee7bf222babc35e61674a11a08e1c2925019d6c03154fcaaca4541df43abe35d2720843b9b4cbcebdcc31408f36 + languageName: node + linkType: hard + +"which-collection@npm:^1.0.1": + version: 1.0.1 + resolution: "which-collection@npm:1.0.1" + dependencies: + is-map: ^2.0.1 + is-set: ^2.0.1 + is-weakmap: ^2.0.1 + is-weakset: ^2.0.1 + checksum: c815bbd163107ef9cb84f135e6f34453eaf4cca994e7ba85ddb0d27cea724c623fae2a473ceccfd5549c53cc65a5d82692de418166df3f858e1e5dc60818581c + languageName: node + linkType: hard + "which-module@npm:^2.0.0": version: 2.0.0 resolution: "which-module@npm:2.0.0" @@ -18136,6 +19178,19 @@ __metadata: languageName: node linkType: hard +"which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.9": + version: 1.1.13 + resolution: "which-typed-array@npm:1.1.13" + dependencies: + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.4 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-tostringtag: ^1.0.0 + checksum: 3828a0d5d72c800e369d447e54c7620742a4cc0c9baf1b5e8c17e9b6ff90d8d861a3a6dd4800f1953dbf80e5e5cec954a289e5b4a223e3bee4aeb1f8c5f33309 + languageName: node + linkType: hard + "which-typed-array@npm:^1.1.2": version: 1.1.8 resolution: "which-typed-array@npm:1.1.8" @@ -18630,6 +19685,13 @@ __metadata: languageName: node linkType: hard +"zod@npm:3.21.4": + version: 3.21.4 + resolution: "zod@npm:3.21.4" + checksum: f185ba87342ff16f7a06686767c2b2a7af41110c7edf7c1974095d8db7a73792696bcb4a00853de0d2edeb34a5b2ea6a55871bc864227dace682a0a28de33e1f + languageName: node + linkType: hard + "zustand@npm:^4.3.1": version: 4.3.1 resolution: "zustand@npm:4.3.1" From da9407bbdf492bf2c21232031aa3e62c0c8058c0 Mon Sep 17 00:00:00 2001 From: Alex Grover Date: Thu, 9 Nov 2023 19:15:43 -0800 Subject: [PATCH 4/6] Add SIWE implementation for app router --- .../src/app-router/configureSIWE.ts | 182 ++++++++++++++++++ .../src/app-router/session.ts | 67 +++++++ packages/connectkit-next-siwe/src/index.ts | 1 + 3 files changed, 250 insertions(+) create mode 100644 packages/connectkit-next-siwe/src/app-router/configureSIWE.ts create mode 100644 packages/connectkit-next-siwe/src/app-router/session.ts diff --git a/packages/connectkit-next-siwe/src/app-router/configureSIWE.ts b/packages/connectkit-next-siwe/src/app-router/configureSIWE.ts new file mode 100644 index 00000000..956b9880 --- /dev/null +++ b/packages/connectkit-next-siwe/src/app-router/configureSIWE.ts @@ -0,0 +1,182 @@ +import { IronSessionOptions } from 'iron-session'; +import { NextRequest, NextResponse } from 'next/server'; +import { generateNonce, SiweErrorType, SiweMessage } from 'siwe'; +import { Address } from 'viem'; +import Session, { type Cookies } from './session'; + +type RouteHandlerOptions = { + afterNonce?: (req: NextRequest, session: NextSIWESession<{}>) => Promise; + afterVerify?: (req: NextRequest, session: NextSIWESession<{}>) => Promise; + afterSession?: (req: NextRequest, session: NextSIWESession<{}>) => Promise; + afterLogout?: (req: NextRequest) => Promise; +}; +type NextServerSIWEConfig = { + session?: Partial; + options?: RouteHandlerOptions; +}; + +type NextSIWESession = Session & TSessionData; + +type NextRouteHandler = (req: NextRequest, { params }: { params: any }) => Promise +type ConfigureServerSIWEResult = { + apiRouteHandler: { + GET: NextRouteHandler; + POST: NextRouteHandler; + }; + getSession: (cookies: Cookies) => Promise>; +}; + +const getSession = async ( + cookies: Cookies, + sessionConfig: IronSessionOptions +) => { + const session = await Session.fromCookies(cookies, sessionConfig); + return session as NextSIWESession; +}; + +const logoutRoute = async ( + req: NextRequest, + sessionConfig: IronSessionOptions, + afterCallback?: RouteHandlerOptions['afterLogout'] +): Promise> => { + const session = await getSession(req.cookies, sessionConfig); + const res = new NextResponse(); + await session.destroy(res, sessionConfig); + if (afterCallback) { + await afterCallback(req); + } + return res; +}; + +const nonceRoute = async ( + req: NextRequest, + sessionConfig: IronSessionOptions, + afterCallback?: RouteHandlerOptions['afterNonce'] +): Promise> => { + const session = await getSession(req.cookies, sessionConfig); + let res: NextResponse = new NextResponse(session.nonce); + if (!session.nonce) { + session.nonce = generateNonce(); + res = new NextResponse(session.nonce); + await session.save(res, sessionConfig); + } + if (afterCallback) { + await afterCallback(req, session); + } + return res; +}; + +const sessionRoute = async ( + req: NextRequest, + sessionConfig: IronSessionOptions, + afterCallback?: RouteHandlerOptions['afterSession'] +): Promise> => { + const session = await getSession(req.cookies, sessionConfig); + if (afterCallback) { + await afterCallback(req, session); + } + const { address, chainId } = session; + return NextResponse.json({ address, chainId }); +}; + +const verifyRoute = async ( + req: NextRequest, + sessionConfig: IronSessionOptions, + afterCallback?: RouteHandlerOptions['afterVerify'] +): Promise> => { + try { + const session = await getSession(req.cookies, sessionConfig); + const { message, signature } = await req.json(); + const siweMessage = new SiweMessage(message); + const { data: fields } = await siweMessage.verify({ signature, nonce: session.nonce }); + if (fields.nonce !== session.nonce) { + return new NextResponse('Invalid nonce.', { status: 422 }); + } + session.address = fields.address as Address; + session.chainId = fields.chainId; + const res = new NextResponse() + await session.save(res, sessionConfig); + if (afterCallback) { + await afterCallback(req, session); + } + return res; + } catch (error) { + switch (error) { + case SiweErrorType.INVALID_NONCE: + case SiweErrorType.INVALID_SIGNATURE: { + return new NextResponse(String(error), { status: 422 }); + } + default: { + return new NextResponse(String(error), { status: 400 }); + } + } + } +}; + +const envVar = (name: string) => { + const value = process.env[name]; + if (!value) { + throw new Error(`Missing environment variable: ${name}`); + } + return value; +}; + +export const configureServerSideSIWE = ({ + session: { cookieName, password, cookieOptions, ...otherSessionOptions } = {}, + options: { afterNonce, afterVerify, afterSession, afterLogout } = {}, +}: NextServerSIWEConfig): ConfigureServerSIWEResult => { + const sessionConfig: IronSessionOptions = { + cookieName: cookieName ?? 'connectkit-next-siwe', + password: password ?? envVar('SESSION_SECRET'), + cookieOptions: { + secure: process.env.NODE_ENV === 'production', + ...(cookieOptions ?? {}), + }, + ...otherSessionOptions, + }; + + function checkRouteParam(params: any): asserts params is { route: string[] } { + if (!(params.route instanceof Array)) { + throw new Error( + 'Catch-all query param `route` not found. SIWE API page should be named `[...route].ts` and within your `app/api` directory.' + ); + } + } + + const GET: NextRouteHandler = async (req: NextRequest, { params }: { params: any }) => { + checkRouteParam(params); + + const route = params.route.join('/'); + switch (route) { + case 'nonce': + return await nonceRoute(req, sessionConfig, afterNonce); + case 'session': + return await sessionRoute(req, sessionConfig, afterSession); + case 'logout': + return await logoutRoute(req, sessionConfig, afterLogout); + default: + return new Response(null, { status: 404 }); + } + } + + const POST: NextRouteHandler = async (req: NextRequest, { params }: { params: any }) => { + checkRouteParam(params); + + const route = params.route.join('/'); + switch (route) { + case 'verify': + return await verifyRoute(req, sessionConfig, afterVerify); + default: + return new Response(null, { status: 404 }); + } + } + + return { + apiRouteHandler: { + GET, + POST, + }, + getSession: async (cookies: Cookies) => + await getSession(cookies, sessionConfig), + }; +}; diff --git a/packages/connectkit-next-siwe/src/app-router/session.ts b/packages/connectkit-next-siwe/src/app-router/session.ts new file mode 100644 index 00000000..5f7bc0c5 --- /dev/null +++ b/packages/connectkit-next-siwe/src/app-router/session.ts @@ -0,0 +1,67 @@ +/** + * iron-session has not been updated for the Next.js 13 App Router yet. This + * class is a shim for the `getIronSession(req, res, options)` function that + * iron-session provides. It uses the lower-level `sealData` and `unsealData` + * APIs and interacts with the request cookies directly. + * + * Adapted from https://github.com/m1guelpf/nextjs13-connectkit-siwe + */ + +import { sealData, unsealData, type IronSessionOptions } from 'iron-session' +import { RequestCookies } from 'next/dist/compiled/@edge-runtime/cookies' +import { ReadonlyRequestCookies } from 'next/dist/server/web/spec-extension/adapters/request-cookies' +import { NextResponse } from 'next/server' +import { Address } from 'viem' + +export type Cookies = RequestCookies | ReadonlyRequestCookies; + +export type SerializedSession = { + nonce?: string + chainId?: number + address?: Address +} + +export default class Session { + nonce?: string + chainId?: number + address?: Address + + constructor(session?: SerializedSession) { + this.nonce = session?.nonce + this.chainId = session?.chainId + this.address = session?.address + } + + static async fromCookies( + cookies: RequestCookies | ReadonlyRequestCookies, + config: IronSessionOptions + ): Promise { + const sessionCookie = cookies.get(config.cookieName)?.value; + + if (!sessionCookie) return new Session(); + return new Session(await unsealData(sessionCookie, config)); + } + + async destroy(res: NextResponse, config: IronSessionOptions) { + this.nonce = undefined; + this.chainId = undefined; + this.address = undefined; + + return this.save(res, config) + } + + async save(res: NextResponse, config: IronSessionOptions) { + const data = await sealData(this.toJSON(), config); + + // TODO: iron-session manages some default options for these cookies + // Some of these make development much easier, like setting `max-age` based + // on the `ttl`, and defaulting that to 14 days rather than expiring after + // the session ends + // https://github.com/vvo/iron-session/blob/bf7b808707a436a14b9fa4d1f224f9490591a638/src/core.ts#L97 + res.cookies.set(config.cookieName, data, config.cookieOptions); + } + + toJSON(): SerializedSession { + return { nonce: this.nonce, address: this.address, chainId: this.chainId }; + } +} diff --git a/packages/connectkit-next-siwe/src/index.ts b/packages/connectkit-next-siwe/src/index.ts index 935ddc3d..49226b94 100644 --- a/packages/connectkit-next-siwe/src/index.ts +++ b/packages/connectkit-next-siwe/src/index.ts @@ -1,2 +1,3 @@ export { configureClientSIWE } from './client' export { configureServerSideSIWE } from './configureSIWE'; +export { configureServerSideSIWE as configureServerSideSIWEAppRouter } from './app-router/configureSIWE'; From d3b54fc7dde636fa0a868cd99611de597f3ecfb6 Mon Sep 17 00:00:00 2001 From: Alex Grover Date: Thu, 9 Nov 2023 19:19:57 -0800 Subject: [PATCH 5/6] Add example project --- examples/nextjs-siwe-app-router/.env.example | 3 ++ .../nextjs-siwe-app-router/.eslintrc.json | 3 ++ examples/nextjs-siwe-app-router/.gitignore | 35 +++++++++++++++ examples/nextjs-siwe-app-router/README.md | 9 ++++ .../nextjs-siwe-app-router/next.config.js | 11 +++++ examples/nextjs-siwe-app-router/package.json | 29 +++++++++++++ .../nextjs-siwe-app-router/postcss.config.js | 6 +++ .../nextjs-siwe-app-router/public/next.svg | 1 + .../nextjs-siwe-app-router/public/vercel.svg | 1 + .../src/app/api/siwe/[...route].ts | 4 ++ .../src/app/favicon.ico | Bin 0 -> 25931 bytes .../src/app/globals.css | 27 ++++++++++++ .../nextjs-siwe-app-router/src/app/layout.tsx | 25 +++++++++++ .../nextjs-siwe-app-router/src/app/page.tsx | 13 ++++++ .../src/utils/connectkit.tsx | 27 ++++++++++++ .../src/utils/siweClient.ts | 6 +++ .../src/utils/siweServer.ts | 11 +++++ .../nextjs-siwe-app-router/tailwind.config.js | 18 ++++++++ .../nextjs-siwe-app-router/tailwind.config.ts | 20 +++++++++ examples/nextjs-siwe-app-router/tsconfig.json | 41 ++++++++++++++++++ package.json | 2 + yarn.lock | 21 +++++++++ 22 files changed, 313 insertions(+) create mode 100644 examples/nextjs-siwe-app-router/.env.example create mode 100644 examples/nextjs-siwe-app-router/.eslintrc.json create mode 100644 examples/nextjs-siwe-app-router/.gitignore create mode 100644 examples/nextjs-siwe-app-router/README.md create mode 100644 examples/nextjs-siwe-app-router/next.config.js create mode 100644 examples/nextjs-siwe-app-router/package.json create mode 100644 examples/nextjs-siwe-app-router/postcss.config.js create mode 100644 examples/nextjs-siwe-app-router/public/next.svg create mode 100644 examples/nextjs-siwe-app-router/public/vercel.svg create mode 100644 examples/nextjs-siwe-app-router/src/app/api/siwe/[...route].ts create mode 100644 examples/nextjs-siwe-app-router/src/app/favicon.ico create mode 100644 examples/nextjs-siwe-app-router/src/app/globals.css create mode 100644 examples/nextjs-siwe-app-router/src/app/layout.tsx create mode 100644 examples/nextjs-siwe-app-router/src/app/page.tsx create mode 100644 examples/nextjs-siwe-app-router/src/utils/connectkit.tsx create mode 100644 examples/nextjs-siwe-app-router/src/utils/siweClient.ts create mode 100644 examples/nextjs-siwe-app-router/src/utils/siweServer.ts create mode 100644 examples/nextjs-siwe-app-router/tailwind.config.js create mode 100644 examples/nextjs-siwe-app-router/tailwind.config.ts create mode 100644 examples/nextjs-siwe-app-router/tsconfig.json diff --git a/examples/nextjs-siwe-app-router/.env.example b/examples/nextjs-siwe-app-router/.env.example new file mode 100644 index 00000000..46368dbb --- /dev/null +++ b/examples/nextjs-siwe-app-router/.env.example @@ -0,0 +1,3 @@ +NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID= +NEXT_PUBLIC_ALCHEMY_KEY= +SESSION_SECRET= diff --git a/examples/nextjs-siwe-app-router/.eslintrc.json b/examples/nextjs-siwe-app-router/.eslintrc.json new file mode 100644 index 00000000..bffb357a --- /dev/null +++ b/examples/nextjs-siwe-app-router/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/examples/nextjs-siwe-app-router/.gitignore b/examples/nextjs-siwe-app-router/.gitignore new file mode 100644 index 00000000..8f322f0d --- /dev/null +++ b/examples/nextjs-siwe-app-router/.gitignore @@ -0,0 +1,35 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/examples/nextjs-siwe-app-router/README.md b/examples/nextjs-siwe-app-router/README.md new file mode 100644 index 00000000..e8645bfc --- /dev/null +++ b/examples/nextjs-siwe-app-router/README.md @@ -0,0 +1,9 @@ +# [Next.js](https://nextjs.org/) + [TypeScript](https://www.typescriptlang.org/) + [SIWE](https://login.xyz/) + ConnectKit Example + +This is a simple example of how to implement ConnectKit with [Next.js](https://nextjs.org/) and [SIWE](https://docs.family.co/connectkit/authentication) in TypeScript. This example is based on the [SIWE with Next.js documentation](https://docs.family.co/connectkit/auth-with-nextjs) provided by Family. + +## Running the example + +- Have a look at the [instructions in the main README](https://github.com/family/connectkit/blob/main/README.md#running-examples-locally) +- Please copy the `.env.example` file to `.env.local` and fill in the values +- You'll want to set up an environment variable called `SESSION_SECRET` — a randomly generated, strong password of at least 32 characters diff --git a/examples/nextjs-siwe-app-router/next.config.js b/examples/nextjs-siwe-app-router/next.config.js new file mode 100644 index 00000000..fbad4023 --- /dev/null +++ b/examples/nextjs-siwe-app-router/next.config.js @@ -0,0 +1,11 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + reactStrictMode: true, + webpack: (config) => { + config.externals.push('pino-pretty', 'lokijs', 'encoding') + config.resolve.fallback = { fs: false, net: false, tls: false } + return config + }, +} + +module.exports = nextConfig diff --git a/examples/nextjs-siwe-app-router/package.json b/examples/nextjs-siwe-app-router/package.json new file mode 100644 index 00000000..80cd8ec7 --- /dev/null +++ b/examples/nextjs-siwe-app-router/package.json @@ -0,0 +1,29 @@ +{ + "name": "nextjs-siwe-app-router", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "connectkit": "workspace:packages/connectkit", + "connectkit-next-siwe": "workspace:packages/connectkit-next-siwe", + "next": "^13.4.4", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "siwe": "^2.1.4", + "viem": "^1.1.0", + "wagmi": "^1.1.1" + }, + "devDependencies": { + "@types/node": "18.7.18", + "@types/react": "^18.0.6", + "@types/react-dom": "^18.0.2", + "eslint": "8.23.1", + "eslint-config-next": "^13", + "typescript": "^4.9.5" + } +} diff --git a/examples/nextjs-siwe-app-router/postcss.config.js b/examples/nextjs-siwe-app-router/postcss.config.js new file mode 100644 index 00000000..33ad091d --- /dev/null +++ b/examples/nextjs-siwe-app-router/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/examples/nextjs-siwe-app-router/public/next.svg b/examples/nextjs-siwe-app-router/public/next.svg new file mode 100644 index 00000000..5174b28c --- /dev/null +++ b/examples/nextjs-siwe-app-router/public/next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/nextjs-siwe-app-router/public/vercel.svg b/examples/nextjs-siwe-app-router/public/vercel.svg new file mode 100644 index 00000000..d2f84222 --- /dev/null +++ b/examples/nextjs-siwe-app-router/public/vercel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/nextjs-siwe-app-router/src/app/api/siwe/[...route].ts b/examples/nextjs-siwe-app-router/src/app/api/siwe/[...route].ts new file mode 100644 index 00000000..6a7ed201 --- /dev/null +++ b/examples/nextjs-siwe-app-router/src/app/api/siwe/[...route].ts @@ -0,0 +1,4 @@ +import { siweServer } from '@/utils/siweServer' // Your path to siweServer.ts + +export const GET = siweServer.apiRouteHandler.GET +export const POST = siweServer.apiRouteHandler.POST diff --git a/examples/nextjs-siwe-app-router/src/app/favicon.ico b/examples/nextjs-siwe-app-router/src/app/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..718d6fea4835ec2d246af9800eddb7ffb276240c GIT binary patch literal 25931 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 LrJugUA?W`A8`#=m literal 0 HcmV?d00001 diff --git a/examples/nextjs-siwe-app-router/src/app/globals.css b/examples/nextjs-siwe-app-router/src/app/globals.css new file mode 100644 index 00000000..b2c34e35 --- /dev/null +++ b/examples/nextjs-siwe-app-router/src/app/globals.css @@ -0,0 +1,27 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --foreground-rgb: 0, 0, 0; + --background-start-rgb: 214, 219, 220; + --background-end-rgb: 255, 255, 255; +} + +@media (prefers-color-scheme: dark) { + :root { + --foreground-rgb: 255, 255, 255; + --background-start-rgb: 0, 0, 0; + --background-end-rgb: 0, 0, 0; + } +} + +body { + color: rgb(var(--foreground-rgb)); + background: linear-gradient( + to bottom, + transparent, + rgb(var(--background-end-rgb)) + ) + rgb(var(--background-start-rgb)); +} diff --git a/examples/nextjs-siwe-app-router/src/app/layout.tsx b/examples/nextjs-siwe-app-router/src/app/layout.tsx new file mode 100644 index 00000000..8d8d9df8 --- /dev/null +++ b/examples/nextjs-siwe-app-router/src/app/layout.tsx @@ -0,0 +1,25 @@ +import ConnectKitConfig from '@/utils/connectkit'; +import type { Metadata } from 'next' +import { Inter } from 'next/font/google' +import './globals.css' + +const inter = Inter({ subsets: ['latin'] }) + +export const metadata: Metadata = { + title: 'Create Next App', + description: 'Generated by create next app', +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + + {children} + + + ) +} diff --git a/examples/nextjs-siwe-app-router/src/app/page.tsx b/examples/nextjs-siwe-app-router/src/app/page.tsx new file mode 100644 index 00000000..fe968d4d --- /dev/null +++ b/examples/nextjs-siwe-app-router/src/app/page.tsx @@ -0,0 +1,13 @@ +'use client' + +import { ConnectKitButton, useSIWE } from 'connectkit'; + +export default function Home() { + const { data, isSignedIn, signOut, signIn } = useSIWE(); + console.log({ data, isSignedIn, signOut, signIn }); + return ( +
+ +
+ ); +} diff --git a/examples/nextjs-siwe-app-router/src/utils/connectkit.tsx b/examples/nextjs-siwe-app-router/src/utils/connectkit.tsx new file mode 100644 index 00000000..05507bb1 --- /dev/null +++ b/examples/nextjs-siwe-app-router/src/utils/connectkit.tsx @@ -0,0 +1,27 @@ +'use client' + +import { PropsWithChildren } from 'react'; + +import { siweClient } from '@/utils/siweClient'; +import { ConnectKitProvider, getDefaultConfig } from 'connectkit'; +import { WagmiConfig, createConfig } from 'wagmi'; + +const config = createConfig( + getDefaultConfig({ + alchemyId: process.env.NEXT_PUBLIC_ALCHEMY_KEY, + walletConnectProjectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID!, + appName: 'My ConnectKit App', + }) +); + +export default function ConnectKitConfig({ children }: PropsWithChildren) { + return ( + + + + {children} + + + + ); +} diff --git a/examples/nextjs-siwe-app-router/src/utils/siweClient.ts b/examples/nextjs-siwe-app-router/src/utils/siweClient.ts new file mode 100644 index 00000000..8af8b3b1 --- /dev/null +++ b/examples/nextjs-siwe-app-router/src/utils/siweClient.ts @@ -0,0 +1,6 @@ +import { configureClientSIWE } from 'connectkit-next-siwe' + +export const siweClient = configureClientSIWE({ + apiRoutePrefix: '/api/siwe', // Your API route directory + statement: 'Sign In With Ethereum to prove you control this wallet.', // optional +}); diff --git a/examples/nextjs-siwe-app-router/src/utils/siweServer.ts b/examples/nextjs-siwe-app-router/src/utils/siweServer.ts new file mode 100644 index 00000000..696f4db0 --- /dev/null +++ b/examples/nextjs-siwe-app-router/src/utils/siweServer.ts @@ -0,0 +1,11 @@ +import { configureServerSideSIWEAppRouter } from 'connectkit-next-siwe'; + +export const siweServer = configureServerSideSIWEAppRouter({ + session: { + cookieName: 'connectkit-next-siwe', + password: process.env.SESSION_SECRET, + cookieOptions: { + secure: process.env.NODE_ENV === 'production', + }, + }, +}); diff --git a/examples/nextjs-siwe-app-router/tailwind.config.js b/examples/nextjs-siwe-app-router/tailwind.config.js new file mode 100644 index 00000000..d53b2eaa --- /dev/null +++ b/examples/nextjs-siwe-app-router/tailwind.config.js @@ -0,0 +1,18 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + './src/pages/**/*.{js,ts,jsx,tsx,mdx}', + './src/components/**/*.{js,ts,jsx,tsx,mdx}', + './src/app/**/*.{js,ts,jsx,tsx,mdx}', + ], + theme: { + extend: { + backgroundImage: { + 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', + 'gradient-conic': + 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', + }, + }, + }, + plugins: [], +} diff --git a/examples/nextjs-siwe-app-router/tailwind.config.ts b/examples/nextjs-siwe-app-router/tailwind.config.ts new file mode 100644 index 00000000..1af3b8f0 --- /dev/null +++ b/examples/nextjs-siwe-app-router/tailwind.config.ts @@ -0,0 +1,20 @@ +import type { Config } from 'tailwindcss' + +const config: Config = { + content: [ + './src/pages/**/*.{js,ts,jsx,tsx,mdx}', + './src/components/**/*.{js,ts,jsx,tsx,mdx}', + './src/app/**/*.{js,ts,jsx,tsx,mdx}', + ], + theme: { + extend: { + backgroundImage: { + 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', + 'gradient-conic': + 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', + }, + }, + }, + plugins: [], +} +export default config diff --git a/examples/nextjs-siwe-app-router/tsconfig.json b/examples/nextjs-siwe-app-router/tsconfig.json new file mode 100644 index 00000000..31eebad2 --- /dev/null +++ b/examples/nextjs-siwe-app-router/tsconfig.json @@ -0,0 +1,41 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "paths": { + "@/*": [ + "./src/*" + ] + }, + "plugins": [ + { + "name": "next" + } + ] + }, + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} diff --git a/package.json b/package.json index b73ac48f..67101d5e 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "dev:cra": "yarn workspace cra run dev", "dev:nextjs": "yarn workspace nextjs run dev", "dev:nextjs-siwe": "yarn workspace nextjs-siwe run dev", + "dev:nextjs-siwe-app-router": "yarn workspace nextjs-siwe-app-router run dev", "dev:vite": "yarn workspace vite run dev", "dev:testbench": "yarn workspace testbench run dev", "build": "node build.js && yarn workspace connectkit run build && cp README.md packages/connectkit/README.md", @@ -21,6 +22,7 @@ "build:cra": "yarn build && yarn workspace cra build", "build:nextjs": "yarn build && yarn workspace nextjs build", "build:nextjs-siwe": "yarn build && yarn workspace nextjs-siwe build", + "build:nextjs-siwe-app-router": "yarn build && yarn workspace nextjs-siwe-app-router build", "build:vite": "yarn build && yarn workspace vite build", "build:testbench": "yarn build && yarn build:connectkit-next-siwe && yarn workspace testbench build", "build:ci": "yarn workspaces foreach -R run build", diff --git a/yarn.lock b/yarn.lock index 5cf7d829..aed9e9b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13802,6 +13802,27 @@ __metadata: languageName: node linkType: hard +"nextjs-siwe-app-router@workspace:examples/nextjs-siwe-app-router": + version: 0.0.0-use.local + resolution: "nextjs-siwe-app-router@workspace:examples/nextjs-siwe-app-router" + dependencies: + "@types/node": 18.7.18 + "@types/react": ^18.0.6 + "@types/react-dom": ^18.0.2 + connectkit: "workspace:packages/connectkit" + connectkit-next-siwe: "workspace:packages/connectkit-next-siwe" + eslint: 8.23.1 + eslint-config-next: ^13 + next: ^13.4.4 + react: ^18.0.0 + react-dom: ^18.0.0 + siwe: ^2.1.4 + typescript: ^4.9.5 + viem: ^1.1.0 + wagmi: ^1.1.1 + languageName: unknown + linkType: soft + "nextjs-siwe@workspace:examples/nextjs-siwe": version: 0.0.0-use.local resolution: "nextjs-siwe@workspace:examples/nextjs-siwe" From 673a3da5496540a0ff8fdccb0da44cdcd5eca7b5 Mon Sep 17 00:00:00 2001 From: Alex Grover Date: Wed, 15 Nov 2023 22:50:13 -0800 Subject: [PATCH 6/6] Fix API route path --- .../src/app/api/siwe/{[...route].ts => [...route]/route.ts} | 0 packages/connectkit-next-siwe/src/app-router/configureSIWE.ts | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename examples/nextjs-siwe-app-router/src/app/api/siwe/{[...route].ts => [...route]/route.ts} (100%) diff --git a/examples/nextjs-siwe-app-router/src/app/api/siwe/[...route].ts b/examples/nextjs-siwe-app-router/src/app/api/siwe/[...route]/route.ts similarity index 100% rename from examples/nextjs-siwe-app-router/src/app/api/siwe/[...route].ts rename to examples/nextjs-siwe-app-router/src/app/api/siwe/[...route]/route.ts diff --git a/packages/connectkit-next-siwe/src/app-router/configureSIWE.ts b/packages/connectkit-next-siwe/src/app-router/configureSIWE.ts index 956b9880..0e1e3d74 100644 --- a/packages/connectkit-next-siwe/src/app-router/configureSIWE.ts +++ b/packages/connectkit-next-siwe/src/app-router/configureSIWE.ts @@ -138,7 +138,7 @@ export const configureServerSideSIWE = ({ function checkRouteParam(params: any): asserts params is { route: string[] } { if (!(params.route instanceof Array)) { throw new Error( - 'Catch-all query param `route` not found. SIWE API page should be named `[...route].ts` and within your `app/api` directory.' + 'Catch-all query param `route` not found. SIWE API page should be named `[...route]/route.ts` and within your `app/api` directory.' ); } }