From 85cfd628e0e6c19899ade3d3a90aa864cccb841a Mon Sep 17 00:00:00 2001 From: Shine Li Date: Wed, 17 Dec 2025 12:08:04 +1100 Subject: [PATCH 01/52] feat(auth-nextjs): add auth-nextjs package --- .husky/pre-commit | 2 +- packages/auth-nextjs/.eslintrc.cjs | 20 + packages/auth-nextjs/README.md | 189 ++++++ packages/auth-nextjs/package.json | 91 +++ packages/auth-nextjs/src/client/callback.tsx | 121 ++++ packages/auth-nextjs/src/client/index.ts | 16 + packages/auth-nextjs/src/client/provider.tsx | 352 ++++++++++ packages/auth-nextjs/src/config.ts | 140 ++++ packages/auth-nextjs/src/index.ts | 73 +++ packages/auth-nextjs/src/refresh.ts | 73 +++ packages/auth-nextjs/src/server/index.ts | 10 + .../auth-nextjs/src/server/with-page-auth.ts | 172 +++++ packages/auth-nextjs/src/types.ts | 181 ++++++ packages/auth-nextjs/tsconfig.eslint.json | 5 + packages/auth-nextjs/tsconfig.json | 20 + packages/auth-nextjs/tsup.config.ts | 17 + .../passport/sdk-sample-app/next.config.js | 4 +- packages/passport/sdk-sample-app/package.json | 4 +- .../src/components/AuthNextJS.tsx | 100 +++ .../src/context/ImmutableProvider.tsx | 9 +- .../sdk-sample-app/src/lib/auth-nextjs.ts | 30 + .../sdk-sample-app/src/pages/_app.tsx | 26 +- .../src/pages/api/auth/[...nextauth].ts | 7 + .../sdk-sample-app/src/pages/callback.tsx | 45 ++ .../sdk-sample-app/src/pages/index.tsx | 4 + pnpm-lock.yaml | 613 +++++++++++------- pnpm-workspace.yaml | 3 +- 27 files changed, 2085 insertions(+), 242 deletions(-) create mode 100644 packages/auth-nextjs/.eslintrc.cjs create mode 100644 packages/auth-nextjs/README.md create mode 100644 packages/auth-nextjs/package.json create mode 100644 packages/auth-nextjs/src/client/callback.tsx create mode 100644 packages/auth-nextjs/src/client/index.ts create mode 100644 packages/auth-nextjs/src/client/provider.tsx create mode 100644 packages/auth-nextjs/src/config.ts create mode 100644 packages/auth-nextjs/src/index.ts create mode 100644 packages/auth-nextjs/src/refresh.ts create mode 100644 packages/auth-nextjs/src/server/index.ts create mode 100644 packages/auth-nextjs/src/server/with-page-auth.ts create mode 100644 packages/auth-nextjs/src/types.ts create mode 100644 packages/auth-nextjs/tsconfig.eslint.json create mode 100644 packages/auth-nextjs/tsconfig.json create mode 100644 packages/auth-nextjs/tsup.config.ts create mode 100644 packages/passport/sdk-sample-app/src/components/AuthNextJS.tsx create mode 100644 packages/passport/sdk-sample-app/src/lib/auth-nextjs.ts create mode 100644 packages/passport/sdk-sample-app/src/pages/api/auth/[...nextauth].ts create mode 100644 packages/passport/sdk-sample-app/src/pages/callback.tsx diff --git a/.husky/pre-commit b/.husky/pre-commit index 5ec4a3505f..ef4e0058d0 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,6 +2,6 @@ . "$(dirname -- "$0")/_/husky.sh" # prevent heap limit allocation errors - increased to 8GB -export NODE_OPTIONS="--max-old-space-size=8192" +export NODE_OPTIONS="--max-old-space-size=10240" pnpm lint-staged diff --git a/packages/auth-nextjs/.eslintrc.cjs b/packages/auth-nextjs/.eslintrc.cjs new file mode 100644 index 0000000000..b136aaddaf --- /dev/null +++ b/packages/auth-nextjs/.eslintrc.cjs @@ -0,0 +1,20 @@ +module.exports = { + extends: ['../../.eslintrc'], + parserOptions: { + project: './tsconfig.eslint.json', + tsconfigRootDir: __dirname, + }, + rules: { + // Disable all import plugin rules due to stack overflow with auth package structure + 'import/order': 'off', + 'import/no-unresolved': 'off', + 'import/named': 'off', + 'import/default': 'off', + 'import/namespace': 'off', + 'import/no-cycle': 'off', + 'import/no-named-as-default': 'off', + 'import/no-named-as-default-member': 'off', + // Allow optional props without defaultProps in functional components (use destructuring defaults) + 'react/require-default-props': 'off', + }, +}; \ No newline at end of file diff --git a/packages/auth-nextjs/README.md b/packages/auth-nextjs/README.md new file mode 100644 index 0000000000..9d4bf60c17 --- /dev/null +++ b/packages/auth-nextjs/README.md @@ -0,0 +1,189 @@ +# @imtbl/auth-nextjs + +Next.js authentication integration for Immutable SDK using NextAuth.js. + +This package bridges `@imtbl/auth` popup-based authentication with NextAuth.js session management, providing: + +- Server-side session storage in encrypted JWT cookies +- Automatic token refresh on both server and client +- Full SSR support with `getServerSession` +- React hooks for easy client-side authentication + +## Installation + +```bash +pnpm add @imtbl/auth-nextjs next-auth +``` + +## Quick Start + +### 1. Set Up Auth API Route + +```typescript +// pages/api/auth/[...nextauth].ts +import { ImmutableAuth } from "@imtbl/auth-nextjs"; + +export default ImmutableAuth({ + clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, + redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, +}); +``` + +### 2. Create Callback Page + +```typescript +// pages/callback.tsx +import { CallbackPage } from "@imtbl/auth-nextjs/client"; + +const config = { + clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, + redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, +}; + +export default function Callback() { + return ; +} +``` + +### 3. Add Provider to App + +```typescript +// pages/_app.tsx +import { ImmutableAuthProvider } from "@imtbl/auth-nextjs/client"; + +const config = { + clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, + redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, +}; + +export default function App({ Component, pageProps }: AppProps) { + return ( + + + + ); +} +``` + +### 4. Use in Components + +```typescript +import { useImmutableAuth } from "@imtbl/auth-nextjs/client"; + +function LoginButton() { + const { user, isLoading, signIn, signOut } = useImmutableAuth(); + + if (isLoading) return
Loading...
; + + if (user) { + return ( +
+ Welcome, {user.email} + +
+ ); + } + + return ; +} +``` + +### 5. Access Session Server-Side (SSR) + +```typescript +// pages/profile.tsx +import { getImmutableSession } from "@imtbl/auth-nextjs/server"; +import type { GetServerSideProps } from "next"; + +const config = { + clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, + redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, +}; + +export default function ProfilePage({ user }) { + if (!user) return

Not logged in

; + return

Welcome, {user.email}

; +} + +export const getServerSideProps: GetServerSideProps = async (ctx) => { + const session = await getImmutableSession(ctx.req, ctx.res, config); + return { props: { user: session?.user ?? null } }; +}; +``` + +### 6. Protect Pages (Optional) + +```typescript +// pages/dashboard.tsx +import { withPageAuthRequired } from "@imtbl/auth-nextjs/server"; + +const config = { + clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, + redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, +}; + +function DashboardPage() { + return

Dashboard (protected)

; +} + +export default DashboardPage; + +// Redirects to /login if not authenticated +export const getServerSideProps = withPageAuthRequired(config); +``` + +## Environment Variables + +```bash +# .env.local +NEXT_PUBLIC_IMMUTABLE_CLIENT_ID=your-client-id +NEXT_PUBLIC_BASE_URL=http://localhost:3000 + +# Required by NextAuth for cookie encryption +NEXTAUTH_SECRET=generate-with-openssl-rand-base64-32 +NEXTAUTH_URL=http://localhost:3000 +``` + +Generate a secret: + +```bash +openssl rand -base64 32 +``` + +## API Reference + +### Main Exports (`@imtbl/auth-nextjs`) + +| Export | Description | +| ----------------------------------- | ------------------------------------------- | +| `ImmutableAuth(config, overrides?)` | Creates NextAuth handler (use in API route) | +| `ImmutableAuthConfig` | Configuration type | +| `ImmutableAuthOverrides` | NextAuth options override type | + +### Client Exports (`@imtbl/auth-nextjs/client`) + +| Export | Description | +| ----------------------- | ------------------------------------------------------------------------ | +| `ImmutableAuthProvider` | React context provider | +| `useImmutableAuth()` | Hook returning `{ user, session, signIn, signOut, getAccessToken, ... }` | +| `useAccessToken()` | Hook returning `getAccessToken` function | +| `CallbackPage` | Pre-built callback page component for OAuth redirects | + +### Server Exports (`@imtbl/auth-nextjs/server`) + +| Export | Description | +| ---------------------------------------- | ------------------------ | +| `getImmutableSession(req, res, config)` | Get session server-side | +| `withPageAuthRequired(config, options?)` | HOC for protecting pages | + +## How It Works + +1. **Login**: User clicks login → `@imtbl/auth` opens popup → tokens returned +2. **Session Creation**: Tokens passed to NextAuth's credentials provider → stored in encrypted JWT cookie +3. **Token Refresh**: NextAuth JWT callback automatically refreshes expired tokens using refresh_token +4. **SSR**: `getServerSession()` reads and decrypts cookie, providing full session with tokens +5. **Auto-hydration**: If localStorage is cleared but session cookie exists, the Auth instance is automatically hydrated from session tokens + +## License + +Apache-2.0 diff --git a/packages/auth-nextjs/package.json b/packages/auth-nextjs/package.json new file mode 100644 index 0000000000..3976bb1e25 --- /dev/null +++ b/packages/auth-nextjs/package.json @@ -0,0 +1,91 @@ +{ + "name": "@imtbl/auth-nextjs", + "version": "0.0.0", + "description": "Next.js authentication integration for Immutable SDK using NextAuth", + "author": "Immutable", + "bugs": "https://github.com/immutable/ts-immutable-sdk/issues", + "homepage": "https://github.com/immutable/ts-immutable-sdk#readme", + "license": "Apache-2.0", + "main": "dist/node/index.cjs", + "module": "dist/node/index.js", + "types": "./dist/types/index.d.ts", + "exports": { + ".": { + "development": { + "types": "./src/index.ts", + "require": "./dist/node/index.cjs", + "default": "./dist/node/index.js" + }, + "default": { + "types": "./dist/types/index.d.ts", + "require": "./dist/node/index.cjs", + "default": "./dist/node/index.js" + } + }, + "./client": { + "development": { + "types": "./src/client/index.ts", + "require": "./dist/node/client/index.cjs", + "default": "./dist/node/client/index.js" + }, + "default": { + "types": "./dist/types/client/index.d.ts", + "require": "./dist/node/client/index.cjs", + "default": "./dist/node/client/index.js" + } + }, + "./server": { + "development": { + "types": "./src/server/index.ts", + "require": "./dist/node/server/index.cjs", + "default": "./dist/node/server/index.js" + }, + "default": { + "types": "./dist/types/server/index.d.ts", + "require": "./dist/node/server/index.cjs", + "default": "./dist/node/server/index.js" + } + } + }, + "files": [ + "dist" + ], + "scripts": { + "build": "pnpm transpile && pnpm typegen", + "transpile": "tsup --config tsup.config.ts", + "typegen": "tsc --customConditions default --emitDeclarationOnly --outDir dist/types", + "lint": "eslint ./src --ext .ts,.tsx --max-warnings=0", + "lint:fix": "eslint ./src --ext .ts,.tsx --max-warnings=0 --fix", + "typecheck": "tsc --customConditions default --noEmit --jsx preserve", + "test": "jest" + }, + "dependencies": { + "@imtbl/auth": "workspace:*" + }, + "peerDependencies": { + "next": "14.2.25", + "next-auth": "^4.24.0", + "react": "^18.2.0" + }, + "devDependencies": { + "@swc/core": "^1.3.36", + "@swc/jest": "^0.2.37", + "@types/jest": "^29.5.12", + "@types/node": "^18.14.2", + "@types/react": "^18.3.5", + "jest": "^29.4.3", + "jest-environment-jsdom": "^29.4.3", + "next": "14.2.25", + "next-auth": "^4.24.0", + "react": "^18.2.0", + "ts-node": "^10.9.1", + "tsup": "^8.3.0", + "typescript": "^5.6.2" + }, + "publishConfig": { + "access": "public" + }, + "repository": "immutable/ts-immutable-sdk.git", + "type": "module" +} + diff --git a/packages/auth-nextjs/src/client/callback.tsx b/packages/auth-nextjs/src/client/callback.tsx new file mode 100644 index 0000000000..a6942ca3a1 --- /dev/null +++ b/packages/auth-nextjs/src/client/callback.tsx @@ -0,0 +1,121 @@ +'use client'; + +import React, { useEffect, useState } from 'react'; +import { useRouter } from 'next/router'; +import { Auth } from '@imtbl/auth'; +import type { ImmutableAuthConfig } from '../types'; + +export interface CallbackPageProps { + /** + * Immutable auth configuration + */ + config: ImmutableAuthConfig; + /** + * URL to redirect to after successful authentication (when not in popup) + */ + redirectTo?: string; + /** + * Custom loading component + */ + loadingComponent?: React.ReactElement | null; + /** + * Custom error component + */ + errorComponent?: (error: string) => React.ReactElement | null; +} + +const DEFAULT_AUTH_DOMAIN = 'https://auth.immutable.com'; + +/** + * Callback page component for handling OAuth redirects. + * + * Use this in your callback page to process authentication responses. + * + * @example + * ```tsx + * // pages/callback.tsx + * import { CallbackPage } from "@imtbl/auth-nextjs/client"; + * import { immutableConfig } from "@/lib/auth-nextjs"; + * + * export default function Callback() { + * return ; + * } + * ``` + */ +export function CallbackPage({ + config, + redirectTo = '/', + loadingComponent = null, + errorComponent = null, +}: CallbackPageProps) { + const router = useRouter(); + const [error, setError] = useState(null); + + useEffect(() => { + const handleCallback = async () => { + try { + // Create Auth instance to handle the callback + const auth = new Auth({ + clientId: config.clientId, + redirectUri: config.redirectUri, + logoutRedirectUri: config.logoutRedirectUri, + audience: config.audience || 'platform_api', + scope: config.scope || 'openid profile email offline_access transact', + authenticationDomain: config.authenticationDomain || DEFAULT_AUTH_DOMAIN, + }); + + // Process the callback - this extracts tokens from the URL + await auth.loginCallback(); + + // Check if we're in a popup window + if (window.opener) { + // Close the popup - the parent window will receive the tokens + window.close(); + } else { + // Not in a popup - redirect to specified page + router.replace(redirectTo); + } + } catch (err) { + setError(err instanceof Error ? err.message : 'Authentication failed'); + } + }; + + // Only run when we have the code parameter + if (router.isReady && router.query.code) { + handleCallback(); + } + }, [router.isReady, router.query.code, router, config, redirectTo]); + + if (error) { + if (errorComponent) { + return errorComponent(error); + } + + return ( +
+

Authentication Error

+

{error}

+ +
+ ); + } + + if (loadingComponent) { + return loadingComponent; + } + + return ( +
+

Completing authentication...

+
+ ); +} diff --git a/packages/auth-nextjs/src/client/index.ts b/packages/auth-nextjs/src/client/index.ts new file mode 100644 index 0000000000..70d08b59bd --- /dev/null +++ b/packages/auth-nextjs/src/client/index.ts @@ -0,0 +1,16 @@ +// Client-side exports +export { + ImmutableAuthProvider, + useImmutableAuth, + useAccessToken, +} from './provider'; + +export { CallbackPage, type CallbackPageProps } from './callback'; + +// Re-export useful types +export type { + ImmutableAuthProviderProps, + UseImmutableAuthReturn, + ImmutableAuthConfig, + ImmutableUser, +} from '../types'; diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx new file mode 100644 index 0000000000..38b31ba6eb --- /dev/null +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -0,0 +1,352 @@ +'use client'; + +import React, { + createContext, + useContext, + useEffect, + useRef, + useState, + useCallback, + useMemo, +} from 'react'; +import { + SessionProvider, useSession, signIn, signOut, +} from 'next-auth/react'; +import type { Session } from 'next-auth'; +import { Auth, type User, type DeviceTokenResponse } from '@imtbl/auth'; +import type { + ImmutableAuthConfig, + ImmutableAuthProviderProps, + UseImmutableAuthReturn, + ImmutableUser, + ImmutableTokenData, +} from '../types'; + +const DEFAULT_AUTH_DOMAIN = 'https://auth.immutable.com'; + +/** + * Internal context for Immutable auth state + */ +interface ImmutableAuthContextValue { + auth: Auth | null; + config: ImmutableAuthConfig; +} + +const ImmutableAuthContext = createContext(null); + +/** + * Internal provider that manages Auth instance + */ +function ImmutableAuthInner({ + children, + config, +}: { + children: React.ReactNode; + config: ImmutableAuthConfig; +}) { + const authRef = useRef(null); + const prevConfigRef = useRef(null); + const [isAuthReady, setIsAuthReady] = useState(false); + const { data: session, update: updateSession } = useSession(); + + // Initialize/reinitialize Auth instance when config changes (e.g., environment switch) + useEffect(() => { + if (typeof window === 'undefined') return; + + // Create a config key to detect changes (clientId + authDomain uniquely identify the environment) + const configKey = `${config.clientId}:${config.authenticationDomain || DEFAULT_AUTH_DOMAIN}`; + + // If config changed, recreate Auth instance + if (prevConfigRef.current !== null && prevConfigRef.current !== configKey) { + authRef.current = null; + setIsAuthReady(false); + } + prevConfigRef.current = configKey; + + if (!authRef.current) { + authRef.current = new Auth({ + clientId: config.clientId, + redirectUri: config.redirectUri, + logoutRedirectUri: config.logoutRedirectUri, + audience: config.audience || 'platform_api', + scope: config.scope || 'openid profile email offline_access transact', + authenticationDomain: config.authenticationDomain || DEFAULT_AUTH_DOMAIN, + }); + setIsAuthReady(true); + } + }, [config]); + + // Hydrate Auth instance from NextAuth session if localStorage is cleared + // This handles the case where a valid session exists but Auth has no local state + useEffect(() => { + const auth = authRef.current; + if (!auth || !isAuthReady) return; + if (!session?.accessToken || !session?.idToken) return; + + const hydrateAuth = async () => { + try { + // Re-check tokens inside async function for TypeScript narrowing + const { + accessToken, idToken, refreshToken, accessTokenExpires, + } = session; + if (!accessToken || !idToken) return; + + // Check if Auth already has user data + const existingUser = await auth.getUser(); + if (existingUser) return; // Already hydrated + + // Calculate expires_in from accessTokenExpires + const expiresIn = accessTokenExpires + ? Math.max(0, Math.floor((accessTokenExpires - Date.now()) / 1000)) + : 3600; // Default 1 hour + + // Hydrate Auth with tokens from NextAuth session + const tokenResponse: DeviceTokenResponse = { + access_token: accessToken, + refresh_token: refreshToken, + id_token: idToken, + token_type: 'Bearer', + expires_in: expiresIn, + }; + + await auth.storeTokens(tokenResponse); + // eslint-disable-next-line no-console + console.log('[auth-nextjs] Hydrated Auth instance from session'); + } catch (error) { + // eslint-disable-next-line no-console + console.warn('[auth-nextjs] Failed to hydrate Auth instance:', error); + } + }; + + hydrateAuth(); + }, [isAuthReady, session]); + + // Listen for Auth events to sync tokens back to NextAuth + useEffect(() => { + const auth = authRef.current; + if (!auth || !isAuthReady) return undefined; + + const handleLoggedIn = async (authUser: User) => { + // When Auth refreshes tokens, sync to NextAuth session + if (session?.accessToken && authUser.accessToken !== session.accessToken) { + await updateSession({ + accessToken: authUser.accessToken, + refreshToken: authUser.refreshToken, + idToken: authUser.idToken, + accessTokenExpires: Date.now() + 3600 * 1000, // 1 hour + zkEvm: authUser.zkEvm, + }); + } + }; + + auth.eventEmitter.on('loggedIn', handleLoggedIn); + + return () => { + auth.eventEmitter.removeListener('loggedIn', handleLoggedIn); + }; + }, [isAuthReady, session, updateSession]); + + const contextValue = useMemo( + () => ({ auth: authRef.current, config }), + [isAuthReady, config], + ); + + return ( + + {children} + + ); +} + +/** + * Provider component for Immutable authentication with NextAuth + * + * Wraps your app to provide authentication state via useImmutableAuth hook. + * + * @example + * ```tsx + * // pages/_app.tsx + * import { ImmutableAuthProvider } from "@imtbl/auth-nextjs/client"; + * + * const config = { + * clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, + * redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, + * }; + * + * export default function App({ Component, pageProps }: AppProps) { + * return ( + * + * + * + * ); + * } + * ``` + */ +export function ImmutableAuthProvider({ + children, + config, + session, +}: ImmutableAuthProviderProps) { + return ( + + {children} + + ); +} + +/** + * Hook to access Immutable authentication state and methods + * + * Must be used within an ImmutableAuthProvider. + * + * @example + * ```tsx + * function MyComponent() { + * const { user, isLoading, signIn, signOut } = useImmutableAuth(); + * + * if (isLoading) return
Loading...
; + * + * if (user) { + * return ( + *
+ *

Welcome, {user.email}

+ * + *
+ * ); + * } + * + * return ; + * } + * ``` + */ +export function useImmutableAuth(): UseImmutableAuthReturn { + const context = useContext(ImmutableAuthContext); + const { data: sessionData, status } = useSession(); + + if (!context) { + throw new Error('useImmutableAuth must be used within ImmutableAuthProvider'); + } + + // Cast session to our augmented Session type + const session = sessionData as Session | null; + + const { auth } = context; + const isLoading = status === 'loading'; + const isAuthenticated = status === 'authenticated' && !!session; + + // Extract user from session + const user: ImmutableUser | null = session?.user + ? { + sub: session.user.sub, + email: session.user.email, + nickname: session.user.nickname, + } + : null; + + // Sign in with Immutable popup + const handleSignIn = useCallback(async () => { + if (!auth) { + throw new Error('Auth not initialized'); + } + + // Open popup login + const authUser = await auth.login(); + if (!authUser) { + throw new Error('Login failed'); + } + + // Build token data for NextAuth + const tokenData: ImmutableTokenData = { + accessToken: authUser.accessToken, + refreshToken: authUser.refreshToken, + idToken: authUser.idToken, + accessTokenExpires: Date.now() + 3600 * 1000, // 1 hour + profile: { + sub: authUser.profile.sub, + email: authUser.profile.email, + nickname: authUser.profile.nickname, + }, + zkEvm: authUser.zkEvm, + }; + + // Sign in to NextAuth with the tokens + await signIn('immutable', { + tokens: JSON.stringify(tokenData), + redirect: false, + }); + }, [auth]); + + // Sign out from both NextAuth and Immutable + const handleSignOut = useCallback(async () => { + // Sign out from NextAuth first (clears session cookie) + await signOut({ redirect: false }); + + // Clear local Auth state without doing a full OIDC logout redirect + // We use getLogoutUrl() which clears local storage but returns URL instead of redirecting + if (auth) { + try { + // This removes the user from local storage without redirecting + await auth.getLogoutUrl(); + } catch (error) { + // Ignore errors (user may already be logged out) + // eslint-disable-next-line no-console + console.warn('[auth-nextjs] Logout cleanup error:', error); + } + } + }, [auth]); + + // Get access token (refreshes if needed) + const getAccessToken = useCallback(async (): Promise => { + // First try to get from Auth instance (most up-to-date) + if (auth) { + try { + const token = await auth.getAccessToken(); + if (token) { + return token; + } + } catch { + // Fall through to session + } + } + + // Fall back to session token + if (session?.accessToken) { + return session.accessToken; + } + + throw new Error('No access token available'); + }, [auth, session]); + + return { + user, + session, + isLoading, + isAuthenticated, + signIn: handleSignIn, + signOut: handleSignOut, + getAccessToken, + auth, + }; +} + +/** + * Hook to get a function that returns a valid access token + * + * @example + * ```tsx + * function ApiComponent() { + * const getAccessToken = useAccessToken(); + * + * const fetchData = async () => { + * const token = await getAccessToken(); + * const response = await fetch("/api/data", { + * headers: { Authorization: `Bearer ${token}` }, + * }); + * }; + * } + * ``` + */ +export function useAccessToken(): () => Promise { + const { getAccessToken } = useImmutableAuth(); + return getAccessToken; +} diff --git a/packages/auth-nextjs/src/config.ts b/packages/auth-nextjs/src/config.ts new file mode 100644 index 0000000000..9d480a04e1 --- /dev/null +++ b/packages/auth-nextjs/src/config.ts @@ -0,0 +1,140 @@ +import type { NextAuthOptions } from 'next-auth'; +import Credentials from 'next-auth/providers/credentials'; +import type { ImmutableAuthConfig, ImmutableTokenData } from './types'; +import { refreshAccessToken, isTokenExpired } from './refresh'; + +// Handle ESM/CJS interop - CredentialsProvider may be default export or the module itself +const CredentialsProvider = (Credentials as unknown as { default?: typeof Credentials }).default || Credentials; + +/** + * Create NextAuth options configured for Immutable authentication + * + * @example + * ```typescript + * // lib/auth.ts + * import { createAuthOptions } from "@imtbl/auth-nextjs"; + * + * export const authOptions = createAuthOptions({ + * clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, + * redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, + * }); + * + * // pages/api/auth/[...nextauth].ts + * import NextAuth from "next-auth"; + * import { authOptions } from "@/lib/auth"; + * + * export default NextAuth(authOptions); + * ``` + */ +export function createAuthOptions(config: ImmutableAuthConfig): NextAuthOptions { + return { + providers: [ + CredentialsProvider({ + id: 'immutable', + name: 'Immutable', + credentials: { + tokens: { label: 'Tokens', type: 'text' }, + }, + async authorize(credentials) { + if (!credentials?.tokens) { + return null; + } + + try { + const tokenData: ImmutableTokenData = JSON.parse(credentials.tokens); + + // Return user object with all token data + return { + id: tokenData.profile.sub, + sub: tokenData.profile.sub, + email: tokenData.profile.email, + nickname: tokenData.profile.nickname, + accessToken: tokenData.accessToken, + refreshToken: tokenData.refreshToken, + idToken: tokenData.idToken, + accessTokenExpires: tokenData.accessTokenExpires, + zkEvm: tokenData.zkEvm, + }; + } catch (error) { + // eslint-disable-next-line no-console + console.error('[auth-nextjs] Failed to parse token data:', error); + return null; + } + }, + }), + ], + + callbacks: { + async jwt({ + token, user, trigger, session: sessionUpdate, + }) { + // Initial sign in - store all token data + if (user) { + return { + ...token, + sub: user.sub, + email: user.email, + nickname: user.nickname, + accessToken: user.accessToken, + refreshToken: user.refreshToken, + idToken: user.idToken, + accessTokenExpires: user.accessTokenExpires, + zkEvm: user.zkEvm, + }; + } + + // Handle session update (for client-side token sync) + if (trigger === 'update' && sessionUpdate) { + return { + ...token, + ...(sessionUpdate.accessToken && { accessToken: sessionUpdate.accessToken }), + ...(sessionUpdate.refreshToken && { refreshToken: sessionUpdate.refreshToken }), + ...(sessionUpdate.idToken && { idToken: sessionUpdate.idToken }), + ...(sessionUpdate.accessTokenExpires && { accessTokenExpires: sessionUpdate.accessTokenExpires }), + ...(sessionUpdate.zkEvm && { zkEvm: sessionUpdate.zkEvm }), + }; + } + + // Return token if not expired + if (!isTokenExpired(token.accessTokenExpires)) { + return token; + } + + // Token expired - refresh it + return refreshAccessToken(token, config); + }, + + async session({ session, token }) { + // Expose token data to the session + return { + ...session, + user: { + sub: token.sub, + email: token.email, + nickname: token.nickname, + }, + accessToken: token.accessToken, + refreshToken: token.refreshToken, + idToken: token.idToken, + accessTokenExpires: token.accessTokenExpires, + zkEvm: token.zkEvm, + ...(token.error && { error: token.error }), + }; + }, + }, + + pages: { + signIn: '/login', + error: '/login', + }, + + session: { + strategy: 'jwt', + // Session max age in seconds (30 days default) + maxAge: 30 * 24 * 60 * 60, + }, + + // Use NEXTAUTH_SECRET from environment + secret: process.env.NEXTAUTH_SECRET, + }; +} diff --git a/packages/auth-nextjs/src/index.ts b/packages/auth-nextjs/src/index.ts new file mode 100644 index 0000000000..2cbe978630 --- /dev/null +++ b/packages/auth-nextjs/src/index.ts @@ -0,0 +1,73 @@ +// Main entry point for @imtbl/auth-nextjs + +import NextAuth, { type NextAuthOptions } from 'next-auth'; +import { createAuthOptions } from './config'; +import type { ImmutableAuthConfig } from './types'; + +/** + * NextAuth options that can be overridden. + * Excludes 'providers' as that's managed internally. + */ +export type ImmutableAuthOverrides = Omit; + +/** + * Create a NextAuth handler with Immutable authentication + * + * @param config - Immutable auth configuration + * @param overrides - Optional NextAuth options to override defaults + * + * @example Basic usage + * ```typescript + * // pages/api/auth/[...nextauth].ts + * import { ImmutableAuth } from "@imtbl/auth-nextjs"; + * + * export default ImmutableAuth({ + * clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, + * redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, + * }); + * ``` + * + * @example With NextAuth overrides + * ```typescript + * export default ImmutableAuth( + * { clientId: "...", redirectUri: "..." }, + * { + * pages: { signIn: "/custom-login", error: "/auth-error" }, + * debug: true, + * } + * ); + * ``` + */ +export function ImmutableAuth( + config: ImmutableAuthConfig, + overrides?: ImmutableAuthOverrides, +) { + const authOptions = createAuthOptions(config); + + // Merge overrides with generated options + const mergedOptions: NextAuthOptions = overrides + ? { + ...authOptions, + ...overrides, + // Deep merge callbacks if both exist + callbacks: { + ...authOptions.callbacks, + ...overrides.callbacks, + }, + } + : authOptions; + + return NextAuth(mergedOptions); +} + +// Types +export type { + ImmutableAuthConfig, + ImmutableTokenData, + ImmutableUser, + ZkEvmInfo, + WithPageAuthRequiredOptions, +} from './types'; + +// Token refresh utilities (for advanced use) +export { refreshAccessToken, isTokenExpired } from './refresh'; diff --git a/packages/auth-nextjs/src/refresh.ts b/packages/auth-nextjs/src/refresh.ts new file mode 100644 index 0000000000..d247657ebd --- /dev/null +++ b/packages/auth-nextjs/src/refresh.ts @@ -0,0 +1,73 @@ +import type { JWT } from 'next-auth/jwt'; +import type { ImmutableAuthConfig } from './types'; + +const DEFAULT_AUTH_DOMAIN = 'https://auth.immutable.com'; + +/** + * Refresh the access token using the refresh token + * Called by NextAuth JWT callback when token is expired + */ +export async function refreshAccessToken( + token: JWT, + config: ImmutableAuthConfig, +): Promise { + const authDomain = config.authenticationDomain || DEFAULT_AUTH_DOMAIN; + + if (!token.refreshToken) { + return { + ...token, + error: 'NoRefreshToken', + }; + } + + try { + const response = await fetch(`${authDomain}/oauth/token`, { + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + body: new URLSearchParams({ + grant_type: 'refresh_token', + client_id: config.clientId, + refresh_token: token.refreshToken, + }), + }); + + const data = await response.json(); + + if (!response.ok) { + throw new Error(data.error_description || data.error || 'Token refresh failed'); + } + + // Calculate expiry (access_token typically expires in 1 hour) + const expiresIn = data.expires_in || 3600; + const accessTokenExpires = Date.now() + expiresIn * 1000; + + return { + ...token, + accessToken: data.access_token, + refreshToken: data.refresh_token ?? token.refreshToken, + idToken: data.id_token ?? token.idToken, + accessTokenExpires, + error: undefined, + }; + } catch (error) { + // eslint-disable-next-line no-console + console.error('[auth-nextjs] Failed to refresh token:', error); + return { + ...token, + error: 'RefreshTokenError', + }; + } +} + +/** + * Check if the access token is expired or about to expire + * Returns true if token expires within the buffer time (default 60 seconds) + */ +export function isTokenExpired( + accessTokenExpires: number, + bufferSeconds: number = 60, +): boolean { + return Date.now() >= accessTokenExpires - bufferSeconds * 1000; +} diff --git a/packages/auth-nextjs/src/server/index.ts b/packages/auth-nextjs/src/server/index.ts new file mode 100644 index 0000000000..00fb0c2a9d --- /dev/null +++ b/packages/auth-nextjs/src/server/index.ts @@ -0,0 +1,10 @@ +// Server-side exports +export { + withPageAuthRequired, + getImmutableSession, + type WithPageAuthRequiredFullOptions, + type WithPageAuthRequiredProps, +} from './with-page-auth'; + +// Re-export useful types +export type { WithPageAuthRequiredOptions } from '../types'; diff --git a/packages/auth-nextjs/src/server/with-page-auth.ts b/packages/auth-nextjs/src/server/with-page-auth.ts new file mode 100644 index 0000000000..f7ded3aa5a --- /dev/null +++ b/packages/auth-nextjs/src/server/with-page-auth.ts @@ -0,0 +1,172 @@ +import type { + GetServerSideProps, + GetServerSidePropsContext, + GetServerSidePropsResult, +} from 'next'; +import type { IncomingMessage, ServerResponse } from 'http'; +import { getServerSession as nextAuthGetServerSession, type Session } from 'next-auth'; +import type { ImmutableAuthConfig, WithPageAuthRequiredOptions } from '../types'; +import { createAuthOptions } from '../config'; + +/** + * Extended options for withPageAuthRequired + */ +export interface WithPageAuthRequiredFullOptions< + P extends Record = Record, +> extends WithPageAuthRequiredOptions { + /** + * Custom getServerSideProps that runs after auth check. + * Session is guaranteed to exist when this runs. + */ + getServerSideProps?: ( + ctx: GetServerSidePropsContext, + session: Session + ) => Promise>; +} + +/** + * Props added by withPageAuthRequired + */ +export interface WithPageAuthRequiredProps { + session: Session; +} + +/** + * Get the Immutable session on the server side. + * + * @example + * ```typescript + * // pages/api/user.ts + * import { getImmutableSession } from "@imtbl/auth-nextjs/server"; + * + * const config = { clientId: "...", redirectUri: "..." }; + * + * export default async function handler(req, res) { + * const session = await getImmutableSession(req, res, config); + * if (!session) { + * return res.status(401).json({ error: "Not authenticated" }); + * } + * res.json({ user: session.user }); + * } + * ``` + * + * @example In getServerSideProps + * ```typescript + * export const getServerSideProps = async (ctx) => { + * const session = await getImmutableSession(ctx.req, ctx.res, config); + * return { props: { user: session?.user ?? null } }; + * }; + * ``` + */ +export async function getImmutableSession( + req: IncomingMessage & { cookies: Partial> }, + res: ServerResponse, + config: ImmutableAuthConfig, +): Promise { + const authOptions = createAuthOptions(config); + return nextAuthGetServerSession(req, res, authOptions); +} + +/** + * Higher-order function that protects a page with authentication. + * + * When a signed-out user visits the page: + * 1. Server checks session via getServerSession() → returns null + * 2. Returns HTTP redirect to login page with returnTo parameter + * 3. After login, user is redirected back to original page + * + * @example Basic usage: + * ```typescript + * // pages/dashboard.tsx + * import { withPageAuthRequired } from "@imtbl/auth-nextjs/server"; + * + * const config = { clientId: "...", redirectUri: "..." }; + * + * function DashboardPage() { + * // Page only renders if user is authenticated + * return

Dashboard

; + * } + * + * export default DashboardPage; + * export const getServerSideProps = withPageAuthRequired(config); + * ``` + * + * @example With additional data fetching: + * ```typescript + * export const getServerSideProps = withPageAuthRequired(config, { + * async getServerSideProps(ctx, session) { + * // session is guaranteed to exist here + * const data = await fetchData(session.accessToken); + * return { props: { data } }; + * }, + * }); + * ``` + * + * @example With custom options: + * ```typescript + * export const getServerSideProps = withPageAuthRequired(config, { + * loginUrl: "/auth/signin", + * returnTo: "/dashboard", + * }); + * ``` + */ +export function withPageAuthRequired< + P extends Record = Record, +>( + config: ImmutableAuthConfig, + options: WithPageAuthRequiredFullOptions

= {}, +): GetServerSideProps { + const { + loginUrl = '/login', + returnTo, + getServerSideProps: customGetServerSideProps, + } = options; + + const authOptions = createAuthOptions(config); + + return async (ctx: GetServerSidePropsContext) => { + const session = await nextAuthGetServerSession(ctx.req, ctx.res, authOptions); + + if (!session) { + // Build redirect URL + let destination = loginUrl; + + if (returnTo !== false) { + const returnPath = returnTo || ctx.resolvedUrl; + destination = `${loginUrl}?returnTo=${encodeURIComponent(returnPath)}`; + } + + return { + redirect: { + destination, + permanent: false, + }, + }; + } + + // Run custom getServerSideProps if provided + if (customGetServerSideProps) { + const result = await customGetServerSideProps(ctx, session); + + // Handle redirect or notFound + if ('redirect' in result || 'notFound' in result) { + return result; + } + + // Merge props with session + return { + props: { + ...result.props, + session, + } as WithPageAuthRequiredProps & P, + }; + } + + // Default: just return session + return { + props: { + session, + } as WithPageAuthRequiredProps & P, + }; + }; +} diff --git a/packages/auth-nextjs/src/types.ts b/packages/auth-nextjs/src/types.ts new file mode 100644 index 0000000000..7466ed9579 --- /dev/null +++ b/packages/auth-nextjs/src/types.ts @@ -0,0 +1,181 @@ +import type { DefaultSession, DefaultUser, Session } from 'next-auth'; +import type { DefaultJWT } from 'next-auth/jwt'; + +/** + * Configuration for ImmutableAuthProvider and createAuthOptions + */ +export interface ImmutableAuthConfig { + /** + * Immutable OAuth client ID + */ + clientId: string; + + /** + * OAuth callback redirect URI + */ + redirectUri: string; + + /** + * Where to redirect after logout + */ + logoutRedirectUri?: string; + + /** + * OAuth audience (default: "platform_api") + */ + audience?: string; + + /** + * OAuth scopes (default: "openid profile email offline_access transact") + */ + scope?: string; + + /** + * Authentication domain (default: "https://auth.immutable.com") + */ + authenticationDomain?: string; +} + +/** + * zkEVM wallet information + */ +export interface ZkEvmInfo { + ethAddress: string; + userAdminAddress: string; +} + +/** + * User profile from Immutable + */ +export interface ImmutableUser { + sub: string; + email?: string; + nickname?: string; +} + +/** + * NextAuth module augmentation to add Immutable-specific fields + */ +declare module 'next-auth' { + // eslint-disable-next-line @typescript-eslint/no-shadow + interface Session extends DefaultSession { + user: ImmutableUser; + accessToken: string; + refreshToken?: string; + idToken?: string; + accessTokenExpires: number; + zkEvm?: ZkEvmInfo; + error?: string; + } + + interface User extends DefaultUser { + sub: string; + email?: string; + nickname?: string; + accessToken: string; + refreshToken?: string; + idToken?: string; + accessTokenExpires: number; + zkEvm?: ZkEvmInfo; + } +} + +declare module 'next-auth/jwt' { + interface JWT extends DefaultJWT { + sub: string; + email?: string; + nickname?: string; + accessToken: string; + refreshToken?: string; + idToken?: string; + accessTokenExpires: number; + zkEvm?: ZkEvmInfo; + error?: string; + } +} + +/** + * Token data passed from client to NextAuth credentials provider + */ +export interface ImmutableTokenData { + accessToken: string; + refreshToken?: string; + idToken?: string; + accessTokenExpires: number; + profile: { + sub: string; + email?: string; + nickname?: string; + }; + zkEvm?: ZkEvmInfo; +} + +/** + * Props for ImmutableAuthProvider + */ +export interface ImmutableAuthProviderProps { + children: React.ReactNode; + /** + * Immutable auth configuration + */ + config: ImmutableAuthConfig; + /** + * Initial session from server (for SSR hydration) + * Can be Session from getServerSession or any compatible session object + */ + session?: Session | DefaultSession | null; +} + +/** + * Return type of useImmutableAuth hook + */ +export interface UseImmutableAuthReturn { + /** + * Current user profile (null if not authenticated) + */ + user: ImmutableUser | null; + /** + * Full NextAuth session with tokens + */ + session: Session | null; + /** + * Whether authentication state is loading + */ + isLoading: boolean; + /** + * Whether user is authenticated + */ + isAuthenticated: boolean; + /** + * Sign in with Immutable (opens popup) + */ + signIn: () => Promise; + /** + * Sign out from both NextAuth and Immutable + */ + signOut: () => Promise; + /** + * Get a valid access token (refreshes if needed) + */ + getAccessToken: () => Promise; + /** + * The underlying Auth instance (for advanced use) + */ + auth: import('@imtbl/auth').Auth | null; +} + +/** + * Options for withPageAuthRequired + */ +export interface WithPageAuthRequiredOptions { + /** + * URL to redirect to when not authenticated + * @default "/login" + */ + loginUrl?: string; + /** + * URL to redirect to after login + * @default current page + */ + returnTo?: string | false; +} diff --git a/packages/auth-nextjs/tsconfig.eslint.json b/packages/auth-nextjs/tsconfig.eslint.json new file mode 100644 index 0000000000..1eeb7d351c --- /dev/null +++ b/packages/auth-nextjs/tsconfig.eslint.json @@ -0,0 +1,5 @@ +{ + "extends": "./tsconfig.json", + "exclude": [], + "include": ["src"] +} diff --git a/packages/auth-nextjs/tsconfig.json b/packages/auth-nextjs/tsconfig.json new file mode 100644 index 0000000000..af497ae60e --- /dev/null +++ b/packages/auth-nextjs/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./dist", + "rootDirs": ["src"], + "customConditions": ["development"], + "types": ["node"], + "jsx": "react-jsx" + }, + "include": ["src"], + "exclude": [ + "node_modules", + "dist", + "src/**/*.test.ts", + "src/**/*.test.tsx", + "src/**/*.spec.ts", + "src/**/*.spec.tsx" + ] +} + diff --git a/packages/auth-nextjs/tsup.config.ts b/packages/auth-nextjs/tsup.config.ts new file mode 100644 index 0000000000..7b0bdbd58f --- /dev/null +++ b/packages/auth-nextjs/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + entry: { + index: "src/index.ts", + "client/index": "src/client/index.ts", + "server/index": "src/server/index.ts", + }, + outDir: "dist/node", + format: ["esm", "cjs"], + target: "es2022", + platform: "node", + dts: false, + clean: true, + external: ["react", "next", "next-auth", "next/navigation", "next/headers"], +}); + diff --git a/packages/passport/sdk-sample-app/next.config.js b/packages/passport/sdk-sample-app/next.config.js index 6f4b2c2c11..f1dc3a0669 100644 --- a/packages/passport/sdk-sample-app/next.config.js +++ b/packages/passport/sdk-sample-app/next.config.js @@ -15,7 +15,9 @@ const nextConfig = { typescript: { tsconfigPath: './tsconfig.build.json', }, - output: 'export', + // Static export disables API routes. + // Set ENABLE_API_ROUTES=true to enable API routes (required for auth-nextjs) + ...(process.env.ENABLE_API_ROUTES !== 'true' && { output: 'export' }), reactStrictMode: true, }; diff --git a/packages/passport/sdk-sample-app/package.json b/packages/passport/sdk-sample-app/package.json index 498291463e..0f983d958d 100644 --- a/packages/passport/sdk-sample-app/package.json +++ b/packages/passport/sdk-sample-app/package.json @@ -4,6 +4,7 @@ "dependencies": { "@biom3/design-tokens": "^0.4.5", "@biom3/react": "^0.29.4", + "@imtbl/auth-nextjs": "workspace:*", "@imtbl/blockchain-data": "workspace:*", "@imtbl/config": "workspace:*", "@imtbl/generated-clients": "workspace:*", @@ -20,6 +21,7 @@ "ethers": "^6.13.4", "motion": "^11.17.0", "next": "14.2.25", + "next-auth": "^4.24.0", "react": "^18.2.0", "react-bootstrap": "^2.7.2", "react-dom": "^18.2.0" @@ -41,7 +43,7 @@ "scripts": { "build": "next build", "dev": "next dev", - "dev-with-sdk": "concurrently 'pnpm dev' 'pnpm run -w dev'", + "dev-with-sdk": "concurrently 'ENABLE_API_ROUTES=true pnpm dev' 'pnpm run -w dev'", "lint": "eslint 'src/**/*.{ts,tsx}' --max-warnings=0", "start": "next start" } diff --git a/packages/passport/sdk-sample-app/src/components/AuthNextJS.tsx b/packages/passport/sdk-sample-app/src/components/AuthNextJS.tsx new file mode 100644 index 0000000000..c7d76c02fc --- /dev/null +++ b/packages/passport/sdk-sample-app/src/components/AuthNextJS.tsx @@ -0,0 +1,100 @@ +import { useCallback } from "react"; +import { Stack } from "react-bootstrap"; +import { Body } from "@biom3/react"; +import { useImmutableAuth } from "@imtbl/auth-nextjs/client"; +import CardStack from "@/components/CardStack"; +import WorkflowButton from "@/components/WorkflowButton"; +import { useStatusProvider } from "@/context/StatusProvider"; +import { useImmutableProvider } from "@/context/ImmutableProvider"; +import { usePassportProvider } from "@/context/PassportProvider"; + +/** + * Example component demonstrating @imtbl/auth-nextjs usage + * Uses useImmutableAuth hook from the provider (which handles hydration automatically) + */ +export default function AuthNextJS() { + const { addMessage } = useStatusProvider(); + const { environment } = useImmutableProvider(); + const { logout: passportLogout } = usePassportProvider(); + const { + user, + session, + isLoading, + isAuthenticated, + signIn, + signOut, + } = useImmutableAuth(); + + const handleSignIn = useCallback(async () => { + try { + await signIn(); + addMessage("Auth NextJS", `Login successful (${environment})`); + } catch (error) { + addMessage("Auth NextJS", error); + } + }, [signIn, environment, addMessage]); + + const handleSignOut = useCallback(async () => { + try { + await signOut(); + // Also logout from Passport + await passportLogout(); + addMessage("Auth NextJS", "Logout successful"); + } catch (error) { + addMessage("Auth NextJS", error); + } + }, [signOut, passportLogout, addMessage]); + + const handleGetUserInfo = useCallback(() => { + if (user) { + addMessage("Auth NextJS - User Info", { + sub: user.sub, + email: user.email, + nickname: user.nickname, + }); + } else { + addMessage("Auth NextJS", "Not authenticated"); + } + }, [user, addMessage]); + + const handleGetSessionInfo = useCallback(() => { + if (session) { + addMessage("Auth NextJS - Session Info", { + environment, + hasAccessToken: !!session.accessToken, + hasRefreshToken: !!session.refreshToken, + tokenExpires: session.accessTokenExpires + ? new Date(session.accessTokenExpires).toLocaleString() + : "N/A", + zkEvm: session.zkEvm || null, + }); + } else { + addMessage("Auth NextJS", "No session"); + } + }, [session, environment, addMessage]); + + return ( + + + + Login (NextAuth) + + + Logout (NextAuth) + + + Get User Info + + + Get Session Info + + + {isAuthenticated && ( + + Logged in as: {user?.email || user?.sub} ({environment}) + + )} + + ); +} + diff --git a/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx b/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx index 6e4a3099d4..4951c53002 100644 --- a/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx +++ b/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx @@ -10,6 +10,7 @@ import { import { Orderbook, OrderbookOverrides } from '@imtbl/orderbook'; import { Passport, PassportModuleConfiguration } from '@imtbl/passport'; import { Environment, ImmutableConfiguration, ModuleConfiguration } from '@imtbl/config'; +import { ImmutableAuthProvider } from '@imtbl/auth-nextjs/client'; import { AUDIENCE, POPUP_REDIRECT_URI, @@ -23,6 +24,7 @@ import { EnvironmentNames } from '@/types'; import useLocalStorage from '@/hooks/useLocalStorage'; import { ImxApiClients, createConfig } from '@imtbl/generated-clients'; import { BlockchainData, BlockchainDataModuleConfiguration } from '@imtbl/blockchain-data'; +import { getAuthConfig } from '@/lib/auth-nextjs'; const getSdkConfig = (environment: EnvironmentNames): ImxModuleConfiguration => { switch (environment) { @@ -240,9 +242,14 @@ export function ImmutableProvider({ setEnvironment, }), [sdkClient, orderbookClient, passportClient, blockchainData, environment, setEnvironment]); + // Get auth-nextjs config based on current environment + const authConfig = useMemo(() => getAuthConfig(environment), [environment]); + return ( - {children} + + {children} + ); } diff --git a/packages/passport/sdk-sample-app/src/lib/auth-nextjs.ts b/packages/passport/sdk-sample-app/src/lib/auth-nextjs.ts new file mode 100644 index 0000000000..33265f5db6 --- /dev/null +++ b/packages/passport/sdk-sample-app/src/lib/auth-nextjs.ts @@ -0,0 +1,30 @@ +import type { ImmutableAuthConfig } from "@imtbl/auth-nextjs"; +import { EnvironmentNames } from "@/types"; + +// Client IDs for each environment (same as ImmutableProvider) +const CLIENT_IDS: Record = { + [EnvironmentNames.PRODUCTION]: "PtQRK4iRJ8GkXjiz6xfImMAYhPhW0cYk", + [EnvironmentNames.SANDBOX]: "mjtCL8mt06BtbxSkp2vbrYStKWnXVZfo", + [EnvironmentNames.DEV]: "pCtSnHovRnPiQuBcFkXAnbCNqNVcDM3m", +}; + +// Auth domains for each environment +const AUTH_DOMAINS: Record = { + [EnvironmentNames.PRODUCTION]: "https://auth.immutable.com", + [EnvironmentNames.SANDBOX]: "https://auth.immutable.com", + [EnvironmentNames.DEV]: "https://auth.dev.immutable.com", +}; + +// Get auth-nextjs config for a specific environment +export function getAuthConfig(environment: EnvironmentNames): ImmutableAuthConfig { + const baseUrl = typeof window !== "undefined" ? window.location.origin : "http://localhost:3000"; + + return { + clientId: CLIENT_IDS[environment], + redirectUri: `${baseUrl}/callback`, + audience: "platform_api", + scope: "openid profile email offline_access transact", + authenticationDomain: AUTH_DOMAINS[environment], + }; +} + diff --git a/packages/passport/sdk-sample-app/src/pages/_app.tsx b/packages/passport/sdk-sample-app/src/pages/_app.tsx index 8ae1164431..a8d8e5898a 100644 --- a/packages/passport/sdk-sample-app/src/pages/_app.tsx +++ b/packages/passport/sdk-sample-app/src/pages/_app.tsx @@ -3,21 +3,27 @@ import '@/styles/globals.css'; import React from 'react'; import type { AppProps } from 'next/app'; import { BiomeCombinedProviders } from '@biom3/react'; +import { SessionProvider } from 'next-auth/react'; import { ImmutableProvider } from '@/context/ImmutableProvider'; import { StatusProvider } from '@/context/StatusProvider'; import { PassportProvider } from '@/context/PassportProvider'; export default function App({ Component, pageProps }: AppProps) { return ( - - - - - {/* @ts-ignore */} - - - - - + + + + + + {/* @ts-ignore */} + + + + + + ); } + + + diff --git a/packages/passport/sdk-sample-app/src/pages/api/auth/[...nextauth].ts b/packages/passport/sdk-sample-app/src/pages/api/auth/[...nextauth].ts new file mode 100644 index 0000000000..b7f0a61af7 --- /dev/null +++ b/packages/passport/sdk-sample-app/src/pages/api/auth/[...nextauth].ts @@ -0,0 +1,7 @@ +import { ImmutableAuth } from "@imtbl/auth-nextjs"; +import { getAuthConfig } from "@/lib/auth-nextjs"; +import { EnvironmentNames } from "@/types"; + +// Use sandbox config for the API route (server-side default) +export default ImmutableAuth(getAuthConfig(EnvironmentNames.SANDBOX)); + diff --git a/packages/passport/sdk-sample-app/src/pages/callback.tsx b/packages/passport/sdk-sample-app/src/pages/callback.tsx new file mode 100644 index 0000000000..2cfd7be779 --- /dev/null +++ b/packages/passport/sdk-sample-app/src/pages/callback.tsx @@ -0,0 +1,45 @@ +import { useEffect, useState } from "react"; +import { CallbackPage } from "@imtbl/auth-nextjs/client"; +import { getAuthConfig } from "@/lib/auth-nextjs"; +import { EnvironmentNames } from "@/types"; +import type { ImmutableAuthConfig } from "@imtbl/auth-nextjs"; +import { Container, Spinner } from "react-bootstrap"; + +/** + * OAuth callback page - reads environment from localStorage to use correct config + */ +export default function Callback() { + const [config, setConfig] = useState(null); + + useEffect(() => { + // Read environment from localStorage (same key as ImmutableProvider uses) + const storedEnv = localStorage.getItem("IMX_PASSPORT_SAMPLE_ENVIRONMENT"); + const environment = storedEnv + ? (JSON.parse(storedEnv) as EnvironmentNames) + : EnvironmentNames.SANDBOX; + + setConfig(getAuthConfig(environment)); + }, []); + + if (!config) { + return ( + + +

Loading...

+ + ); + } + + return ( + + +

Completing authentication...

+ + } + /> + ); +} + diff --git a/packages/passport/sdk-sample-app/src/pages/index.tsx b/packages/passport/sdk-sample-app/src/pages/index.tsx index ac20f5886f..90493574d4 100644 --- a/packages/passport/sdk-sample-app/src/pages/index.tsx +++ b/packages/passport/sdk-sample-app/src/pages/index.tsx @@ -10,6 +10,7 @@ import { useStatusProvider } from '@/context/StatusProvider'; import { BASE_PATH } from '@/config'; import PassportMethods from '@/components/PassportMethods'; import ZkEvmWorkflow from '@/components/zkevm/ZkEvmWorkflow'; +import AuthNextJS from '@/components/AuthNextJS'; export default function Home() { const { isLoading } = useStatusProvider(); @@ -28,6 +29,9 @@ export default function Home() { + + + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 50f6441917..d3a464f003 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,7 +68,7 @@ importers: version: 17.1.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-react-refresh: specifier: latest - version: 0.4.24(eslint@8.57.0) + version: 0.4.25(eslint@8.57.0) http-server: specifier: ^14.1.1 version: 14.1.1 @@ -135,7 +135,7 @@ importers: version: 0.25.21(@emotion/react@11.11.3(@types/react@18.3.12)(react@18.3.1))(@rive-app/react-canvas-lite@4.9.0(react@18.3.1))(embla-carousel-react@8.1.5(react@18.3.1))(framer-motion@11.18.2(@emotion/is-prop-valid@0.8.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@imtbl/sdk': specifier: latest - version: 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + version: 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) next: specifier: 14.2.25 version: 14.2.25(@babel/core@7.26.9)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -344,7 +344,7 @@ importers: dependencies: '@imtbl/contracts': specifier: latest - version: 2.2.17(bufferutil@4.0.8)(eslint@9.16.0(jiti@1.21.0))(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 2.2.18(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) '@imtbl/sdk': specifier: workspace:* version: link:../../sdk @@ -771,7 +771,7 @@ importers: version: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) next: specifier: 14.2.25 - version: 14.2.25(@babel/core@7.26.10)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.25(@babel/core@7.26.10)(@playwright/test@1.45.3)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.2.0 version: 18.3.1 @@ -829,7 +829,7 @@ importers: version: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) next: specifier: 14.2.25 - version: 14.2.25(@babel/core@7.26.10)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.25(@babel/core@7.26.10)(@playwright/test@1.45.3)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.2.0 version: 18.3.1 @@ -1043,6 +1043,52 @@ importers: specifier: ^5.6.2 version: 5.6.2 + packages/auth-nextjs: + dependencies: + '@imtbl/auth': + specifier: workspace:* + version: link:../auth + devDependencies: + '@swc/core': + specifier: ^1.3.36 + version: 1.15.3(@swc/helpers@0.5.13) + '@swc/jest': + specifier: ^0.2.37 + version: 0.2.37(@swc/core@1.15.3(@swc/helpers@0.5.13)) + '@types/jest': + specifier: ^29.5.12 + version: 29.5.14 + '@types/node': + specifier: ^18.14.2 + version: 18.15.13 + '@types/react': + specifier: ^18.3.5 + version: 18.3.12 + jest: + specifier: ^29.4.3 + version: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + jest-environment-jsdom: + specifier: ^29.4.3 + version: 29.6.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + next: + specifier: 14.2.25 + version: 14.2.25(@babel/core@7.26.10)(@playwright/test@1.45.3)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next-auth: + specifier: ^4.24.0 + version: 4.24.13(next@14.2.25(@babel/core@7.26.10)(@playwright/test@1.45.3)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: + specifier: ^18.2.0 + version: 18.3.1 + ts-node: + specifier: ^10.9.1 + version: 10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2) + tsup: + specifier: ^8.3.0 + version: 8.3.0(@swc/core@1.15.3(@swc/helpers@0.5.13))(jiti@1.21.0)(postcss@8.4.49)(typescript@5.6.2)(yaml@2.5.0) + typescript: + specifier: ^5.6.2 + version: 5.6.2 + packages/blockchain-data/sdk: dependencies: '@imtbl/config': @@ -2209,6 +2255,9 @@ importers: '@biom3/react': specifier: ^0.29.4 version: 0.29.11(@emotion/react@11.11.3(@types/react@18.3.12)(react@18.3.1))(@rive-app/react-canvas-lite@4.9.0(react@18.3.1))(embla-carousel-react@8.1.5(react@18.3.1))(motion@11.18.2(@emotion/is-prop-valid@0.8.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@imtbl/auth-nextjs': + specifier: workspace:* + version: link:../../auth-nextjs '@imtbl/blockchain-data': specifier: workspace:* version: link:../../blockchain-data/sdk @@ -2257,6 +2306,9 @@ importers: next: specifier: 14.2.25 version: 14.2.25(@babel/core@7.26.9)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next-auth: + specifier: ^4.24.0 + version: 4.24.13(next@14.2.25(@babel/core@7.26.9)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.2.0 version: 18.3.1 @@ -2746,19 +2798,6 @@ importers: packages: - '@0xsequence/abi@2.3.38': - resolution: {integrity: sha512-KdR0JkjA9qnkZg5G/gFJT6xg5Ngzargf9blDGjniVqLhK3i/PuVMKV23CVmNi8Yg4QKB1DcwwB4hXKx6rXmJgQ==} - - '@0xsequence/core@2.3.38': - resolution: {integrity: sha512-H87zfeIX9YjlsDgxj2xJ2sIPU4bonRN5iHnOerWeVpHAfsUgVT6CwRSEvd2Ek3Yw1sI+s7kG9b4XxmJuh6Dp6Q==} - peerDependencies: - ethers: '>=6' - - '@0xsequence/utils@2.3.38': - resolution: {integrity: sha512-XCe17omFbLjQnDW7HNhNzTqcpeeiXeSCc5ttFjOYex+GO8v9imPt3qbcn4N2v4dlylfkSfpdh4DcnKlcAPAtFw==} - peerDependencies: - ethers: '>=6' - '@0xsquid/sdk@2.8.25': resolution: {integrity: sha512-fSMKVdKIX8G3qFpoTf3WfcyjhGdc9hE0uSu1bs1gsh4+iG19ILguDdrY8g87dUknt9PCKBb6TIt1QeYEgbXjdA==} @@ -4431,71 +4470,77 @@ packages: resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} engines: {node: '>=18.18'} - '@imtbl/blockchain-data@2.11.0': - resolution: {integrity: sha512-UmgjEWN3pad+lZCVTx+BV5rFx9VMVM7WDSiVyYMqES3C+WgJeel/7dJKNjGpW9kq0BwPy6tSVRMKb+kokGL/dw==} + '@imtbl/auth@2.12.3': + resolution: {integrity: sha512-zUPwoYoiqyIyq4XKaJkvMMrKDhnPw0ND3AJUNN/ZZ2NMIKrDYpaIvCD2JmisO6HXiXrlb9HcocI+Bc+bfPnYhQ==} - '@imtbl/bridge-sdk@2.11.0': - resolution: {integrity: sha512-xZ6KoAlRY8Im7alyfKcqqcvIGxR+BiJ0S9tV4q6BXNSq0VKRoLt+4asJdzwQvfpFag1j2gZFP2jIz7zytShRVA==} + '@imtbl/blockchain-data@2.12.3': + resolution: {integrity: sha512-IwhH2oQe6eOb+WCOmrN5axuUH5cW13dzqaRudNwtZK8fG2qgSnbhEarozLUvkqTgnA4YWZ/q1GMfpDNV8gqxww==} + + '@imtbl/bridge-sdk@2.12.3': + resolution: {integrity: sha512-q8kZC0a14IhKRGkYd8a2H9YEMThS3irkHq1c/o3zOnzGLfk+wMGUaUzEzDYWgWWFzoskZfUMo9SUI5MX3MzLCA==} engines: {node: '>=20.11.0'} - '@imtbl/checkout-sdk@2.11.0': - resolution: {integrity: sha512-qOVzOW2fdys9sl2zMKYtrfvyzVvp+Q3R1uVUeN2NQ+yscDp4mvpVgWEr1s4FhYZ75gYG/+18mrKnvxLik+t2xA==} + '@imtbl/checkout-sdk@2.12.3': + resolution: {integrity: sha512-zjiL7bBkTcTX140XFuzVd5is4tGR3EW8f4v5ltCcIJYtp5QGK3ZBAK+O28kiLHzBug6ZB/dE1aIn2AsVp7zNog==} - '@imtbl/config@2.11.0': - resolution: {integrity: sha512-huORWo89gUYCXQPvKKl/cB440MrFhW2pU7nOELxHat/8hm3JirazemMmF5wyuaLJ+F0HjeWakqlOOnfM51ajiQ==} + '@imtbl/config@2.12.3': + resolution: {integrity: sha512-3bTdJrprnNFAuhB6vOsv2/1/wCoh+qzHc+j9NiSMLsE0RVr+8ZkLWHnvcEAxdlmTIS8FhA8i/C/k8VX8eGRWDg==} engines: {node: '>=20.11.0'} - '@imtbl/contracts@2.2.17': - resolution: {integrity: sha512-JakmzqU019vo4T52nPQIgXmGM5tlzPO5QRiMKU9xJQVMKPaICTc3UPIFEBfHr/Jq4cj720Dj8YaJ3SgowwO+bg==} + '@imtbl/contracts@2.2.18': + resolution: {integrity: sha512-wxjfE32t9jzEs4PswKwZDMlBO6wqCfSpVxseyFADFVG+Y2oFBrf1lK4eA0e81BbrXTGAbR+snSnSjPS305JoIQ==} '@imtbl/contracts@2.2.6': resolution: {integrity: sha512-2cfE3Tojfp4GnxwVKSwoZY1CWd+/drCIbCKawyH9Nh2zASXd7VC71lo27aD5RnCweXHkZVhPzjqwQf/xrtnmIQ==} - '@imtbl/dex-sdk@2.11.0': - resolution: {integrity: sha512-FSXplji/Thqd4DNgFad3T/AKszt0Ua5D+/hGjUzj+OaWIabTH9maeXtZThkJAV38Mm22mYz0xNgNCsszuhseNw==} + '@imtbl/dex-sdk@2.12.3': + resolution: {integrity: sha512-oFKqNAPNCfs4g9Yb3fmPSLVgvUevF9Mf7NmL2ubWcHM2EDu01cAVuUcuwklDxtbyHoD1aRzgFcWpoQQ9uml5rQ==} engines: {node: '>=20.11.0'} - '@imtbl/generated-clients@2.11.0': - resolution: {integrity: sha512-tYzqEnH2XIE5GYf1iMMJGPhdp9cQctLymy3Gav9aRCHQzXnLwSLQGEk0/M0JJ/3QTMoocawY6rV/Cs+vSTMsCw==} + '@imtbl/generated-clients@2.12.3': + resolution: {integrity: sha512-4YaMQYbCEX7XyYB7EOq9+qENFOz83JUF74D5yU9rInQYmdYAqoxRCF0W8tD5XSz7biLz+OMKjhP2a02J8/2xDw==} engines: {node: '>=20.11.0'} '@imtbl/image-resizer-utils@0.0.3': resolution: {integrity: sha512-/EOJKMJF4gD/Dv0qNhpUTpp2AgWeQ7XgYK9Xjl+xP2WWgaarNv1SHe1aeqSb8aZT5W7wSXdUGzn6TIxNsuCWGw==} - '@imtbl/metrics@2.11.0': - resolution: {integrity: sha512-e7ZFsYScv0P5Wy50PvC0L5GlGxnDLec5DvyHHd93RJGzkDs3spYkkGCXjoybbb6agTgtoL1IyKawcGe5K8HNLQ==} + '@imtbl/metrics@2.12.3': + resolution: {integrity: sha512-omHwaRfHMuBTkn8D9kDokF1xkWzgcA5VMzQcAtlKUvZAaKXgKJ6v6oA0d0idlPjSNJxnR6qz8k5gZQpI1jS4Mw==} engines: {node: '>=20.11.0'} - '@imtbl/minting-backend@2.11.0': - resolution: {integrity: sha512-SouAioAynwpXjgzBOOT1SfK+T6JpNaUw+ouIuNdpnR+fOE7DOsL9N+WxbmhFP6BLPrEOgE34ZtI+QNBX614iPA==} + '@imtbl/minting-backend@2.12.3': + resolution: {integrity: sha512-6RdzYxtJ/FQI6nb/Osany/8XZG3EkPv0nF8gH78lstp35FDsojMr0ynMd+lQBKfXK8N+1SCHdaDFuUOqiK70Ig==} - '@imtbl/orderbook@2.11.0': - resolution: {integrity: sha512-Mq1NXB/hs+In4hOrdGJmBM44rtSrYDejM4ixRaMbzRrSxehKpmsMI6W4fmv/3ZyJx2m8bvhAvZrS//jLL61UtQ==} + '@imtbl/orderbook@2.12.3': + resolution: {integrity: sha512-xc533eYWzbavagw1dr47TA0P0YTNHE/fSvGTKAWP+L3i8UZk7ptb67NsldeqQ5bOB5A4MByxGO9jUZ3DT/eKrg==} - '@imtbl/passport@2.11.0': - resolution: {integrity: sha512-hcBJmgoN2yjrczbRc+sZ6oCyqFmyBsIZRjR7QywhZIRwunGsGpzjO+kwmWzUOHCNl7zEShmEsfFOtpxlRBOckA==} + '@imtbl/passport@2.12.3': + resolution: {integrity: sha512-9f0IUalTd7csGZyFwE/Rxmt0pjnsSs6CktnuGhEVG+pVv86OMWJhrXSH00P1l+veHkLrO/TCJ+92LzcKxxUFJQ==} engines: {node: '>=20.11.0'} '@imtbl/react-analytics@0.3.4-alpha': resolution: {integrity: sha512-4VWvfm8RZtpLub7+x2D2wNQ507nIVBCSAPA7B5lxdb0cKrHEujM6Y/HScMImHZHvgjUFQT1jiD9b2BL/DS43Pg==} - '@imtbl/sdk@2.11.0': - resolution: {integrity: sha512-JyRj1bgVbQY7LzgROEvJba0a6DQRKgOP+Fou2lOjWJrxMdz7rYmEohhHS3eWaMnDvi+zRg8Ffbwy1bxlp9RLVQ==} + '@imtbl/sdk@2.12.3': + resolution: {integrity: sha512-ou3jCehJjVDqEob0HOhLrwnLhL/FwdmjBO6F37wBLgXXj1ThOraXpofV29f2qrlHPL1EjWEYED+j+gKL2m00sg==} engines: {node: '>=20.0.0'} - '@imtbl/toolkit@2.11.0': - resolution: {integrity: sha512-yL+V8wqHiAcQ4Q/TOE5euLMlRh/5rnhER5oFRtZss1lzTsmTqfygB/lg+8yyQ5i0pNNtt9bc/26uyXYl37JlhA==} + '@imtbl/toolkit@2.12.3': + resolution: {integrity: sha512-Orz0I8ajdLd1xhbwAxuj7+9VNjD+yUUaeVy35EJY3Yfm/08v6x/5BahLa0PKLMvSOniGs5QI9notA9lpX9naHQ==} engines: {node: '>=20.11.0'} - '@imtbl/webhook@2.11.0': - resolution: {integrity: sha512-xmeraQ6STLaCceEd4IFPE0htPrTb8oGVXPrk8zTRhuPzMRp/S4zfbOtnqpiLIU/Q+TzH7lrC7C1Fk3KxVe2OBw==} + '@imtbl/wallet@2.12.3': + resolution: {integrity: sha512-mHfqmywGNHXaEYoQjLGD/2ZuJz42/bCem+ocjkOeanbfpRmtLZDFiz+tdkte6MpnHWCz/8QKfg1DLy4KrdqZJg==} + + '@imtbl/webhook@2.12.3': + resolution: {integrity: sha512-k9+x1IZTN6oyNOmbJ+O824PtAb5vmB0sMWLXzGRwK/n8qYXpBbSpsk1NgP7vHJYbmqVydzyiNgn00zM3qmyY5w==} - '@imtbl/x-client@2.11.0': - resolution: {integrity: sha512-jW+W4uG0Z/XqJpNnDMJhlpp+JRMYz0rnsCpZxGKYUG55YwcHjXxMpkPuQSWWrwu7CNOrcFSYETZ2Mb+BKrR7gQ==} + '@imtbl/x-client@2.12.3': + resolution: {integrity: sha512-Ihje4DtgU/wxeDu7Cei0MeaB2aC9ZYVf8KSutMFvimF7Pqhlv/PqHfiYGdWe2B4a58nm2A0c1TOcuC8Ml7DcJg==} engines: {node: '>=20.11.0'} - '@imtbl/x-provider@2.11.0': - resolution: {integrity: sha512-2le+7s1WO2e6/scYQaV/XROucvWmJjvLRHuVCBbpfMaMZgp9HcF4DerHn8/wFcMzyi1AxHpQ8dG+UwzknYKPaA==} + '@imtbl/x-provider@2.12.3': + resolution: {integrity: sha512-/A5Ka8DFPAnkChHfxIyDSxFKAyTmdZhk0RXZpSxe2hs5Dd+3t6OfleJJL5HWaOdOf6F/Gzlqm22l3uWU5lDhpA==} engines: {node: '>=20.11.0'} '@ioredis/commands@1.2.0': @@ -4741,6 +4786,12 @@ packages: '@lezer/lr@1.4.5': resolution: {integrity: sha512-/YTRKP5yPPSo1xImYQk7AZZMAgap0kegzqCSYHjAL9x1AZ0ZQW+IpcEzMKagCsbTsLnVeWkxYrCNeXG8xEPrjg==} + '@limitbreak/creator-token-standards@5.0.0': + resolution: {integrity: sha512-BhrD3SMCq8YrGbJildBbu4BpHia7uby60XpGYVyFnb4xEvFey7bRbnOeVQ2mrTx07y02KvTWS5gESIPj5O4Mtg==} + + '@limitbreak/permit-c@1.0.0': + resolution: {integrity: sha512-7BooxTklXlCPzfdccfKL7Tt2Cm4MntOHR51dHqjKePn7AynMKsUtaKH75ZXHzWRPZSmyixFNzQ7tIJDdPxF2MA==} + '@lit-labs/ssr-dom-shim@1.2.0': resolution: {integrity: sha512-yWJKmpGE6lUURKAaIltoPIE/wrbY3TEkqQt+X0m+7fQNnAv0keydnYvbiJFP1PnMhizmIWRWOG5KLhYyc/xl+g==} @@ -4785,24 +4836,6 @@ packages: resolution: {integrity: sha512-qC72D4+CDdjGqJvkFMMEAtancHUQ7/d/tAiHf64z8MopFDmcrtbcJuerDtFceuAfQJ2pDSfCKCtbqoGBNnwg0w==} engines: {node: '>=8'} - '@magic-ext/oidc@12.0.5': - resolution: {integrity: sha512-EAmmRRZn/c5jmxHZ1H3IHtEqUKHYrsRtH9O+WuMFOZMv0llef/9MBa4DiRZkpnB0EPKb2hwsY7us8qk/LaFRNA==} - deprecated: 'Deprecation Notice: The OIDC extension will be deprecated soon. Please migrate to API Wallet, which offers improved performance and faster response times. Learn more: https://docs.magic.link/api-wallets/introduction' - - '@magic-sdk/commons@25.4.2': - resolution: {integrity: sha512-R3wJ1NWa+uDH9+Cc6kLjPDCSkelG3VM9pnuHR0zpE52XxiYaL0IplSG8DsjCqt2FeurTgqlUHGUEFrDHIdXEFQ==} - peerDependencies: - '@magic-sdk/provider': '>=18.6.0' - '@magic-sdk/types': '>=15.8.0' - - '@magic-sdk/provider@29.5.0': - resolution: {integrity: sha512-OAd813MLFfJDdRk/puRYqoGpBukGbTAlnR0n7f5AHG1NH9vQd/VSo3g6FunAPgoMfnLtJjFH9PdmD+Sh+f1yWA==} - peerDependencies: - localforage: ^1.7.4 - - '@magic-sdk/types@24.22.0': - resolution: {integrity: sha512-FLa9ChjsHcuRNF+dcXIFK4wPb1hJMjGtW+dz1gY5Oyhv37UB7xmOaIlR6YAe4jAxQvO+Hz2Q2Htk4JGI7WRluA==} - '@metamask/detect-provider@2.0.0': resolution: {integrity: sha512-sFpN+TX13E9fdBDh9lvQeZdJn4qYoRb/6QF2oZZK/Pn559IhCFacPMU1rMuqyXoFQF3JSJfii2l98B87QDPeCQ==} engines: {node: '>=14.0.0'} @@ -5397,6 +5430,9 @@ packages: '@openzeppelin/contracts@3.4.2': resolution: {integrity: sha512-z0zMCjyhhp4y7XKAcDAi3Vgms4T2PstwBdahiO0+9NaGICQKjynK3wduSRplTgk4LXmoO1yfDGO5RbjKYxtuxA==} + '@openzeppelin/contracts@4.8.3': + resolution: {integrity: sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg==} + '@openzeppelin/contracts@4.9.6': resolution: {integrity: sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA==} @@ -5458,6 +5494,9 @@ packages: cpu: [x64] os: [win32] + '@panva/hkdf@1.2.1': + resolution: {integrity: sha512-6oclG6Y3PiDFcoyk8srjLfVKyMfVCKJ27JwNPViuXziFpmdz+MZnZN/aKY0JGXgYuO/VghU0jcOAZgWXZ1Dmrw==} + '@parcel/bundler-default@2.16.3': resolution: {integrity: sha512-zCW2KzMfcEXqpVSU+MbLFMV3mHIzm/7UK1kT8mceuj4UwUScw7Lmjmulc2Ev4hcnwnaAFyaVkyFE5JXA4GKsLQ==} engines: {node: '>= 16.0.0', parcel: ^2.16.3} @@ -8851,9 +8890,6 @@ packages: caniuse-lite@1.0.30001660: resolution: {integrity: sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==} - caniuse-lite@1.0.30001703: - resolution: {integrity: sha512-kRlAGTRWgPsOj7oARC9m1okJEXdL/8fekFVcxA8Hl7GH4r/sN4OJn/i6Flde373T50KS7Y37oFbMwlE8+F42kQ==} - caniuse-lite@1.0.30001760: resolution: {integrity: sha512-7AAMPcueWELt1p3mi13HR/LHH0TJLT11cnwDJEs3xA4+CK/PLKeO9Kl1oru24htkyUKtkGCvAx4ohB0Ttry8Dw==} @@ -10058,6 +10094,9 @@ packages: engines: {node: '>=4'} hasBin: true + erc721a@4.2.3: + resolution: {integrity: sha512-0deF0hOOK1XI1Vxv3NKDh2E9sgzRlENuOoexjXRJIRfYCsLlqi9ejl2RF6Wcd9HfH0ldqC03wleQ2WDjxoOUvA==} + err-code@2.0.3: resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} @@ -10342,8 +10381,8 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - eslint-plugin-react-refresh@0.4.24: - resolution: {integrity: sha512-nLHIW7TEq3aLrEYWpVaJ1dRgFR+wLDPN8e8FpYAql/bMV2oBEfC37K0gLEGgv9fy66juNShSMV8OkTqzltcG/w==} + eslint-plugin-react-refresh@0.4.25: + resolution: {integrity: sha512-dRUD2LOdEqI4zXHqbQ442blQAzdSuShAaiSq5Vtyy6LT08YUf0oOjBDo4VPx0dCPgiPWh1WB4dtbLOd0kOlDPQ==} peerDependencies: eslint: '>=8.40' @@ -12406,13 +12445,13 @@ packages: joi@17.13.3: resolution: {integrity: sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==} + jose@4.15.9: + resolution: {integrity: sha512-1vUQX+IdDMVPj4k8kOxgUqlcK518yluMuGZwqlr44FS1ppZB/5GWh4rZG89erpOBOJjU/OBsnCVFfapsRz6nEA==} + joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} - js-base64@3.7.8: - resolution: {integrity: sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow==} - js-cookie@3.0.1: resolution: {integrity: sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==} engines: {node: '>=12'} @@ -12544,9 +12583,6 @@ packages: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} - jwt-decode@3.1.2: - resolution: {integrity: sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==} - jwt-decode@4.0.0: resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==} engines: {node: '>=18'} @@ -12888,6 +12924,10 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + lru-cache@7.18.3: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} @@ -12905,9 +12945,6 @@ packages: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true - magic-sdk@29.4.2: - resolution: {integrity: sha512-m5DFM+FUxAwDkmG8cuGKp9aIcJfIrI7TUoL5oL2ywumVAPAfBdJys0Udda7nZMJMN0mtHAhYPhqoOSqDU9HvgA==} - magic-string@0.25.9: resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} @@ -13225,9 +13262,6 @@ packages: engines: {node: '>= 14.0.0'} hasBin: true - moment@2.30.1: - resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} - motion-dom@11.18.1: resolution: {integrity: sha512-g76KvA001z+atjfxczdRtw/RXOM3OMSdd1f4DL77qCTF/+avrRJiawSG4yDibEQ215sr9kpinSlX2pCTJ9zbhw==} @@ -13319,9 +13353,24 @@ packages: new-date@1.0.3: resolution: {integrity: sha512-0fsVvQPbo2I18DT2zVHpezmeeNYV2JaJSrseiHLc17GNOxJzUdx5mvSigPu8LtIfZSij5i1wXnXFspEs2CD6hA==} + next-auth@4.24.13: + resolution: {integrity: sha512-sgObCfcfL7BzIK76SS5TnQtc3yo2Oifp/yIpfv6fMfeBOiBJkDWF3A2y9+yqnmJ4JKc2C+nMjSjmgDeTwgN1rQ==} + peerDependencies: + '@auth/core': 0.34.3 + next: ^12.2.5 || ^13 || ^14 || ^15 || ^16 + nodemailer: ^7.0.7 + react: ^17.0.2 || ^18 || ^19 + react-dom: ^17.0.2 || ^18 || ^19 + peerDependenciesMeta: + '@auth/core': + optional: true + nodemailer: + optional: true + next@14.2.25: resolution: {integrity: sha512-N5M7xMc4wSb4IkPvEV5X2BRRXUmhVHNyaXwEM86+voXthSZz8ZiRyQW4p9mwAoAPIm6OzuVZtn7idgEJeAJN3Q==} engines: {node: '>=18.17.0'} + deprecated: This version has a security vulnerability. Please upgrade to a patched version. See https://nextjs.org/blog/security-update-2025-12-11 for more details. hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 @@ -13520,6 +13569,9 @@ packages: '@swc/core': optional: true + oauth@0.9.15: + resolution: {integrity: sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==} + ob1@0.80.12: resolution: {integrity: sha512-VMArClVT6LkhUGpnuEoBuyjG9rzUyEzg4PDkav6wK1cLhOK02gPCYFxoiB4mqVnrMhDpIzJcrGNAMVi9P+hXrw==} engines: {node: '>=18'} @@ -13538,6 +13590,10 @@ packages: resolution: {integrity: sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==} engines: {node: '>=0.10.0'} + object-hash@2.2.0: + resolution: {integrity: sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==} + engines: {node: '>= 6'} + object-hash@3.0.0: resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} engines: {node: '>= 6'} @@ -13601,6 +13657,10 @@ packages: resolution: {integrity: sha512-jNdst/U28Iasukx/L5MP6b274Vr7ftQs6qAhPBCvz6Wt5rPCA+Q/tUmCzfCHHWweWw5szeMy2Gfrm1rITwUKrw==} engines: {node: '>=18'} + oidc-token-hash@5.2.0: + resolution: {integrity: sha512-6gj2m8cJZ+iSW8bm0FXdGF0YhIQbKrfP4yWTNzxc31U6MOjfEmB1rHvlYvxI1B7t7BCi1F2vYTT6YhtQRG4hxw==} + engines: {node: ^10.13.0 || >=12.0.0} + on-exit-leak-free@0.2.0: resolution: {integrity: sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==} @@ -13651,6 +13711,9 @@ packages: resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} hasBin: true + openid-client@5.7.1: + resolution: {integrity: sha512-jDBPgSVfTnkIh71Hg9pRvtJc6wTwqjRkN88+gCFtYWrlP4Yx2Dsrow8uPi3qLr/aeymPF3o2+dS+wOpglK04ew==} + optionator@0.8.3: resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} engines: {node: '>= 0.8.0'} @@ -14527,6 +14590,11 @@ packages: postgres-range@1.1.4: resolution: {integrity: sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w==} + preact-render-to-string@5.2.6: + resolution: {integrity: sha512-JyhErpYOvBV1hEPwIxc/fHWXPfnEGdRKxc8gFdAZ7XV4tlzyzG847XAyEZqoDnynP88akM4eaHcSOzNcLWFguw==} + peerDependencies: + preact: '>=10' + preact@10.23.1: resolution: {integrity: sha512-O5UdRsNh4vdZaTieWe3XOgSpdMAmkIYBCT3VhQDlKrzyCm8lUYsk0fmVEvoQQifoOjFRTaHZO69ylrzTW2BH+A==} @@ -14566,6 +14634,9 @@ packages: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + pretty-format@3.8.0: + resolution: {integrity: sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==} + prisma@5.20.0: resolution: {integrity: sha512-6obb3ucKgAnsGS9x9gLOe8qa51XxvJ3vLQtmyf52CTey1Qcez3A6W6ROH5HIz5Q5bW+0VpmZb8WBohieMFGpig==} engines: {node: '>=16.13'} @@ -14670,6 +14741,7 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} deprecated: |- You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. + (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) qr-code-styling@1.6.0-rc.1: @@ -15317,16 +15389,31 @@ packages: seaport-core@0.0.1: resolution: {integrity: sha512-fgdSIC0ru8xK+fdDfF4bgTFH8ssr6EwbPejC2g/JsWzxy+FvG7JfaX57yn/eIv6hoscgZL87Rm+kANncgwLH3A==} + seaport-core@1.6.5: + resolution: {integrity: sha512-jpGOpaKpH1B49oOYqAYAAVXN8eGlI/NjE6fYHPYlQaDVx325NS5dpiDDgGLtQZNgQ3EbqrfhfB5KyIbg7owyFg==} + seaport-core@https://codeload.github.com/immutable/seaport-core/tar.gz/0633350ec34f21fcede657ff812f11cf7d19144e: resolution: {tarball: https://codeload.github.com/immutable/seaport-core/tar.gz/0633350ec34f21fcede657ff812f11cf7d19144e} version: 1.5.0 + seaport-core@https://codeload.github.com/immutable/seaport-core/tar.gz/f9b2e50267862570d0df3ed7e3e32d1ff2cd9813: + resolution: {tarball: https://codeload.github.com/immutable/seaport-core/tar.gz/f9b2e50267862570d0df3ed7e3e32d1ff2cd9813} + version: 1.6.6 + seaport-sol@1.6.0: resolution: {integrity: sha512-a1FBK1jIeEQXZ9CmQvtmfG0w7CE8nIad89btGg7qrrrtF4j1S0Ilmzpe2Hderap05Uvf3EWS9P/aghDQCNAwkA==} seaport-types@0.0.1: resolution: {integrity: sha512-m7MLa7sq3YPwojxXiVvoX1PM9iNVtQIn7AdEtBnKTwgxPfGRWUlbs/oMgetpjT/ZYTmv3X5/BghOcstWYvKqRA==} + seaport-types@1.6.3: + resolution: {integrity: sha512-Rm9dTTEUKmXqMgc5TiRtfX/sFOX6SjKkT9l/spTdRknplYh5tmJ0fMJzbE60pCzV1/Izq0cCua6uvWszo6zOAQ==} + + seaport@https://codeload.github.com/immutable/seaport/tar.gz/8345d291c69b7777a77bd81996ce46b28183586c: + resolution: {tarball: https://codeload.github.com/immutable/seaport/tar.gz/8345d291c69b7777a77bd81996ce46b28183586c} + version: 1.6.0 + engines: {node: '>=18.15.0'} + seaport@https://codeload.github.com/immutable/seaport/tar.gz/ae061dc008105dd8d05937df9ad9a676f878cbf9: resolution: {tarball: https://codeload.github.com/immutable/seaport/tar.gz/ae061dc008105dd8d05937df9ad9a676f878cbf9} version: 1.5.0 @@ -17388,19 +17475,6 @@ packages: snapshots: - '@0xsequence/abi@2.3.38': {} - - '@0xsequence/core@2.3.38(ethers@6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))': - dependencies: - '@0xsequence/abi': 2.3.38 - '@0xsequence/utils': 2.3.38(ethers@6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) - - '@0xsequence/utils@2.3.38(ethers@6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))': - dependencies: - ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) - js-base64: 3.7.8 - '@0xsquid/sdk@2.8.25(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@cosmjs/cosmwasm-stargate': 0.32.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -20293,17 +20367,26 @@ snapshots: '@humanwhocodes/retry@0.4.1': {} - '@imtbl/blockchain-data@2.11.0': + '@imtbl/auth@2.12.3': + dependencies: + '@imtbl/generated-clients': 2.12.3 + '@imtbl/metrics': 2.12.3 + localforage: 1.10.0 + oidc-client-ts: 3.4.1 + transitivePeerDependencies: + - debug + + '@imtbl/blockchain-data@2.12.3': dependencies: - '@imtbl/config': 2.11.0 - '@imtbl/generated-clients': 2.11.0 + '@imtbl/config': 2.12.3 + '@imtbl/generated-clients': 2.12.3 axios: 1.7.7 transitivePeerDependencies: - debug - '@imtbl/bridge-sdk@2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/bridge-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@imtbl/config': 2.11.0 + '@imtbl/config': 2.12.3 '@jest/globals': 29.7.0 axios: 1.7.7 ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -20313,21 +20396,21 @@ snapshots: - supports-color - utf-8-validate - '@imtbl/checkout-sdk@2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/checkout-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@imtbl/blockchain-data': 2.11.0 - '@imtbl/bridge-sdk': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/config': 2.11.0 - '@imtbl/dex-sdk': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/generated-clients': 2.11.0 - '@imtbl/metrics': 2.11.0 - '@imtbl/orderbook': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/passport': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/blockchain-data': 2.12.3 + '@imtbl/bridge-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/config': 2.12.3 + '@imtbl/dex-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/generated-clients': 2.12.3 + '@imtbl/metrics': 2.12.3 + '@imtbl/orderbook': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/passport': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metamask/detect-provider': 2.0.0 axios: 1.7.7 ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) semver: 7.7.1 - uuid: 8.3.2 + uuid: 9.0.1 transitivePeerDependencies: - bufferutil - debug @@ -20335,29 +20418,27 @@ snapshots: - supports-color - utf-8-validate - '@imtbl/config@2.11.0': + '@imtbl/config@2.12.3': dependencies: - '@imtbl/metrics': 2.11.0 - transitivePeerDependencies: - - debug + '@imtbl/metrics': 2.12.3 - '@imtbl/contracts@2.2.17(bufferutil@4.0.8)(eslint@9.16.0(jiti@1.21.0))(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)': + '@imtbl/contracts@2.2.18(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)': dependencies: '@axelar-network/axelar-gmp-sdk-solidity': 5.10.0 + '@limitbreak/creator-token-standards': 5.0.0 '@openzeppelin/contracts': 4.9.6 '@openzeppelin/contracts-upgradeable': 4.9.6 - '@rari-capital/solmate': 6.4.0 - eslint-plugin-mocha: 10.5.0(eslint@9.16.0(jiti@1.21.0)) - moment: 2.30.1 openzeppelin-contracts-5.0.2: '@openzeppelin/contracts@5.0.2' openzeppelin-contracts-upgradeable-4.9.3: '@openzeppelin/contracts-upgradeable@4.9.6' seaport: https://codeload.github.com/immutable/seaport/tar.gz/ae061dc008105dd8d05937df9ad9a676f878cbf9(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + seaport-16: seaport@https://codeload.github.com/immutable/seaport/tar.gz/8345d291c69b7777a77bd81996ce46b28183586c(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + seaport-core-16: seaport-core@https://codeload.github.com/immutable/seaport-core/tar.gz/f9b2e50267862570d0df3ed7e3e32d1ff2cd9813 + seaport-types-16: seaport-types@1.6.3 solidity-bits: 0.4.0 solidity-bytes-utils: 0.8.2 transitivePeerDependencies: - bufferutil - c-kzg - - eslint - supports-color - ts-node - typescript @@ -20384,20 +20465,19 @@ snapshots: - typescript - utf-8-validate - '@imtbl/dex-sdk@2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/dex-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@imtbl/config': 2.11.0 + '@imtbl/config': 2.12.3 '@uniswap/sdk-core': 3.2.3 '@uniswap/swap-router-contracts': 1.3.1(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) '@uniswap/v3-sdk': 3.10.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - - debug - hardhat - utf-8-validate - '@imtbl/generated-clients@2.11.0': + '@imtbl/generated-clients@2.12.3': dependencies: axios: 1.7.7 transitivePeerDependencies: @@ -20407,22 +20487,19 @@ snapshots: dependencies: buffer: 6.0.3 - '@imtbl/metrics@2.11.0': + '@imtbl/metrics@2.12.3': dependencies: - axios: 1.7.7 global-const: 0.1.2 lru-memorise: 0.3.0 - transitivePeerDependencies: - - debug - '@imtbl/minting-backend@2.11.0': + '@imtbl/minting-backend@2.12.3': dependencies: - '@imtbl/blockchain-data': 2.11.0 - '@imtbl/config': 2.11.0 - '@imtbl/generated-clients': 2.11.0 - '@imtbl/metrics': 2.11.0 - '@imtbl/webhook': 2.11.0 - uuid: 8.3.2 + '@imtbl/blockchain-data': 2.12.3 + '@imtbl/config': 2.12.3 + '@imtbl/generated-clients': 2.12.3 + '@imtbl/metrics': 2.12.3 + '@imtbl/webhook': 2.12.3 + uuid: 9.0.1 optionalDependencies: pg: 8.11.5 prisma: 5.20.0 @@ -20430,10 +20507,10 @@ snapshots: - debug - pg-native - '@imtbl/orderbook@2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/orderbook@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@imtbl/config': 2.11.0 - '@imtbl/metrics': 2.11.0 + '@imtbl/config': 2.12.3 + '@imtbl/metrics': 2.12.3 '@opensea/seaport-js': 4.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) axios: 1.7.7 ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -20444,27 +20521,19 @@ snapshots: - debug - utf-8-validate - '@imtbl/passport@2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': - dependencies: - '@0xsequence/abi': 2.3.38 - '@0xsequence/core': 2.3.38(ethers@6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@imtbl/config': 2.11.0 - '@imtbl/generated-clients': 2.11.0 - '@imtbl/metrics': 2.11.0 - '@imtbl/toolkit': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/x-client': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/x-provider': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@magic-ext/oidc': 12.0.5 - '@magic-sdk/provider': 29.5.0(localforage@1.10.0) - '@metamask/detect-provider': 2.0.0 - axios: 1.7.7 + '@imtbl/passport@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@imtbl/auth': 2.12.3 + '@imtbl/config': 2.12.3 + '@imtbl/generated-clients': 2.12.3 + '@imtbl/metrics': 2.12.3 + '@imtbl/toolkit': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/wallet': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/x-client': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/x-provider': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) - events: 3.3.0 - jwt-decode: 3.1.2 localforage: 1.10.0 - magic-sdk: 29.4.2 oidc-client-ts: 3.4.1 - uuid: 8.3.2 transitivePeerDependencies: - bufferutil - debug @@ -20478,17 +20547,19 @@ snapshots: - encoding - supports-color - '@imtbl/sdk@2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@imtbl/blockchain-data': 2.11.0 - '@imtbl/checkout-sdk': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/config': 2.11.0 - '@imtbl/minting-backend': 2.11.0 - '@imtbl/orderbook': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/passport': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/webhook': 2.11.0 - '@imtbl/x-client': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/x-provider': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/auth': 2.12.3 + '@imtbl/blockchain-data': 2.12.3 + '@imtbl/checkout-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/config': 2.12.3 + '@imtbl/minting-backend': 2.12.3 + '@imtbl/orderbook': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/passport': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/wallet': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/webhook': 2.12.3 + '@imtbl/x-client': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/x-provider': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - debug @@ -20497,35 +20568,45 @@ snapshots: - supports-color - utf-8-validate - '@imtbl/toolkit@2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/toolkit@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@imtbl/x-client': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@magic-ext/oidc': 12.0.5 + '@imtbl/x-client': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metamask/detect-provider': 2.0.0 axios: 1.7.7 bn.js: 5.2.1 enc-utils: 3.0.0 ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) - magic-sdk: 29.4.2 oidc-client-ts: 3.4.1 transitivePeerDependencies: - bufferutil - debug - utf-8-validate - '@imtbl/webhook@2.11.0': + '@imtbl/wallet@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@imtbl/config': 2.11.0 - '@imtbl/generated-clients': 2.11.0 + '@imtbl/auth': 2.12.3 + '@imtbl/generated-clients': 2.12.3 + '@imtbl/metrics': 2.12.3 + '@imtbl/toolkit': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + '@imtbl/webhook@2.12.3': + dependencies: + '@imtbl/config': 2.12.3 + '@imtbl/generated-clients': 2.12.3 sns-validator: 0.3.5 transitivePeerDependencies: - debug - '@imtbl/x-client@2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/x-client@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@ethereumjs/wallet': 2.0.4 - '@imtbl/config': 2.11.0 - '@imtbl/generated-clients': 2.11.0 + '@imtbl/config': 2.12.3 + '@imtbl/generated-clients': 2.12.3 axios: 1.7.7 bn.js: 5.2.1 elliptic: 6.6.1 @@ -20537,18 +20618,16 @@ snapshots: - debug - utf-8-validate - '@imtbl/x-provider@2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/x-provider@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@imtbl/config': 2.11.0 - '@imtbl/generated-clients': 2.11.0 - '@imtbl/toolkit': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/x-client': 2.11.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@magic-ext/oidc': 12.0.5 + '@imtbl/config': 2.12.3 + '@imtbl/generated-clients': 2.12.3 + '@imtbl/toolkit': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/x-client': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metamask/detect-provider': 2.0.0 axios: 1.7.7 enc-utils: 3.0.0 ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) - magic-sdk: 29.4.2 oidc-client-ts: 3.4.1 transitivePeerDependencies: - bufferutil @@ -21313,6 +21392,16 @@ snapshots: dependencies: '@lezer/common': 1.4.0 + '@limitbreak/creator-token-standards@5.0.0': + dependencies: + '@limitbreak/permit-c': 1.0.0 + '@openzeppelin/contracts': 4.8.3 + erc721a: 4.2.3 + + '@limitbreak/permit-c@1.0.0': + dependencies: + '@openzeppelin/contracts': 4.8.3 + '@lit-labs/ssr-dom-shim@1.2.0': {} '@lit/reactive-element@1.6.3': @@ -21343,21 +21432,6 @@ snapshots: dependencies: '@lukeed/csprng': 1.1.0 - '@magic-ext/oidc@12.0.5': {} - - '@magic-sdk/commons@25.4.2(@magic-sdk/provider@29.5.0(localforage@1.10.0))(@magic-sdk/types@24.22.0)': - dependencies: - '@magic-sdk/provider': 29.5.0(localforage@1.10.0) - '@magic-sdk/types': 24.22.0 - - '@magic-sdk/provider@29.5.0(localforage@1.10.0)': - dependencies: - '@magic-sdk/types': 24.22.0 - eventemitter3: 4.0.7 - localforage: 1.10.0 - - '@magic-sdk/types@24.22.0': {} - '@metamask/detect-provider@2.0.0': {} '@metamask/eth-json-rpc-provider@1.0.1': @@ -21513,8 +21587,8 @@ snapshots: dependencies: '@ethereumjs/tx': 4.2.0 '@metamask/superstruct': 3.1.0 - '@noble/hashes': 1.5.0 - '@scure/base': 1.1.7 + '@noble/hashes': 1.8.0 + '@scure/base': 1.2.6 '@types/debug': 4.1.8 debug: 4.3.7(supports-color@8.1.1) pony-cause: 2.1.11 @@ -21527,8 +21601,8 @@ snapshots: dependencies: '@ethereumjs/tx': 4.2.0 '@metamask/superstruct': 3.1.0 - '@noble/hashes': 1.5.0 - '@scure/base': 1.1.7 + '@noble/hashes': 1.8.0 + '@scure/base': 1.2.6 '@types/debug': 4.1.8 debug: 4.3.7(supports-color@8.1.1) pony-cause: 2.1.11 @@ -22118,6 +22192,8 @@ snapshots: '@openzeppelin/contracts@3.4.2': {} + '@openzeppelin/contracts@4.8.3': {} + '@openzeppelin/contracts@4.9.6': {} '@openzeppelin/contracts@5.0.2': {} @@ -22157,6 +22233,8 @@ snapshots: '@oxc-resolver/binding-win32-x64-msvc@1.11.0': optional: true + '@panva/hkdf@1.2.1': {} + '@parcel/bundler-default@2.16.3(@parcel/core@2.16.3(@swc/helpers@0.5.13))': dependencies: '@parcel/diagnostic': 2.16.3 @@ -24584,6 +24662,13 @@ snapshots: '@swc/counter': 0.1.3 jsonc-parser: 3.3.1 + '@swc/jest@0.2.37(@swc/core@1.15.3(@swc/helpers@0.5.13))': + dependencies: + '@jest/create-cache-key-function': 29.7.0 + '@swc/core': 1.15.3(@swc/helpers@0.5.13) + '@swc/counter': 0.1.3 + jsonc-parser: 3.3.1 + '@swc/jest@0.2.37(@swc/core@1.9.3(@swc/helpers@0.5.13))': dependencies: '@jest/create-cache-key-function': 29.7.0 @@ -26796,7 +26881,7 @@ snapshots: browserslist@4.24.4: dependencies: - caniuse-lite: 1.0.30001703 + caniuse-lite: 1.0.30001760 electron-to-chromium: 1.5.113 node-releases: 2.0.19 update-browserslist-db: 1.1.3(browserslist@4.24.4) @@ -26950,14 +27035,12 @@ snapshots: caniuse-api@3.0.0: dependencies: browserslist: 4.24.4 - caniuse-lite: 1.0.30001703 + caniuse-lite: 1.0.30001760 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 caniuse-lite@1.0.30001660: {} - caniuse-lite@1.0.30001703: {} - caniuse-lite@1.0.30001760: {} capture-exit@2.0.0: @@ -28289,6 +28372,8 @@ snapshots: envinfo@7.14.0: {} + erc721a@4.2.3: {} + err-code@2.0.3: {} error-ex@1.3.2: @@ -28997,7 +29082,7 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-plugin-react-refresh@0.4.24(eslint@8.57.0): + eslint-plugin-react-refresh@0.4.25(eslint@8.57.0): dependencies: eslint: 8.57.0 @@ -32932,9 +33017,9 @@ snapshots: '@sideway/formula': 3.0.1 '@sideway/pinpoint': 2.0.0 - joycon@3.1.1: {} + jose@4.15.9: {} - js-base64@3.7.8: {} + joycon@3.1.1: {} js-cookie@3.0.1: {} @@ -33113,8 +33198,6 @@ snapshots: object.assign: 4.1.5 object.values: 1.2.0 - jwt-decode@3.1.2: {} - jwt-decode@4.0.0: {} jwt-encode@1.0.1: @@ -33471,6 +33554,10 @@ snapshots: dependencies: yallist: 3.1.1 + lru-cache@6.0.0: + dependencies: + yallist: 4.0.0 + lru-cache@7.18.3: {} lru-memorise@0.3.0: @@ -33483,13 +33570,6 @@ snapshots: lz-string@1.5.0: {} - magic-sdk@29.4.2: - dependencies: - '@magic-sdk/commons': 25.4.2(@magic-sdk/provider@29.5.0(localforage@1.10.0))(@magic-sdk/types@24.22.0) - '@magic-sdk/provider': 29.5.0(localforage@1.10.0) - '@magic-sdk/types': 24.22.0 - localforage: 1.10.0 - magic-string@0.25.9: dependencies: sourcemap-codec: 1.4.8 @@ -33952,8 +34032,6 @@ snapshots: yargs-parser: 20.2.9 yargs-unparser: 2.0.0 - moment@2.30.1: {} - motion-dom@11.18.1: dependencies: motion-utils: 11.18.1 @@ -34075,17 +34153,47 @@ snapshots: dependencies: '@segment/isodate': 1.0.3 - next@14.2.25(@babel/core@7.26.10)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next-auth@4.24.13(next@14.2.25(@babel/core@7.26.10)(@playwright/test@1.45.3)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + '@babel/runtime': 7.25.0 + '@panva/hkdf': 1.2.1 + cookie: 0.7.2 + jose: 4.15.9 + next: 14.2.25(@babel/core@7.26.10)(@playwright/test@1.45.3)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + oauth: 0.9.15 + openid-client: 5.7.1 + preact: 10.23.1 + preact-render-to-string: 5.2.6(preact@10.23.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + uuid: 8.3.2 + + next-auth@4.24.13(next@14.2.25(@babel/core@7.26.9)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + '@babel/runtime': 7.25.0 + '@panva/hkdf': 1.2.1 + cookie: 0.7.2 + jose: 4.15.9 + next: 14.2.25(@babel/core@7.26.9)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + oauth: 0.9.15 + openid-client: 5.7.1 + preact: 10.23.1 + preact-render-to-string: 5.2.6(preact@10.23.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + uuid: 8.3.2 + + next@14.2.25(@babel/core@7.26.10)(@playwright/test@1.45.3)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 14.2.25 '@swc/helpers': 0.5.5 busboy: 1.6.0 - caniuse-lite: 1.0.30001703 + caniuse-lite: 1.0.30001760 graceful-fs: 4.2.11 postcss: 8.4.31 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.1(@babel/core@7.26.10)(react@18.3.1) + styled-jsx: 5.1.1(@babel/core@7.26.10)(babel-plugin-macros@3.1.0)(react@18.3.1) optionalDependencies: '@next/swc-darwin-arm64': 14.2.25 '@next/swc-darwin-x64': 14.2.25 @@ -34106,7 +34214,7 @@ snapshots: '@next/env': 14.2.25 '@swc/helpers': 0.5.5 busboy: 1.6.0 - caniuse-lite: 1.0.30001703 + caniuse-lite: 1.0.30001760 graceful-fs: 4.2.11 postcss: 8.4.31 react: 18.3.1 @@ -34380,6 +34488,8 @@ snapshots: transitivePeerDependencies: - debug + oauth@0.9.15: {} + ob1@0.80.12: dependencies: flow-enums-runtime: 0.0.6 @@ -34400,6 +34510,8 @@ snapshots: define-property: 0.2.5 kind-of: 3.2.2 + object-hash@2.2.0: {} + object-hash@3.0.0: {} object-inspect@1.13.1: {} @@ -34475,6 +34587,8 @@ snapshots: dependencies: jwt-decode: 4.0.0 + oidc-token-hash@5.2.0: {} + on-exit-leak-free@0.2.0: {} on-exit-leak-free@2.1.2: {} @@ -34525,6 +34639,13 @@ snapshots: opener@1.5.2: {} + openid-client@5.7.1: + dependencies: + jose: 4.15.9 + lru-cache: 6.0.0 + object-hash: 2.2.0 + oidc-token-hash: 5.2.0 + optionator@0.8.3: dependencies: deep-is: 0.1.4 @@ -35456,6 +35577,11 @@ snapshots: postgres-range@1.1.4: {} + preact-render-to-string@5.2.6(preact@10.23.1): + dependencies: + preact: 10.23.1 + pretty-format: 3.8.0 + preact@10.23.1: {} prelude-ls@1.1.2: {} @@ -35497,6 +35623,8 @@ snapshots: ansi-styles: 5.2.0 react-is: 18.2.0 + pretty-format@3.8.0: {} + prisma@5.20.0: dependencies: '@prisma/engines': 5.20.0 @@ -36656,10 +36784,18 @@ snapshots: dependencies: seaport-types: 0.0.1 + seaport-core@1.6.5: + dependencies: + seaport-types: 1.6.3 + seaport-core@https://codeload.github.com/immutable/seaport-core/tar.gz/0633350ec34f21fcede657ff812f11cf7d19144e: dependencies: seaport-types: 0.0.1 + seaport-core@https://codeload.github.com/immutable/seaport-core/tar.gz/f9b2e50267862570d0df3ed7e3e32d1ff2cd9813: + dependencies: + seaport-types: 1.6.3 + seaport-sol@1.6.0: dependencies: seaport-core: 0.0.1 @@ -36667,6 +36803,28 @@ snapshots: seaport-types@0.0.1: {} + seaport-types@1.6.3: {} + + seaport@https://codeload.github.com/immutable/seaport/tar.gz/8345d291c69b7777a77bd81996ce46b28183586c(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10): + dependencies: + '@nomicfoundation/hardhat-network-helpers': 1.0.11(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + '@openzeppelin/contracts': 4.9.6 + ethers: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ethers-eip712: 0.2.0(ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + hardhat: 2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + merkletreejs: 0.3.11 + seaport-core: 1.6.5 + seaport-sol: 1.6.0 + seaport-types: 1.6.3 + solady: 0.0.84 + transitivePeerDependencies: + - bufferutil + - c-kzg + - supports-color + - ts-node + - typescript + - utf-8-validate + seaport@https://codeload.github.com/immutable/seaport/tar.gz/ae061dc008105dd8d05937df9ad9a676f878cbf9(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10): dependencies: '@nomicfoundation/hardhat-network-helpers': 1.0.11(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) @@ -37418,12 +37576,13 @@ snapshots: dependencies: webpack: 5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1) - styled-jsx@5.1.1(@babel/core@7.26.10)(react@18.3.1): + styled-jsx@5.1.1(@babel/core@7.26.10)(babel-plugin-macros@3.1.0)(react@18.3.1): dependencies: client-only: 0.0.1 react: 18.3.1 optionalDependencies: '@babel/core': 7.26.10 + babel-plugin-macros: 3.1.0 styled-jsx@5.1.1(@babel/core@7.26.9)(react@18.3.1): dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 59f7047925..84cdcb072f 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,6 +1,7 @@ packages: - "sdk" - "packages/auth" + - "packages/auth-nextjs" - "packages/wallet" - "packages/config" - "packages/x-client" @@ -33,4 +34,4 @@ packages: - "examples/contracts/**" - "examples/x-to-zkevm-migration-app/**" - # Setup catalog file versions for core packages like typescript/eslint \ No newline at end of file + # Setup catalog file versions for core packages like typescript/eslint From 55f5c1f7c031dccc83b63ecafe7dc66cd9a2abee Mon Sep 17 00:00:00 2001 From: Shine Li Date: Wed, 17 Dec 2025 14:45:49 +1100 Subject: [PATCH 02/52] clean up --- packages/auth-nextjs/README.md | 100 +++++++++++++++--- packages/auth-nextjs/src/client/callback.tsx | 2 +- packages/auth-nextjs/src/client/provider.tsx | 43 ++++---- packages/auth-nextjs/src/index.ts | 7 +- packages/auth-nextjs/tsup.config.ts | 36 +++++-- .../src/components/AuthNextJS.tsx | 9 +- .../src/context/ImmutableProvider.tsx | 6 +- .../sdk-sample-app/src/pages/_app.tsx | 26 +++-- .../sdk-sample-app/src/pages/index.tsx | 4 +- 9 files changed, 168 insertions(+), 65 deletions(-) diff --git a/packages/auth-nextjs/README.md b/packages/auth-nextjs/README.md index 9d4bf60c17..d7eaffc9fe 100644 --- a/packages/auth-nextjs/README.md +++ b/packages/auth-nextjs/README.md @@ -132,6 +132,19 @@ export default DashboardPage; export const getServerSideProps = withPageAuthRequired(config); ``` +## Configuration Options + +The `ImmutableAuthConfig` object accepts the following properties: + +| Property | Type | Required | Default | Description | +| ---------------------- | -------- | -------- | ------------------------------------------------ | ------------------------------ | +| `clientId` | `string` | Yes | - | Immutable OAuth client ID | +| `redirectUri` | `string` | Yes | - | OAuth callback redirect URI | +| `logoutRedirectUri` | `string` | No | - | Where to redirect after logout | +| `audience` | `string` | No | `"platform_api"` | OAuth audience | +| `scope` | `string` | No | `"openid profile email offline_access transact"` | OAuth scopes | +| `authenticationDomain` | `string` | No | `"https://auth.immutable.com"` | Authentication domain | + ## Environment Variables ```bash @@ -157,24 +170,87 @@ openssl rand -base64 32 | Export | Description | | ----------------------------------- | ------------------------------------------- | | `ImmutableAuth(config, overrides?)` | Creates NextAuth handler (use in API route) | -| `ImmutableAuthConfig` | Configuration type | -| `ImmutableAuthOverrides` | NextAuth options override type | +| `refreshAccessToken(token)` | Utility to refresh an expired access token | +| `isTokenExpired(token)` | Utility to check if a token is expired | + +**Types:** + +| Type | Description | +| ----------------------------- | ----------------------------------------- | +| `ImmutableAuthConfig` | Configuration options | +| `ImmutableAuthOverrides` | NextAuth options override type | +| `ImmutableUser` | User profile type | +| `ImmutableTokenData` | Token data passed to credentials provider | +| `ZkEvmInfo` | zkEVM wallet information type | +| `WithPageAuthRequiredOptions` | Options for page protection | ### Client Exports (`@imtbl/auth-nextjs/client`) -| Export | Description | -| ----------------------- | ------------------------------------------------------------------------ | -| `ImmutableAuthProvider` | React context provider | -| `useImmutableAuth()` | Hook returning `{ user, session, signIn, signOut, getAccessToken, ... }` | -| `useAccessToken()` | Hook returning `getAccessToken` function | -| `CallbackPage` | Pre-built callback page component for OAuth redirects | +| Export | Description | +| ----------------------- | ------------------------------------------------------- | +| `ImmutableAuthProvider` | React context provider (wraps NextAuth SessionProvider) | +| `useImmutableAuth()` | Hook for authentication state and methods (see below) | +| `useAccessToken()` | Hook returning `getAccessToken` function | +| `CallbackPage` | Pre-built callback page component for OAuth redirects | + +**`useImmutableAuth()` Return Value:** + +| Property | Type | Description | +| ----------------- | ----------------------- | ------------------------------------------------ | +| `user` | `ImmutableUser \| null` | Current user profile (null if not authenticated) | +| `session` | `Session \| null` | Full NextAuth session with tokens | +| `isLoading` | `boolean` | Whether authentication state is loading | +| `isAuthenticated` | `boolean` | Whether user is authenticated | +| `signIn` | `() => Promise` | Sign in with Immutable (opens popup) | +| `signOut` | `() => Promise` | Sign out from both NextAuth and Immutable | +| `getAccessToken` | `() => Promise` | Get a valid access token (refreshes if needed) | +| `auth` | `Auth \| null` | The underlying Auth instance (for advanced use) | + +**Types:** + +| Type | Description | +| ---------------------------- | -------------------------------- | +| `ImmutableAuthProviderProps` | Props for the provider component | +| `UseImmutableAuthReturn` | Return type of useImmutableAuth | +| `CallbackPageProps` | Props for CallbackPage component | +| `ImmutableAuthConfig` | Re-exported configuration type | +| `ImmutableUser` | Re-exported user type | ### Server Exports (`@imtbl/auth-nextjs/server`) -| Export | Description | -| ---------------------------------------- | ------------------------ | -| `getImmutableSession(req, res, config)` | Get session server-side | -| `withPageAuthRequired(config, options?)` | HOC for protecting pages | +| Export | Description | +| ---------------------------------------- | ---------------------------------------- | +| `getImmutableSession(req, res, config)` | Get session server-side | +| `withPageAuthRequired(config, options?)` | HOC for protecting pages with auth check | + +**`withPageAuthRequired` Options:** + +| Option | Type | Default | Description | +| -------------------- | ----------------------- | ------------ | ---------------------------------------------------- | +| `loginUrl` | `string` | `"/login"` | URL to redirect to when not authenticated | +| `returnTo` | `string \| false` | current page | URL to redirect to after login (`false` to disable) | +| `getServerSideProps` | `(ctx, session) => ...` | - | Custom getServerSideProps that runs after auth check | + +**Example with custom getServerSideProps:** + +```typescript +export const getServerSideProps = withPageAuthRequired(config, { + loginUrl: "/auth/signin", + async getServerSideProps(ctx, session) { + // session is guaranteed to exist here + const data = await fetchData(session.accessToken); + return { props: { data } }; + }, +}); +``` + +**Types:** + +| Type | Description | +| --------------------------------- | ----------------------------------------- | +| `WithPageAuthRequiredOptions` | Basic options for page protection | +| `WithPageAuthRequiredFullOptions` | Full options including getServerSideProps | +| `WithPageAuthRequiredProps` | Props added to protected pages (session) | ## How It Works diff --git a/packages/auth-nextjs/src/client/callback.tsx b/packages/auth-nextjs/src/client/callback.tsx index a6942ca3a1..7212966ff6 100644 --- a/packages/auth-nextjs/src/client/callback.tsx +++ b/packages/auth-nextjs/src/client/callback.tsx @@ -46,7 +46,7 @@ export function CallbackPage({ config, redirectTo = '/', loadingComponent = null, - errorComponent = null, + errorComponent, }: CallbackPageProps) { const router = useRouter(); const [error, setError] = useState(null); diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index 38b31ba6eb..cfd5abb90c 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -44,7 +44,8 @@ function ImmutableAuthInner({ children: React.ReactNode; config: ImmutableAuthConfig; }) { - const authRef = useRef(null); + // Use state instead of ref so changes trigger re-renders and update context consumers + const [auth, setAuth] = useState(null); const prevConfigRef = useRef(null); const [isAuthReady, setIsAuthReady] = useState(false); const { data: session, update: updateSession } = useSession(); @@ -56,30 +57,29 @@ function ImmutableAuthInner({ // Create a config key to detect changes (clientId + authDomain uniquely identify the environment) const configKey = `${config.clientId}:${config.authenticationDomain || DEFAULT_AUTH_DOMAIN}`; - // If config changed, recreate Auth instance - if (prevConfigRef.current !== null && prevConfigRef.current !== configKey) { - authRef.current = null; - setIsAuthReady(false); + // Only recreate if config actually changed + if (prevConfigRef.current === configKey) { + return; } prevConfigRef.current = configKey; - if (!authRef.current) { - authRef.current = new Auth({ - clientId: config.clientId, - redirectUri: config.redirectUri, - logoutRedirectUri: config.logoutRedirectUri, - audience: config.audience || 'platform_api', - scope: config.scope || 'openid profile email offline_access transact', - authenticationDomain: config.authenticationDomain || DEFAULT_AUTH_DOMAIN, - }); - setIsAuthReady(true); - } + // Create new Auth instance with current config + const newAuth = new Auth({ + clientId: config.clientId, + redirectUri: config.redirectUri, + logoutRedirectUri: config.logoutRedirectUri, + audience: config.audience || 'platform_api', + scope: config.scope || 'openid profile email offline_access transact', + authenticationDomain: config.authenticationDomain || DEFAULT_AUTH_DOMAIN, + }); + + setAuth(newAuth); + setIsAuthReady(true); }, [config]); // Hydrate Auth instance from NextAuth session if localStorage is cleared // This handles the case where a valid session exists but Auth has no local state useEffect(() => { - const auth = authRef.current; if (!auth || !isAuthReady) return; if (!session?.accessToken || !session?.idToken) return; @@ -119,11 +119,10 @@ function ImmutableAuthInner({ }; hydrateAuth(); - }, [isAuthReady, session]); + }, [auth, isAuthReady, session]); // Listen for Auth events to sync tokens back to NextAuth useEffect(() => { - const auth = authRef.current; if (!auth || !isAuthReady) return undefined; const handleLoggedIn = async (authUser: User) => { @@ -144,11 +143,11 @@ function ImmutableAuthInner({ return () => { auth.eventEmitter.removeListener('loggedIn', handleLoggedIn); }; - }, [isAuthReady, session, updateSession]); + }, [auth, isAuthReady, session, updateSession]); const contextValue = useMemo( - () => ({ auth: authRef.current, config }), - [isAuthReady, config], + () => ({ auth, config }), + [auth, config], ); return ( diff --git a/packages/auth-nextjs/src/index.ts b/packages/auth-nextjs/src/index.ts index 2cbe978630..9f5682fd37 100644 --- a/packages/auth-nextjs/src/index.ts +++ b/packages/auth-nextjs/src/index.ts @@ -1,9 +1,14 @@ // Main entry point for @imtbl/auth-nextjs -import NextAuth, { type NextAuthOptions } from 'next-auth'; +import NextAuthDefault, { type NextAuthOptions } from 'next-auth'; import { createAuthOptions } from './config'; import type { ImmutableAuthConfig } from './types'; +// Handle ESM/CJS interop - in some bundler configurations, the default export +// may be nested under a 'default' property +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const NextAuth = ((NextAuthDefault as any).default || NextAuthDefault) as typeof NextAuthDefault; + /** * NextAuth options that can be overridden. * Excludes 'providers' as that's managed internally. diff --git a/packages/auth-nextjs/tsup.config.ts b/packages/auth-nextjs/tsup.config.ts index 7b0bdbd58f..d834ce0814 100644 --- a/packages/auth-nextjs/tsup.config.ts +++ b/packages/auth-nextjs/tsup.config.ts @@ -1,17 +1,35 @@ -import { defineConfig } from "tsup"; +import { defineConfig, type Options } from "tsup"; -export default defineConfig({ - entry: { - index: "src/index.ts", - "client/index": "src/client/index.ts", - "server/index": "src/server/index.ts", - }, +// Base configuration shared across all builds +const baseConfig: Options = { outDir: "dist/node", format: ["esm", "cjs"], target: "es2022", platform: "node", dts: false, - clean: true, external: ["react", "next", "next-auth", "next/navigation", "next/headers"], -}); +}; + +export default defineConfig([ + // Server-side entries (no 'use client' directive) + { + ...baseConfig, + entry: { + index: "src/index.ts", + "server/index": "src/server/index.ts", + }, + clean: true, + }, + // Client-side entry (needs 'use client' directive for Next.js) + { + ...baseConfig, + entry: { + "client/index": "src/client/index.ts", + }, + clean: false, // Don't clean since server build runs first + banner: { + js: "'use client';", + }, + }, +]); diff --git a/packages/passport/sdk-sample-app/src/components/AuthNextJS.tsx b/packages/passport/sdk-sample-app/src/components/AuthNextJS.tsx index c7d76c02fc..f68e4daad2 100644 --- a/packages/passport/sdk-sample-app/src/components/AuthNextJS.tsx +++ b/packages/passport/sdk-sample-app/src/components/AuthNextJS.tsx @@ -74,13 +74,16 @@ export default function AuthNextJS() { }, [session, environment, addMessage]); return ( - + + + ⚠️ This section is only testable when running the sample app locally with: pnpm run dev-with-sdk + - Login (NextAuth) + Login - Logout (NextAuth) + Logout Get User Info diff --git a/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx b/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx index 4951c53002..837e0d6528 100644 --- a/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx +++ b/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx @@ -11,6 +11,7 @@ import { Orderbook, OrderbookOverrides } from '@imtbl/orderbook'; import { Passport, PassportModuleConfiguration } from '@imtbl/passport'; import { Environment, ImmutableConfiguration, ModuleConfiguration } from '@imtbl/config'; import { ImmutableAuthProvider } from '@imtbl/auth-nextjs/client'; +import type { Session } from 'next-auth'; import { AUDIENCE, POPUP_REDIRECT_URI, @@ -202,7 +203,8 @@ const ImmutableContext = createContext<{ export function ImmutableProvider({ children, -}: { children: JSX.Element | JSX.Element[] }) { + session, +}: { children: JSX.Element | JSX.Element[]; session?: Session }) { const [environment, setEnvironment] = useLocalStorage( 'IMX_PASSPORT_SAMPLE_ENVIRONMENT', useContext(ImmutableContext).environment, @@ -247,7 +249,7 @@ export function ImmutableProvider({ return ( - + {children} diff --git a/packages/passport/sdk-sample-app/src/pages/_app.tsx b/packages/passport/sdk-sample-app/src/pages/_app.tsx index a8d8e5898a..997e0c3c10 100644 --- a/packages/passport/sdk-sample-app/src/pages/_app.tsx +++ b/packages/passport/sdk-sample-app/src/pages/_app.tsx @@ -3,25 +3,23 @@ import '@/styles/globals.css'; import React from 'react'; import type { AppProps } from 'next/app'; import { BiomeCombinedProviders } from '@biom3/react'; -import { SessionProvider } from 'next-auth/react'; +import type { Session } from 'next-auth'; import { ImmutableProvider } from '@/context/ImmutableProvider'; import { StatusProvider } from '@/context/StatusProvider'; import { PassportProvider } from '@/context/PassportProvider'; -export default function App({ Component, pageProps }: AppProps) { +export default function App({ Component, pageProps }: AppProps<{ session?: Session }>) { return ( - - - - - - {/* @ts-ignore */} - - - - - - + + + + + {/* @ts-ignore */} + + + + + ); } diff --git a/packages/passport/sdk-sample-app/src/pages/index.tsx b/packages/passport/sdk-sample-app/src/pages/index.tsx index 90493574d4..0451d2afbf 100644 --- a/packages/passport/sdk-sample-app/src/pages/index.tsx +++ b/packages/passport/sdk-sample-app/src/pages/index.tsx @@ -7,6 +7,7 @@ import Message from '@/components/Message'; import Environment from '@/components/Environment'; import { usePassportProvider } from '@/context/PassportProvider'; import { useStatusProvider } from '@/context/StatusProvider'; +import { useImmutableAuth } from '@imtbl/auth-nextjs/client'; import { BASE_PATH } from '@/config'; import PassportMethods from '@/components/PassportMethods'; import ZkEvmWorkflow from '@/components/zkevm/ZkEvmWorkflow'; @@ -15,6 +16,7 @@ import AuthNextJS from '@/components/AuthNextJS'; export default function Home() { const { isLoading } = useStatusProvider(); const { imxProvider, zkEvmProvider, defaultWalletProvider } = usePassportProvider(); + const { isAuthenticated: isAuthNextJSAuthenticated } = useImmutableAuth(); return ( <> @@ -27,7 +29,7 @@ export default function Home() {
- + From e9cfdc48a6bedd818ee0195046d90024870c13e0 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Wed, 17 Dec 2025 14:50:13 +1100 Subject: [PATCH 03/52] handle error callback --- packages/auth-nextjs/src/client/callback.tsx | 28 +++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/packages/auth-nextjs/src/client/callback.tsx b/packages/auth-nextjs/src/client/callback.tsx index 7212966ff6..f204511767 100644 --- a/packages/auth-nextjs/src/client/callback.tsx +++ b/packages/auth-nextjs/src/client/callback.tsx @@ -80,11 +80,33 @@ export function CallbackPage({ } }; - // Only run when we have the code parameter - if (router.isReady && router.query.code) { + const handleOAuthError = () => { + // OAuth providers return error and error_description when authentication fails + // (e.g., user cancels, consent denied, invalid request) + const errorCode = router.query.error as string; + const errorDescription = router.query.error_description as string; + + const errorMessage = errorDescription || errorCode || 'Authentication failed'; + setError(errorMessage); + }; + + if (!router.isReady) { + return; + } + + // Handle OAuth error responses (user cancelled, consent denied, etc.) + if (router.query.error) { + handleOAuthError(); + return; + } + + // Handle successful OAuth callback with authorization code + if (router.query.code) { handleCallback(); } - }, [router.isReady, router.query.code, router, config, redirectTo]); + }, [ + router.isReady, router.query.code, router.query.error, router.query.error_description, router, config, redirectTo, + ]); if (error) { if (errorComponent) { From 6f8ed40b27b013f159371f70e3393ef8225e9369 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Wed, 17 Dec 2025 15:05:33 +1100 Subject: [PATCH 04/52] conditional api routes --- packages/passport/sdk-sample-app/next.config.js | 12 +++++++++--- .../auth/{[...nextauth].ts => [...nextauth].api.ts} | 0 2 files changed, 9 insertions(+), 3 deletions(-) rename packages/passport/sdk-sample-app/src/pages/api/auth/{[...nextauth].ts => [...nextauth].api.ts} (100%) diff --git a/packages/passport/sdk-sample-app/next.config.js b/packages/passport/sdk-sample-app/next.config.js index f1dc3a0669..6836df8e5c 100644 --- a/packages/passport/sdk-sample-app/next.config.js +++ b/packages/passport/sdk-sample-app/next.config.js @@ -1,5 +1,7 @@ const basePath = process.env.NEXT_PUBLIC_BASE_PATH; +const enableApiRoutes = process.env.ENABLE_API_ROUTES === 'true'; + let pathConfig = {}; if (basePath) { @@ -15,9 +17,13 @@ const nextConfig = { typescript: { tsconfigPath: './tsconfig.build.json', }, - // Static export disables API routes. - // Set ENABLE_API_ROUTES=true to enable API routes (required for auth-nextjs) - ...(process.env.ENABLE_API_ROUTES !== 'true' && { output: 'export' }), + // Only include .api.ts/.api.tsx extensions when API routes are enabled + // This allows static export to work by excluding API route files + pageExtensions: enableApiRoutes + ? ['tsx', 'ts', 'jsx', 'js', 'api.tsx', 'api.ts'] + : ['tsx', 'ts', 'jsx', 'js'], + // Static export when API routes are disabled + ...(!enableApiRoutes && { output: 'export' }), reactStrictMode: true, }; diff --git a/packages/passport/sdk-sample-app/src/pages/api/auth/[...nextauth].ts b/packages/passport/sdk-sample-app/src/pages/api/auth/[...nextauth].api.ts similarity index 100% rename from packages/passport/sdk-sample-app/src/pages/api/auth/[...nextauth].ts rename to packages/passport/sdk-sample-app/src/pages/api/auth/[...nextauth].api.ts From 4b8aea16b52674f8bc54de61c4e4c6d01eaa7140 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Wed, 17 Dec 2025 15:14:44 +1100 Subject: [PATCH 05/52] fix hardcoded urls --- packages/auth-nextjs/src/config.ts | 5 ----- packages/auth-nextjs/src/server/with-page-auth.ts | 2 +- packages/auth-nextjs/src/types.ts | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/auth-nextjs/src/config.ts b/packages/auth-nextjs/src/config.ts index 9d480a04e1..b7fc214c39 100644 --- a/packages/auth-nextjs/src/config.ts +++ b/packages/auth-nextjs/src/config.ts @@ -123,11 +123,6 @@ export function createAuthOptions(config: ImmutableAuthConfig): NextAuthOptions }, }, - pages: { - signIn: '/login', - error: '/login', - }, - session: { strategy: 'jwt', // Session max age in seconds (30 days default) diff --git a/packages/auth-nextjs/src/server/with-page-auth.ts b/packages/auth-nextjs/src/server/with-page-auth.ts index f7ded3aa5a..a916199180 100644 --- a/packages/auth-nextjs/src/server/with-page-auth.ts +++ b/packages/auth-nextjs/src/server/with-page-auth.ts @@ -117,7 +117,7 @@ export function withPageAuthRequired< options: WithPageAuthRequiredFullOptions

= {}, ): GetServerSideProps { const { - loginUrl = '/login', + loginUrl = '/', returnTo, getServerSideProps: customGetServerSideProps, } = options; diff --git a/packages/auth-nextjs/src/types.ts b/packages/auth-nextjs/src/types.ts index 7466ed9579..c1f3ab191c 100644 --- a/packages/auth-nextjs/src/types.ts +++ b/packages/auth-nextjs/src/types.ts @@ -170,7 +170,7 @@ export interface UseImmutableAuthReturn { export interface WithPageAuthRequiredOptions { /** * URL to redirect to when not authenticated - * @default "/login" + * @default "/" */ loginUrl?: string; /** From c8d3639271f4ba0ee095b7e47b8867a9e9347732 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Wed, 17 Dec 2025 15:22:38 +1100 Subject: [PATCH 06/52] fix path --- packages/passport/sdk-sample-app/next.config.js | 7 ++++--- packages/passport/sdk-sample-app/src/lib/auth-nextjs.ts | 3 ++- .../sdk-sample-app/src/pages/{_app.tsx => _app.page.tsx} | 0 .../src/pages/{_document.tsx => _document.page.tsx} | 0 .../src/pages/{callback.tsx => callback.page.tsx} | 0 .../sdk-sample-app/src/pages/{index.tsx => index.page.tsx} | 0 .../src/pages/login/{callback.ts => callback.page.ts} | 0 .../{redirect-callback.ts => redirect-callback.page.ts} | 0 .../pages/silent-logout/{callback.ts => callback.page.ts} | 0 9 files changed, 6 insertions(+), 4 deletions(-) rename packages/passport/sdk-sample-app/src/pages/{_app.tsx => _app.page.tsx} (100%) rename packages/passport/sdk-sample-app/src/pages/{_document.tsx => _document.page.tsx} (100%) rename packages/passport/sdk-sample-app/src/pages/{callback.tsx => callback.page.tsx} (100%) rename packages/passport/sdk-sample-app/src/pages/{index.tsx => index.page.tsx} (100%) rename packages/passport/sdk-sample-app/src/pages/login/{callback.ts => callback.page.ts} (100%) rename packages/passport/sdk-sample-app/src/pages/login/{redirect-callback.ts => redirect-callback.page.ts} (100%) rename packages/passport/sdk-sample-app/src/pages/silent-logout/{callback.ts => callback.page.ts} (100%) diff --git a/packages/passport/sdk-sample-app/next.config.js b/packages/passport/sdk-sample-app/next.config.js index 6836df8e5c..7cc08245f6 100644 --- a/packages/passport/sdk-sample-app/next.config.js +++ b/packages/passport/sdk-sample-app/next.config.js @@ -17,11 +17,12 @@ const nextConfig = { typescript: { tsconfigPath: './tsconfig.build.json', }, - // Only include .api.ts/.api.tsx extensions when API routes are enabled + // Use .page.* extensions for regular pages and .api.* for API routes + // When API routes are disabled, only .page.* files are included (excludes .api.* files) // This allows static export to work by excluding API route files pageExtensions: enableApiRoutes - ? ['tsx', 'ts', 'jsx', 'js', 'api.tsx', 'api.ts'] - : ['tsx', 'ts', 'jsx', 'js'], + ? ['page.tsx', 'page.ts', 'page.jsx', 'page.js', 'api.tsx', 'api.ts'] + : ['page.tsx', 'page.ts', 'page.jsx', 'page.js'], // Static export when API routes are disabled ...(!enableApiRoutes && { output: 'export' }), reactStrictMode: true, diff --git a/packages/passport/sdk-sample-app/src/lib/auth-nextjs.ts b/packages/passport/sdk-sample-app/src/lib/auth-nextjs.ts index 33265f5db6..6acd7b82b5 100644 --- a/packages/passport/sdk-sample-app/src/lib/auth-nextjs.ts +++ b/packages/passport/sdk-sample-app/src/lib/auth-nextjs.ts @@ -1,5 +1,6 @@ import type { ImmutableAuthConfig } from "@imtbl/auth-nextjs"; import { EnvironmentNames } from "@/types"; +import { BASE_PATH } from "@/config"; // Client IDs for each environment (same as ImmutableProvider) const CLIENT_IDS: Record = { @@ -21,7 +22,7 @@ export function getAuthConfig(environment: EnvironmentNames): ImmutableAuthConfi return { clientId: CLIENT_IDS[environment], - redirectUri: `${baseUrl}/callback`, + redirectUri: `${baseUrl}${BASE_PATH}/callback`, audience: "platform_api", scope: "openid profile email offline_access transact", authenticationDomain: AUTH_DOMAINS[environment], diff --git a/packages/passport/sdk-sample-app/src/pages/_app.tsx b/packages/passport/sdk-sample-app/src/pages/_app.page.tsx similarity index 100% rename from packages/passport/sdk-sample-app/src/pages/_app.tsx rename to packages/passport/sdk-sample-app/src/pages/_app.page.tsx diff --git a/packages/passport/sdk-sample-app/src/pages/_document.tsx b/packages/passport/sdk-sample-app/src/pages/_document.page.tsx similarity index 100% rename from packages/passport/sdk-sample-app/src/pages/_document.tsx rename to packages/passport/sdk-sample-app/src/pages/_document.page.tsx diff --git a/packages/passport/sdk-sample-app/src/pages/callback.tsx b/packages/passport/sdk-sample-app/src/pages/callback.page.tsx similarity index 100% rename from packages/passport/sdk-sample-app/src/pages/callback.tsx rename to packages/passport/sdk-sample-app/src/pages/callback.page.tsx diff --git a/packages/passport/sdk-sample-app/src/pages/index.tsx b/packages/passport/sdk-sample-app/src/pages/index.page.tsx similarity index 100% rename from packages/passport/sdk-sample-app/src/pages/index.tsx rename to packages/passport/sdk-sample-app/src/pages/index.page.tsx diff --git a/packages/passport/sdk-sample-app/src/pages/login/callback.ts b/packages/passport/sdk-sample-app/src/pages/login/callback.page.ts similarity index 100% rename from packages/passport/sdk-sample-app/src/pages/login/callback.ts rename to packages/passport/sdk-sample-app/src/pages/login/callback.page.ts diff --git a/packages/passport/sdk-sample-app/src/pages/login/redirect-callback.ts b/packages/passport/sdk-sample-app/src/pages/login/redirect-callback.page.ts similarity index 100% rename from packages/passport/sdk-sample-app/src/pages/login/redirect-callback.ts rename to packages/passport/sdk-sample-app/src/pages/login/redirect-callback.page.ts diff --git a/packages/passport/sdk-sample-app/src/pages/silent-logout/callback.ts b/packages/passport/sdk-sample-app/src/pages/silent-logout/callback.page.ts similarity index 100% rename from packages/passport/sdk-sample-app/src/pages/silent-logout/callback.ts rename to packages/passport/sdk-sample-app/src/pages/silent-logout/callback.page.ts From 7dcad1b572ede21c1063ca285d89de234de251b7 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Wed, 17 Dec 2025 15:28:55 +1100 Subject: [PATCH 07/52] lint --- packages/auth-nextjs/package.json | 2 +- packages/passport/sdk-sample-app/src/pages/index.page.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/auth-nextjs/package.json b/packages/auth-nextjs/package.json index 3976bb1e25..8bc0ecd941 100644 --- a/packages/auth-nextjs/package.json +++ b/packages/auth-nextjs/package.json @@ -57,7 +57,7 @@ "lint": "eslint ./src --ext .ts,.tsx --max-warnings=0", "lint:fix": "eslint ./src --ext .ts,.tsx --max-warnings=0 --fix", "typecheck": "tsc --customConditions default --noEmit --jsx preserve", - "test": "jest" + "test": "jest --passWithNoTests" }, "dependencies": { "@imtbl/auth": "workspace:*" diff --git a/packages/passport/sdk-sample-app/src/pages/index.page.tsx b/packages/passport/sdk-sample-app/src/pages/index.page.tsx index 0451d2afbf..3929080ee1 100644 --- a/packages/passport/sdk-sample-app/src/pages/index.page.tsx +++ b/packages/passport/sdk-sample-app/src/pages/index.page.tsx @@ -29,7 +29,9 @@ export default function Home() {

- + From 7d6f3e7dd260d651c5f829cd0220d5a69c7cbb32 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Thu, 18 Dec 2025 11:10:40 +1100 Subject: [PATCH 08/52] fix sample app --- packages/auth-nextjs/package.json | 2 +- packages/auth-nextjs/src/client/provider.tsx | 14 +- packages/auth-nextjs/src/config.ts | 92 ++- packages/auth-nextjs/src/types.ts | 27 + .../src/context/ImmutableProvider.tsx | 14 +- .../pages/api/auth/dev/[...nextauth].api.ts | 5 + .../pages/api/auth/prod/[...nextauth].api.ts | 5 + .../auth/{ => sandbox}/[...nextauth].api.ts | 2 - pnpm-lock.yaml | 700 +++++++++++------- 9 files changed, 586 insertions(+), 275 deletions(-) create mode 100644 packages/passport/sdk-sample-app/src/pages/api/auth/dev/[...nextauth].api.ts create mode 100644 packages/passport/sdk-sample-app/src/pages/api/auth/prod/[...nextauth].api.ts rename packages/passport/sdk-sample-app/src/pages/api/auth/{ => sandbox}/[...nextauth].api.ts (77%) diff --git a/packages/auth-nextjs/package.json b/packages/auth-nextjs/package.json index 8bc0ecd941..9993e7de4b 100644 --- a/packages/auth-nextjs/package.json +++ b/packages/auth-nextjs/package.json @@ -52,6 +52,7 @@ ], "scripts": { "build": "pnpm transpile && pnpm typegen", + "dev": "pnpm transpile && tsup --config tsup.config.ts --watch --no-clean", "transpile": "tsup --config tsup.config.ts", "typegen": "tsc --customConditions default --emitDeclarationOnly --outDir dist/types", "lint": "eslint ./src --ext .ts,.tsx --max-warnings=0", @@ -88,4 +89,3 @@ "repository": "immutable/ts-immutable-sdk.git", "type": "module" } - diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index cfd5abb90c..165564add9 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -30,19 +30,24 @@ const DEFAULT_AUTH_DOMAIN = 'https://auth.immutable.com'; interface ImmutableAuthContextValue { auth: Auth | null; config: ImmutableAuthConfig; + basePath: string; } const ImmutableAuthContext = createContext(null); +const DEFAULT_BASE_PATH = '/api/auth'; + /** * Internal provider that manages Auth instance */ function ImmutableAuthInner({ children, config, + basePath, }: { children: React.ReactNode; config: ImmutableAuthConfig; + basePath: string; }) { // Use state instead of ref so changes trigger re-renders and update context consumers const [auth, setAuth] = useState(null); @@ -146,8 +151,8 @@ function ImmutableAuthInner({ }, [auth, isAuthReady, session, updateSession]); const contextValue = useMemo( - () => ({ auth, config }), - [auth, config], + () => ({ auth, config, basePath }), + [auth, config, basePath], ); return ( @@ -185,10 +190,11 @@ export function ImmutableAuthProvider({ children, config, session, + basePath = DEFAULT_BASE_PATH, }: ImmutableAuthProviderProps) { return ( - - {children} + + {children} ); } diff --git a/packages/auth-nextjs/src/config.ts b/packages/auth-nextjs/src/config.ts index b7fc214c39..f846438742 100644 --- a/packages/auth-nextjs/src/config.ts +++ b/packages/auth-nextjs/src/config.ts @@ -1,11 +1,48 @@ import type { NextAuthOptions } from 'next-auth'; import Credentials from 'next-auth/providers/credentials'; -import type { ImmutableAuthConfig, ImmutableTokenData } from './types'; +import type { ImmutableAuthConfig, ImmutableTokenData, UserInfoResponse } from './types'; import { refreshAccessToken, isTokenExpired } from './refresh'; // Handle ESM/CJS interop - CredentialsProvider may be default export or the module itself const CredentialsProvider = (Credentials as unknown as { default?: typeof Credentials }).default || Credentials; +const DEFAULT_AUTH_DOMAIN = 'https://auth.immutable.com'; + +/** + * Validate tokens by calling the userinfo endpoint. + * This is the standard OAuth 2.0 way to validate access tokens server-side. + * The auth server validates signature, issuer, audience, and expiry. + * + * @param accessToken - The access token to validate + * @param authDomain - The authentication domain + * @returns The user info if valid, null otherwise + */ +async function validateTokens( + accessToken: string, + authDomain: string, +): Promise { + try { + const response = await fetch(`${authDomain}/userinfo`, { + method: 'GET', + headers: { + Authorization: `Bearer ${accessToken}`, + }, + }); + + if (!response.ok) { + // eslint-disable-next-line no-console + console.error('[auth-nextjs] Token validation failed:', response.status, response.statusText); + return null; + } + + return await response.json(); + } catch (error) { + // eslint-disable-next-line no-console + console.error('[auth-nextjs] Token validation error:', error); + return null; + } +} + /** * Create NextAuth options configured for Immutable authentication * @@ -27,6 +64,8 @@ const CredentialsProvider = (Credentials as unknown as { default?: typeof Creden * ``` */ export function createAuthOptions(config: ImmutableAuthConfig): NextAuthOptions { + const authDomain = config.authenticationDomain || DEFAULT_AUTH_DOMAIN; + return { providers: [ CredentialsProvider({ @@ -40,26 +79,49 @@ export function createAuthOptions(config: ImmutableAuthConfig): NextAuthOptions return null; } + let tokenData: ImmutableTokenData; try { - const tokenData: ImmutableTokenData = JSON.parse(credentials.tokens); - - // Return user object with all token data - return { - id: tokenData.profile.sub, - sub: tokenData.profile.sub, - email: tokenData.profile.email, - nickname: tokenData.profile.nickname, - accessToken: tokenData.accessToken, - refreshToken: tokenData.refreshToken, - idToken: tokenData.idToken, - accessTokenExpires: tokenData.accessTokenExpires, - zkEvm: tokenData.zkEvm, - }; + tokenData = JSON.parse(credentials.tokens); } catch (error) { // eslint-disable-next-line no-console console.error('[auth-nextjs] Failed to parse token data:', error); return null; } + + // Validate tokens server-side via userinfo endpoint. + // This is the standard OAuth 2.0 way - the auth server validates the token. + const userInfo = await validateTokens(tokenData.accessToken, authDomain); + if (!userInfo) { + // eslint-disable-next-line no-console + console.error('[auth-nextjs] Token validation failed - rejecting authentication'); + return null; + } + + // Verify the user ID (sub) from userinfo matches the client-provided profile. + // This prevents spoofing a different user ID with a valid token. + if (userInfo.sub !== tokenData.profile.sub) { + // eslint-disable-next-line no-console + console.error( + '[auth-nextjs] User ID mismatch - userinfo sub:', + userInfo.sub, + 'provided sub:', + tokenData.profile.sub, + ); + return null; + } + + // Return user object with validated data + return { + id: userInfo.sub, + sub: userInfo.sub, + email: userInfo.email ?? tokenData.profile.email, + nickname: userInfo.nickname ?? tokenData.profile.nickname, + accessToken: tokenData.accessToken, + refreshToken: tokenData.refreshToken, + idToken: tokenData.idToken, + accessTokenExpires: tokenData.accessTokenExpires, + zkEvm: tokenData.zkEvm, + }; }, }), ], diff --git a/packages/auth-nextjs/src/types.ts b/packages/auth-nextjs/src/types.ts index c1f3ab191c..d707e6c267 100644 --- a/packages/auth-nextjs/src/types.ts +++ b/packages/auth-nextjs/src/types.ts @@ -110,6 +110,27 @@ export interface ImmutableTokenData { zkEvm?: ZkEvmInfo; } +/** + * Response from the userinfo endpoint + * Used for server-side token validation + */ +export interface UserInfoResponse { + /** Subject - unique user identifier */ + sub: string; + /** User's email address */ + email?: string; + /** User's nickname/username */ + nickname?: string; + /** User's full name */ + name?: string; + /** User's profile picture URL */ + picture?: string; + /** When the user profile was last updated */ + updated_at?: string; + /** Whether the email has been verified */ + email_verified?: boolean; +} + /** * Props for ImmutableAuthProvider */ @@ -124,6 +145,12 @@ export interface ImmutableAuthProviderProps { * Can be Session from getServerSession or any compatible session object */ session?: Session | DefaultSession | null; + /** + * Custom base path for NextAuth API routes + * Use this when you have multiple auth endpoints (e.g., per environment) + * @default "/api/auth" + */ + basePath?: string; } /** diff --git a/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx b/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx index 837e0d6528..a29a4bab8c 100644 --- a/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx +++ b/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx @@ -247,9 +247,21 @@ export function ImmutableProvider({ // Get auth-nextjs config based on current environment const authConfig = useMemo(() => getAuthConfig(environment), [environment]); + // Get the NextAuth base path for the current environment + const authBasePath = useMemo(() => { + switch (environment) { + case EnvironmentNames.DEV: + return '/api/auth/dev'; + case EnvironmentNames.PRODUCTION: + return '/api/auth/prod'; + default: + return '/api/auth/sandbox'; + } + }, [environment]); + return ( - + {children} diff --git a/packages/passport/sdk-sample-app/src/pages/api/auth/dev/[...nextauth].api.ts b/packages/passport/sdk-sample-app/src/pages/api/auth/dev/[...nextauth].api.ts new file mode 100644 index 0000000000..d12da56051 --- /dev/null +++ b/packages/passport/sdk-sample-app/src/pages/api/auth/dev/[...nextauth].api.ts @@ -0,0 +1,5 @@ +import { ImmutableAuth } from "@imtbl/auth-nextjs"; +import { getAuthConfig } from "@/lib/auth-nextjs"; +import { EnvironmentNames } from "@/types"; + +export default ImmutableAuth(getAuthConfig(EnvironmentNames.DEV)); diff --git a/packages/passport/sdk-sample-app/src/pages/api/auth/prod/[...nextauth].api.ts b/packages/passport/sdk-sample-app/src/pages/api/auth/prod/[...nextauth].api.ts new file mode 100644 index 0000000000..b455009f1c --- /dev/null +++ b/packages/passport/sdk-sample-app/src/pages/api/auth/prod/[...nextauth].api.ts @@ -0,0 +1,5 @@ +import { ImmutableAuth } from "@imtbl/auth-nextjs"; +import { getAuthConfig } from "@/lib/auth-nextjs"; +import { EnvironmentNames } from "@/types"; + +export default ImmutableAuth(getAuthConfig(EnvironmentNames.PRODUCTION)); diff --git a/packages/passport/sdk-sample-app/src/pages/api/auth/[...nextauth].api.ts b/packages/passport/sdk-sample-app/src/pages/api/auth/sandbox/[...nextauth].api.ts similarity index 77% rename from packages/passport/sdk-sample-app/src/pages/api/auth/[...nextauth].api.ts rename to packages/passport/sdk-sample-app/src/pages/api/auth/sandbox/[...nextauth].api.ts index b7f0a61af7..5d120ad9ff 100644 --- a/packages/passport/sdk-sample-app/src/pages/api/auth/[...nextauth].api.ts +++ b/packages/passport/sdk-sample-app/src/pages/api/auth/sandbox/[...nextauth].api.ts @@ -2,6 +2,4 @@ import { ImmutableAuth } from "@imtbl/auth-nextjs"; import { getAuthConfig } from "@/lib/auth-nextjs"; import { EnvironmentNames } from "@/types"; -// Use sandbox config for the API route (server-side default) export default ImmutableAuth(getAuthConfig(EnvironmentNames.SANDBOX)); - diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d3a464f003..6512dcbf6c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,7 +68,7 @@ importers: version: 17.1.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-react-refresh: specifier: latest - version: 0.4.25(eslint@8.57.0) + version: 0.4.26(eslint@8.57.0) http-server: specifier: ^14.1.1 version: 14.1.1 @@ -117,13 +117,13 @@ importers: version: 29.7.0 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)) + version: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) ts-jest: specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)))(typescript@5.6.2) + version: 29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)))(typescript@5.6.2) ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2) + version: 10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2) typescript: specifier: ^5 version: 5.6.2 @@ -135,7 +135,7 @@ importers: version: 0.25.21(@emotion/react@11.11.3(@types/react@18.3.12)(react@18.3.1))(@rive-app/react-canvas-lite@4.9.0(react@18.3.1))(embla-carousel-react@8.1.5(react@18.3.1))(framer-motion@11.18.2(@emotion/is-prop-valid@0.8.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@imtbl/sdk': specifier: latest - version: 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + version: 2.12.3(bufferutil@4.0.8)(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) next: specifier: 14.2.25 version: 14.2.25(@babel/core@7.26.9)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1051,10 +1051,10 @@ importers: devDependencies: '@swc/core': specifier: ^1.3.36 - version: 1.15.3(@swc/helpers@0.5.13) + version: 1.15.3 '@swc/jest': specifier: ^0.2.37 - version: 0.2.37(@swc/core@1.15.3(@swc/helpers@0.5.13)) + version: 0.2.37(@swc/core@1.15.3) '@types/jest': specifier: ^29.5.12 version: 29.5.14 @@ -1066,7 +1066,7 @@ importers: version: 18.3.12 jest: specifier: ^29.4.3 - version: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + version: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) jest-environment-jsdom: specifier: ^29.4.3 version: 29.6.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -1081,10 +1081,10 @@ importers: version: 18.3.1 ts-node: specifier: ^10.9.1 - version: 10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2) + version: 10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2) tsup: specifier: ^8.3.0 - version: 8.3.0(@swc/core@1.15.3(@swc/helpers@0.5.13))(jiti@1.21.0)(postcss@8.4.49)(typescript@5.6.2)(yaml@2.5.0) + version: 8.3.0(@swc/core@1.15.3)(jiti@1.21.0)(postcss@8.4.49)(typescript@5.6.2)(yaml@2.5.0) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -1291,7 +1291,7 @@ importers: version: 29.6.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) react-scripts: specifier: 5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@9.16.0(jiti@1.21.0))(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@9.16.0(jiti@1.21.0))(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -1457,7 +1457,7 @@ importers: version: 29.6.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) react-scripts: specifier: 5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -1469,7 +1469,7 @@ importers: version: 0.13.0(rollup@4.28.0) ts-jest: specifier: ^29.1.0 - version: 29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2) + version: 29.2.5(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -10381,8 +10381,8 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - eslint-plugin-react-refresh@0.4.25: - resolution: {integrity: sha512-dRUD2LOdEqI4zXHqbQ442blQAzdSuShAaiSq5Vtyy6LT08YUf0oOjBDo4VPx0dCPgiPWh1WB4dtbLOd0kOlDPQ==} + eslint-plugin-react-refresh@0.4.26: + resolution: {integrity: sha512-1RETEylht2O6FM/MvgnyvT+8K21wLqDNg4qD51Zj3guhjt433XbnnkVttHMyaVyAFD03QSV4LPS5iE3VQmO7XQ==} peerDependencies: eslint: '>=8.40' @@ -17598,7 +17598,7 @@ snapshots: '@babel/traverse': 7.27.0 '@babel/types': 7.27.0 convert-source-map: 2.0.0 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.7 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -19288,7 +19288,7 @@ snapshots: '@babel/parser': 7.27.0 '@babel/template': 7.27.0 '@babel/types': 7.27.0 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -20396,12 +20396,12 @@ snapshots: - supports-color - utf-8-validate - '@imtbl/checkout-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/checkout-sdk@2.12.3(bufferutil@4.0.8)(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10)': dependencies: '@imtbl/blockchain-data': 2.12.3 '@imtbl/bridge-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@imtbl/config': 2.12.3 - '@imtbl/dex-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/dex-sdk': 2.12.3(bufferutil@4.0.8)(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) '@imtbl/generated-clients': 2.12.3 '@imtbl/metrics': 2.12.3 '@imtbl/orderbook': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -20465,12 +20465,12 @@ snapshots: - typescript - utf-8-validate - '@imtbl/dex-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/dex-sdk@2.12.3(bufferutil@4.0.8)(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10)': dependencies: '@imtbl/config': 2.12.3 '@uniswap/sdk-core': 3.2.3 - '@uniswap/swap-router-contracts': 1.3.1(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) - '@uniswap/v3-sdk': 3.10.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + '@uniswap/swap-router-contracts': 1.3.1(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + '@uniswap/v3-sdk': 3.10.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil @@ -20547,11 +20547,11 @@ snapshots: - encoding - supports-color - '@imtbl/sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/sdk@2.12.3(bufferutil@4.0.8)(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10)': dependencies: '@imtbl/auth': 2.12.3 '@imtbl/blockchain-data': 2.12.3 - '@imtbl/checkout-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/checkout-sdk': 2.12.3(bufferutil@4.0.8)(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) '@imtbl/config': 2.12.3 '@imtbl/minting-backend': 2.12.3 '@imtbl/orderbook': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -20808,6 +20808,43 @@ snapshots: - ts-node - utf-8-validate + '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0(node-notifier@8.0.2) + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.14.13 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.8.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.5 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + optionalDependencies: + node-notifier: 8.0.2 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node + '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))': dependencies: '@jest/console': 29.7.0 @@ -20919,6 +20956,43 @@ snapshots: - supports-color - ts-node + '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2))': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0(node-notifier@8.0.2) + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.14.13 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.8.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.5 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + optionalDependencies: + node-notifier: 8.0.2 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + - ts-node + '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))': dependencies: '@jest/console': 29.7.0 @@ -21225,7 +21299,7 @@ snapshots: '@types/istanbul-lib-coverage': 2.0.4 collect-v8-coverage: 1.0.2 - '@jest/test-sequencer@26.6.3(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(utf-8-validate@5.0.10)': + '@jest/test-sequencer@26.6.3': dependencies: '@jest/test-result': 26.6.2 graceful-fs: 4.2.11 @@ -21233,11 +21307,7 @@ snapshots: jest-runner: 26.6.3(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(utf-8-validate@5.0.10) jest-runtime: 26.6.3(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(utf-8-validate@5.0.10) transitivePeerDependencies: - - bufferutil - - canvas - supports-color - - ts-node - - utf-8-validate '@jest/test-sequencer@27.5.1': dependencies: @@ -24610,6 +24680,22 @@ snapshots: '@swc/core-win32-x64-msvc@1.9.3': optional: true + '@swc/core@1.15.3': + dependencies: + '@swc/counter': 0.1.3 + '@swc/types': 0.1.25 + optionalDependencies: + '@swc/core-darwin-arm64': 1.15.3 + '@swc/core-darwin-x64': 1.15.3 + '@swc/core-linux-arm-gnueabihf': 1.15.3 + '@swc/core-linux-arm64-gnu': 1.15.3 + '@swc/core-linux-arm64-musl': 1.15.3 + '@swc/core-linux-x64-gnu': 1.15.3 + '@swc/core-linux-x64-musl': 1.15.3 + '@swc/core-win32-arm64-msvc': 1.15.3 + '@swc/core-win32-ia32-msvc': 1.15.3 + '@swc/core-win32-x64-msvc': 1.15.3 + '@swc/core@1.15.3(@swc/helpers@0.5.13)': dependencies: '@swc/counter': 0.1.3 @@ -24662,10 +24748,10 @@ snapshots: '@swc/counter': 0.1.3 jsonc-parser: 3.3.1 - '@swc/jest@0.2.37(@swc/core@1.15.3(@swc/helpers@0.5.13))': + '@swc/jest@0.2.37(@swc/core@1.15.3)': dependencies: '@jest/create-cache-key-function': 29.7.0 - '@swc/core': 1.15.3(@swc/helpers@0.5.13) + '@swc/core': 1.15.3 '@swc/counter': 0.1.3 jsonc-parser: 3.3.1 @@ -25175,25 +25261,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/type-utils': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) - '@typescript-eslint/utils': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) - debug: 4.3.7(supports-color@8.1.1) - eslint: 9.16.0(jiti@1.21.0) - graphemer: 1.4.0 - ignore: 5.3.1 - natural-compare-lite: 1.4.0 - semver: 7.6.3 - tsutils: 3.21.0(typescript@5.6.2) - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -25355,6 +25422,17 @@ snapshots: tiny-invariant: 1.3.1 toformat: 2.0.0 + '@uniswap/swap-router-contracts@1.3.1(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))': + dependencies: + '@openzeppelin/contracts': 3.4.2 + '@uniswap/v2-core': 1.0.1 + '@uniswap/v3-core': 1.0.0 + '@uniswap/v3-periphery': 1.4.4 + dotenv: 14.3.2 + hardhat-watcher: 2.5.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + transitivePeerDependencies: + - hardhat + '@uniswap/swap-router-contracts@1.3.1(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))': dependencies: '@openzeppelin/contracts': 3.4.2 @@ -25386,6 +25464,19 @@ snapshots: '@uniswap/v3-core': 1.0.0 base64-sol: 1.0.1 + '@uniswap/v3-sdk@3.10.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))': + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/solidity': 5.7.0 + '@uniswap/sdk-core': 4.0.6 + '@uniswap/swap-router-contracts': 1.3.1(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + '@uniswap/v3-periphery': 1.4.3 + '@uniswap/v3-staker': 1.0.0 + tiny-invariant: 1.3.1 + tiny-warning: 1.0.3 + transitivePeerDependencies: + - hardhat + '@uniswap/v3-sdk@3.10.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))': dependencies: '@ethersproject/abi': 5.7.0 @@ -25940,7 +26031,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.7 transitivePeerDependencies: - supports-color @@ -26401,6 +26492,20 @@ snapshots: transitivePeerDependencies: - supports-color + babel-jest@29.7.0(@babel/core@7.26.9): + dependencies: + '@babel/core': 7.26.9 + '@jest/transform': 29.7.0 + '@types/babel__core': 7.20.5 + babel-plugin-istanbul: 6.1.1 + babel-preset-jest: 29.6.3(@babel/core@7.26.9) + chalk: 4.1.2 + graceful-fs: 4.2.11 + slash: 3.0.0 + transitivePeerDependencies: + - supports-color + optional: true + babel-loader@8.3.0(@babel/core@7.26.9)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)): dependencies: '@babel/core': 7.26.9 @@ -26610,6 +26715,13 @@ snapshots: babel-plugin-jest-hoist: 29.6.3 babel-preset-current-node-syntax: 1.0.1(@babel/core@7.26.10) + babel-preset-jest@29.6.3(@babel/core@7.26.9): + dependencies: + '@babel/core': 7.26.9 + babel-plugin-jest-hoist: 29.6.3 + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.26.9) + optional: true + babel-preset-react-app@10.0.1: dependencies: '@babel/core': 7.26.9 @@ -27555,6 +27667,21 @@ snapshots: safe-buffer: 5.2.1 sha.js: 2.4.11 + create-jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + create-jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)): dependencies: '@jest/types': 29.6.3 @@ -27570,6 +27697,21 @@ snapshots: - supports-color - ts-node + create-jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + create-jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)): dependencies: '@jest/types': 29.6.3 @@ -27600,6 +27742,21 @@ snapshots: - supports-color - ts-node + create-jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + create-jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)): dependencies: '@jest/types': 29.6.3 @@ -27923,6 +28080,10 @@ snapshots: dependencies: ms: 2.1.3 + debug@4.3.7: + dependencies: + ms: 2.1.3 + debug@4.3.7(supports-color@8.1.1): dependencies: ms: 2.1.3 @@ -28598,7 +28759,7 @@ snapshots: dependencies: confusing-browser-globals: 1.0.11 eslint: 8.57.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) object.assign: 4.1.5 object.entries: 1.1.8 semver: 6.3.1 @@ -28609,13 +28770,13 @@ snapshots: '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0))(eslint-plugin-react-hooks@5.0.0(eslint@8.57.0))(eslint-plugin-react@7.35.0(eslint@8.57.0))(eslint@8.57.0): dependencies: eslint: 8.57.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 5.0.0(eslint@8.57.0) @@ -28629,8 +28790,8 @@ snapshots: '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) @@ -28648,8 +28809,8 @@ snapshots: '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.0) @@ -28667,8 +28828,8 @@ snapshots: '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.0) @@ -28686,7 +28847,7 @@ snapshots: eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.0) @@ -28703,8 +28864,8 @@ snapshots: '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.0) @@ -28714,45 +28875,18 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): - dependencies: - '@babel/core': 7.26.9 - '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@8.57.0) - '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2) - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) - babel-preset-react-app: 10.0.1 - confusing-browser-globals: 1.0.11 - eslint: 8.57.0 - eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) - eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) - eslint-plugin-react: 7.35.0(eslint@8.57.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) - eslint-plugin-testing-library: 5.11.0(eslint@8.57.0)(typescript@5.6.2) - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - '@babel/plugin-syntax-flow' - - '@babel/plugin-transform-react-jsx' - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - jest - - supports-color - eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): dependencies: '@babel/core': 7.26.9 '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@9.16.0(jiti@1.21.0)) '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) '@typescript-eslint/parser': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) babel-preset-react-app: 10.0.1 confusing-browser-globals: 1.0.11 eslint: 9.16.0(jiti@1.21.0) eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)) eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) eslint-plugin-jsx-a11y: 6.9.0(eslint@9.16.0(jiti@1.21.0)) eslint-plugin-react: 7.35.0(eslint@9.16.0(jiti@1.21.0)) @@ -28768,23 +28902,23 @@ snapshots: - jest - supports-color - eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): + eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): dependencies: '@babel/core': 7.26.9 - '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@9.16.0(jiti@1.21.0)) + '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@8.57.0) '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) - '@typescript-eslint/parser': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) babel-preset-react-app: 10.0.1 confusing-browser-globals: 1.0.11 - eslint: 9.16.0(jiti@1.21.0) - eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) - eslint-plugin-jsx-a11y: 6.9.0(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-react: 7.35.0(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-react-hooks: 4.6.0(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-testing-library: 5.11.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + eslint: 8.57.0 + eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) + eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) + eslint-plugin-react: 7.35.0(eslint@8.57.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) + eslint-plugin-testing-library: 5.11.0(eslint@8.57.0)(typescript@5.6.2) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: @@ -28809,7 +28943,7 @@ snapshots: enhanced-resolve: 5.15.0 eslint: 8.57.0 eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.0) get-tsconfig: 4.6.2 globby: 13.2.2 is-core-module: 2.15.0 @@ -28826,8 +28960,8 @@ snapshots: debug: 4.3.7(supports-color@8.1.1) enhanced-resolve: 5.15.0 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) get-tsconfig: 4.6.2 globby: 13.2.2 is-core-module: 2.15.0 @@ -28850,7 +28984,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: @@ -28861,16 +28995,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0(jiti@1.21.0)): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) - eslint: 9.16.0(jiti@1.21.0) - eslint-import-resolver-node: 0.3.9 - transitivePeerDependencies: - - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0(jiti@1.21.0)): dependencies: debug: 3.2.7 @@ -28881,14 +29005,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0): - dependencies: - '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.26.10) - '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.10) - eslint: 8.57.0 - lodash: 4.17.21 - string-natural-compare: 3.0.1 - eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@9.16.0(jiti@1.21.0)): dependencies: '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.26.10) @@ -28897,15 +29013,42 @@ snapshots: lodash: 4.17.21 string-natural-compare: 3.0.1 - eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0)): + eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0): dependencies: '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.26.9) '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.9) - eslint: 9.16.0(jiti@1.21.0) + eslint: 8.57.0 lodash: 4.17.21 string-natural-compare: 3.0.1 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): + dependencies: + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + hasown: 2.0.2 + is-core-module: 2.15.0 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 + semver: 6.3.1 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + + eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -28932,7 +29075,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -28940,9 +29083,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.16.0(jiti@1.21.0) + eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0(jiti@1.21.0)) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -29008,17 +29151,6 @@ snapshots: - supports-color - typescript - eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): - dependencies: - '@typescript-eslint/experimental-utils': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) - eslint: 9.16.0(jiti@1.21.0) - optionalDependencies: - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) - jest: 27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10) - transitivePeerDependencies: - - supports-color - - typescript - eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0): dependencies: aria-query: 5.1.3 @@ -29082,7 +29214,7 @@ snapshots: dependencies: eslint: 8.57.0 - eslint-plugin-react-refresh@0.4.25(eslint@8.57.0): + eslint-plugin-react-refresh@0.4.26(eslint@8.57.0): dependencies: eslint: 8.57.0 @@ -30433,6 +30565,11 @@ snapshots: - debug - utf-8-validate + hardhat-watcher@2.5.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)): + dependencies: + chokidar: 3.6.0 + hardhat: 2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) + hardhat-watcher@2.5.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)): dependencies: chokidar: 3.6.0 @@ -30803,7 +30940,7 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.7 transitivePeerDependencies: - supports-color @@ -30862,7 +30999,7 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.7 transitivePeerDependencies: - supports-color @@ -31317,7 +31454,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.7 istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -31507,11 +31644,11 @@ snapshots: jest-cli@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + create-jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0) exit: 0.1.2 import-local: 3.1.0 jest-config: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) @@ -31547,6 +31684,27 @@ snapshots: - supports-color - ts-node + jest-cli@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)): + dependencies: + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + chalk: 4.1.2 + create-jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) + exit: 0.1.2 + import-local: 3.1.0 + jest-config: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) + jest-util: 29.7.0 + jest-validate: 29.7.0 + yargs: 17.7.2 + optionalDependencies: + node-notifier: 8.0.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + jest-cli@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)): dependencies: '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) @@ -31591,11 +31749,11 @@ snapshots: jest-cli@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) + create-jest: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0) exit: 0.1.2 import-local: 3.1.0 jest-config: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) @@ -31655,7 +31813,7 @@ snapshots: jest-config@26.6.3(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.26.10 - '@jest/test-sequencer': 26.6.3(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(utf-8-validate@5.0.10) + '@jest/test-sequencer': 26.6.3 '@jest/types': 26.6.2 babel-jest: 26.6.3(@babel/core@7.26.10) chalk: 4.1.2 @@ -31779,6 +31937,37 @@ snapshots: - babel-plugin-macros - supports-color + jest-config@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)): + dependencies: + '@babel/core': 7.26.10 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.26.10) + chalk: 4.1.2 + ci-info: 3.8.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0(babel-plugin-macros@3.1.0) + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 18.15.13 + ts-node: 10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + jest-config@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)): dependencies: '@babel/core': 7.26.10 @@ -31903,6 +32092,37 @@ snapshots: - babel-plugin-macros - supports-color + jest-config@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)): + dependencies: + '@babel/core': 7.26.10 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.26.10) + chalk: 4.1.2 + ci-info: 3.8.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0(babel-plugin-macros@3.1.0) + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 20.14.13 + ts-node: 10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + jest-config@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)): dependencies: '@babel/core': 7.26.10 @@ -32911,7 +33131,7 @@ snapshots: jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) '@jest/types': 29.6.3 import-local: 3.1.0 jest-cli: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) @@ -32937,6 +33157,20 @@ snapshots: - supports-color - ts-node + jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)): + dependencies: + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) + '@jest/types': 29.6.3 + import-local: 3.1.0 + jest-cli: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) + optionalDependencies: + node-notifier: 8.0.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node + jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)): dependencies: '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) @@ -32967,7 +33201,7 @@ snapshots: jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) '@jest/types': 29.6.3 import-local: 3.1.0 jest-cli: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) @@ -36129,7 +36363,7 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10): + react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.26.9 '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@2.19.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)))(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) @@ -36147,7 +36381,7 @@ snapshots: dotenv: 10.0.0 dotenv-expand: 5.1.0 eslint: 8.57.0 - eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) eslint-webpack-plugin: 3.2.0(eslint@8.57.0)(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) file-loader: 6.2.0(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) fs-extra: 10.1.0 @@ -36215,92 +36449,6 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@9.16.0(jiti@1.21.0))(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10): - dependencies: - '@babel/core': 7.26.9 - '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@2.19.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)))(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - '@svgr/webpack': 5.5.0 - babel-jest: 27.5.1(@babel/core@7.26.9) - babel-loader: 8.3.0(@babel/core@7.26.9)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - babel-plugin-named-asset-import: 0.3.8(@babel/core@7.26.9) - babel-preset-react-app: 10.0.1 - bfj: 7.0.2 - browserslist: 4.23.3 - camelcase: 6.3.0 - case-sensitive-paths-webpack-plugin: 2.4.0 - css-loader: 6.8.1(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - css-minimizer-webpack-plugin: 3.4.1(esbuild@0.23.1)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - dotenv: 10.0.0 - dotenv-expand: 5.1.0 - eslint: 9.16.0(jiti@1.21.0) - eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) - eslint-webpack-plugin: 3.2.0(eslint@9.16.0(jiti@1.21.0))(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - file-loader: 6.2.0(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - fs-extra: 10.1.0 - html-webpack-plugin: 5.5.3(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - identity-obj-proxy: 3.0.0 - jest: 27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10) - jest-resolve: 27.5.1 - jest-watch-typeahead: 1.1.0(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10)) - mini-css-extract-plugin: 2.7.6(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - postcss: 8.4.49 - postcss-flexbugs-fixes: 5.0.2(postcss@8.4.49) - postcss-loader: 6.2.1(postcss@8.4.49)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - postcss-normalize: 10.0.1(browserslist@4.23.3)(postcss@8.4.49) - postcss-preset-env: 7.8.3(postcss@8.4.49) - prompts: 2.4.2 - react: 18.3.1 - react-app-polyfill: 3.0.0 - react-dev-utils: 12.0.1(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - react-refresh: 0.11.0 - resolve: 1.22.8 - resolve-url-loader: 4.0.0 - sass-loader: 12.6.0(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - semver: 7.6.3 - source-map-loader: 3.0.2(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - style-loader: 3.3.3(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - tailwindcss: 3.4.7(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) - terser-webpack-plugin: 5.3.9(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - webpack: 5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1) - webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - webpack-manifest-plugin: 4.1.1(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - workbox-webpack-plugin: 6.6.0(@types/babel__core@7.20.5)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - optionalDependencies: - fsevents: 2.3.3 - typescript: 5.6.2 - transitivePeerDependencies: - - '@babel/plugin-syntax-flow' - - '@babel/plugin-transform-react-jsx' - - '@parcel/css' - - '@swc/core' - - '@types/babel__core' - - '@types/webpack' - - bufferutil - - canvas - - clean-css - - csso - - debug - - esbuild - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - fibers - - node-notifier - - node-sass - - rework - - rework-visit - - sass - - sass-embedded - - sockjs-client - - supports-color - - ts-node - - type-fest - - uglify-js - - utf-8-validate - - vue-template-compiler - - webpack-cli - - webpack-hot-middleware - - webpack-plugin-serve - react-transition-group@4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.0 @@ -38122,12 +38270,12 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38142,12 +38290,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) + jest: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38162,12 +38310,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)) + jest: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38182,12 +38330,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) + jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38196,10 +38344,10 @@ snapshots: typescript: 5.6.2 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.26.9 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.10) + babel-jest: 29.7.0(@babel/core@7.26.9) esbuild: 0.23.1 ts-mockito@2.6.1: @@ -38326,6 +38474,26 @@ snapshots: optionalDependencies: '@swc/core': 1.15.3(@swc/helpers@0.5.13) + ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 18.15.13 + acorn: 8.14.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.6.2 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.15.3 + ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2): dependencies: '@cspotcode/source-map-support': 0.8.1 @@ -38430,6 +38598,34 @@ snapshots: - tsx - yaml + tsup@8.3.0(@swc/core@1.15.3)(jiti@1.21.0)(postcss@8.4.49)(typescript@5.6.2)(yaml@2.5.0): + dependencies: + bundle-require: 5.0.0(esbuild@0.23.1) + cac: 6.7.14 + chokidar: 3.6.0 + consola: 3.2.3 + debug: 4.3.7 + esbuild: 0.23.1 + execa: 5.1.1 + joycon: 3.1.1 + picocolors: 1.1.1 + postcss-load-config: 6.0.1(jiti@1.21.0)(postcss@8.4.49)(yaml@2.5.0) + resolve-from: 5.0.0 + rollup: 4.28.0 + source-map: 0.8.0-beta.0 + sucrase: 3.35.0 + tinyglobby: 0.2.10 + tree-kill: 1.2.2 + optionalDependencies: + '@swc/core': 1.15.3 + postcss: 8.4.49 + typescript: 5.6.2 + transitivePeerDependencies: + - jiti + - supports-color + - tsx + - yaml + tsup@8.3.0(@swc/core@1.9.3(@swc/helpers@0.5.13))(jiti@1.21.0)(postcss@8.4.49)(typescript@5.6.2)(yaml@2.5.0): dependencies: bundle-require: 5.0.0(esbuild@0.23.1) From 262eb26745a3e83e48d5633a31f1aa35b5a21d2f Mon Sep 17 00:00:00 2001 From: Shine Li Date: Thu, 18 Dec 2025 12:29:38 +1100 Subject: [PATCH 09/52] fix page guard --- packages/auth-nextjs/src/server/with-page-auth.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/auth-nextjs/src/server/with-page-auth.ts b/packages/auth-nextjs/src/server/with-page-auth.ts index a916199180..a3d1d0c58f 100644 --- a/packages/auth-nextjs/src/server/with-page-auth.ts +++ b/packages/auth-nextjs/src/server/with-page-auth.ts @@ -133,7 +133,9 @@ export function withPageAuthRequired< if (returnTo !== false) { const returnPath = returnTo || ctx.resolvedUrl; - destination = `${loginUrl}?returnTo=${encodeURIComponent(returnPath)}`; + // Use '&' if loginUrl already has a query string, otherwise use '?' + const separator = loginUrl.includes('?') ? '&' : '?'; + destination = `${loginUrl}${separator}returnTo=${encodeURIComponent(returnPath)}`; } return { From 39e63af72154d1b99d6bfacfca40268acb7cd571 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Thu, 18 Dec 2025 13:51:31 +1100 Subject: [PATCH 10/52] default env --- packages/auth-nextjs/src/client/callback.tsx | 36 ++++++++++++++++--- .../src/pages/callback.page.tsx | 3 +- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/packages/auth-nextjs/src/client/callback.tsx b/packages/auth-nextjs/src/client/callback.tsx index f204511767..d1e6ae93ff 100644 --- a/packages/auth-nextjs/src/client/callback.tsx +++ b/packages/auth-nextjs/src/client/callback.tsx @@ -2,8 +2,9 @@ import React, { useEffect, useState } from 'react'; import { useRouter } from 'next/router'; +import { signIn } from 'next-auth/react'; import { Auth } from '@imtbl/auth'; -import type { ImmutableAuthConfig } from '../types'; +import type { ImmutableAuthConfig, ImmutableTokenData } from '../types'; export interface CallbackPageProps { /** @@ -64,15 +65,40 @@ export function CallbackPage({ authenticationDomain: config.authenticationDomain || DEFAULT_AUTH_DOMAIN, }); - // Process the callback - this extracts tokens from the URL - await auth.loginCallback(); + // Process the callback - this extracts tokens from the URL and returns the user + const authUser = await auth.loginCallback(); // Check if we're in a popup window if (window.opener) { - // Close the popup - the parent window will receive the tokens + // Close the popup - the parent window will receive the tokens via Auth events window.close(); } else { - // Not in a popup - redirect to specified page + // Not in a popup - create NextAuth session before redirecting + // This ensures SSR/session-based auth is authenticated + if (authUser) { + const tokenData: ImmutableTokenData = { + accessToken: authUser.accessToken, + refreshToken: authUser.refreshToken, + idToken: authUser.idToken, + accessTokenExpires: Date.now() + 3600 * 1000, // 1 hour + profile: { + sub: authUser.profile.sub, + email: authUser.profile.email, + nickname: authUser.profile.nickname, + }, + zkEvm: authUser.zkEvm, + }; + + // Sign in to NextAuth with the tokens + // Note: signIn uses the basePath from SessionProvider context, + // so ensure CallbackPage is rendered within ImmutableAuthProvider + await signIn('immutable', { + tokens: JSON.stringify(tokenData), + redirect: false, + }); + } + + // Redirect to specified page router.replace(redirectTo); } } catch (err) { diff --git a/packages/passport/sdk-sample-app/src/pages/callback.page.tsx b/packages/passport/sdk-sample-app/src/pages/callback.page.tsx index 2cfd7be779..e084ec31fc 100644 --- a/packages/passport/sdk-sample-app/src/pages/callback.page.tsx +++ b/packages/passport/sdk-sample-app/src/pages/callback.page.tsx @@ -13,10 +13,11 @@ export default function Callback() { useEffect(() => { // Read environment from localStorage (same key as ImmutableProvider uses) + // Default to DEV to match ImmutableProvider's default context environment const storedEnv = localStorage.getItem("IMX_PASSPORT_SAMPLE_ENVIRONMENT"); const environment = storedEnv ? (JSON.parse(storedEnv) as EnvironmentNames) - : EnvironmentNames.SANDBOX; + : EnvironmentNames.DEV; setConfig(getAuthConfig(environment)); }, []); From bc21f52113a6eb060c211d1b4864061a5cda8b1b Mon Sep 17 00:00:00 2001 From: Shine Li Date: Thu, 18 Dec 2025 14:05:01 +1100 Subject: [PATCH 11/52] align expiry --- packages/auth-nextjs/src/client/callback.tsx | 3 +- packages/auth-nextjs/src/client/provider.tsx | 7 ++-- packages/auth-nextjs/src/refresh.ts | 2 +- packages/auth-nextjs/src/utils/token.ts | 44 ++++++++++++++++++++ 4 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 packages/auth-nextjs/src/utils/token.ts diff --git a/packages/auth-nextjs/src/client/callback.tsx b/packages/auth-nextjs/src/client/callback.tsx index d1e6ae93ff..cf40c9ab76 100644 --- a/packages/auth-nextjs/src/client/callback.tsx +++ b/packages/auth-nextjs/src/client/callback.tsx @@ -5,6 +5,7 @@ import { useRouter } from 'next/router'; import { signIn } from 'next-auth/react'; import { Auth } from '@imtbl/auth'; import type { ImmutableAuthConfig, ImmutableTokenData } from '../types'; +import { getTokenExpiry } from '../utils/token'; export interface CallbackPageProps { /** @@ -80,7 +81,7 @@ export function CallbackPage({ accessToken: authUser.accessToken, refreshToken: authUser.refreshToken, idToken: authUser.idToken, - accessTokenExpires: Date.now() + 3600 * 1000, // 1 hour + accessTokenExpires: getTokenExpiry(authUser.accessToken), profile: { sub: authUser.profile.sub, email: authUser.profile.email, diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index 165564add9..d651f75b6d 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -21,6 +21,7 @@ import type { ImmutableUser, ImmutableTokenData, } from '../types'; +import { getTokenExpiry } from '../utils/token'; const DEFAULT_AUTH_DOMAIN = 'https://auth.immutable.com'; @@ -103,7 +104,7 @@ function ImmutableAuthInner({ // Calculate expires_in from accessTokenExpires const expiresIn = accessTokenExpires ? Math.max(0, Math.floor((accessTokenExpires - Date.now()) / 1000)) - : 3600; // Default 1 hour + : 900; // Default 15 minutes // Hydrate Auth with tokens from NextAuth session const tokenResponse: DeviceTokenResponse = { @@ -137,7 +138,7 @@ function ImmutableAuthInner({ accessToken: authUser.accessToken, refreshToken: authUser.refreshToken, idToken: authUser.idToken, - accessTokenExpires: Date.now() + 3600 * 1000, // 1 hour + accessTokenExpires: getTokenExpiry(authUser.accessToken), zkEvm: authUser.zkEvm, }); } @@ -265,7 +266,7 @@ export function useImmutableAuth(): UseImmutableAuthReturn { accessToken: authUser.accessToken, refreshToken: authUser.refreshToken, idToken: authUser.idToken, - accessTokenExpires: Date.now() + 3600 * 1000, // 1 hour + accessTokenExpires: getTokenExpiry(authUser.accessToken), profile: { sub: authUser.profile.sub, email: authUser.profile.email, diff --git a/packages/auth-nextjs/src/refresh.ts b/packages/auth-nextjs/src/refresh.ts index d247657ebd..8733dbd89c 100644 --- a/packages/auth-nextjs/src/refresh.ts +++ b/packages/auth-nextjs/src/refresh.ts @@ -40,7 +40,7 @@ export async function refreshAccessToken( } // Calculate expiry (access_token typically expires in 1 hour) - const expiresIn = data.expires_in || 3600; + const expiresIn = data.expires_in || 900; const accessTokenExpires = Date.now() + expiresIn * 1000; return { diff --git a/packages/auth-nextjs/src/utils/token.ts b/packages/auth-nextjs/src/utils/token.ts new file mode 100644 index 0000000000..d01bc37479 --- /dev/null +++ b/packages/auth-nextjs/src/utils/token.ts @@ -0,0 +1,44 @@ +import { decodeJwtPayload } from '@imtbl/auth'; + +/** + * JWT payload with expiry claim + */ +interface JwtPayload { + exp?: number; + iat?: number; + [key: string]: unknown; +} + +/** + * Default token expiry in milliseconds (1 hour) + * Used as fallback when exp claim cannot be extracted + */ +const DEFAULT_EXPIRY_MS = 900 * 1000; + +/** + * Extract the expiry timestamp from a JWT access token. + * Returns the expiry as a Unix timestamp in milliseconds. + * + * @param accessToken - JWT access token + * @returns Expiry timestamp in milliseconds, or a default 1-hour expiry if extraction fails + */ +export function getTokenExpiry(accessToken: string | undefined): number { + if (!accessToken) { + return Date.now() + DEFAULT_EXPIRY_MS; + } + + try { + const payload = decodeJwtPayload(accessToken); + + if (payload.exp && typeof payload.exp === 'number') { + // JWT exp is in seconds, convert to milliseconds + return payload.exp * 1000; + } + + // No exp claim, fall back to default + return Date.now() + DEFAULT_EXPIRY_MS; + } catch { + // Failed to decode token, fall back to default + return Date.now() + DEFAULT_EXPIRY_MS; + } +} From 88290994fc3c95d9d3ed0e76939cb14f812f4988 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Thu, 18 Dec 2025 14:21:13 +1100 Subject: [PATCH 12/52] error handling --- packages/auth-nextjs/src/client/callback.tsx | 10 +++++++++- packages/auth-nextjs/src/client/provider.tsx | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/auth-nextjs/src/client/callback.tsx b/packages/auth-nextjs/src/client/callback.tsx index cf40c9ab76..34a42aac0e 100644 --- a/packages/auth-nextjs/src/client/callback.tsx +++ b/packages/auth-nextjs/src/client/callback.tsx @@ -93,10 +93,18 @@ export function CallbackPage({ // Sign in to NextAuth with the tokens // Note: signIn uses the basePath from SessionProvider context, // so ensure CallbackPage is rendered within ImmutableAuthProvider - await signIn('immutable', { + const result = await signIn('immutable', { tokens: JSON.stringify(tokenData), redirect: false, }); + + // signIn with redirect: false returns a result object instead of throwing + if (result?.error) { + throw new Error(`NextAuth sign-in failed: ${result.error}`); + } + if (!result?.ok) { + throw new Error('NextAuth sign-in failed: unknown error'); + } } // Redirect to specified page diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index d651f75b6d..bf2ae545d6 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -276,10 +276,18 @@ export function useImmutableAuth(): UseImmutableAuthReturn { }; // Sign in to NextAuth with the tokens - await signIn('immutable', { + const result = await signIn('immutable', { tokens: JSON.stringify(tokenData), redirect: false, }); + + // signIn with redirect: false returns a result object instead of throwing + if (result?.error) { + throw new Error(`NextAuth sign-in failed: ${result.error}`); + } + if (!result?.ok) { + throw new Error('NextAuth sign-in failed: unknown error'); + } }, [auth]); // Sign out from both NextAuth and Immutable From 0ee89283a1b1d3223a5226e6de5473aa26720af7 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Thu, 18 Dec 2025 14:58:49 +1100 Subject: [PATCH 13/52] use constants --- packages/auth-nextjs/src/client/callback.tsx | 14 ++++-- packages/auth-nextjs/src/client/provider.tsx | 22 +++++---- packages/auth-nextjs/src/config.ts | 11 +++-- packages/auth-nextjs/src/constants.ts | 51 ++++++++++++++++++++ packages/auth-nextjs/src/refresh.ts | 11 +++-- packages/auth-nextjs/src/utils/token.ts | 15 ++---- 6 files changed, 92 insertions(+), 32 deletions(-) create mode 100644 packages/auth-nextjs/src/constants.ts diff --git a/packages/auth-nextjs/src/client/callback.tsx b/packages/auth-nextjs/src/client/callback.tsx index 34a42aac0e..e90c4b152e 100644 --- a/packages/auth-nextjs/src/client/callback.tsx +++ b/packages/auth-nextjs/src/client/callback.tsx @@ -6,6 +6,12 @@ import { signIn } from 'next-auth/react'; import { Auth } from '@imtbl/auth'; import type { ImmutableAuthConfig, ImmutableTokenData } from '../types'; import { getTokenExpiry } from '../utils/token'; +import { + DEFAULT_AUTH_DOMAIN, + DEFAULT_AUDIENCE, + DEFAULT_SCOPE, + IMMUTABLE_PROVIDER_ID, +} from '../constants'; export interface CallbackPageProps { /** @@ -26,8 +32,6 @@ export interface CallbackPageProps { errorComponent?: (error: string) => React.ReactElement | null; } -const DEFAULT_AUTH_DOMAIN = 'https://auth.immutable.com'; - /** * Callback page component for handling OAuth redirects. * @@ -61,8 +65,8 @@ export function CallbackPage({ clientId: config.clientId, redirectUri: config.redirectUri, logoutRedirectUri: config.logoutRedirectUri, - audience: config.audience || 'platform_api', - scope: config.scope || 'openid profile email offline_access transact', + audience: config.audience || DEFAULT_AUDIENCE, + scope: config.scope || DEFAULT_SCOPE, authenticationDomain: config.authenticationDomain || DEFAULT_AUTH_DOMAIN, }); @@ -93,7 +97,7 @@ export function CallbackPage({ // Sign in to NextAuth with the tokens // Note: signIn uses the basePath from SessionProvider context, // so ensure CallbackPage is rendered within ImmutableAuthProvider - const result = await signIn('immutable', { + const result = await signIn(IMMUTABLE_PROVIDER_ID, { tokens: JSON.stringify(tokenData), redirect: false, }); diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index bf2ae545d6..c21114a720 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -22,8 +22,14 @@ import type { ImmutableTokenData, } from '../types'; import { getTokenExpiry } from '../utils/token'; - -const DEFAULT_AUTH_DOMAIN = 'https://auth.immutable.com'; +import { + DEFAULT_AUTH_DOMAIN, + DEFAULT_AUDIENCE, + DEFAULT_SCOPE, + DEFAULT_NEXTAUTH_BASE_PATH, + DEFAULT_TOKEN_EXPIRY_SECONDS, + IMMUTABLE_PROVIDER_ID, +} from '../constants'; /** * Internal context for Immutable auth state @@ -36,8 +42,6 @@ interface ImmutableAuthContextValue { const ImmutableAuthContext = createContext(null); -const DEFAULT_BASE_PATH = '/api/auth'; - /** * Internal provider that manages Auth instance */ @@ -74,8 +78,8 @@ function ImmutableAuthInner({ clientId: config.clientId, redirectUri: config.redirectUri, logoutRedirectUri: config.logoutRedirectUri, - audience: config.audience || 'platform_api', - scope: config.scope || 'openid profile email offline_access transact', + audience: config.audience || DEFAULT_AUDIENCE, + scope: config.scope || DEFAULT_SCOPE, authenticationDomain: config.authenticationDomain || DEFAULT_AUTH_DOMAIN, }); @@ -104,7 +108,7 @@ function ImmutableAuthInner({ // Calculate expires_in from accessTokenExpires const expiresIn = accessTokenExpires ? Math.max(0, Math.floor((accessTokenExpires - Date.now()) / 1000)) - : 900; // Default 15 minutes + : DEFAULT_TOKEN_EXPIRY_SECONDS; // Hydrate Auth with tokens from NextAuth session const tokenResponse: DeviceTokenResponse = { @@ -191,7 +195,7 @@ export function ImmutableAuthProvider({ children, config, session, - basePath = DEFAULT_BASE_PATH, + basePath = DEFAULT_NEXTAUTH_BASE_PATH, }: ImmutableAuthProviderProps) { return ( @@ -276,7 +280,7 @@ export function useImmutableAuth(): UseImmutableAuthReturn { }; // Sign in to NextAuth with the tokens - const result = await signIn('immutable', { + const result = await signIn(IMMUTABLE_PROVIDER_ID, { tokens: JSON.stringify(tokenData), redirect: false, }); diff --git a/packages/auth-nextjs/src/config.ts b/packages/auth-nextjs/src/config.ts index f846438742..ba24736e6d 100644 --- a/packages/auth-nextjs/src/config.ts +++ b/packages/auth-nextjs/src/config.ts @@ -2,12 +2,15 @@ import type { NextAuthOptions } from 'next-auth'; import Credentials from 'next-auth/providers/credentials'; import type { ImmutableAuthConfig, ImmutableTokenData, UserInfoResponse } from './types'; import { refreshAccessToken, isTokenExpired } from './refresh'; +import { + DEFAULT_AUTH_DOMAIN, + IMMUTABLE_PROVIDER_ID, + DEFAULT_SESSION_MAX_AGE_SECONDS, +} from './constants'; // Handle ESM/CJS interop - CredentialsProvider may be default export or the module itself const CredentialsProvider = (Credentials as unknown as { default?: typeof Credentials }).default || Credentials; -const DEFAULT_AUTH_DOMAIN = 'https://auth.immutable.com'; - /** * Validate tokens by calling the userinfo endpoint. * This is the standard OAuth 2.0 way to validate access tokens server-side. @@ -69,7 +72,7 @@ export function createAuthOptions(config: ImmutableAuthConfig): NextAuthOptions return { providers: [ CredentialsProvider({ - id: 'immutable', + id: IMMUTABLE_PROVIDER_ID, name: 'Immutable', credentials: { tokens: { label: 'Tokens', type: 'text' }, @@ -188,7 +191,7 @@ export function createAuthOptions(config: ImmutableAuthConfig): NextAuthOptions session: { strategy: 'jwt', // Session max age in seconds (30 days default) - maxAge: 30 * 24 * 60 * 60, + maxAge: DEFAULT_SESSION_MAX_AGE_SECONDS, }, // Use NEXTAUTH_SECRET from environment diff --git a/packages/auth-nextjs/src/constants.ts b/packages/auth-nextjs/src/constants.ts new file mode 100644 index 0000000000..af450ce5fe --- /dev/null +++ b/packages/auth-nextjs/src/constants.ts @@ -0,0 +1,51 @@ +/** + * Shared constants for @imtbl/auth-nextjs + */ + +/** + * Default Immutable authentication domain + */ +export const DEFAULT_AUTH_DOMAIN = 'https://auth.immutable.com'; + +/** + * Default OAuth audience + */ +export const DEFAULT_AUDIENCE = 'platform_api'; + +/** + * Default OAuth scopes + */ +export const DEFAULT_SCOPE = 'openid profile email offline_access transact'; + +/** + * NextAuth credentials provider ID for Immutable + */ +export const IMMUTABLE_PROVIDER_ID = 'immutable'; + +/** + * Default NextAuth API base path + */ +export const DEFAULT_NEXTAUTH_BASE_PATH = '/api/auth'; + +/** + * Default token expiry in seconds (15 minutes) + * Used as fallback when exp claim cannot be extracted from JWT + */ +export const DEFAULT_TOKEN_EXPIRY_SECONDS = 900; + +/** + * Default token expiry in milliseconds + */ +export const DEFAULT_TOKEN_EXPIRY_MS = DEFAULT_TOKEN_EXPIRY_SECONDS * 1000; + +/** + * Buffer time in seconds before token expiry to trigger refresh + * Tokens will be refreshed when they expire within this window + */ +export const TOKEN_EXPIRY_BUFFER_SECONDS = 60; + +/** + * Default session max age in seconds (30 days) + * This is how long the NextAuth session cookie will be valid + */ +export const DEFAULT_SESSION_MAX_AGE_SECONDS = 30 * 24 * 60 * 60; diff --git a/packages/auth-nextjs/src/refresh.ts b/packages/auth-nextjs/src/refresh.ts index 8733dbd89c..5388cccd50 100644 --- a/packages/auth-nextjs/src/refresh.ts +++ b/packages/auth-nextjs/src/refresh.ts @@ -1,7 +1,10 @@ import type { JWT } from 'next-auth/jwt'; import type { ImmutableAuthConfig } from './types'; - -const DEFAULT_AUTH_DOMAIN = 'https://auth.immutable.com'; +import { + DEFAULT_AUTH_DOMAIN, + DEFAULT_TOKEN_EXPIRY_SECONDS, + TOKEN_EXPIRY_BUFFER_SECONDS, +} from './constants'; /** * Refresh the access token using the refresh token @@ -40,7 +43,7 @@ export async function refreshAccessToken( } // Calculate expiry (access_token typically expires in 1 hour) - const expiresIn = data.expires_in || 900; + const expiresIn = data.expires_in || DEFAULT_TOKEN_EXPIRY_SECONDS; const accessTokenExpires = Date.now() + expiresIn * 1000; return { @@ -67,7 +70,7 @@ export async function refreshAccessToken( */ export function isTokenExpired( accessTokenExpires: number, - bufferSeconds: number = 60, + bufferSeconds: number = TOKEN_EXPIRY_BUFFER_SECONDS, ): boolean { return Date.now() >= accessTokenExpires - bufferSeconds * 1000; } diff --git a/packages/auth-nextjs/src/utils/token.ts b/packages/auth-nextjs/src/utils/token.ts index d01bc37479..1264fcdffd 100644 --- a/packages/auth-nextjs/src/utils/token.ts +++ b/packages/auth-nextjs/src/utils/token.ts @@ -1,4 +1,5 @@ import { decodeJwtPayload } from '@imtbl/auth'; +import { DEFAULT_TOKEN_EXPIRY_MS } from '../constants'; /** * JWT payload with expiry claim @@ -9,22 +10,16 @@ interface JwtPayload { [key: string]: unknown; } -/** - * Default token expiry in milliseconds (1 hour) - * Used as fallback when exp claim cannot be extracted - */ -const DEFAULT_EXPIRY_MS = 900 * 1000; - /** * Extract the expiry timestamp from a JWT access token. * Returns the expiry as a Unix timestamp in milliseconds. * * @param accessToken - JWT access token - * @returns Expiry timestamp in milliseconds, or a default 1-hour expiry if extraction fails + * @returns Expiry timestamp in milliseconds, or a default 15-minute expiry if extraction fails */ export function getTokenExpiry(accessToken: string | undefined): number { if (!accessToken) { - return Date.now() + DEFAULT_EXPIRY_MS; + return Date.now() + DEFAULT_TOKEN_EXPIRY_MS; } try { @@ -36,9 +31,9 @@ export function getTokenExpiry(accessToken: string | undefined): number { } // No exp claim, fall back to default - return Date.now() + DEFAULT_EXPIRY_MS; + return Date.now() + DEFAULT_TOKEN_EXPIRY_MS; } catch { // Failed to decode token, fall back to default - return Date.now() + DEFAULT_EXPIRY_MS; + return Date.now() + DEFAULT_TOKEN_EXPIRY_MS; } } From ea20a8ff2908d2b1e0bb06bb634e4fab4cf20d96 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Thu, 18 Dec 2025 15:41:44 +1100 Subject: [PATCH 14/52] bug fixes --- packages/auth-nextjs/src/client/callback.tsx | 9 +++++++-- packages/auth-nextjs/src/config.ts | 14 ++++++++++++++ packages/auth-nextjs/src/server/with-page-auth.ts | 2 +- packages/auth-nextjs/src/types.ts | 2 +- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/packages/auth-nextjs/src/client/callback.tsx b/packages/auth-nextjs/src/client/callback.tsx index e90c4b152e..56e7fad593 100644 --- a/packages/auth-nextjs/src/client/callback.tsx +++ b/packages/auth-nextjs/src/client/callback.tsx @@ -1,6 +1,6 @@ 'use client'; -import React, { useEffect, useState } from 'react'; +import React, { useEffect, useState, useRef } from 'react'; import { useRouter } from 'next/router'; import { signIn } from 'next-auth/react'; import { Auth } from '@imtbl/auth'; @@ -56,6 +56,9 @@ export function CallbackPage({ }: CallbackPageProps) { const router = useRouter(); const [error, setError] = useState(null); + // Track whether callback has been processed to prevent double invocation + // (React 18 StrictMode runs effects twice, and OAuth codes are single-use) + const callbackProcessedRef = useRef(false); useEffect(() => { const handleCallback = async () => { @@ -140,7 +143,9 @@ export function CallbackPage({ } // Handle successful OAuth callback with authorization code - if (router.query.code) { + // Guard against double invocation (React 18 StrictMode runs effects twice) + if (router.query.code && !callbackProcessedRef.current) { + callbackProcessedRef.current = true; handleCallback(); } }, [ diff --git a/packages/auth-nextjs/src/config.ts b/packages/auth-nextjs/src/config.ts index ba24736e6d..7ce452c44d 100644 --- a/packages/auth-nextjs/src/config.ts +++ b/packages/auth-nextjs/src/config.ts @@ -91,6 +91,20 @@ export function createAuthOptions(config: ImmutableAuthConfig): NextAuthOptions return null; } + // Validate required fields exist to prevent TypeError on malformed requests + if ( + !tokenData.accessToken + || typeof tokenData.accessToken !== 'string' + || !tokenData.profile + || typeof tokenData.profile !== 'object' + || !tokenData.profile.sub + || typeof tokenData.profile.sub !== 'string' + ) { + // eslint-disable-next-line no-console + console.error('[auth-nextjs] Invalid token data structure - missing required fields'); + return null; + } + // Validate tokens server-side via userinfo endpoint. // This is the standard OAuth 2.0 way - the auth server validates the token. const userInfo = await validateTokens(tokenData.accessToken, authDomain); diff --git a/packages/auth-nextjs/src/server/with-page-auth.ts b/packages/auth-nextjs/src/server/with-page-auth.ts index a3d1d0c58f..bd58e57734 100644 --- a/packages/auth-nextjs/src/server/with-page-auth.ts +++ b/packages/auth-nextjs/src/server/with-page-auth.ts @@ -117,7 +117,7 @@ export function withPageAuthRequired< options: WithPageAuthRequiredFullOptions

= {}, ): GetServerSideProps { const { - loginUrl = '/', + loginUrl = '/login', returnTo, getServerSideProps: customGetServerSideProps, } = options; diff --git a/packages/auth-nextjs/src/types.ts b/packages/auth-nextjs/src/types.ts index d707e6c267..da93ec523c 100644 --- a/packages/auth-nextjs/src/types.ts +++ b/packages/auth-nextjs/src/types.ts @@ -197,7 +197,7 @@ export interface UseImmutableAuthReturn { export interface WithPageAuthRequiredOptions { /** * URL to redirect to when not authenticated - * @default "/" + * @default "/login" */ loginUrl?: string; /** From e6a377f924a1a486c5d1ab6c3ffe0b51bf799b5c Mon Sep 17 00:00:00 2001 From: Shine Li Date: Thu, 18 Dec 2025 15:54:45 +1100 Subject: [PATCH 15/52] bug fixes --- packages/auth-nextjs/src/index.ts | 87 +++++++++++++++++++++++++---- packages/auth-nextjs/src/refresh.ts | 5 ++ 2 files changed, 81 insertions(+), 11 deletions(-) diff --git a/packages/auth-nextjs/src/index.ts b/packages/auth-nextjs/src/index.ts index 9f5682fd37..295276a68d 100644 --- a/packages/auth-nextjs/src/index.ts +++ b/packages/auth-nextjs/src/index.ts @@ -21,6 +21,12 @@ export type ImmutableAuthOverrides = Omit; * @param config - Immutable auth configuration * @param overrides - Optional NextAuth options to override defaults * + * @remarks + * Callback composition: The `jwt` and `session` callbacks are composed rather than + * replaced. Internal callbacks run first (handling token storage and refresh), then + * your custom callbacks receive the result. Other callbacks (`signIn`, `redirect`) + * are replaced entirely if provided. + * * @example Basic usage * ```typescript * // pages/api/auth/[...nextauth].ts @@ -42,6 +48,23 @@ export type ImmutableAuthOverrides = Omit; * } * ); * ``` + * + * @example With custom jwt callback (composed with internal callback) + * ```typescript + * export default ImmutableAuth( + * { clientId: "...", redirectUri: "..." }, + * { + * callbacks: { + * // Your jwt callback receives the token after internal processing + * async jwt({ token }) { + * // Add custom claims + * token.customClaim = "value"; + * return token; + * }, + * }, + * } + * ); + * ``` */ export function ImmutableAuth( config: ImmutableAuthConfig, @@ -49,18 +72,60 @@ export function ImmutableAuth( ) { const authOptions = createAuthOptions(config); - // Merge overrides with generated options - const mergedOptions: NextAuthOptions = overrides - ? { - ...authOptions, - ...overrides, - // Deep merge callbacks if both exist - callbacks: { - ...authOptions.callbacks, - ...overrides.callbacks, - }, + // If no overrides, use auth options as-is + if (!overrides) { + return NextAuth(authOptions); + } + + // Compose callbacks to ensure internal callbacks always run first + // User callbacks receive the result and can modify it further + const composedCallbacks: NextAuthOptions['callbacks'] = { + ...authOptions.callbacks, + }; + + if (overrides.callbacks) { + // Compose jwt callback - internal callback runs first, then user callback + if (overrides.callbacks.jwt) { + const internalJwt = authOptions.callbacks?.jwt; + const userJwt = overrides.callbacks.jwt; + composedCallbacks.jwt = async (params) => { + // Run internal jwt callback first to handle token storage and refresh + const token = internalJwt ? await internalJwt(params) : params.token; + // Then run user's jwt callback with the result + return userJwt({ ...params, token }); + }; + } + + // Compose session callback - internal callback runs first, then user callback + if (overrides.callbacks.session) { + const internalSession = authOptions.callbacks?.session; + const userSession = overrides.callbacks.session; + composedCallbacks.session = async (params) => { + // Run internal session callback first to expose token data + const session = internalSession + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ? await internalSession(params as any) + : params.session; + // Then run user's session callback with the result + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return userSession({ ...params, session } as any); + }; } - : authOptions; + + // For other callbacks (signIn, redirect), just use overrides if provided + if (overrides.callbacks.signIn) { + composedCallbacks.signIn = overrides.callbacks.signIn; + } + if (overrides.callbacks.redirect) { + composedCallbacks.redirect = overrides.callbacks.redirect; + } + } + + const mergedOptions: NextAuthOptions = { + ...authOptions, + ...overrides, + callbacks: composedCallbacks, + }; return NextAuth(mergedOptions); } diff --git a/packages/auth-nextjs/src/refresh.ts b/packages/auth-nextjs/src/refresh.ts index 5388cccd50..0ac71e0eca 100644 --- a/packages/auth-nextjs/src/refresh.ts +++ b/packages/auth-nextjs/src/refresh.ts @@ -42,6 +42,11 @@ export async function refreshAccessToken( throw new Error(data.error_description || data.error || 'Token refresh failed'); } + // Validate that access_token exists in the response + if (!data.access_token || typeof data.access_token !== 'string') { + throw new Error('Invalid token response: missing access_token'); + } + // Calculate expiry (access_token typically expires in 1 hour) const expiresIn = data.expires_in || DEFAULT_TOKEN_EXPIRY_SECONDS; const accessTokenExpires = Date.now() + expiresIn * 1000; From 1becb640aabda0aff92bc07611116a0c1c0e0c16 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Thu, 18 Dec 2025 16:07:37 +1100 Subject: [PATCH 16/52] fix bug --- packages/auth-nextjs/src/config.ts | 4 ++++ packages/auth-nextjs/src/refresh.ts | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/packages/auth-nextjs/src/config.ts b/packages/auth-nextjs/src/config.ts index 7ce452c44d..7ec1972517 100644 --- a/packages/auth-nextjs/src/config.ts +++ b/packages/auth-nextjs/src/config.ts @@ -92,6 +92,8 @@ export function createAuthOptions(config: ImmutableAuthConfig): NextAuthOptions } // Validate required fields exist to prevent TypeError on malformed requests + // accessTokenExpires must be a valid number to ensure isTokenExpired() works correctly + // (NaN comparisons always return false, which would prevent token refresh) if ( !tokenData.accessToken || typeof tokenData.accessToken !== 'string' @@ -99,6 +101,8 @@ export function createAuthOptions(config: ImmutableAuthConfig): NextAuthOptions || typeof tokenData.profile !== 'object' || !tokenData.profile.sub || typeof tokenData.profile.sub !== 'string' + || typeof tokenData.accessTokenExpires !== 'number' + || Number.isNaN(tokenData.accessTokenExpires) ) { // eslint-disable-next-line no-console console.error('[auth-nextjs] Invalid token data structure - missing required fields'); diff --git a/packages/auth-nextjs/src/refresh.ts b/packages/auth-nextjs/src/refresh.ts index 0ac71e0eca..c126991d17 100644 --- a/packages/auth-nextjs/src/refresh.ts +++ b/packages/auth-nextjs/src/refresh.ts @@ -72,10 +72,19 @@ export async function refreshAccessToken( /** * Check if the access token is expired or about to expire * Returns true if token expires within the buffer time (default 60 seconds) + * + * @remarks + * If accessTokenExpires is not a valid number (undefined, null, NaN), + * returns true to trigger a refresh as a safety measure. */ export function isTokenExpired( accessTokenExpires: number, bufferSeconds: number = TOKEN_EXPIRY_BUFFER_SECONDS, ): boolean { + // If accessTokenExpires is invalid (not a number or NaN), treat as expired + // This prevents NaN comparisons from incorrectly returning false + if (typeof accessTokenExpires !== 'number' || Number.isNaN(accessTokenExpires)) { + return true; + } return Date.now() >= accessTokenExpires - bufferSeconds * 1000; } From 38db4d6790a674ce04bd57e77f92ae6edf9831af Mon Sep 17 00:00:00 2001 From: Shine Li Date: Thu, 18 Dec 2025 16:51:28 +1100 Subject: [PATCH 17/52] bug --- packages/auth-nextjs/src/client/callback.tsx | 64 ++++++++++---------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/packages/auth-nextjs/src/client/callback.tsx b/packages/auth-nextjs/src/client/callback.tsx index 56e7fad593..78a523faa2 100644 --- a/packages/auth-nextjs/src/client/callback.tsx +++ b/packages/auth-nextjs/src/client/callback.tsx @@ -80,42 +80,44 @@ export function CallbackPage({ if (window.opener) { // Close the popup - the parent window will receive the tokens via Auth events window.close(); - } else { + } else if (authUser) { // Not in a popup - create NextAuth session before redirecting // This ensures SSR/session-based auth is authenticated - if (authUser) { - const tokenData: ImmutableTokenData = { - accessToken: authUser.accessToken, - refreshToken: authUser.refreshToken, - idToken: authUser.idToken, - accessTokenExpires: getTokenExpiry(authUser.accessToken), - profile: { - sub: authUser.profile.sub, - email: authUser.profile.email, - nickname: authUser.profile.nickname, - }, - zkEvm: authUser.zkEvm, - }; - - // Sign in to NextAuth with the tokens - // Note: signIn uses the basePath from SessionProvider context, - // so ensure CallbackPage is rendered within ImmutableAuthProvider - const result = await signIn(IMMUTABLE_PROVIDER_ID, { - tokens: JSON.stringify(tokenData), - redirect: false, - }); - - // signIn with redirect: false returns a result object instead of throwing - if (result?.error) { - throw new Error(`NextAuth sign-in failed: ${result.error}`); - } - if (!result?.ok) { - throw new Error('NextAuth sign-in failed: unknown error'); - } + const tokenData: ImmutableTokenData = { + accessToken: authUser.accessToken, + refreshToken: authUser.refreshToken, + idToken: authUser.idToken, + accessTokenExpires: getTokenExpiry(authUser.accessToken), + profile: { + sub: authUser.profile.sub, + email: authUser.profile.email, + nickname: authUser.profile.nickname, + }, + zkEvm: authUser.zkEvm, + }; + + // Sign in to NextAuth with the tokens + // Note: signIn uses the basePath from SessionProvider context, + // so ensure CallbackPage is rendered within ImmutableAuthProvider + const result = await signIn(IMMUTABLE_PROVIDER_ID, { + tokens: JSON.stringify(tokenData), + redirect: false, + }); + + // signIn with redirect: false returns a result object instead of throwing + if (result?.error) { + throw new Error(`NextAuth sign-in failed: ${result.error}`); + } + if (!result?.ok) { + throw new Error('NextAuth sign-in failed: unknown error'); } - // Redirect to specified page + // Only redirect after successful session creation router.replace(redirectTo); + } else { + // authUser is undefined - loginCallback failed silently + // This can happen if the OIDC signinCallback returns null + throw new Error('Authentication failed: no user data received from login callback'); } } catch (err) { setError(err instanceof Error ? err.message : 'Authentication failed'); From ebe4e0eed7a698248afe861a0446f434c01d0ded Mon Sep 17 00:00:00 2001 From: Shine Li Date: Thu, 18 Dec 2025 17:50:06 +1100 Subject: [PATCH 18/52] bug --- packages/auth-nextjs/src/server/with-page-auth.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/auth-nextjs/src/server/with-page-auth.ts b/packages/auth-nextjs/src/server/with-page-auth.ts index bd58e57734..d9874f3ba4 100644 --- a/packages/auth-nextjs/src/server/with-page-auth.ts +++ b/packages/auth-nextjs/src/server/with-page-auth.ts @@ -156,9 +156,11 @@ export function withPageAuthRequired< } // Merge props with session + // Note: result.props can be P | Promise

, so we must await it + const userProps = await result.props; return { props: { - ...result.props, + ...userProps, session, } as WithPageAuthRequiredProps & P, }; From c6f7b3e5730be378e38a1ccd1a7cc290b03924d9 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 09:04:41 +1100 Subject: [PATCH 19/52] bug --- packages/auth-nextjs/src/client/callback.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/auth-nextjs/src/client/callback.tsx b/packages/auth-nextjs/src/client/callback.tsx index 78a523faa2..33fe96128e 100644 --- a/packages/auth-nextjs/src/client/callback.tsx +++ b/packages/auth-nextjs/src/client/callback.tsx @@ -78,6 +78,11 @@ export function CallbackPage({ // Check if we're in a popup window if (window.opener) { + // Validate authUser before closing - if loginCallback failed silently, + // we need to show an error instead of closing the popup + if (!authUser) { + throw new Error('Authentication failed: no user data received from login callback'); + } // Close the popup - the parent window will receive the tokens via Auth events window.close(); } else if (authUser) { From 7b2d6f9861c32fcdb9b624dbb9cbca5859eaa9dc Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 09:58:18 +1100 Subject: [PATCH 20/52] bug --- packages/auth-nextjs/src/client/provider.tsx | 12 ++++++++++-- packages/auth-nextjs/src/refresh.ts | 18 +++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index c21114a720..b806e3b689 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -64,8 +64,16 @@ function ImmutableAuthInner({ useEffect(() => { if (typeof window === 'undefined') return; - // Create a config key to detect changes (clientId + authDomain uniquely identify the environment) - const configKey = `${config.clientId}:${config.authenticationDomain || DEFAULT_AUTH_DOMAIN}`; + // Create a config key to detect changes - include all properties used in Auth constructor + // to ensure the Auth instance is recreated when any config property changes + const configKey = [ + config.clientId, + config.redirectUri, + config.logoutRedirectUri || '', + config.audience || DEFAULT_AUDIENCE, + config.scope || DEFAULT_SCOPE, + config.authenticationDomain || DEFAULT_AUTH_DOMAIN, + ].join(':'); // Only recreate if config actually changed if (prevConfigRef.current === configKey) { diff --git a/packages/auth-nextjs/src/refresh.ts b/packages/auth-nextjs/src/refresh.ts index c126991d17..0cedbe4f3c 100644 --- a/packages/auth-nextjs/src/refresh.ts +++ b/packages/auth-nextjs/src/refresh.ts @@ -36,12 +36,24 @@ export async function refreshAccessToken( }), }); - const data = await response.json(); - + // Check response.ok before parsing JSON to avoid confusing errors + // when server returns non-JSON responses (e.g., HTML error pages) if (!response.ok) { - throw new Error(data.error_description || data.error || 'Token refresh failed'); + let errorMessage = `Token refresh failed with status ${response.status}`; + try { + const errorData = await response.json(); + if (errorData.error_description || errorData.error) { + errorMessage = errorData.error_description || errorData.error; + } + } catch { + // Response is not JSON (e.g., HTML error page from proxy/load balancer) + // Use the status-based error message + } + throw new Error(errorMessage); } + const data = await response.json(); + // Validate that access_token exists in the response if (!data.access_token || typeof data.access_token !== 'string') { throw new Error('Invalid token response: missing access_token'); From f65f510ba78e8ea88c578346fed57fb401c35e1d Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 12:13:14 +1100 Subject: [PATCH 21/52] build --- pnpm-lock.yaml | 695 ++++++++++++---------------------- sdk/package.json | 65 ++++ sdk/src/auth.ts | 1 + sdk/src/auth_nextjs.ts | 1 + sdk/src/auth_nextjs_client.ts | 1 + sdk/src/auth_nextjs_server.ts | 1 + sdk/src/index.ts | 3 + sdk/src/wallet.ts | 1 + 8 files changed, 324 insertions(+), 444 deletions(-) create mode 100644 sdk/src/auth.ts create mode 100644 sdk/src/auth_nextjs.ts create mode 100644 sdk/src/auth_nextjs_client.ts create mode 100644 sdk/src/auth_nextjs_server.ts create mode 100644 sdk/src/wallet.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6512dcbf6c..202ad09307 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -117,13 +117,13 @@ importers: version: 29.7.0 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) + version: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)) ts-jest: specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)))(typescript@5.6.2) + version: 29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)))(typescript@5.6.2) ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2) + version: 10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2) typescript: specifier: ^5 version: 5.6.2 @@ -135,7 +135,7 @@ importers: version: 0.25.21(@emotion/react@11.11.3(@types/react@18.3.12)(react@18.3.1))(@rive-app/react-canvas-lite@4.9.0(react@18.3.1))(embla-carousel-react@8.1.5(react@18.3.1))(framer-motion@11.18.2(@emotion/is-prop-valid@0.8.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@imtbl/sdk': specifier: latest - version: 2.12.3(bufferutil@4.0.8)(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) + version: 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) next: specifier: 14.2.25 version: 14.2.25(@babel/core@7.26.9)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1051,10 +1051,10 @@ importers: devDependencies: '@swc/core': specifier: ^1.3.36 - version: 1.15.3 + version: 1.15.3(@swc/helpers@0.5.13) '@swc/jest': specifier: ^0.2.37 - version: 0.2.37(@swc/core@1.15.3) + version: 0.2.37(@swc/core@1.15.3(@swc/helpers@0.5.13)) '@types/jest': specifier: ^29.5.12 version: 29.5.14 @@ -1066,7 +1066,7 @@ importers: version: 18.3.12 jest: specifier: ^29.4.3 - version: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) + version: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) jest-environment-jsdom: specifier: ^29.4.3 version: 29.6.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -1081,10 +1081,10 @@ importers: version: 18.3.1 ts-node: specifier: ^10.9.1 - version: 10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2) + version: 10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2) tsup: specifier: ^8.3.0 - version: 8.3.0(@swc/core@1.15.3)(jiti@1.21.0)(postcss@8.4.49)(typescript@5.6.2)(yaml@2.5.0) + version: 8.3.0(@swc/core@1.15.3(@swc/helpers@0.5.13))(jiti@1.21.0)(postcss@8.4.49)(typescript@5.6.2)(yaml@2.5.0) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -1291,7 +1291,7 @@ importers: version: 29.6.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) react-scripts: specifier: 5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@9.16.0(jiti@1.21.0))(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@9.16.0(jiti@1.21.0))(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -1457,7 +1457,7 @@ importers: version: 29.6.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) react-scripts: specifier: 5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -1469,7 +1469,7 @@ importers: version: 0.13.0(rollup@4.28.0) ts-jest: specifier: ^29.1.0 - version: 29.2.5(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2) + version: 29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -2633,6 +2633,9 @@ importers: '@imtbl/auth': specifier: workspace:* version: link:../packages/auth + '@imtbl/auth-nextjs': + specifier: workspace:* + version: link:../packages/auth-nextjs '@imtbl/blockchain-data': specifier: workspace:* version: link:../packages/blockchain-data/sdk @@ -17598,7 +17601,7 @@ snapshots: '@babel/traverse': 7.27.0 '@babel/types': 7.27.0 convert-source-map: 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -19288,7 +19291,7 @@ snapshots: '@babel/parser': 7.27.0 '@babel/template': 7.27.0 '@babel/types': 7.27.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -20396,12 +20399,12 @@ snapshots: - supports-color - utf-8-validate - '@imtbl/checkout-sdk@2.12.3(bufferutil@4.0.8)(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10)': + '@imtbl/checkout-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@imtbl/blockchain-data': 2.12.3 '@imtbl/bridge-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@imtbl/config': 2.12.3 - '@imtbl/dex-sdk': 2.12.3(bufferutil@4.0.8)(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) + '@imtbl/dex-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@imtbl/generated-clients': 2.12.3 '@imtbl/metrics': 2.12.3 '@imtbl/orderbook': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -20465,12 +20468,12 @@ snapshots: - typescript - utf-8-validate - '@imtbl/dex-sdk@2.12.3(bufferutil@4.0.8)(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10)': + '@imtbl/dex-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@imtbl/config': 2.12.3 '@uniswap/sdk-core': 3.2.3 - '@uniswap/swap-router-contracts': 1.3.1(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) - '@uniswap/v3-sdk': 3.10.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + '@uniswap/swap-router-contracts': 1.3.1(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) + '@uniswap/v3-sdk': 3.10.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil @@ -20547,11 +20550,11 @@ snapshots: - encoding - supports-color - '@imtbl/sdk@2.12.3(bufferutil@4.0.8)(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10)': + '@imtbl/sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@imtbl/auth': 2.12.3 '@imtbl/blockchain-data': 2.12.3 - '@imtbl/checkout-sdk': 2.12.3(bufferutil@4.0.8)(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) + '@imtbl/checkout-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@imtbl/config': 2.12.3 '@imtbl/minting-backend': 2.12.3 '@imtbl/orderbook': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -20808,43 +20811,6 @@ snapshots: - ts-node - utf-8-validate - '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)': - dependencies: - '@jest/console': 29.7.0 - '@jest/reporters': 29.7.0(node-notifier@8.0.2) - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.14.13 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.8.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)) - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-resolve-dependencies: 29.7.0 - jest-runner: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - jest-watcher: 29.7.0 - micromatch: 4.0.5 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-ansi: 6.0.1 - optionalDependencies: - node-notifier: 8.0.2 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - ts-node - '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))': dependencies: '@jest/console': 29.7.0 @@ -20956,43 +20922,6 @@ snapshots: - supports-color - ts-node - '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2))': - dependencies: - '@jest/console': 29.7.0 - '@jest/reporters': 29.7.0(node-notifier@8.0.2) - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.14.13 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.8.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-resolve-dependencies: 29.7.0 - jest-runner: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - jest-watcher: 29.7.0 - micromatch: 4.0.5 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-ansi: 6.0.1 - optionalDependencies: - node-notifier: 8.0.2 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - ts-node - '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))': dependencies: '@jest/console': 29.7.0 @@ -21299,7 +21228,7 @@ snapshots: '@types/istanbul-lib-coverage': 2.0.4 collect-v8-coverage: 1.0.2 - '@jest/test-sequencer@26.6.3': + '@jest/test-sequencer@26.6.3(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(utf-8-validate@5.0.10)': dependencies: '@jest/test-result': 26.6.2 graceful-fs: 4.2.11 @@ -21307,7 +21236,11 @@ snapshots: jest-runner: 26.6.3(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(utf-8-validate@5.0.10) jest-runtime: 26.6.3(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(utf-8-validate@5.0.10) transitivePeerDependencies: + - bufferutil + - canvas - supports-color + - ts-node + - utf-8-validate '@jest/test-sequencer@27.5.1': dependencies: @@ -24680,22 +24613,6 @@ snapshots: '@swc/core-win32-x64-msvc@1.9.3': optional: true - '@swc/core@1.15.3': - dependencies: - '@swc/counter': 0.1.3 - '@swc/types': 0.1.25 - optionalDependencies: - '@swc/core-darwin-arm64': 1.15.3 - '@swc/core-darwin-x64': 1.15.3 - '@swc/core-linux-arm-gnueabihf': 1.15.3 - '@swc/core-linux-arm64-gnu': 1.15.3 - '@swc/core-linux-arm64-musl': 1.15.3 - '@swc/core-linux-x64-gnu': 1.15.3 - '@swc/core-linux-x64-musl': 1.15.3 - '@swc/core-win32-arm64-msvc': 1.15.3 - '@swc/core-win32-ia32-msvc': 1.15.3 - '@swc/core-win32-x64-msvc': 1.15.3 - '@swc/core@1.15.3(@swc/helpers@0.5.13)': dependencies: '@swc/counter': 0.1.3 @@ -24748,10 +24665,10 @@ snapshots: '@swc/counter': 0.1.3 jsonc-parser: 3.3.1 - '@swc/jest@0.2.37(@swc/core@1.15.3)': + '@swc/jest@0.2.37(@swc/core@1.15.3(@swc/helpers@0.5.13))': dependencies: '@jest/create-cache-key-function': 29.7.0 - '@swc/core': 1.15.3 + '@swc/core': 1.15.3(@swc/helpers@0.5.13) '@swc/counter': 0.1.3 jsonc-parser: 3.3.1 @@ -25261,6 +25178,25 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/type-utils': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/utils': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + debug: 4.3.7(supports-color@8.1.1) + eslint: 9.16.0(jiti@1.21.0) + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare-lite: 1.4.0 + semver: 7.6.3 + tsutils: 3.21.0(typescript@5.6.2) + optionalDependencies: + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -25422,17 +25358,6 @@ snapshots: tiny-invariant: 1.3.1 toformat: 2.0.0 - '@uniswap/swap-router-contracts@1.3.1(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))': - dependencies: - '@openzeppelin/contracts': 3.4.2 - '@uniswap/v2-core': 1.0.1 - '@uniswap/v3-core': 1.0.0 - '@uniswap/v3-periphery': 1.4.4 - dotenv: 14.3.2 - hardhat-watcher: 2.5.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) - transitivePeerDependencies: - - hardhat - '@uniswap/swap-router-contracts@1.3.1(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))': dependencies: '@openzeppelin/contracts': 3.4.2 @@ -25464,19 +25389,6 @@ snapshots: '@uniswap/v3-core': 1.0.0 base64-sol: 1.0.1 - '@uniswap/v3-sdk@3.10.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))': - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/solidity': 5.7.0 - '@uniswap/sdk-core': 4.0.6 - '@uniswap/swap-router-contracts': 1.3.1(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)) - '@uniswap/v3-periphery': 1.4.3 - '@uniswap/v3-staker': 1.0.0 - tiny-invariant: 1.3.1 - tiny-warning: 1.0.3 - transitivePeerDependencies: - - hardhat - '@uniswap/v3-sdk@3.10.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10))': dependencies: '@ethersproject/abi': 5.7.0 @@ -26031,7 +25943,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -26492,20 +26404,6 @@ snapshots: transitivePeerDependencies: - supports-color - babel-jest@29.7.0(@babel/core@7.26.9): - dependencies: - '@babel/core': 7.26.9 - '@jest/transform': 29.7.0 - '@types/babel__core': 7.20.5 - babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.6.3(@babel/core@7.26.9) - chalk: 4.1.2 - graceful-fs: 4.2.11 - slash: 3.0.0 - transitivePeerDependencies: - - supports-color - optional: true - babel-loader@8.3.0(@babel/core@7.26.9)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)): dependencies: '@babel/core': 7.26.9 @@ -26715,13 +26613,6 @@ snapshots: babel-plugin-jest-hoist: 29.6.3 babel-preset-current-node-syntax: 1.0.1(@babel/core@7.26.10) - babel-preset-jest@29.6.3(@babel/core@7.26.9): - dependencies: - '@babel/core': 7.26.9 - babel-plugin-jest-hoist: 29.6.3 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.26.9) - optional: true - babel-preset-react-app@10.0.1: dependencies: '@babel/core': 7.26.9 @@ -27667,21 +27558,6 @@ snapshots: safe-buffer: 5.2.1 sha.js: 2.4.11 - create-jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0): - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - create-jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)): dependencies: '@jest/types': 29.6.3 @@ -27697,21 +27573,6 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)): - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - create-jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)): dependencies: '@jest/types': 29.6.3 @@ -27742,21 +27603,6 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0): - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - create-jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)): dependencies: '@jest/types': 29.6.3 @@ -28080,10 +27926,6 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.7: - dependencies: - ms: 2.1.3 - debug@4.3.7(supports-color@8.1.1): dependencies: ms: 2.1.3 @@ -28759,7 +28601,7 @@ snapshots: dependencies: confusing-browser-globals: 1.0.11 eslint: 8.57.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) object.assign: 4.1.5 object.entries: 1.1.8 semver: 6.3.1 @@ -28770,13 +28612,13 @@ snapshots: '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0))(eslint-plugin-react-hooks@5.0.0(eslint@8.57.0))(eslint-plugin-react@7.35.0(eslint@8.57.0))(eslint@8.57.0): dependencies: eslint: 8.57.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 5.0.0(eslint@8.57.0) @@ -28790,8 +28632,8 @@ snapshots: '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) @@ -28809,8 +28651,8 @@ snapshots: '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.0) @@ -28828,8 +28670,8 @@ snapshots: '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.0) @@ -28847,7 +28689,7 @@ snapshots: eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.0) @@ -28864,8 +28706,8 @@ snapshots: '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.0) @@ -28875,18 +28717,45 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): + dependencies: + '@babel/core': 7.26.9 + '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@8.57.0) + '@rushstack/eslint-patch': 1.10.4 + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) + babel-preset-react-app: 10.0.1 + confusing-browser-globals: 1.0.11 + eslint: 8.57.0 + eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) + eslint-plugin-react: 7.35.0(eslint@8.57.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) + eslint-plugin-testing-library: 5.11.0(eslint@8.57.0)(typescript@5.6.2) + optionalDependencies: + typescript: 5.6.2 + transitivePeerDependencies: + - '@babel/plugin-syntax-flow' + - '@babel/plugin-transform-react-jsx' + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - jest + - supports-color + eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): dependencies: '@babel/core': 7.26.9 '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@9.16.0(jiti@1.21.0)) '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) '@typescript-eslint/parser': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) babel-preset-react-app: 10.0.1 confusing-browser-globals: 1.0.11 eslint: 9.16.0(jiti@1.21.0) eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)) eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) eslint-plugin-jsx-a11y: 6.9.0(eslint@9.16.0(jiti@1.21.0)) eslint-plugin-react: 7.35.0(eslint@9.16.0(jiti@1.21.0)) @@ -28902,23 +28771,23 @@ snapshots: - jest - supports-color - eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): + eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): dependencies: '@babel/core': 7.26.9 - '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@8.57.0) + '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@9.16.0(jiti@1.21.0)) '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2) - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/parser': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) babel-preset-react-app: 10.0.1 confusing-browser-globals: 1.0.11 - eslint: 8.57.0 - eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) - eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) - eslint-plugin-react: 7.35.0(eslint@8.57.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) - eslint-plugin-testing-library: 5.11.0(eslint@8.57.0)(typescript@5.6.2) + eslint: 9.16.0(jiti@1.21.0) + eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-plugin-jsx-a11y: 6.9.0(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-react: 7.35.0(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-react-hooks: 4.6.0(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-testing-library: 5.11.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: @@ -28943,7 +28812,7 @@ snapshots: enhanced-resolve: 5.15.0 eslint: 8.57.0 eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) get-tsconfig: 4.6.2 globby: 13.2.2 is-core-module: 2.15.0 @@ -28960,8 +28829,8 @@ snapshots: debug: 4.3.7(supports-color@8.1.1) enhanced-resolve: 5.15.0 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) get-tsconfig: 4.6.2 globby: 13.2.2 is-core-module: 2.15.0 @@ -28984,7 +28853,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: @@ -28995,6 +28864,16 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0(jiti@1.21.0)): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) + eslint: 9.16.0(jiti@1.21.0) + eslint-import-resolver-node: 0.3.9 + transitivePeerDependencies: + - supports-color + eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0(jiti@1.21.0)): dependencies: debug: 3.2.7 @@ -29005,6 +28884,14 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0): + dependencies: + '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.26.10) + '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.10) + eslint: 8.57.0 + lodash: 4.17.21 + string-natural-compare: 3.0.1 + eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@9.16.0(jiti@1.21.0)): dependencies: '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.26.10) @@ -29013,42 +28900,15 @@ snapshots: lodash: 4.17.21 string-natural-compare: 3.0.1 - eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0): + eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0)): dependencies: '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.26.9) '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.9) - eslint: 8.57.0 + eslint: 9.16.0(jiti@1.21.0) lodash: 4.17.21 string-natural-compare: 3.0.1 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): - dependencies: - array-includes: 3.1.8 - array.prototype.findlastindex: 1.2.5 - array.prototype.flat: 1.3.2 - array.prototype.flatmap: 1.3.2 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.57.0 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) - hasown: 2.0.2 - is-core-module: 2.15.0 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.0 - semver: 6.3.1 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - - eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5)(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -29075,7 +28935,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -29083,9 +28943,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.57.0 + eslint: 9.16.0(jiti@1.21.0) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0(jiti@1.21.0)) hasown: 2.0.2 is-core-module: 2.15.0 is-glob: 4.0.3 @@ -29151,6 +29011,17 @@ snapshots: - supports-color - typescript + eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): + dependencies: + '@typescript-eslint/experimental-utils': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + eslint: 9.16.0(jiti@1.21.0) + optionalDependencies: + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + jest: 27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10) + transitivePeerDependencies: + - supports-color + - typescript + eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0): dependencies: aria-query: 5.1.3 @@ -30565,11 +30436,6 @@ snapshots: - debug - utf-8-validate - hardhat-watcher@2.5.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)): - dependencies: - chokidar: 3.6.0 - hardhat: 2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10) - hardhat-watcher@2.5.0(hardhat@2.22.6(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(typescript@5.6.2)(utf-8-validate@5.0.10)): dependencies: chokidar: 3.6.0 @@ -30940,7 +30806,7 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -30999,7 +30865,7 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -31454,7 +31320,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -31644,11 +31510,11 @@ snapshots: jest-cli@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0) + create-jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) exit: 0.1.2 import-local: 3.1.0 jest-config: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) @@ -31684,27 +31550,6 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)): - dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - chalk: 4.1.2 - create-jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) - exit: 0.1.2 - import-local: 3.1.0 - jest-config: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) - jest-util: 29.7.0 - jest-validate: 29.7.0 - yargs: 17.7.2 - optionalDependencies: - node-notifier: 8.0.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - jest-cli@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)): dependencies: '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) @@ -31749,11 +31594,11 @@ snapshots: jest-cli@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0) + create-jest: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) exit: 0.1.2 import-local: 3.1.0 jest-config: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) @@ -31813,7 +31658,7 @@ snapshots: jest-config@26.6.3(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.26.10 - '@jest/test-sequencer': 26.6.3 + '@jest/test-sequencer': 26.6.3(bufferutil@4.0.8)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2))(utf-8-validate@5.0.10) '@jest/types': 26.6.2 babel-jest: 26.6.3(@babel/core@7.26.10) chalk: 4.1.2 @@ -31937,37 +31782,6 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)): - dependencies: - '@babel/core': 7.26.10 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.10) - chalk: 4.1.2 - ci-info: 3.8.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0(babel-plugin-macros@3.1.0) - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.5 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 18.15.13 - ts-node: 10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - jest-config@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)): dependencies: '@babel/core': 7.26.10 @@ -32092,37 +31906,6 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)): - dependencies: - '@babel/core': 7.26.10 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.10) - chalk: 4.1.2 - ci-info: 3.8.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0(babel-plugin-macros@3.1.0) - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.5 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 20.14.13 - ts-node: 10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - jest-config@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)): dependencies: '@babel/core': 7.26.10 @@ -33131,7 +32914,7 @@ snapshots: jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) '@jest/types': 29.6.3 import-local: 3.1.0 jest-cli: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) @@ -33157,20 +32940,6 @@ snapshots: - supports-color - ts-node - jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)): - dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) - '@jest/types': 29.6.3 - import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2)) - optionalDependencies: - node-notifier: 8.0.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)): dependencies: '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) @@ -33201,7 +32970,7 @@ snapshots: jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2): dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) + '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) '@jest/types': 29.6.3 import-local: 3.1.0 jest-cli: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) @@ -36363,7 +36132,7 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10): + react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.26.9 '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@2.19.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)))(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) @@ -36381,7 +36150,7 @@ snapshots: dotenv: 10.0.0 dotenv-expand: 5.1.0 eslint: 8.57.0 - eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) eslint-webpack-plugin: 3.2.0(eslint@8.57.0)(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) file-loader: 6.2.0(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) fs-extra: 10.1.0 @@ -36449,6 +36218,92 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve + react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@9.16.0(jiti@1.21.0))(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10): + dependencies: + '@babel/core': 7.26.9 + '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@2.19.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)))(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + '@svgr/webpack': 5.5.0 + babel-jest: 27.5.1(@babel/core@7.26.9) + babel-loader: 8.3.0(@babel/core@7.26.9)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + babel-plugin-named-asset-import: 0.3.8(@babel/core@7.26.9) + babel-preset-react-app: 10.0.1 + bfj: 7.0.2 + browserslist: 4.23.3 + camelcase: 6.3.0 + case-sensitive-paths-webpack-plugin: 2.4.0 + css-loader: 6.8.1(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + css-minimizer-webpack-plugin: 3.4.1(esbuild@0.23.1)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + dotenv: 10.0.0 + dotenv-expand: 5.1.0 + eslint: 9.16.0(jiti@1.21.0) + eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-webpack-plugin: 3.2.0(eslint@9.16.0(jiti@1.21.0))(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + file-loader: 6.2.0(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + fs-extra: 10.1.0 + html-webpack-plugin: 5.5.3(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + identity-obj-proxy: 3.0.0 + jest: 27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10) + jest-resolve: 27.5.1 + jest-watch-typeahead: 1.1.0(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10)) + mini-css-extract-plugin: 2.7.6(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + postcss: 8.4.49 + postcss-flexbugs-fixes: 5.0.2(postcss@8.4.49) + postcss-loader: 6.2.1(postcss@8.4.49)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + postcss-normalize: 10.0.1(browserslist@4.23.3)(postcss@8.4.49) + postcss-preset-env: 7.8.3(postcss@8.4.49) + prompts: 2.4.2 + react: 18.3.1 + react-app-polyfill: 3.0.0 + react-dev-utils: 12.0.1(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + react-refresh: 0.11.0 + resolve: 1.22.8 + resolve-url-loader: 4.0.0 + sass-loader: 12.6.0(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + semver: 7.6.3 + source-map-loader: 3.0.2(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + style-loader: 3.3.3(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + tailwindcss: 3.4.7(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + terser-webpack-plugin: 5.3.9(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + webpack: 5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1) + webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + webpack-manifest-plugin: 4.1.1(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + workbox-webpack-plugin: 6.6.0(@types/babel__core@7.20.5)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + optionalDependencies: + fsevents: 2.3.3 + typescript: 5.6.2 + transitivePeerDependencies: + - '@babel/plugin-syntax-flow' + - '@babel/plugin-transform-react-jsx' + - '@parcel/css' + - '@swc/core' + - '@types/babel__core' + - '@types/webpack' + - bufferutil + - canvas + - clean-css + - csso + - debug + - esbuild + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - fibers + - node-notifier + - node-sass + - rework + - rework-visit + - sass + - sass-embedded + - sockjs-client + - supports-color + - ts-node + - type-fest + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + - webpack-hot-middleware + - webpack-plugin-serve + react-transition-group@4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.0 @@ -38270,12 +38125,12 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) + jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38290,12 +38145,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)) + jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38310,12 +38165,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) + jest: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38330,12 +38185,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + jest: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38344,10 +38199,10 @@ snapshots: typescript: 5.6.2 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.9) + babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 ts-mockito@2.6.1: @@ -38474,26 +38329,6 @@ snapshots: optionalDependencies: '@swc/core': 1.15.3(@swc/helpers@0.5.13) - ts-node@10.9.2(@swc/core@1.15.3)(@types/node@18.15.13)(typescript@5.6.2): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 18.15.13 - acorn: 8.14.0 - acorn-walk: 8.2.0 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.6.2 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - optionalDependencies: - '@swc/core': 1.15.3 - ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2): dependencies: '@cspotcode/source-map-support': 0.8.1 @@ -38598,34 +38433,6 @@ snapshots: - tsx - yaml - tsup@8.3.0(@swc/core@1.15.3)(jiti@1.21.0)(postcss@8.4.49)(typescript@5.6.2)(yaml@2.5.0): - dependencies: - bundle-require: 5.0.0(esbuild@0.23.1) - cac: 6.7.14 - chokidar: 3.6.0 - consola: 3.2.3 - debug: 4.3.7 - esbuild: 0.23.1 - execa: 5.1.1 - joycon: 3.1.1 - picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@1.21.0)(postcss@8.4.49)(yaml@2.5.0) - resolve-from: 5.0.0 - rollup: 4.28.0 - source-map: 0.8.0-beta.0 - sucrase: 3.35.0 - tinyglobby: 0.2.10 - tree-kill: 1.2.2 - optionalDependencies: - '@swc/core': 1.15.3 - postcss: 8.4.49 - typescript: 5.6.2 - transitivePeerDependencies: - - jiti - - supports-color - - tsx - - yaml - tsup@8.3.0(@swc/core@1.9.3(@swc/helpers@0.5.13))(jiti@1.21.0)(postcss@8.4.49)(typescript@5.6.2)(yaml@2.5.0): dependencies: bundle-require: 5.0.0(esbuild@0.23.1) diff --git a/sdk/package.json b/sdk/package.json index 7708f843bd..4b4d6cafa1 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -6,6 +6,7 @@ "bugs": "https://github.com/immutable/ts-immutable-sdk/issues", "dependencies": { "@imtbl/auth": "workspace:*", + "@imtbl/auth-nextjs": "workspace:*", "@imtbl/blockchain-data": "workspace:*", "@imtbl/checkout-sdk": "workspace:*", "@imtbl/config": "workspace:*", @@ -148,6 +149,70 @@ "require": "./dist/minting_backend.cjs", "default": "./dist/minting_backend.js" } + }, + "./auth": { + "development": { + "types": "./src/auth.ts", + "browser": "./dist/auth.js", + "require": "./dist/auth.cjs", + "default": "./dist/auth.js" + }, + "default": { + "types": "./dist/auth.d.ts", + "browser": "./dist/auth.js", + "require": "./dist/auth.cjs", + "default": "./dist/auth.js" + } + }, + "./wallet": { + "development": { + "types": "./src/wallet.ts", + "browser": "./dist/wallet.js", + "require": "./dist/wallet.cjs", + "default": "./dist/wallet.js" + }, + "default": { + "types": "./dist/wallet.d.ts", + "browser": "./dist/wallet.js", + "require": "./dist/wallet.cjs", + "default": "./dist/wallet.js" + } + }, + "./auth_nextjs": { + "development": { + "types": "./src/auth_nextjs.ts", + "require": "./dist/auth_nextjs.cjs", + "default": "./dist/auth_nextjs.js" + }, + "default": { + "types": "./dist/auth_nextjs.d.ts", + "require": "./dist/auth_nextjs.cjs", + "default": "./dist/auth_nextjs.js" + } + }, + "./auth_nextjs/client": { + "development": { + "types": "./src/auth_nextjs_client.ts", + "require": "./dist/auth_nextjs_client.cjs", + "default": "./dist/auth_nextjs_client.js" + }, + "default": { + "types": "./dist/auth_nextjs_client.d.ts", + "require": "./dist/auth_nextjs_client.cjs", + "default": "./dist/auth_nextjs_client.js" + } + }, + "./auth_nextjs/server": { + "development": { + "types": "./src/auth_nextjs_server.ts", + "require": "./dist/auth_nextjs_server.cjs", + "default": "./dist/auth_nextjs_server.js" + }, + "default": { + "types": "./dist/auth_nextjs_server.d.ts", + "require": "./dist/auth_nextjs_server.cjs", + "default": "./dist/auth_nextjs_server.js" + } } }, "files": [ diff --git a/sdk/src/auth.ts b/sdk/src/auth.ts new file mode 100644 index 0000000000..fdb9a410af --- /dev/null +++ b/sdk/src/auth.ts @@ -0,0 +1 @@ +export * from '@imtbl/auth'; diff --git a/sdk/src/auth_nextjs.ts b/sdk/src/auth_nextjs.ts new file mode 100644 index 0000000000..4151b2b137 --- /dev/null +++ b/sdk/src/auth_nextjs.ts @@ -0,0 +1 @@ +export * from '@imtbl/auth-nextjs'; diff --git a/sdk/src/auth_nextjs_client.ts b/sdk/src/auth_nextjs_client.ts new file mode 100644 index 0000000000..b5f1cd4265 --- /dev/null +++ b/sdk/src/auth_nextjs_client.ts @@ -0,0 +1 @@ +export * from '@imtbl/auth-nextjs/client'; diff --git a/sdk/src/auth_nextjs_server.ts b/sdk/src/auth_nextjs_server.ts new file mode 100644 index 0000000000..6bd4d6fd8c --- /dev/null +++ b/sdk/src/auth_nextjs_server.ts @@ -0,0 +1 @@ +export * from '@imtbl/auth-nextjs/server'; diff --git a/sdk/src/index.ts b/sdk/src/index.ts index c8d0123eb1..b958894de4 100644 --- a/sdk/src/index.ts +++ b/sdk/src/index.ts @@ -6,3 +6,6 @@ export * as checkout from './checkout'; export * as x from './x'; export * as webhook from './webhook'; export * as mintingBackend from './minting_backend'; +export * as auth from './auth'; +export * as wallet from './wallet'; +export * as authNextjs from './auth_nextjs'; diff --git a/sdk/src/wallet.ts b/sdk/src/wallet.ts new file mode 100644 index 0000000000..6d49f54f24 --- /dev/null +++ b/sdk/src/wallet.ts @@ -0,0 +1 @@ +export * from '@imtbl/wallet'; From 9afc0600bbbbcf1574ce15bd52316c4bc417a411 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 12:40:16 +1100 Subject: [PATCH 22/52] bug --- packages/auth-nextjs/src/client/provider.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index b806e3b689..f919361392 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -335,7 +335,13 @@ export function useImmutableAuth(): UseImmutableAuthReturn { } } - // Fall back to session token + // Fall back to session token, but check for errors first + // When server-side token refresh fails, the session contains both an error flag + // and the original stale token. We must not return the stale token in this case. + if (session?.error) { + throw new Error(`Token refresh failed: ${session.error}`); + } + if (session?.accessToken) { return session.accessToken; } From eb868d32f7a54fec8a5c6c3f3438520aa76b3b00 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 13:25:49 +1100 Subject: [PATCH 23/52] dep install --- .npmrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.npmrc b/.npmrc index f65dd218b5..53a09bef8f 100644 --- a/.npmrc +++ b/.npmrc @@ -7,3 +7,10 @@ public-hoist-pattern[]=@imtbl/* public-hoist-pattern[]=*openzeppelin* public-hoist-pattern[]=*solidity* public-hoist-pattern[]=eslint-* + +# Skip preparing git-hosted seaport dependencies that run yarn install +# These packages provide Solidity contracts/types and don't require building +# Their prepare script is only for development (Husky git hooks) +# Without this, parallel yarn installs cause race conditions on CI +neverBuiltDependencies[]=seaport +neverBuiltDependencies[]=seaport-core From 6c695f99b405995fdb7c6725ff0bb766fb0b6474 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 13:35:12 +1100 Subject: [PATCH 24/52] dep install --- .npmrc | 3 +-- package.json | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.npmrc b/.npmrc index 53a09bef8f..73b0a413d6 100644 --- a/.npmrc +++ b/.npmrc @@ -12,5 +12,4 @@ public-hoist-pattern[]=eslint-* # These packages provide Solidity contracts/types and don't require building # Their prepare script is only for development (Husky git hooks) # Without this, parallel yarn installs cause race conditions on CI -neverBuiltDependencies[]=seaport -neverBuiltDependencies[]=seaport-core +never-built-dependencies=seaport seaport-core diff --git a/package.json b/package.json index 07a3b88546..f6f9af84fe 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,9 @@ "*.{js,jsx,ts,tsx}": "eslint" }, "packageManager": "pnpm@9.12.0", + "pnpm": { + "neverBuiltDependencies": ["seaport", "seaport-core"] + }, "private": true, "repository": "immutable/ts-immutable-sdk.git", "resolutions": { From 3fc1329986dbeda267c48306d8717e94a5daf0a8 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 13:40:58 +1100 Subject: [PATCH 25/52] revert --- .npmrc | 6 ---- package.json | 3 -- sdk/package.json | 64 ----------------------------------- sdk/src/auth.ts | 1 - sdk/src/auth_nextjs.ts | 1 - sdk/src/auth_nextjs_client.ts | 1 - sdk/src/auth_nextjs_server.ts | 1 - sdk/src/index.ts | 3 -- sdk/src/wallet.ts | 1 - 9 files changed, 81 deletions(-) diff --git a/.npmrc b/.npmrc index 73b0a413d6..f65dd218b5 100644 --- a/.npmrc +++ b/.npmrc @@ -7,9 +7,3 @@ public-hoist-pattern[]=@imtbl/* public-hoist-pattern[]=*openzeppelin* public-hoist-pattern[]=*solidity* public-hoist-pattern[]=eslint-* - -# Skip preparing git-hosted seaport dependencies that run yarn install -# These packages provide Solidity contracts/types and don't require building -# Their prepare script is only for development (Husky git hooks) -# Without this, parallel yarn installs cause race conditions on CI -never-built-dependencies=seaport seaport-core diff --git a/package.json b/package.json index f6f9af84fe..07a3b88546 100644 --- a/package.json +++ b/package.json @@ -46,9 +46,6 @@ "*.{js,jsx,ts,tsx}": "eslint" }, "packageManager": "pnpm@9.12.0", - "pnpm": { - "neverBuiltDependencies": ["seaport", "seaport-core"] - }, "private": true, "repository": "immutable/ts-immutable-sdk.git", "resolutions": { diff --git a/sdk/package.json b/sdk/package.json index 4b4d6cafa1..f307144e6a 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -149,70 +149,6 @@ "require": "./dist/minting_backend.cjs", "default": "./dist/minting_backend.js" } - }, - "./auth": { - "development": { - "types": "./src/auth.ts", - "browser": "./dist/auth.js", - "require": "./dist/auth.cjs", - "default": "./dist/auth.js" - }, - "default": { - "types": "./dist/auth.d.ts", - "browser": "./dist/auth.js", - "require": "./dist/auth.cjs", - "default": "./dist/auth.js" - } - }, - "./wallet": { - "development": { - "types": "./src/wallet.ts", - "browser": "./dist/wallet.js", - "require": "./dist/wallet.cjs", - "default": "./dist/wallet.js" - }, - "default": { - "types": "./dist/wallet.d.ts", - "browser": "./dist/wallet.js", - "require": "./dist/wallet.cjs", - "default": "./dist/wallet.js" - } - }, - "./auth_nextjs": { - "development": { - "types": "./src/auth_nextjs.ts", - "require": "./dist/auth_nextjs.cjs", - "default": "./dist/auth_nextjs.js" - }, - "default": { - "types": "./dist/auth_nextjs.d.ts", - "require": "./dist/auth_nextjs.cjs", - "default": "./dist/auth_nextjs.js" - } - }, - "./auth_nextjs/client": { - "development": { - "types": "./src/auth_nextjs_client.ts", - "require": "./dist/auth_nextjs_client.cjs", - "default": "./dist/auth_nextjs_client.js" - }, - "default": { - "types": "./dist/auth_nextjs_client.d.ts", - "require": "./dist/auth_nextjs_client.cjs", - "default": "./dist/auth_nextjs_client.js" - } - }, - "./auth_nextjs/server": { - "development": { - "types": "./src/auth_nextjs_server.ts", - "require": "./dist/auth_nextjs_server.cjs", - "default": "./dist/auth_nextjs_server.js" - }, - "default": { - "types": "./dist/auth_nextjs_server.d.ts", - "require": "./dist/auth_nextjs_server.cjs", - "default": "./dist/auth_nextjs_server.js" - } } }, "files": [ diff --git a/sdk/src/auth.ts b/sdk/src/auth.ts index fdb9a410af..e69de29bb2 100644 --- a/sdk/src/auth.ts +++ b/sdk/src/auth.ts @@ -1 +0,0 @@ -export * from '@imtbl/auth'; diff --git a/sdk/src/auth_nextjs.ts b/sdk/src/auth_nextjs.ts index 4151b2b137..e69de29bb2 100644 --- a/sdk/src/auth_nextjs.ts +++ b/sdk/src/auth_nextjs.ts @@ -1 +0,0 @@ -export * from '@imtbl/auth-nextjs'; diff --git a/sdk/src/auth_nextjs_client.ts b/sdk/src/auth_nextjs_client.ts index b5f1cd4265..e69de29bb2 100644 --- a/sdk/src/auth_nextjs_client.ts +++ b/sdk/src/auth_nextjs_client.ts @@ -1 +0,0 @@ -export * from '@imtbl/auth-nextjs/client'; diff --git a/sdk/src/auth_nextjs_server.ts b/sdk/src/auth_nextjs_server.ts index 6bd4d6fd8c..e69de29bb2 100644 --- a/sdk/src/auth_nextjs_server.ts +++ b/sdk/src/auth_nextjs_server.ts @@ -1 +0,0 @@ -export * from '@imtbl/auth-nextjs/server'; diff --git a/sdk/src/index.ts b/sdk/src/index.ts index b958894de4..c8d0123eb1 100644 --- a/sdk/src/index.ts +++ b/sdk/src/index.ts @@ -6,6 +6,3 @@ export * as checkout from './checkout'; export * as x from './x'; export * as webhook from './webhook'; export * as mintingBackend from './minting_backend'; -export * as auth from './auth'; -export * as wallet from './wallet'; -export * as authNextjs from './auth_nextjs'; diff --git a/sdk/src/wallet.ts b/sdk/src/wallet.ts index 6d49f54f24..e69de29bb2 100644 --- a/sdk/src/wallet.ts +++ b/sdk/src/wallet.ts @@ -1 +0,0 @@ -export * from '@imtbl/wallet'; From f40556e70792ed1ad2ab9bb39044183f1d8d85cc Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 13:44:59 +1100 Subject: [PATCH 26/52] revert --- packages/auth-nextjs/src/client/provider.tsx | 2 - pnpm-lock.yaml | 332 +++++-------------- sdk/package.json | 1 - 3 files changed, 81 insertions(+), 254 deletions(-) diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index f919361392..72f7e70b73 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -128,8 +128,6 @@ function ImmutableAuthInner({ }; await auth.storeTokens(tokenResponse); - // eslint-disable-next-line no-console - console.log('[auth-nextjs] Hydrated Auth instance from session'); } catch (error) { // eslint-disable-next-line no-console console.warn('[auth-nextjs] Failed to hydrate Auth instance:', error); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 202ad09307..0c6f8159aa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -135,7 +135,7 @@ importers: version: 0.25.21(@emotion/react@11.11.3(@types/react@18.3.12)(react@18.3.1))(@rive-app/react-canvas-lite@4.9.0(react@18.3.1))(embla-carousel-react@8.1.5(react@18.3.1))(framer-motion@11.18.2(@emotion/is-prop-valid@0.8.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@imtbl/sdk': specifier: latest - version: 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + version: 2.12.3 next: specifier: 14.2.25 version: 14.2.25(@babel/core@7.26.9)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1291,7 +1291,7 @@ importers: version: 29.6.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) react-scripts: specifier: 5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@9.16.0(jiti@1.21.0))(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@9.16.0(jiti@1.21.0))(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -1457,7 +1457,7 @@ importers: version: 29.6.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) react-scripts: specifier: 5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -1469,7 +1469,7 @@ importers: version: 0.13.0(rollup@4.28.0) ts-jest: specifier: ^29.1.0 - version: 29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2) + version: 29.2.5(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -2633,9 +2633,6 @@ importers: '@imtbl/auth': specifier: workspace:* version: link:../packages/auth - '@imtbl/auth-nextjs': - specifier: workspace:* - version: link:../packages/auth-nextjs '@imtbl/blockchain-data': specifier: workspace:* version: link:../packages/blockchain-data/sdk @@ -20387,7 +20384,7 @@ snapshots: transitivePeerDependencies: - debug - '@imtbl/bridge-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/bridge-sdk@2.12.3': dependencies: '@imtbl/config': 2.12.3 '@jest/globals': 29.7.0 @@ -20399,16 +20396,16 @@ snapshots: - supports-color - utf-8-validate - '@imtbl/checkout-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/checkout-sdk@2.12.3': dependencies: '@imtbl/blockchain-data': 2.12.3 - '@imtbl/bridge-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/bridge-sdk': 2.12.3 '@imtbl/config': 2.12.3 - '@imtbl/dex-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/dex-sdk': 2.12.3 '@imtbl/generated-clients': 2.12.3 '@imtbl/metrics': 2.12.3 - '@imtbl/orderbook': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/passport': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/orderbook': 2.12.3 + '@imtbl/passport': 2.12.3 '@metamask/detect-provider': 2.0.0 axios: 1.7.7 ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -20468,7 +20465,7 @@ snapshots: - typescript - utf-8-validate - '@imtbl/dex-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/dex-sdk@2.12.3': dependencies: '@imtbl/config': 2.12.3 '@uniswap/sdk-core': 3.2.3 @@ -20510,7 +20507,7 @@ snapshots: - debug - pg-native - '@imtbl/orderbook@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/orderbook@2.12.3': dependencies: '@imtbl/config': 2.12.3 '@imtbl/metrics': 2.12.3 @@ -20524,16 +20521,16 @@ snapshots: - debug - utf-8-validate - '@imtbl/passport@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/passport@2.12.3': dependencies: '@imtbl/auth': 2.12.3 '@imtbl/config': 2.12.3 '@imtbl/generated-clients': 2.12.3 '@imtbl/metrics': 2.12.3 - '@imtbl/toolkit': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/wallet': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/x-client': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/x-provider': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/toolkit': 2.12.3 + '@imtbl/wallet': 2.12.3 + '@imtbl/x-client': 2.12.3 + '@imtbl/x-provider': 2.12.3 ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) localforage: 1.10.0 oidc-client-ts: 3.4.1 @@ -20550,19 +20547,19 @@ snapshots: - encoding - supports-color - '@imtbl/sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/sdk@2.12.3': dependencies: '@imtbl/auth': 2.12.3 '@imtbl/blockchain-data': 2.12.3 - '@imtbl/checkout-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/checkout-sdk': 2.12.3 '@imtbl/config': 2.12.3 '@imtbl/minting-backend': 2.12.3 - '@imtbl/orderbook': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/passport': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/wallet': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/orderbook': 2.12.3 + '@imtbl/passport': 2.12.3 + '@imtbl/wallet': 2.12.3 '@imtbl/webhook': 2.12.3 - '@imtbl/x-client': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/x-provider': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/x-client': 2.12.3 + '@imtbl/x-provider': 2.12.3 transitivePeerDependencies: - bufferutil - debug @@ -20571,9 +20568,9 @@ snapshots: - supports-color - utf-8-validate - '@imtbl/toolkit@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/toolkit@2.12.3': dependencies: - '@imtbl/x-client': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/x-client': 2.12.3 '@metamask/detect-provider': 2.0.0 axios: 1.7.7 bn.js: 5.2.1 @@ -20585,12 +20582,12 @@ snapshots: - debug - utf-8-validate - '@imtbl/wallet@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/wallet@2.12.3': dependencies: '@imtbl/auth': 2.12.3 '@imtbl/generated-clients': 2.12.3 '@imtbl/metrics': 2.12.3 - '@imtbl/toolkit': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/toolkit': 2.12.3 ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil @@ -20605,7 +20602,7 @@ snapshots: transitivePeerDependencies: - debug - '@imtbl/x-client@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/x-client@2.12.3': dependencies: '@ethereumjs/wallet': 2.0.4 '@imtbl/config': 2.12.3 @@ -20621,12 +20618,12 @@ snapshots: - debug - utf-8-validate - '@imtbl/x-provider@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@imtbl/x-provider@2.12.3': dependencies: '@imtbl/config': 2.12.3 '@imtbl/generated-clients': 2.12.3 - '@imtbl/toolkit': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@imtbl/x-client': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/toolkit': 2.12.3 + '@imtbl/x-client': 2.12.3 '@metamask/detect-provider': 2.0.0 axios: 1.7.7 enc-utils: 3.0.0 @@ -25178,25 +25175,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/type-utils': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) - '@typescript-eslint/utils': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) - debug: 4.3.7(supports-color@8.1.1) - eslint: 9.16.0(jiti@1.21.0) - graphemer: 1.4.0 - ignore: 5.3.1 - natural-compare-lite: 1.4.0 - semver: 7.6.3 - tsutils: 3.21.0(typescript@5.6.2) - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -26404,6 +26382,20 @@ snapshots: transitivePeerDependencies: - supports-color + babel-jest@29.7.0(@babel/core@7.26.9): + dependencies: + '@babel/core': 7.26.9 + '@jest/transform': 29.7.0 + '@types/babel__core': 7.20.5 + babel-plugin-istanbul: 6.1.1 + babel-preset-jest: 29.6.3(@babel/core@7.26.9) + chalk: 4.1.2 + graceful-fs: 4.2.11 + slash: 3.0.0 + transitivePeerDependencies: + - supports-color + optional: true + babel-loader@8.3.0(@babel/core@7.26.9)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)): dependencies: '@babel/core': 7.26.9 @@ -26613,6 +26605,13 @@ snapshots: babel-plugin-jest-hoist: 29.6.3 babel-preset-current-node-syntax: 1.0.1(@babel/core@7.26.10) + babel-preset-jest@29.6.3(@babel/core@7.26.9): + dependencies: + '@babel/core': 7.26.9 + babel-plugin-jest-hoist: 29.6.3 + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.26.9) + optional: true + babel-preset-react-app@10.0.1: dependencies: '@babel/core': 7.26.9 @@ -28717,45 +28716,18 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): - dependencies: - '@babel/core': 7.26.9 - '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@8.57.0) - '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2) - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) - babel-preset-react-app: 10.0.1 - confusing-browser-globals: 1.0.11 - eslint: 8.57.0 - eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) - eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) - eslint-plugin-react: 7.35.0(eslint@8.57.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) - eslint-plugin-testing-library: 5.11.0(eslint@8.57.0)(typescript@5.6.2) - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - '@babel/plugin-syntax-flow' - - '@babel/plugin-transform-react-jsx' - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - jest - - supports-color - eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): dependencies: '@babel/core': 7.26.9 '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@9.16.0(jiti@1.21.0)) '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) '@typescript-eslint/parser': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) babel-preset-react-app: 10.0.1 confusing-browser-globals: 1.0.11 eslint: 9.16.0(jiti@1.21.0) eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)) eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) eslint-plugin-jsx-a11y: 6.9.0(eslint@9.16.0(jiti@1.21.0)) eslint-plugin-react: 7.35.0(eslint@9.16.0(jiti@1.21.0)) @@ -28771,23 +28743,23 @@ snapshots: - jest - supports-color - eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): + eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): dependencies: '@babel/core': 7.26.9 - '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@9.16.0(jiti@1.21.0)) + '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@8.57.0) '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) - '@typescript-eslint/parser': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) babel-preset-react-app: 10.0.1 confusing-browser-globals: 1.0.11 - eslint: 9.16.0(jiti@1.21.0) - eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) - eslint-plugin-jsx-a11y: 6.9.0(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-react: 7.35.0(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-react-hooks: 4.6.0(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-testing-library: 5.11.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + eslint: 8.57.0 + eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) + eslint-plugin-react: 7.35.0(eslint@8.57.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) + eslint-plugin-testing-library: 5.11.0(eslint@8.57.0)(typescript@5.6.2) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: @@ -28864,16 +28836,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0(jiti@1.21.0)): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) - eslint: 9.16.0(jiti@1.21.0) - eslint-import-resolver-node: 0.3.9 - transitivePeerDependencies: - - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0(jiti@1.21.0)): dependencies: debug: 3.2.7 @@ -28884,14 +28846,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0): - dependencies: - '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.26.10) - '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.10) - eslint: 8.57.0 - lodash: 4.17.21 - string-natural-compare: 3.0.1 - eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@9.16.0(jiti@1.21.0)): dependencies: '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.26.10) @@ -28900,11 +28854,11 @@ snapshots: lodash: 4.17.21 string-natural-compare: 3.0.1 - eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0)): + eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0): dependencies: '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.26.9) '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.9) - eslint: 9.16.0(jiti@1.21.0) + eslint: 8.57.0 lodash: 4.17.21 string-natural-compare: 3.0.1 @@ -28935,33 +28889,6 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)): - dependencies: - array-includes: 3.1.8 - array.prototype.findlastindex: 1.2.5 - array.prototype.flat: 1.3.2 - array.prototype.flatmap: 1.3.2 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 9.16.0(jiti@1.21.0) - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0(jiti@1.21.0)) - hasown: 2.0.2 - is-core-module: 2.15.0 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.0 - semver: 6.3.1 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)): dependencies: array-includes: 3.1.8 @@ -29011,17 +28938,6 @@ snapshots: - supports-color - typescript - eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): - dependencies: - '@typescript-eslint/experimental-utils': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) - eslint: 9.16.0(jiti@1.21.0) - optionalDependencies: - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) - jest: 27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10) - transitivePeerDependencies: - - supports-color - - typescript - eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0): dependencies: aria-query: 5.1.3 @@ -36132,7 +36048,7 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10): + react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.26.9 '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@2.19.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)))(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) @@ -36150,7 +36066,7 @@ snapshots: dotenv: 10.0.0 dotenv-expand: 5.1.0 eslint: 8.57.0 - eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) eslint-webpack-plugin: 3.2.0(eslint@8.57.0)(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) file-loader: 6.2.0(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) fs-extra: 10.1.0 @@ -36218,92 +36134,6 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@9.16.0(jiti@1.21.0))(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10): - dependencies: - '@babel/core': 7.26.9 - '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@2.19.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)))(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - '@svgr/webpack': 5.5.0 - babel-jest: 27.5.1(@babel/core@7.26.9) - babel-loader: 8.3.0(@babel/core@7.26.9)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - babel-plugin-named-asset-import: 0.3.8(@babel/core@7.26.9) - babel-preset-react-app: 10.0.1 - bfj: 7.0.2 - browserslist: 4.23.3 - camelcase: 6.3.0 - case-sensitive-paths-webpack-plugin: 2.4.0 - css-loader: 6.8.1(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - css-minimizer-webpack-plugin: 3.4.1(esbuild@0.23.1)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - dotenv: 10.0.0 - dotenv-expand: 5.1.0 - eslint: 9.16.0(jiti@1.21.0) - eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) - eslint-webpack-plugin: 3.2.0(eslint@9.16.0(jiti@1.21.0))(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - file-loader: 6.2.0(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - fs-extra: 10.1.0 - html-webpack-plugin: 5.5.3(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - identity-obj-proxy: 3.0.0 - jest: 27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10) - jest-resolve: 27.5.1 - jest-watch-typeahead: 1.1.0(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10)) - mini-css-extract-plugin: 2.7.6(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - postcss: 8.4.49 - postcss-flexbugs-fixes: 5.0.2(postcss@8.4.49) - postcss-loader: 6.2.1(postcss@8.4.49)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - postcss-normalize: 10.0.1(browserslist@4.23.3)(postcss@8.4.49) - postcss-preset-env: 7.8.3(postcss@8.4.49) - prompts: 2.4.2 - react: 18.3.1 - react-app-polyfill: 3.0.0 - react-dev-utils: 12.0.1(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - react-refresh: 0.11.0 - resolve: 1.22.8 - resolve-url-loader: 4.0.0 - sass-loader: 12.6.0(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - semver: 7.6.3 - source-map-loader: 3.0.2(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - style-loader: 3.3.3(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - tailwindcss: 3.4.7(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) - terser-webpack-plugin: 5.3.9(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - webpack: 5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1) - webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - webpack-manifest-plugin: 4.1.1(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - workbox-webpack-plugin: 6.6.0(@types/babel__core@7.20.5)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) - optionalDependencies: - fsevents: 2.3.3 - typescript: 5.6.2 - transitivePeerDependencies: - - '@babel/plugin-syntax-flow' - - '@babel/plugin-transform-react-jsx' - - '@parcel/css' - - '@swc/core' - - '@types/babel__core' - - '@types/webpack' - - bufferutil - - canvas - - clean-css - - csso - - debug - - esbuild - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - fibers - - node-notifier - - node-sass - - rework - - rework-visit - - sass - - sass-embedded - - sockjs-client - - supports-color - - ts-node - - type-fest - - uglify-js - - utf-8-validate - - vue-template-compiler - - webpack-cli - - webpack-hot-middleware - - webpack-plugin-serve - react-transition-group@4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.0 @@ -38125,12 +37955,12 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38145,12 +37975,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) + jest: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38165,12 +37995,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)) + jest: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38185,12 +38015,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) + jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38199,10 +38029,10 @@ snapshots: typescript: 5.6.2 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 7.26.10 + '@babel/core': 7.26.9 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.10) + babel-jest: 29.7.0(@babel/core@7.26.9) esbuild: 0.23.1 ts-mockito@2.6.1: diff --git a/sdk/package.json b/sdk/package.json index f307144e6a..7708f843bd 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -6,7 +6,6 @@ "bugs": "https://github.com/immutable/ts-immutable-sdk/issues", "dependencies": { "@imtbl/auth": "workspace:*", - "@imtbl/auth-nextjs": "workspace:*", "@imtbl/blockchain-data": "workspace:*", "@imtbl/checkout-sdk": "workspace:*", "@imtbl/config": "workspace:*", From 0c0ea254a74b8dd068c3aac3300af36774a8cc44 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 13:52:54 +1100 Subject: [PATCH 27/52] build --- sdk/src/auth.ts | 0 sdk/src/auth_nextjs.ts | 0 sdk/src/auth_nextjs_client.ts | 0 sdk/src/auth_nextjs_server.ts | 0 sdk/src/wallet.ts | 0 5 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 sdk/src/auth.ts delete mode 100644 sdk/src/auth_nextjs.ts delete mode 100644 sdk/src/auth_nextjs_client.ts delete mode 100644 sdk/src/auth_nextjs_server.ts delete mode 100644 sdk/src/wallet.ts diff --git a/sdk/src/auth.ts b/sdk/src/auth.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/src/auth_nextjs.ts b/sdk/src/auth_nextjs.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/src/auth_nextjs_client.ts b/sdk/src/auth_nextjs_client.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/src/auth_nextjs_server.ts b/sdk/src/auth_nextjs_server.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sdk/src/wallet.ts b/sdk/src/wallet.ts deleted file mode 100644 index e69de29bb2..0000000000 From 55c1e7f62ef37cd5cab15fa556b87df1f32bb7f9 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 14:12:43 +1100 Subject: [PATCH 28/52] clear cache --- .github/actions/setup/action.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index d62f4aab35..f2089f1166 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -17,6 +17,10 @@ runs: registry-url: https://registry.npmjs.org/ cache: "pnpm" + - name: Clear yarn cache (workaround for git-hosted packages) + shell: bash + run: yarn cache clean || true + - name: install dependencies shell: bash - run: pnpm install --frozen-lockfile \ No newline at end of file + run: pnpm install --frozen-lockfile From 613177b0e1a60de67a22f3222b3aba62a98ef787 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 14:17:56 +1100 Subject: [PATCH 29/52] fix action --- .github/actions/setup/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index f2089f1166..6ef5a33943 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -19,7 +19,7 @@ runs: - name: Clear yarn cache (workaround for git-hosted packages) shell: bash - run: yarn cache clean || true + run: rm -rf ~/.cache/yarn || true - name: install dependencies shell: bash From 44a2003924b6c7910c55ac51b724917bc2105339 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 14:21:13 +1100 Subject: [PATCH 30/52] fix action --- .github/actions/setup/action.yaml | 4 ---- .npmrc | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 6ef5a33943..daf93703e2 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -17,10 +17,6 @@ runs: registry-url: https://registry.npmjs.org/ cache: "pnpm" - - name: Clear yarn cache (workaround for git-hosted packages) - shell: bash - run: rm -rf ~/.cache/yarn || true - - name: install dependencies shell: bash run: pnpm install --frozen-lockfile diff --git a/.npmrc b/.npmrc index f65dd218b5..0b2d90ec57 100644 --- a/.npmrc +++ b/.npmrc @@ -7,3 +7,7 @@ public-hoist-pattern[]=@imtbl/* public-hoist-pattern[]=*openzeppelin* public-hoist-pattern[]=*solidity* public-hoist-pattern[]=eslint-* + +# Serialize git-hosted package preparation to prevent parallel yarn installs +# from corrupting each other (seaport packages use yarn install as prepare script) +network-concurrency=1 From 7d62d3f7efcf1f8a96255c422b59e9e29446e3d5 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 14:30:44 +1100 Subject: [PATCH 31/52] add package --- packages/auth-nextjs/src/client/provider.tsx | 4 ++ sdk/package.json | 65 ++++++++++++++++++++ sdk/src/auth.ts | 1 + sdk/src/auth_nextjs.ts | 1 + sdk/src/auth_nextjs_client.ts | 1 + sdk/src/auth_nextjs_server.ts | 1 + sdk/src/index.ts | 3 + sdk/src/wallet.ts | 1 + 8 files changed, 77 insertions(+) create mode 100644 sdk/src/auth.ts create mode 100644 sdk/src/auth_nextjs.ts create mode 100644 sdk/src/auth_nextjs_client.ts create mode 100644 sdk/src/auth_nextjs_server.ts create mode 100644 sdk/src/wallet.ts diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index 72f7e70b73..c0e4dadf99 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -99,6 +99,10 @@ function ImmutableAuthInner({ // This handles the case where a valid session exists but Auth has no local state useEffect(() => { if (!auth || !isAuthReady) return; + // Don't hydrate if session has an error (e.g., RefreshTokenError) + // When server-side token refresh fails, the session contains both stale tokens + // AND an error flag - we must not store these stale tokens in the Auth instance + if (session?.error) return; if (!session?.accessToken || !session?.idToken) return; const hydrateAuth = async () => { diff --git a/sdk/package.json b/sdk/package.json index 7708f843bd..4b4d6cafa1 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -6,6 +6,7 @@ "bugs": "https://github.com/immutable/ts-immutable-sdk/issues", "dependencies": { "@imtbl/auth": "workspace:*", + "@imtbl/auth-nextjs": "workspace:*", "@imtbl/blockchain-data": "workspace:*", "@imtbl/checkout-sdk": "workspace:*", "@imtbl/config": "workspace:*", @@ -148,6 +149,70 @@ "require": "./dist/minting_backend.cjs", "default": "./dist/minting_backend.js" } + }, + "./auth": { + "development": { + "types": "./src/auth.ts", + "browser": "./dist/auth.js", + "require": "./dist/auth.cjs", + "default": "./dist/auth.js" + }, + "default": { + "types": "./dist/auth.d.ts", + "browser": "./dist/auth.js", + "require": "./dist/auth.cjs", + "default": "./dist/auth.js" + } + }, + "./wallet": { + "development": { + "types": "./src/wallet.ts", + "browser": "./dist/wallet.js", + "require": "./dist/wallet.cjs", + "default": "./dist/wallet.js" + }, + "default": { + "types": "./dist/wallet.d.ts", + "browser": "./dist/wallet.js", + "require": "./dist/wallet.cjs", + "default": "./dist/wallet.js" + } + }, + "./auth_nextjs": { + "development": { + "types": "./src/auth_nextjs.ts", + "require": "./dist/auth_nextjs.cjs", + "default": "./dist/auth_nextjs.js" + }, + "default": { + "types": "./dist/auth_nextjs.d.ts", + "require": "./dist/auth_nextjs.cjs", + "default": "./dist/auth_nextjs.js" + } + }, + "./auth_nextjs/client": { + "development": { + "types": "./src/auth_nextjs_client.ts", + "require": "./dist/auth_nextjs_client.cjs", + "default": "./dist/auth_nextjs_client.js" + }, + "default": { + "types": "./dist/auth_nextjs_client.d.ts", + "require": "./dist/auth_nextjs_client.cjs", + "default": "./dist/auth_nextjs_client.js" + } + }, + "./auth_nextjs/server": { + "development": { + "types": "./src/auth_nextjs_server.ts", + "require": "./dist/auth_nextjs_server.cjs", + "default": "./dist/auth_nextjs_server.js" + }, + "default": { + "types": "./dist/auth_nextjs_server.d.ts", + "require": "./dist/auth_nextjs_server.cjs", + "default": "./dist/auth_nextjs_server.js" + } } }, "files": [ diff --git a/sdk/src/auth.ts b/sdk/src/auth.ts new file mode 100644 index 0000000000..fdb9a410af --- /dev/null +++ b/sdk/src/auth.ts @@ -0,0 +1 @@ +export * from '@imtbl/auth'; diff --git a/sdk/src/auth_nextjs.ts b/sdk/src/auth_nextjs.ts new file mode 100644 index 0000000000..4151b2b137 --- /dev/null +++ b/sdk/src/auth_nextjs.ts @@ -0,0 +1 @@ +export * from '@imtbl/auth-nextjs'; diff --git a/sdk/src/auth_nextjs_client.ts b/sdk/src/auth_nextjs_client.ts new file mode 100644 index 0000000000..b5f1cd4265 --- /dev/null +++ b/sdk/src/auth_nextjs_client.ts @@ -0,0 +1 @@ +export * from '@imtbl/auth-nextjs/client'; diff --git a/sdk/src/auth_nextjs_server.ts b/sdk/src/auth_nextjs_server.ts new file mode 100644 index 0000000000..6bd4d6fd8c --- /dev/null +++ b/sdk/src/auth_nextjs_server.ts @@ -0,0 +1 @@ +export * from '@imtbl/auth-nextjs/server'; diff --git a/sdk/src/index.ts b/sdk/src/index.ts index c8d0123eb1..b958894de4 100644 --- a/sdk/src/index.ts +++ b/sdk/src/index.ts @@ -6,3 +6,6 @@ export * as checkout from './checkout'; export * as x from './x'; export * as webhook from './webhook'; export * as mintingBackend from './minting_backend'; +export * as auth from './auth'; +export * as wallet from './wallet'; +export * as authNextjs from './auth_nextjs'; diff --git a/sdk/src/wallet.ts b/sdk/src/wallet.ts new file mode 100644 index 0000000000..6d49f54f24 --- /dev/null +++ b/sdk/src/wallet.ts @@ -0,0 +1 @@ +export * from '@imtbl/wallet'; From 5b504b552aa351567d571225112dd10f35ca35f3 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 19 Dec 2025 14:34:17 +1100 Subject: [PATCH 32/52] lock file --- pnpm-lock.yaml | 332 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 251 insertions(+), 81 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0c6f8159aa..202ad09307 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -135,7 +135,7 @@ importers: version: 0.25.21(@emotion/react@11.11.3(@types/react@18.3.12)(react@18.3.1))(@rive-app/react-canvas-lite@4.9.0(react@18.3.1))(embla-carousel-react@8.1.5(react@18.3.1))(framer-motion@11.18.2(@emotion/is-prop-valid@0.8.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@imtbl/sdk': specifier: latest - version: 2.12.3 + version: 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) next: specifier: 14.2.25 version: 14.2.25(@babel/core@7.26.9)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1291,7 +1291,7 @@ importers: version: 29.6.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) react-scripts: specifier: 5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@9.16.0(jiti@1.21.0))(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@9.16.0(jiti@1.21.0))(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -1457,7 +1457,7 @@ importers: version: 29.6.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) react-scripts: specifier: 5.0.1 - version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10) rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -1469,7 +1469,7 @@ importers: version: 0.13.0(rollup@4.28.0) ts-jest: specifier: ^29.1.0 - version: 29.2.5(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2) + version: 29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -2633,6 +2633,9 @@ importers: '@imtbl/auth': specifier: workspace:* version: link:../packages/auth + '@imtbl/auth-nextjs': + specifier: workspace:* + version: link:../packages/auth-nextjs '@imtbl/blockchain-data': specifier: workspace:* version: link:../packages/blockchain-data/sdk @@ -20384,7 +20387,7 @@ snapshots: transitivePeerDependencies: - debug - '@imtbl/bridge-sdk@2.12.3': + '@imtbl/bridge-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@imtbl/config': 2.12.3 '@jest/globals': 29.7.0 @@ -20396,16 +20399,16 @@ snapshots: - supports-color - utf-8-validate - '@imtbl/checkout-sdk@2.12.3': + '@imtbl/checkout-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@imtbl/blockchain-data': 2.12.3 - '@imtbl/bridge-sdk': 2.12.3 + '@imtbl/bridge-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@imtbl/config': 2.12.3 - '@imtbl/dex-sdk': 2.12.3 + '@imtbl/dex-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@imtbl/generated-clients': 2.12.3 '@imtbl/metrics': 2.12.3 - '@imtbl/orderbook': 2.12.3 - '@imtbl/passport': 2.12.3 + '@imtbl/orderbook': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/passport': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metamask/detect-provider': 2.0.0 axios: 1.7.7 ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -20465,7 +20468,7 @@ snapshots: - typescript - utf-8-validate - '@imtbl/dex-sdk@2.12.3': + '@imtbl/dex-sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@imtbl/config': 2.12.3 '@uniswap/sdk-core': 3.2.3 @@ -20507,7 +20510,7 @@ snapshots: - debug - pg-native - '@imtbl/orderbook@2.12.3': + '@imtbl/orderbook@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@imtbl/config': 2.12.3 '@imtbl/metrics': 2.12.3 @@ -20521,16 +20524,16 @@ snapshots: - debug - utf-8-validate - '@imtbl/passport@2.12.3': + '@imtbl/passport@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@imtbl/auth': 2.12.3 '@imtbl/config': 2.12.3 '@imtbl/generated-clients': 2.12.3 '@imtbl/metrics': 2.12.3 - '@imtbl/toolkit': 2.12.3 - '@imtbl/wallet': 2.12.3 - '@imtbl/x-client': 2.12.3 - '@imtbl/x-provider': 2.12.3 + '@imtbl/toolkit': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/wallet': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/x-client': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/x-provider': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) localforage: 1.10.0 oidc-client-ts: 3.4.1 @@ -20547,19 +20550,19 @@ snapshots: - encoding - supports-color - '@imtbl/sdk@2.12.3': + '@imtbl/sdk@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@imtbl/auth': 2.12.3 '@imtbl/blockchain-data': 2.12.3 - '@imtbl/checkout-sdk': 2.12.3 + '@imtbl/checkout-sdk': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@imtbl/config': 2.12.3 '@imtbl/minting-backend': 2.12.3 - '@imtbl/orderbook': 2.12.3 - '@imtbl/passport': 2.12.3 - '@imtbl/wallet': 2.12.3 + '@imtbl/orderbook': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/passport': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/wallet': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@imtbl/webhook': 2.12.3 - '@imtbl/x-client': 2.12.3 - '@imtbl/x-provider': 2.12.3 + '@imtbl/x-client': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/x-provider': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - debug @@ -20568,9 +20571,9 @@ snapshots: - supports-color - utf-8-validate - '@imtbl/toolkit@2.12.3': + '@imtbl/toolkit@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@imtbl/x-client': 2.12.3 + '@imtbl/x-client': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metamask/detect-provider': 2.0.0 axios: 1.7.7 bn.js: 5.2.1 @@ -20582,12 +20585,12 @@ snapshots: - debug - utf-8-validate - '@imtbl/wallet@2.12.3': + '@imtbl/wallet@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@imtbl/auth': 2.12.3 '@imtbl/generated-clients': 2.12.3 '@imtbl/metrics': 2.12.3 - '@imtbl/toolkit': 2.12.3 + '@imtbl/toolkit': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) ethers: 6.13.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil @@ -20602,7 +20605,7 @@ snapshots: transitivePeerDependencies: - debug - '@imtbl/x-client@2.12.3': + '@imtbl/x-client@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@ethereumjs/wallet': 2.0.4 '@imtbl/config': 2.12.3 @@ -20618,12 +20621,12 @@ snapshots: - debug - utf-8-validate - '@imtbl/x-provider@2.12.3': + '@imtbl/x-provider@2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@imtbl/config': 2.12.3 '@imtbl/generated-clients': 2.12.3 - '@imtbl/toolkit': 2.12.3 - '@imtbl/x-client': 2.12.3 + '@imtbl/toolkit': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@imtbl/x-client': 2.12.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metamask/detect-provider': 2.0.0 axios: 1.7.7 enc-utils: 3.0.0 @@ -25175,6 +25178,25 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/type-utils': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/utils': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + debug: 4.3.7(supports-color@8.1.1) + eslint: 9.16.0(jiti@1.21.0) + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare-lite: 1.4.0 + semver: 7.6.3 + tsutils: 3.21.0(typescript@5.6.2) + optionalDependencies: + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -26382,20 +26404,6 @@ snapshots: transitivePeerDependencies: - supports-color - babel-jest@29.7.0(@babel/core@7.26.9): - dependencies: - '@babel/core': 7.26.9 - '@jest/transform': 29.7.0 - '@types/babel__core': 7.20.5 - babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.6.3(@babel/core@7.26.9) - chalk: 4.1.2 - graceful-fs: 4.2.11 - slash: 3.0.0 - transitivePeerDependencies: - - supports-color - optional: true - babel-loader@8.3.0(@babel/core@7.26.9)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)): dependencies: '@babel/core': 7.26.9 @@ -26605,13 +26613,6 @@ snapshots: babel-plugin-jest-hoist: 29.6.3 babel-preset-current-node-syntax: 1.0.1(@babel/core@7.26.10) - babel-preset-jest@29.6.3(@babel/core@7.26.9): - dependencies: - '@babel/core': 7.26.9 - babel-plugin-jest-hoist: 29.6.3 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.26.9) - optional: true - babel-preset-react-app@10.0.1: dependencies: '@babel/core': 7.26.9 @@ -28716,18 +28717,45 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): + dependencies: + '@babel/core': 7.26.9 + '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@8.57.0) + '@rushstack/eslint-patch': 1.10.4 + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) + babel-preset-react-app: 10.0.1 + confusing-browser-globals: 1.0.11 + eslint: 8.57.0 + eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) + eslint-plugin-react: 7.35.0(eslint@8.57.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) + eslint-plugin-testing-library: 5.11.0(eslint@8.57.0)(typescript@5.6.2) + optionalDependencies: + typescript: 5.6.2 + transitivePeerDependencies: + - '@babel/plugin-syntax-flow' + - '@babel/plugin-transform-react-jsx' + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - jest + - supports-color + eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): dependencies: '@babel/core': 7.26.9 '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@9.16.0(jiti@1.21.0)) '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) '@typescript-eslint/parser': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) babel-preset-react-app: 10.0.1 confusing-browser-globals: 1.0.11 eslint: 9.16.0(jiti@1.21.0) eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@9.16.0(jiti@1.21.0)) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)) eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) eslint-plugin-jsx-a11y: 6.9.0(eslint@9.16.0(jiti@1.21.0)) eslint-plugin-react: 7.35.0(eslint@9.16.0(jiti@1.21.0)) @@ -28743,23 +28771,23 @@ snapshots: - jest - supports-color - eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): + eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): dependencies: '@babel/core': 7.26.9 - '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@8.57.0) + '@babel/eslint-parser': 7.22.9(@babel/core@7.26.9)(eslint@9.16.0(jiti@1.21.0)) '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2) - '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/parser': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) babel-preset-react-app: 10.0.1 confusing-browser-globals: 1.0.11 - eslint: 8.57.0 - eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) - eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) - eslint-plugin-react: 7.35.0(eslint@8.57.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) - eslint-plugin-testing-library: 5.11.0(eslint@8.57.0)(typescript@5.6.2) + eslint: 9.16.0(jiti@1.21.0) + eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-plugin-jsx-a11y: 6.9.0(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-react: 7.35.0(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-react-hooks: 4.6.0(eslint@9.16.0(jiti@1.21.0)) + eslint-plugin-testing-library: 5.11.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: @@ -28836,6 +28864,16 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0(jiti@1.21.0)): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) + eslint: 9.16.0(jiti@1.21.0) + eslint-import-resolver-node: 0.3.9 + transitivePeerDependencies: + - supports-color + eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0(jiti@1.21.0)): dependencies: debug: 3.2.7 @@ -28846,6 +28884,14 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0): + dependencies: + '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.26.10) + '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.10) + eslint: 8.57.0 + lodash: 4.17.21 + string-natural-compare: 3.0.1 + eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@9.16.0(jiti@1.21.0)): dependencies: '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.26.10) @@ -28854,11 +28900,11 @@ snapshots: lodash: 4.17.21 string-natural-compare: 3.0.1 - eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0): + eslint-plugin-flowtype@8.0.3(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0)): dependencies: '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.26.9) '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.9) - eslint: 8.57.0 + eslint: 9.16.0(jiti@1.21.0) lodash: 4.17.21 string-natural-compare: 3.0.1 @@ -28889,6 +28935,33 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)): + dependencies: + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 9.16.0(jiti@1.21.0) + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@9.16.0(jiti@1.21.0)) + hasown: 2.0.2 + is-core-module: 2.15.0 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 + semver: 6.3.1 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.6.2) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0)): dependencies: array-includes: 3.1.8 @@ -28938,6 +29011,17 @@ snapshots: - supports-color - typescript + eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2): + dependencies: + '@typescript-eslint/experimental-utils': 5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + eslint: 9.16.0(jiti@1.21.0) + optionalDependencies: + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2))(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2) + jest: 27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10) + transitivePeerDependencies: + - supports-color + - typescript + eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0): dependencies: aria-query: 5.1.3 @@ -36048,7 +36132,7 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10): + react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@8.57.0)(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.26.9 '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@2.19.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)))(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) @@ -36066,7 +36150,7 @@ snapshots: dotenv: 10.0.0 dotenv-expand: 5.1.0 eslint: 8.57.0 - eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.10))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10))(eslint@8.57.0)(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) eslint-webpack-plugin: 3.2.0(eslint@8.57.0)(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) file-loader: 6.2.0(webpack@5.88.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) fs-extra: 10.1.0 @@ -36134,6 +36218,92 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve + react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/babel__core@7.20.5)(bufferutil@4.0.8)(esbuild@0.23.1)(eslint@9.16.0(jiti@1.21.0))(node-notifier@8.0.2)(react@18.3.1)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(type-fest@2.19.0)(typescript@5.6.2)(utf-8-validate@5.0.10): + dependencies: + '@babel/core': 7.26.9 + '@pmmmwh/react-refresh-webpack-plugin': 0.5.10(react-refresh@0.11.0)(type-fest@2.19.0)(webpack-dev-server@4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)))(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + '@svgr/webpack': 5.5.0 + babel-jest: 27.5.1(@babel/core@7.26.9) + babel-loader: 8.3.0(@babel/core@7.26.9)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + babel-plugin-named-asset-import: 0.3.8(@babel/core@7.26.9) + babel-preset-react-app: 10.0.1 + bfj: 7.0.2 + browserslist: 4.23.3 + camelcase: 6.3.0 + case-sensitive-paths-webpack-plugin: 2.4.0 + css-loader: 6.8.1(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + css-minimizer-webpack-plugin: 3.4.1(esbuild@0.23.1)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + dotenv: 10.0.0 + dotenv-expand: 5.1.0 + eslint: 9.16.0(jiti@1.21.0) + eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.7(@babel/core@7.26.9))(@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.9))(eslint@9.16.0(jiti@1.21.0))(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10))(typescript@5.6.2) + eslint-webpack-plugin: 3.2.0(eslint@9.16.0(jiti@1.21.0))(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + file-loader: 6.2.0(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + fs-extra: 10.1.0 + html-webpack-plugin: 5.5.3(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + identity-obj-proxy: 3.0.0 + jest: 27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10) + jest-resolve: 27.5.1 + jest-watch-typeahead: 1.1.0(jest@27.5.1(bufferutil@4.0.8)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2))(utf-8-validate@5.0.10)) + mini-css-extract-plugin: 2.7.6(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + postcss: 8.4.49 + postcss-flexbugs-fixes: 5.0.2(postcss@8.4.49) + postcss-loader: 6.2.1(postcss@8.4.49)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + postcss-normalize: 10.0.1(browserslist@4.23.3)(postcss@8.4.49) + postcss-preset-env: 7.8.3(postcss@8.4.49) + prompts: 2.4.2 + react: 18.3.1 + react-app-polyfill: 3.0.0 + react-dev-utils: 12.0.1(eslint@9.16.0(jiti@1.21.0))(typescript@5.6.2)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + react-refresh: 0.11.0 + resolve: 1.22.8 + resolve-url-loader: 4.0.0 + sass-loader: 12.6.0(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + semver: 7.6.3 + source-map-loader: 3.0.2(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + style-loader: 3.3.3(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + tailwindcss: 3.4.7(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + terser-webpack-plugin: 5.3.9(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + webpack: 5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1) + webpack-dev-server: 4.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + webpack-manifest-plugin: 4.1.1(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + workbox-webpack-plugin: 6.6.0(@types/babel__core@7.20.5)(webpack@5.88.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(esbuild@0.23.1)) + optionalDependencies: + fsevents: 2.3.3 + typescript: 5.6.2 + transitivePeerDependencies: + - '@babel/plugin-syntax-flow' + - '@babel/plugin-transform-react-jsx' + - '@parcel/css' + - '@swc/core' + - '@types/babel__core' + - '@types/webpack' + - bufferutil + - canvas + - clean-css + - csso + - debug + - esbuild + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - fibers + - node-notifier + - node-sass + - rework + - rework-visit + - sass + - sass-embedded + - sockjs-client + - supports-color + - ts-node + - type-fest + - uglify-js + - utf-8-validate + - vue-template-compiler + - webpack-cli + - webpack-hot-middleware + - webpack-plugin-serve + react-transition-group@4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.25.0 @@ -37955,12 +38125,12 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) + jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -37975,12 +38145,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)) + jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -37995,12 +38165,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) + jest: 29.7.0(@types/node@20.14.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@20.14.13)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38015,12 +38185,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 - ts-jest@29.2.5(@babel/core@7.26.9)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.9))(esbuild@0.23.1)(jest@29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.26.10)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.10))(esbuild@0.23.1)(jest@29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.15.13)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.13))(@types/node@18.15.13)(typescript@5.6.2)) + jest: 29.7.0(@types/node@22.7.5)(babel-plugin-macros@3.1.0)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.15.3(@swc/helpers@0.5.13))(@types/node@22.7.5)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -38029,10 +38199,10 @@ snapshots: typescript: 5.6.2 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 7.26.9 + '@babel/core': 7.26.10 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.9) + babel-jest: 29.7.0(@babel/core@7.26.10) esbuild: 0.23.1 ts-mockito@2.6.1: From e9223f994d989ffa2aedf0bc27bda435b72dc28e Mon Sep 17 00:00:00 2001 From: Shine Li Date: Mon, 5 Jan 2026 12:13:28 +1100 Subject: [PATCH 33/52] add login options --- packages/auth-nextjs/src/client/index.ts | 6 +++++- packages/auth-nextjs/src/client/provider.tsx | 10 ++++++---- packages/auth-nextjs/src/index.ts | 4 ++++ packages/auth-nextjs/src/types.ts | 3 ++- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/packages/auth-nextjs/src/client/index.ts b/packages/auth-nextjs/src/client/index.ts index 70d08b59bd..edd5ba9ff5 100644 --- a/packages/auth-nextjs/src/client/index.ts +++ b/packages/auth-nextjs/src/client/index.ts @@ -7,10 +7,14 @@ export { export { CallbackPage, type CallbackPageProps } from './callback'; -// Re-export useful types +// Re-export useful types from this package export type { ImmutableAuthProviderProps, UseImmutableAuthReturn, ImmutableAuthConfig, ImmutableUser, } from '../types'; + +// Re-export login-related types from @imtbl/auth for convenience +export type { LoginOptions, DirectLoginOptions } from '@imtbl/auth'; +export { MarketingConsentStatus } from '@imtbl/auth'; diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index c0e4dadf99..304c8b3431 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -13,7 +13,9 @@ import { SessionProvider, useSession, signIn, signOut, } from 'next-auth/react'; import type { Session } from 'next-auth'; -import { Auth, type User, type DeviceTokenResponse } from '@imtbl/auth'; +import { + Auth, type User, type DeviceTokenResponse, type LoginOptions, +} from '@imtbl/auth'; import type { ImmutableAuthConfig, ImmutableAuthProviderProps, @@ -264,13 +266,13 @@ export function useImmutableAuth(): UseImmutableAuthReturn { : null; // Sign in with Immutable popup - const handleSignIn = useCallback(async () => { + const handleSignIn = useCallback(async (options?: LoginOptions) => { if (!auth) { throw new Error('Auth not initialized'); } - // Open popup login - const authUser = await auth.login(); + // Open popup login with optional login options + const authUser = await auth.login(options); if (!authUser) { throw new Error('Login failed'); } diff --git a/packages/auth-nextjs/src/index.ts b/packages/auth-nextjs/src/index.ts index 295276a68d..e376509f1e 100644 --- a/packages/auth-nextjs/src/index.ts +++ b/packages/auth-nextjs/src/index.ts @@ -139,5 +139,9 @@ export type { WithPageAuthRequiredOptions, } from './types'; +// Re-export login-related types from @imtbl/auth for convenience +export type { LoginOptions, DirectLoginOptions } from '@imtbl/auth'; +export { MarketingConsentStatus } from '@imtbl/auth'; + // Token refresh utilities (for advanced use) export { refreshAccessToken, isTokenExpired } from './refresh'; diff --git a/packages/auth-nextjs/src/types.ts b/packages/auth-nextjs/src/types.ts index da93ec523c..7a15103d1e 100644 --- a/packages/auth-nextjs/src/types.ts +++ b/packages/auth-nextjs/src/types.ts @@ -175,8 +175,9 @@ export interface UseImmutableAuthReturn { isAuthenticated: boolean; /** * Sign in with Immutable (opens popup) + * @param options - Optional login options (cached session, silent login, redirect flow, direct login) */ - signIn: () => Promise; + signIn: (options?: import('@imtbl/auth').LoginOptions) => Promise; /** * Sign out from both NextAuth and Immutable */ From ba99a04f55bab23db1304b093e78bb8490c9fa83 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Mon, 5 Jan 2026 13:59:13 +1100 Subject: [PATCH 34/52] app router --- packages/auth-nextjs/README.md | 253 +++++++++--------- packages/auth-nextjs/package.json | 6 +- packages/auth-nextjs/src/client/callback.tsx | 33 +-- packages/auth-nextjs/src/client/provider.tsx | 26 +- packages/auth-nextjs/src/config.ts | 76 +++--- packages/auth-nextjs/src/index.ts | 89 +++--- packages/auth-nextjs/src/refresh.ts | 2 +- packages/auth-nextjs/src/server/index.ts | 171 +++++++++++- packages/auth-nextjs/src/types.ts | 53 ++-- packages/auth-nextjs/tsup.config.ts | 2 +- .../app/api/auth/dev/[...nextauth]/route.ts | 4 + .../app/api/auth/prod/[...nextauth]/route.ts | 4 + .../api/auth/sandbox/[...nextauth]/route.ts | 4 + .../passport/sdk-sample-app/app/layout.tsx | 11 + .../passport/sdk-sample-app/next.config.js | 14 +- packages/passport/sdk-sample-app/package.json | 2 +- .../src/context/ImmutableProvider.tsx | 1 + .../sdk-sample-app/src/lib/auth-nextjs.ts | 29 +- .../pages/api/auth/dev/[...nextauth].api.ts | 5 - .../pages/api/auth/prod/[...nextauth].api.ts | 5 - .../api/auth/sandbox/[...nextauth].api.ts | 5 - .../src/pages/callback.page.tsx | 15 +- .../sdk-sample-app/tsconfig.build.json | 32 ++- pnpm-lock.yaml | 192 +++++-------- 24 files changed, 620 insertions(+), 414 deletions(-) create mode 100644 packages/passport/sdk-sample-app/app/api/auth/dev/[...nextauth]/route.ts create mode 100644 packages/passport/sdk-sample-app/app/api/auth/prod/[...nextauth]/route.ts create mode 100644 packages/passport/sdk-sample-app/app/api/auth/sandbox/[...nextauth]/route.ts create mode 100644 packages/passport/sdk-sample-app/app/layout.tsx delete mode 100644 packages/passport/sdk-sample-app/src/pages/api/auth/dev/[...nextauth].api.ts delete mode 100644 packages/passport/sdk-sample-app/src/pages/api/auth/prod/[...nextauth].api.ts delete mode 100644 packages/passport/sdk-sample-app/src/pages/api/auth/sandbox/[...nextauth].api.ts diff --git a/packages/auth-nextjs/README.md b/packages/auth-nextjs/README.md index d7eaffc9fe..5d2ef20568 100644 --- a/packages/auth-nextjs/README.md +++ b/packages/auth-nextjs/README.md @@ -1,38 +1,58 @@ # @imtbl/auth-nextjs -Next.js authentication integration for Immutable SDK using NextAuth.js. +Next.js App Router authentication integration for Immutable SDK using Auth.js v5. -This package bridges `@imtbl/auth` popup-based authentication with NextAuth.js session management, providing: +This package bridges `@imtbl/auth` popup-based authentication with Auth.js session management, providing: - Server-side session storage in encrypted JWT cookies - Automatic token refresh on both server and client -- Full SSR support with `getServerSession` +- Full SSR support with `auth()` function - React hooks for easy client-side authentication +- Middleware support for protecting routes + +## Requirements + +- Next.js 14+ with App Router +- Auth.js v5 (next-auth@5.x) +- React 18+ ## Installation ```bash -pnpm add @imtbl/auth-nextjs next-auth +pnpm add @imtbl/auth-nextjs next-auth@beta ``` ## Quick Start -### 1. Set Up Auth API Route +### 1. Create Auth Configuration ```typescript -// pages/api/auth/[...nextauth].ts -import { ImmutableAuth } from "@imtbl/auth-nextjs"; +// lib/auth.ts +import { createImmutableAuth } from "@imtbl/auth-nextjs"; -export default ImmutableAuth({ +const config = { clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, -}); +}; + +export const { handlers, auth, signIn, signOut } = createImmutableAuth(config); ``` -### 2. Create Callback Page +### 2. Set Up Auth API Route ```typescript -// pages/callback.tsx +// app/api/auth/[...nextauth]/route.ts +import { handlers } from "@/lib/auth"; + +export const { GET, POST } = handlers; +``` + +### 3. Create Callback Page + +```typescript +// app/callback/page.tsx +"use client"; + import { CallbackPage } from "@imtbl/auth-nextjs/client"; const config = { @@ -45,10 +65,12 @@ export default function Callback() { } ``` -### 3. Add Provider to App +### 4. Add Provider to Layout ```typescript -// pages/_app.tsx +// app/providers.tsx +"use client"; + import { ImmutableAuthProvider } from "@imtbl/auth-nextjs/client"; const config = { @@ -56,21 +78,39 @@ const config = { redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, }; -export default function App({ Component, pageProps }: AppProps) { +export function Providers({ children }: { children: React.ReactNode }) { return ( - - - + {children} + ); +} + +// app/layout.tsx +import { Providers } from "./providers"; + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + + {children} + + ); } ``` -### 4. Use in Components +### 5. Use in Components ```typescript +// app/components/LoginButton.tsx +"use client"; + import { useImmutableAuth } from "@imtbl/auth-nextjs/client"; -function LoginButton() { +export function LoginButton() { const { user, isLoading, signIn, signOut } = useImmutableAuth(); if (isLoading) return

Loading...
; @@ -84,52 +124,42 @@ function LoginButton() { ); } - return ; + return ; } ``` -### 5. Access Session Server-Side (SSR) +### 6. Access Session in Server Components ```typescript -// pages/profile.tsx -import { getImmutableSession } from "@imtbl/auth-nextjs/server"; -import type { GetServerSideProps } from "next"; +// app/profile/page.tsx +import { auth } from "@/lib/auth"; +import { redirect } from "next/navigation"; -const config = { - clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, - redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, -}; +export default async function ProfilePage() { + const session = await auth(); -export default function ProfilePage({ user }) { - if (!user) return

Not logged in

; - return

Welcome, {user.email}

; -} + if (!session) { + redirect("/login"); + } -export const getServerSideProps: GetServerSideProps = async (ctx) => { - const session = await getImmutableSession(ctx.req, ctx.res, config); - return { props: { user: session?.user ?? null } }; -}; + return

Welcome, {session.user.email}

; +} ``` -### 6. Protect Pages (Optional) +### 7. Protect Routes with Middleware (Optional) ```typescript -// pages/dashboard.tsx -import { withPageAuthRequired } from "@imtbl/auth-nextjs/server"; - -const config = { - clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, - redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, -}; +// middleware.ts +import { createAuthMiddleware } from "@imtbl/auth-nextjs/server"; +import { auth } from "@/lib/auth"; -function DashboardPage() { - return

Dashboard (protected)

; -} - -export default DashboardPage; +export default createAuthMiddleware(auth, { + loginUrl: "/login", +}); -// Redirects to /login if not authenticated -export const getServerSideProps = withPageAuthRequired(config); +export const config = { + matcher: ["/dashboard/:path*", "/profile/:path*"], +}; ``` ## Configuration Options @@ -152,9 +182,8 @@ The `ImmutableAuthConfig` object accepts the following properties: NEXT_PUBLIC_IMMUTABLE_CLIENT_ID=your-client-id NEXT_PUBLIC_BASE_URL=http://localhost:3000 -# Required by NextAuth for cookie encryption -NEXTAUTH_SECRET=generate-with-openssl-rand-base64-32 -NEXTAUTH_URL=http://localhost:3000 +# Required by Auth.js for cookie encryption +AUTH_SECRET=generate-with-openssl-rand-base64-32 ``` Generate a secret: @@ -167,99 +196,83 @@ openssl rand -base64 32 ### Main Exports (`@imtbl/auth-nextjs`) -| Export | Description | -| ----------------------------------- | ------------------------------------------- | -| `ImmutableAuth(config, overrides?)` | Creates NextAuth handler (use in API route) | -| `refreshAccessToken(token)` | Utility to refresh an expired access token | -| `isTokenExpired(token)` | Utility to check if a token is expired | +| Export | Description | +| --------------------------------------- | ------------------------------------------------------------------- | +| `createImmutableAuth(config, options?)` | Creates Auth.js instance with `{ handlers, auth, signIn, signOut }` | +| `createAuthConfig(config)` | Creates Auth.js config (for advanced use) | +| `refreshAccessToken(token, config)` | Utility to refresh an expired access token | +| `isTokenExpired(expires, buffer?)` | Utility to check if a token is expired | **Types:** -| Type | Description | -| ----------------------------- | ----------------------------------------- | -| `ImmutableAuthConfig` | Configuration options | -| `ImmutableAuthOverrides` | NextAuth options override type | -| `ImmutableUser` | User profile type | -| `ImmutableTokenData` | Token data passed to credentials provider | -| `ZkEvmInfo` | zkEVM wallet information type | -| `WithPageAuthRequiredOptions` | Options for page protection | +| Type | Description | +| ------------------------ | ----------------------------------------- | +| `ImmutableAuthConfig` | Configuration options | +| `ImmutableAuthOverrides` | Auth.js options override type | +| `ImmutableAuthResult` | Return type of createImmutableAuth | +| `ImmutableUser` | User profile type | +| `ImmutableTokenData` | Token data passed to credentials provider | +| `ZkEvmInfo` | zkEVM wallet information type | ### Client Exports (`@imtbl/auth-nextjs/client`) -| Export | Description | -| ----------------------- | ------------------------------------------------------- | -| `ImmutableAuthProvider` | React context provider (wraps NextAuth SessionProvider) | -| `useImmutableAuth()` | Hook for authentication state and methods (see below) | -| `useAccessToken()` | Hook returning `getAccessToken` function | -| `CallbackPage` | Pre-built callback page component for OAuth redirects | +| Export | Description | +| ----------------------- | ------------------------------------------------------ | +| `ImmutableAuthProvider` | React context provider (wraps Auth.js SessionProvider) | +| `useImmutableAuth()` | Hook for authentication state and methods (see below) | +| `useAccessToken()` | Hook returning `getAccessToken` function | +| `CallbackPage` | Pre-built callback page component for OAuth redirects | **`useImmutableAuth()` Return Value:** | Property | Type | Description | | ----------------- | ----------------------- | ------------------------------------------------ | | `user` | `ImmutableUser \| null` | Current user profile (null if not authenticated) | -| `session` | `Session \| null` | Full NextAuth session with tokens | +| `session` | `Session \| null` | Full Auth.js session with tokens | | `isLoading` | `boolean` | Whether authentication state is loading | | `isAuthenticated` | `boolean` | Whether user is authenticated | -| `signIn` | `() => Promise` | Sign in with Immutable (opens popup) | -| `signOut` | `() => Promise` | Sign out from both NextAuth and Immutable | +| `signIn` | `(options?) => Promise` | Sign in with Immutable (opens popup) | +| `signOut` | `() => Promise` | Sign out from both Auth.js and Immutable | | `getAccessToken` | `() => Promise` | Get a valid access token (refreshes if needed) | | `auth` | `Auth \| null` | The underlying Auth instance (for advanced use) | -**Types:** - -| Type | Description | -| ---------------------------- | -------------------------------- | -| `ImmutableAuthProviderProps` | Props for the provider component | -| `UseImmutableAuthReturn` | Return type of useImmutableAuth | -| `CallbackPageProps` | Props for CallbackPage component | -| `ImmutableAuthConfig` | Re-exported configuration type | -| `ImmutableUser` | Re-exported user type | - ### Server Exports (`@imtbl/auth-nextjs/server`) -| Export | Description | -| ---------------------------------------- | ---------------------------------------- | -| `getImmutableSession(req, res, config)` | Get session server-side | -| `withPageAuthRequired(config, options?)` | HOC for protecting pages with auth check | - -**`withPageAuthRequired` Options:** - -| Option | Type | Default | Description | -| -------------------- | ----------------------- | ------------ | ---------------------------------------------------- | -| `loginUrl` | `string` | `"/login"` | URL to redirect to when not authenticated | -| `returnTo` | `string \| false` | current page | URL to redirect to after login (`false` to disable) | -| `getServerSideProps` | `(ctx, session) => ...` | - | Custom getServerSideProps that runs after auth check | - -**Example with custom getServerSideProps:** - -```typescript -export const getServerSideProps = withPageAuthRequired(config, { - loginUrl: "/auth/signin", - async getServerSideProps(ctx, session) { - // session is guaranteed to exist here - const data = await fetchData(session.accessToken); - return { props: { data } }; - }, -}); -``` +| Export | Description | +| ----------------------------------- | ------------------------------------------------ | +| `createImmutableAuth` | Re-exported for convenience | +| `createAuthMiddleware(auth, opts?)` | Create middleware for protecting routes | +| `withAuth(auth, handler)` | HOC for protecting Server Actions/Route Handlers | -**Types:** +**`createAuthMiddleware` Options:** -| Type | Description | -| --------------------------------- | ----------------------------------------- | -| `WithPageAuthRequiredOptions` | Basic options for page protection | -| `WithPageAuthRequiredFullOptions` | Full options including getServerSideProps | -| `WithPageAuthRequiredProps` | Props added to protected pages (session) | +| Option | Type | Default | Description | +| ---------------- | ---------------------- | ---------- | -------------------------------------- | +| `loginUrl` | `string` | `"/login"` | URL to redirect when not authenticated | +| `protectedPaths` | `(string \| RegExp)[]` | - | Paths that require authentication | +| `publicPaths` | `(string \| RegExp)[]` | - | Paths to exclude from protection | ## How It Works 1. **Login**: User clicks login → `@imtbl/auth` opens popup → tokens returned -2. **Session Creation**: Tokens passed to NextAuth's credentials provider → stored in encrypted JWT cookie -3. **Token Refresh**: NextAuth JWT callback automatically refreshes expired tokens using refresh_token -4. **SSR**: `getServerSession()` reads and decrypts cookie, providing full session with tokens +2. **Session Creation**: Tokens passed to Auth.js credentials provider → stored in encrypted JWT cookie +3. **Token Refresh**: Auth.js JWT callback automatically refreshes expired tokens using refresh_token +4. **SSR**: `auth()` reads and decrypts cookie, providing full session with tokens 5. **Auto-hydration**: If localStorage is cleared but session cookie exists, the Auth instance is automatically hydrated from session tokens +## Migration from v4 (Pages Router) + +If you're migrating from the Pages Router version: + +| v4 (Pages Router) | v5 (App Router) | +| --------------------------------------- | --------------------------------------------- | +| `ImmutableAuth(config)` | `createImmutableAuth(config)` | +| `getImmutableSession(req, res, config)` | `auth()` (from createImmutableAuth) | +| `withPageAuthRequired(config)` | `createAuthMiddleware(auth)` or layout checks | +| `pages/api/auth/[...nextauth].ts` | `app/api/auth/[...nextauth]/route.ts` | +| `pages/_app.tsx` with provider | `app/layout.tsx` with provider | +| `NEXTAUTH_SECRET` | `AUTH_SECRET` | + ## License Apache-2.0 diff --git a/packages/auth-nextjs/package.json b/packages/auth-nextjs/package.json index 9993e7de4b..26362a7379 100644 --- a/packages/auth-nextjs/package.json +++ b/packages/auth-nextjs/package.json @@ -1,7 +1,7 @@ { "name": "@imtbl/auth-nextjs", "version": "0.0.0", - "description": "Next.js authentication integration for Immutable SDK using NextAuth", + "description": "Next.js App Router authentication integration for Immutable SDK using Auth.js v5", "author": "Immutable", "bugs": "https://github.com/immutable/ts-immutable-sdk/issues", "homepage": "https://github.com/immutable/ts-immutable-sdk#readme", @@ -65,7 +65,7 @@ }, "peerDependencies": { "next": "14.2.25", - "next-auth": "^4.24.0", + "next-auth": "^5.0.0-beta.30", "react": "^18.2.0" }, "devDependencies": { @@ -77,7 +77,7 @@ "jest": "^29.4.3", "jest-environment-jsdom": "^29.4.3", "next": "14.2.25", - "next-auth": "^4.24.0", + "next-auth": "^5.0.0-beta.30", "react": "^18.2.0", "ts-node": "^10.9.1", "tsup": "^8.3.0", diff --git a/packages/auth-nextjs/src/client/callback.tsx b/packages/auth-nextjs/src/client/callback.tsx index 33fe96128e..75894c90ad 100644 --- a/packages/auth-nextjs/src/client/callback.tsx +++ b/packages/auth-nextjs/src/client/callback.tsx @@ -1,7 +1,7 @@ 'use client'; import React, { useEffect, useState, useRef } from 'react'; -import { useRouter } from 'next/router'; +import { useRouter, useSearchParams } from 'next/navigation'; import { signIn } from 'next-auth/react'; import { Auth } from '@imtbl/auth'; import type { ImmutableAuthConfig, ImmutableTokenData } from '../types'; @@ -33,18 +33,23 @@ export interface CallbackPageProps { } /** - * Callback page component for handling OAuth redirects. + * Callback page component for handling OAuth redirects (App Router version). * * Use this in your callback page to process authentication responses. * * @example * ```tsx - * // pages/callback.tsx + * // app/callback/page.tsx + * "use client"; * import { CallbackPage } from "@imtbl/auth-nextjs/client"; - * import { immutableConfig } from "@/lib/auth-nextjs"; + * + * const config = { + * clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, + * redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, + * }; * * export default function Callback() { - * return ; + * return ; * } * ``` */ @@ -55,6 +60,7 @@ export function CallbackPage({ errorComponent, }: CallbackPageProps) { const router = useRouter(); + const searchParams = useSearchParams(); const [error, setError] = useState(null); // Track whether callback has been processed to prevent double invocation // (React 18 StrictMode runs effects twice, and OAuth codes are single-use) @@ -132,32 +138,26 @@ export function CallbackPage({ const handleOAuthError = () => { // OAuth providers return error and error_description when authentication fails // (e.g., user cancels, consent denied, invalid request) - const errorCode = router.query.error as string; - const errorDescription = router.query.error_description as string; + const errorCode = searchParams.get('error'); + const errorDescription = searchParams.get('error_description'); const errorMessage = errorDescription || errorCode || 'Authentication failed'; setError(errorMessage); }; - if (!router.isReady) { - return; - } - // Handle OAuth error responses (user cancelled, consent denied, etc.) - if (router.query.error) { + if (searchParams.get('error')) { handleOAuthError(); return; } // Handle successful OAuth callback with authorization code // Guard against double invocation (React 18 StrictMode runs effects twice) - if (router.query.code && !callbackProcessedRef.current) { + if (searchParams.get('code') && !callbackProcessedRef.current) { callbackProcessedRef.current = true; handleCallback(); } - }, [ - router.isReady, router.query.code, router.query.error, router.query.error_description, router, config, redirectTo, - ]); + }, [searchParams, router, config, redirectTo]); if (error) { if (errorComponent) { @@ -170,6 +170,7 @@ export function CallbackPage({

{error}

+ + ); + } + + if (!user) { + return ; + } + + return
Welcome, {user.email}
; +} +``` + +### Using getAccessToken + +The `getAccessToken()` function will throw an error if the token cannot be refreshed: + +```typescript +const { getAccessToken } = useImmutableAuth(); + +async function fetchData() { + try { + const token = await getAccessToken(); + const response = await fetch("/api/data", { + headers: { Authorization: `Bearer ${token}` }, + }); + return response.json(); + } catch (error) { + // Token refresh failed - redirect to login or show error + console.error("Failed to get access token:", error); + } +} +``` ## Migration from v4 (Pages Router) diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index 3ea8437629..e08fb95cca 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -119,17 +119,20 @@ function ImmutableAuthInner({ }; }, [config]); - // Hydrate Auth instance from NextAuth session if localStorage is cleared - // This handles the case where a valid session exists but Auth has no local state + // Sync tokens from NextAuth session to Auth instance + // This handles two cases: + // 1. Initial hydration when Auth has no local state (e.g., localStorage cleared) + // 2. Token refresh sync when server-side refresh happened and tokens are newer + // (critical for refresh token rotation - the old refresh token is invalidated) useEffect(() => { if (!auth || !isAuthReady) return; - // Don't hydrate if session has an error (e.g., RefreshTokenError) + // Don't sync if session has an error (e.g., RefreshTokenError) // When server-side token refresh fails, the session contains both stale tokens // AND an error flag - we must not store these stale tokens in the Auth instance if (session?.error) return; if (!session?.accessToken || !session?.idToken) return; - const hydrateAuth = async () => { + const syncTokensToAuth = async () => { try { // Re-check tokens inside async function for TypeScript narrowing const { @@ -137,16 +140,29 @@ function ImmutableAuthInner({ } = session; if (!accessToken || !idToken) return; - // Check if Auth already has user data + // Check if Auth already has user data with same or newer tokens const existingUser = await auth.getUser(); - if (existingUser) return; // Already hydrated + if (existingUser) { + // Compare tokens - only update if session has different tokens + // This handles the case where server-side refresh happened: + // - Server refreshed tokens → new refresh token returned + // - Old refresh token is invalidated (refresh token rotation) + // - Client Auth still has old refresh token → sync the new one + const sessionHasNewerTokens = existingUser.accessToken !== accessToken + || existingUser.refreshToken !== refreshToken; + + if (!sessionHasNewerTokens) { + return; // Tokens are the same, no need to sync + } + // Tokens are different - session has updated tokens from server-side refresh + } // Calculate expires_in from accessTokenExpires const expiresIn = accessTokenExpires ? Math.max(0, Math.floor((accessTokenExpires - Date.now()) / 1000)) : DEFAULT_TOKEN_EXPIRY_SECONDS; - // Hydrate Auth with tokens from NextAuth session + // Store tokens from NextAuth session into Auth instance const tokenResponse: DeviceTokenResponse = { access_token: accessToken, refresh_token: refreshToken, @@ -158,11 +174,11 @@ function ImmutableAuthInner({ await auth.storeTokens(tokenResponse); } catch (error) { // eslint-disable-next-line no-console - console.warn('[auth-nextjs] Failed to hydrate Auth instance:', error); + console.warn('[auth-nextjs] Failed to sync tokens to Auth instance:', error); } }; - hydrateAuth(); + syncTokensToAuth(); }, [auth, isAuthReady, session]); // Listen for Auth events to sync tokens back to NextAuth diff --git a/packages/passport/sdk-sample-app/app/api/auth/dev/[...nextauth]/route.ts b/packages/passport/sdk-sample-app/app/api/auth/dev/[...nextauth]/route.ts index 75ee2f79e6..e3e55c33cf 100644 --- a/packages/passport/sdk-sample-app/app/api/auth/dev/[...nextauth]/route.ts +++ b/packages/passport/sdk-sample-app/app/api/auth/dev/[...nextauth]/route.ts @@ -3,3 +3,4 @@ import { devAuth } from "@/lib/auth-nextjs"; export const { GET, POST } = devAuth.handlers; + diff --git a/packages/passport/sdk-sample-app/app/api/auth/prod/[...nextauth]/route.ts b/packages/passport/sdk-sample-app/app/api/auth/prod/[...nextauth]/route.ts index 7369cb62ae..5969e98df2 100644 --- a/packages/passport/sdk-sample-app/app/api/auth/prod/[...nextauth]/route.ts +++ b/packages/passport/sdk-sample-app/app/api/auth/prod/[...nextauth]/route.ts @@ -3,3 +3,4 @@ import { prodAuth } from "@/lib/auth-nextjs"; export const { GET, POST } = prodAuth.handlers; + diff --git a/packages/passport/sdk-sample-app/app/api/auth/sandbox/[...nextauth]/route.ts b/packages/passport/sdk-sample-app/app/api/auth/sandbox/[...nextauth]/route.ts index 6d6cb1192c..78afa41374 100644 --- a/packages/passport/sdk-sample-app/app/api/auth/sandbox/[...nextauth]/route.ts +++ b/packages/passport/sdk-sample-app/app/api/auth/sandbox/[...nextauth]/route.ts @@ -3,3 +3,4 @@ import { sandboxAuth } from "@/lib/auth-nextjs"; export const { GET, POST } = sandboxAuth.handlers; + From aecce9d911bf0108062ae20794931de5b635c431 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 9 Jan 2026 14:15:10 +1100 Subject: [PATCH 46/52] fix bug passport domain is dropped --- .../wallets-connect-with-nextjs/package.json | 2 +- .../wallets-signing-with-nextjs/package.json | 2 +- .../package.json | 2 +- packages/auth-nextjs/README.md | 58 ++++++++++++++++--- packages/auth-nextjs/src/client/callback.tsx | 1 + packages/auth-nextjs/src/client/provider.tsx | 2 + packages/auth-nextjs/src/types.ts | 11 ++++ 7 files changed, 66 insertions(+), 12 deletions(-) diff --git a/examples/passport/wallets-connect-with-nextjs/package.json b/examples/passport/wallets-connect-with-nextjs/package.json index efa9960cea..66e95867b4 100644 --- a/examples/passport/wallets-connect-with-nextjs/package.json +++ b/examples/passport/wallets-connect-with-nextjs/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "dependencies": { "@biom3/react": "^0.27.12", - "@imtbl/sdk": "workspace:*", + "@imtbl/sdk": "file:.yalc/@imtbl/sdk", "@tanstack/react-query": "^5.51.11", "ethers": "^6.13.4", "next": "14.2.25", diff --git a/examples/passport/wallets-signing-with-nextjs/package.json b/examples/passport/wallets-signing-with-nextjs/package.json index 054afbc778..c22d7ad7d9 100644 --- a/examples/passport/wallets-signing-with-nextjs/package.json +++ b/examples/passport/wallets-signing-with-nextjs/package.json @@ -4,7 +4,7 @@ "dependencies": { "@biom3/design-tokens": "^0.4.4", "@biom3/react": "^0.27.12", - "@imtbl/sdk": "workspace:*", + "@imtbl/sdk": "file:.yalc/@imtbl/sdk", "@tanstack/react-query": "^5.51.11", "ethers": "^6.13.4", "next": "14.2.25", diff --git a/examples/passport/wallets-transactions-with-nextjs/package.json b/examples/passport/wallets-transactions-with-nextjs/package.json index 53d813193a..3852eba1a7 100644 --- a/examples/passport/wallets-transactions-with-nextjs/package.json +++ b/examples/passport/wallets-transactions-with-nextjs/package.json @@ -2,7 +2,7 @@ "name": "@examples/wallets-transactions-with-nextjs", "version": "0.1.0", "dependencies": { - "@imtbl/sdk": "workspace:*", + "@imtbl/sdk": "file:.yalc/@imtbl/sdk", "ethers": "^6.13.4", "next": "14.2.25", "react": "^18.2.0", diff --git a/packages/auth-nextjs/README.md b/packages/auth-nextjs/README.md index f932a71df5..6cf216895e 100644 --- a/packages/auth-nextjs/README.md +++ b/packages/auth-nextjs/README.md @@ -168,15 +168,23 @@ export const config = { The `ImmutableAuthConfig` object accepts the following properties: -| Property | Type | Required | Default | Description | -| ---------------------- | -------- | -------- | ------------------------------------------------ | ----------------------------------------------- | -| `clientId` | `string` | Yes | - | Immutable OAuth client ID | -| `redirectUri` | `string` | Yes | - | OAuth callback redirect URI (for redirect flow) | -| `popupRedirectUri` | `string` | No | `redirectUri` | OAuth callback redirect URI for popup flow | -| `logoutRedirectUri` | `string` | No | - | Where to redirect after logout | -| `audience` | `string` | No | `"platform_api"` | OAuth audience | -| `scope` | `string` | No | `"openid profile email offline_access transact"` | OAuth scopes | -| `authenticationDomain` | `string` | No | `"https://auth.immutable.com"` | Authentication domain | +| Property | Type | Required | Default | Description | +| ---------------------- | -------- | -------- | ------------------------------------------------ | -------------------------------------------------------------- | +| `clientId` | `string` | Yes | - | Immutable OAuth client ID | +| `redirectUri` | `string` | Yes | - | OAuth callback redirect URI (for redirect flow) | +| `popupRedirectUri` | `string` | No | `redirectUri` | OAuth callback redirect URI for popup flow | +| `logoutRedirectUri` | `string` | No | - | Where to redirect after logout | +| `audience` | `string` | No | `"platform_api"` | OAuth audience | +| `scope` | `string` | No | `"openid profile email offline_access transact"` | OAuth scopes | +| `authenticationDomain` | `string` | No | `"https://auth.immutable.com"` | Authentication domain | +| `passportDomain` | `string` | No | `"https://passport.immutable.com"` | Passport domain for transaction confirmations (see note below) | + +> **Important:** The `passportDomain` must match your target environment for transaction signing to work correctly: +> +> - **Production:** `https://passport.immutable.com` (default) +> - **Sandbox:** `https://passport.sandbox.immutable.com` +> +> If you're using the sandbox environment, you must explicitly set `passportDomain` to the sandbox URL. ## Environment Variables @@ -195,6 +203,38 @@ Generate a secret: openssl rand -base64 32 ``` +## Sandbox vs Production Configuration + +When developing or testing, you'll typically use the **Sandbox** environment. Make sure to configure `passportDomain` correctly: + +```typescript +// lib/auth.ts + +// For SANDBOX environment +const sandboxConfig = { + clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, + redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, + passportDomain: "https://passport.sandbox.immutable.com", // Required for sandbox! +}; + +// For PRODUCTION environment +const productionConfig = { + clientId: process.env.NEXT_PUBLIC_IMMUTABLE_CLIENT_ID!, + redirectUri: `${process.env.NEXT_PUBLIC_BASE_URL}/callback`, + // passportDomain defaults to 'https://passport.immutable.com' +}; + +// Use environment variable to switch between configs +const config = + process.env.NEXT_PUBLIC_IMMUTABLE_ENV === "production" + ? productionConfig + : sandboxConfig; + +export const { handlers, auth, signIn, signOut } = createImmutableAuth(config); +``` + +> **Note:** The `passportDomain` is used for transaction confirmation popups. If not set correctly for your environment, transaction signing will not work as expected. + ## API Reference ### Main Exports (`@imtbl/auth-nextjs`) diff --git a/packages/auth-nextjs/src/client/callback.tsx b/packages/auth-nextjs/src/client/callback.tsx index 1a7786a65c..ab9bf6d845 100644 --- a/packages/auth-nextjs/src/client/callback.tsx +++ b/packages/auth-nextjs/src/client/callback.tsx @@ -108,6 +108,7 @@ export function CallbackPage({ audience: config.audience || DEFAULT_AUDIENCE, scope: config.scope || DEFAULT_SCOPE, authenticationDomain: config.authenticationDomain || DEFAULT_AUTH_DOMAIN, + passportDomain: config.passportDomain, }); // Process the callback - this extracts tokens from the URL and returns the user diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index e08fb95cca..4403d7a310 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -79,6 +79,7 @@ function ImmutableAuthInner({ config.audience || DEFAULT_AUDIENCE, config.scope || DEFAULT_SCOPE, config.authenticationDomain || DEFAULT_AUTH_DOMAIN, + config.passportDomain || '', ].join(':'); // Only skip recreation if BOTH: @@ -101,6 +102,7 @@ function ImmutableAuthInner({ audience: config.audience || DEFAULT_AUDIENCE, scope: config.scope || DEFAULT_SCOPE, authenticationDomain: config.authenticationDomain || DEFAULT_AUTH_DOMAIN, + passportDomain: config.passportDomain, }); authInstanceRef.current = newAuth; diff --git a/packages/auth-nextjs/src/types.ts b/packages/auth-nextjs/src/types.ts index b69ff78895..0735868590 100644 --- a/packages/auth-nextjs/src/types.ts +++ b/packages/auth-nextjs/src/types.ts @@ -40,6 +40,17 @@ export interface ImmutableAuthConfig { * Authentication domain (default: "https://auth.immutable.com") */ authenticationDomain?: string; + + /** + * Passport domain for transaction confirmation popups. + * Must be set correctly for the target environment: + * - Production: "https://passport.immutable.com" + * - Sandbox: "https://passport.sandbox.immutable.com" + * + * If not provided, defaults to production ("https://passport.immutable.com"). + * This is important for transaction signing flows to work correctly. + */ + passportDomain?: string; } /** From 41b9a01f841d6e4a6bbe4c170ce49087014a82db Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 9 Jan 2026 14:43:06 +1100 Subject: [PATCH 47/52] fix deps --- examples/passport/wallets-connect-with-nextjs/package.json | 2 +- examples/passport/wallets-signing-with-nextjs/package.json | 2 +- examples/passport/wallets-transactions-with-nextjs/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/passport/wallets-connect-with-nextjs/package.json b/examples/passport/wallets-connect-with-nextjs/package.json index 66e95867b4..efa9960cea 100644 --- a/examples/passport/wallets-connect-with-nextjs/package.json +++ b/examples/passport/wallets-connect-with-nextjs/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "dependencies": { "@biom3/react": "^0.27.12", - "@imtbl/sdk": "file:.yalc/@imtbl/sdk", + "@imtbl/sdk": "workspace:*", "@tanstack/react-query": "^5.51.11", "ethers": "^6.13.4", "next": "14.2.25", diff --git a/examples/passport/wallets-signing-with-nextjs/package.json b/examples/passport/wallets-signing-with-nextjs/package.json index c22d7ad7d9..054afbc778 100644 --- a/examples/passport/wallets-signing-with-nextjs/package.json +++ b/examples/passport/wallets-signing-with-nextjs/package.json @@ -4,7 +4,7 @@ "dependencies": { "@biom3/design-tokens": "^0.4.4", "@biom3/react": "^0.27.12", - "@imtbl/sdk": "file:.yalc/@imtbl/sdk", + "@imtbl/sdk": "workspace:*", "@tanstack/react-query": "^5.51.11", "ethers": "^6.13.4", "next": "14.2.25", diff --git a/examples/passport/wallets-transactions-with-nextjs/package.json b/examples/passport/wallets-transactions-with-nextjs/package.json index 3852eba1a7..53d813193a 100644 --- a/examples/passport/wallets-transactions-with-nextjs/package.json +++ b/examples/passport/wallets-transactions-with-nextjs/package.json @@ -2,7 +2,7 @@ "name": "@examples/wallets-transactions-with-nextjs", "version": "0.1.0", "dependencies": { - "@imtbl/sdk": "file:.yalc/@imtbl/sdk", + "@imtbl/sdk": "workspace:*", "ethers": "^6.13.4", "next": "14.2.25", "react": "^18.2.0", From 24cfe5869f67afb42098bec20cbfaea11d96f3af Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 9 Jan 2026 15:01:56 +1100 Subject: [PATCH 48/52] race condition --- packages/auth-nextjs/src/client/provider.tsx | 23 ++++++-- packages/auth/src/Auth.test.ts | 56 ++++++++++++++++++++ packages/auth/src/Auth.ts | 7 ++- packages/auth/src/types.ts | 7 +++ 4 files changed, 89 insertions(+), 4 deletions(-) diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index 4403d7a310..86bb992b36 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -14,7 +14,7 @@ import { } from 'next-auth/react'; import type { Session } from 'next-auth'; import { - Auth, type User, type DeviceTokenResponse, type LoginOptions, + Auth, AuthEvents, type User, type DeviceTokenResponse, type LoginOptions, } from '@imtbl/auth'; import type { ImmutableAuthConfig, @@ -200,10 +200,27 @@ function ImmutableAuthInner({ } }; - auth.eventEmitter.on('loggedIn', handleLoggedIn); + // Handle client-side token refresh - critical for refresh token rotation. + // When Auth refreshes tokens via signinSilent(), we must sync the new tokens + // (especially the new refresh token) to the NextAuth session. Without this, + // the server-side JWT callback may use a stale refresh token that Auth0 has + // already invalidated, causing "Unknown or invalid refresh token" errors. + const handleTokenRefreshed = async (authUser: User) => { + await updateSession({ + accessToken: authUser.accessToken, + refreshToken: authUser.refreshToken, + idToken: authUser.idToken, + accessTokenExpires: getTokenExpiry(authUser.accessToken), + zkEvm: authUser.zkEvm, + }); + }; + + auth.eventEmitter.on(AuthEvents.LOGGED_IN, handleLoggedIn); + auth.eventEmitter.on(AuthEvents.TOKEN_REFRESHED, handleTokenRefreshed); return () => { - auth.eventEmitter.removeListener('loggedIn', handleLoggedIn); + auth.eventEmitter.removeListener(AuthEvents.LOGGED_IN, handleLoggedIn); + auth.eventEmitter.removeListener(AuthEvents.TOKEN_REFRESHED, handleTokenRefreshed); }; }, [auth, isAuthReady, session, updateSession]); diff --git a/packages/auth/src/Auth.test.ts b/packages/auth/src/Auth.test.ts index f1163d710f..f33f600368 100644 --- a/packages/auth/src/Auth.test.ts +++ b/packages/auth/src/Auth.test.ts @@ -186,6 +186,62 @@ describe('Auth', () => { }); }); + describe('refreshTokenAndUpdatePromise', () => { + it('emits TOKEN_REFRESHED event when signinSilent succeeds', async () => { + const mockOidcUser = { + id_token: 'new-id', + access_token: 'new-access', + refresh_token: 'new-refresh', + expired: false, + profile: { sub: 'user-123', email: 'test@example.com', nickname: 'tester' }, + }; + + (decodeJwtPayload as jest.Mock).mockReturnValue({ + username: undefined, + passport: undefined, + }); + + const auth = Object.create(Auth.prototype) as Auth; + const mockEventEmitter = { emit: jest.fn() }; + const mockUserManager = { + signinSilent: jest.fn().mockResolvedValue(mockOidcUser), + }; + + (auth as any).eventEmitter = mockEventEmitter; + (auth as any).userManager = mockUserManager; + (auth as any).refreshingPromise = null; + + const user = await (auth as any).refreshTokenAndUpdatePromise(); + + expect(user).toBeDefined(); + expect(user.accessToken).toBe('new-access'); + expect(mockEventEmitter.emit).toHaveBeenCalledWith( + AuthEvents.TOKEN_REFRESHED, + expect.objectContaining({ + accessToken: 'new-access', + refreshToken: 'new-refresh', + }), + ); + }); + + it('does not emit TOKEN_REFRESHED event when signinSilent returns null', async () => { + const auth = Object.create(Auth.prototype) as Auth; + const mockEventEmitter = { emit: jest.fn() }; + const mockUserManager = { + signinSilent: jest.fn().mockResolvedValue(null), + }; + + (auth as any).eventEmitter = mockEventEmitter; + (auth as any).userManager = mockUserManager; + (auth as any).refreshingPromise = null; + + const user = await (auth as any).refreshTokenAndUpdatePromise(); + + expect(user).toBeNull(); + expect(mockEventEmitter.emit).not.toHaveBeenCalled(); + }); + }); + describe('loginWithPopup', () => { let mockUserManager: any; let originalCryptoRandomUUID: any; diff --git a/packages/auth/src/Auth.ts b/packages/auth/src/Auth.ts index f3267cf170..60d5597e2e 100644 --- a/packages/auth/src/Auth.ts +++ b/packages/auth/src/Auth.ts @@ -765,7 +765,12 @@ export class Auth { try { const newOidcUser = await this.userManager.signinSilent(); if (newOidcUser) { - resolve(Auth.mapOidcUserToDomainModel(newOidcUser)); + const user = Auth.mapOidcUserToDomainModel(newOidcUser); + // Emit TOKEN_REFRESHED event so consumers (e.g., auth-nextjs) can sync + // the new tokens to their session. This is critical for refresh token + // rotation - without this, the server-side session may have stale tokens. + this.eventEmitter.emit(AuthEvents.TOKEN_REFRESHED, user); + resolve(user); return; } resolve(null); diff --git a/packages/auth/src/types.ts b/packages/auth/src/types.ts index 72d828bc50..47f954ab75 100644 --- a/packages/auth/src/types.ts +++ b/packages/auth/src/types.ts @@ -140,6 +140,12 @@ export type LoginOptions = { export enum AuthEvents { LOGGED_OUT = 'loggedOut', LOGGED_IN = 'loggedIn', + /** + * Emitted when tokens are refreshed via signinSilent(). + * This is critical for refresh token rotation - when client-side refresh happens, + * the new tokens must be synced to server-side session to prevent race conditions. + */ + TOKEN_REFRESHED = 'tokenRefreshed', } /** @@ -148,4 +154,5 @@ export enum AuthEvents { export interface AuthEventMap extends Record { [AuthEvents.LOGGED_OUT]: []; [AuthEvents.LOGGED_IN]: [User]; + [AuthEvents.TOKEN_REFRESHED]: [User]; } From cf939ae05fb5b7b2d4581375a8e3b020682bfb64 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 9 Jan 2026 15:22:28 +1100 Subject: [PATCH 49/52] reset error --- packages/auth-nextjs/src/config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/auth-nextjs/src/config.ts b/packages/auth-nextjs/src/config.ts index ad157084a4..f25c8642f8 100644 --- a/packages/auth-nextjs/src/config.ts +++ b/packages/auth-nextjs/src/config.ts @@ -170,6 +170,9 @@ export function createAuthConfig(config: ImmutableAuthConfig): NextAuthConfig { } // Handle session update (for client-side token sync) + // When client-side Auth refreshes tokens via TOKEN_REFRESHED event and syncs them here, + // we must clear any stale error (e.g., from a previous server-side refresh failure). + // This matches refreshAccessToken's behavior of setting error: undefined on success. if (trigger === 'update' && sessionUpdate) { const update = sessionUpdate as Record; return { @@ -179,6 +182,8 @@ export function createAuthConfig(config: ImmutableAuthConfig): NextAuthConfig { ...(update.idToken ? { idToken: update.idToken } : {}), ...(update.accessTokenExpires ? { accessTokenExpires: update.accessTokenExpires } : {}), ...(update.zkEvm ? { zkEvm: update.zkEvm } : {}), + // Clear any stale error when valid tokens are synced from client-side + error: undefined, }; } From 3cdbada40263531ae7891ec4059f25731a85ee22 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 9 Jan 2026 16:03:29 +1100 Subject: [PATCH 50/52] clean up --- packages/auth-nextjs/README.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/packages/auth-nextjs/README.md b/packages/auth-nextjs/README.md index 6cf216895e..c5bac77953 100644 --- a/packages/auth-nextjs/README.md +++ b/packages/auth-nextjs/README.md @@ -443,20 +443,3 @@ async function fetchData() { } } ``` - -## Migration from v4 (Pages Router) - -If you're migrating from the Pages Router version: - -| v4 (Pages Router) | v5 (App Router) | -| --------------------------------------- | --------------------------------------------- | -| `ImmutableAuth(config)` | `createImmutableAuth(config)` | -| `getImmutableSession(req, res, config)` | `auth()` (from createImmutableAuth) | -| `withPageAuthRequired(config)` | `createAuthMiddleware(auth)` or layout checks | -| `pages/api/auth/[...nextauth].ts` | `app/api/auth/[...nextauth]/route.ts` | -| `pages/_app.tsx` with provider | `app/layout.tsx` with provider | -| `NEXTAUTH_SECRET` | `AUTH_SECRET` | - -## License - -Apache-2.0 From 613d1831f156ff88fdc5c319712cb23f3d61ec78 Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 9 Jan 2026 16:56:55 +1100 Subject: [PATCH 51/52] add isLoggingIn state --- packages/auth-nextjs/src/client/provider.tsx | 75 +++++++++++--------- packages/auth-nextjs/src/constants.ts | 2 +- packages/auth-nextjs/src/refresh.ts | 2 +- packages/auth-nextjs/src/types.ts | 6 +- 4 files changed, 50 insertions(+), 35 deletions(-) diff --git a/packages/auth-nextjs/src/client/provider.tsx b/packages/auth-nextjs/src/client/provider.tsx index 86bb992b36..4c17d254fa 100644 --- a/packages/auth-nextjs/src/client/provider.tsx +++ b/packages/auth-nextjs/src/client/provider.tsx @@ -295,9 +295,9 @@ export function ImmutableAuthProvider({ * @example * ```tsx * function MyComponent() { - * const { user, isLoading, signIn, signOut } = useImmutableAuth(); + * const { user, isLoading, isLoggingIn, signIn, signOut } = useImmutableAuth(); * - * if (isLoading) return
Loading...
; + * if (isLoading) return
Loading session...
; * * if (user) { * return ( @@ -308,13 +308,18 @@ export function ImmutableAuthProvider({ * ); * } * - * return ; + * return ( + * + * ); * } * ``` */ export function useImmutableAuth(): UseImmutableAuthReturn { const context = useContext(ImmutableAuthContext); const { data: sessionData, status } = useSession(); + const [isLoggingIn, setIsLoggingIn] = useState(false); if (!context) { throw new Error('useImmutableAuth must be used within ImmutableAuthProvider'); @@ -342,38 +347,43 @@ export function useImmutableAuth(): UseImmutableAuthReturn { throw new Error('Auth not initialized'); } - // Open popup login with optional login options - const authUser = await auth.login(options); - if (!authUser) { - throw new Error('Login failed'); - } + setIsLoggingIn(true); + try { + // Open popup login with optional login options + const authUser = await auth.login(options); + if (!authUser) { + throw new Error('Login failed'); + } - // Build token data for NextAuth - const tokenData: ImmutableTokenData = { - accessToken: authUser.accessToken, - refreshToken: authUser.refreshToken, - idToken: authUser.idToken, - accessTokenExpires: getTokenExpiry(authUser.accessToken), - profile: { - sub: authUser.profile.sub, - email: authUser.profile.email, - nickname: authUser.profile.nickname, - }, - zkEvm: authUser.zkEvm, - }; + // Build token data for NextAuth + const tokenData: ImmutableTokenData = { + accessToken: authUser.accessToken, + refreshToken: authUser.refreshToken, + idToken: authUser.idToken, + accessTokenExpires: getTokenExpiry(authUser.accessToken), + profile: { + sub: authUser.profile.sub, + email: authUser.profile.email, + nickname: authUser.profile.nickname, + }, + zkEvm: authUser.zkEvm, + }; - // Sign in to NextAuth with the tokens - const result = await signIn(IMMUTABLE_PROVIDER_ID, { - tokens: JSON.stringify(tokenData), - redirect: false, - }); + // Sign in to NextAuth with the tokens + const result = await signIn(IMMUTABLE_PROVIDER_ID, { + tokens: JSON.stringify(tokenData), + redirect: false, + }); - // signIn with redirect: false returns a result object instead of throwing - if (result?.error) { - throw new Error(`NextAuth sign-in failed: ${result.error}`); - } - if (!result?.ok) { - throw new Error('NextAuth sign-in failed: unknown error'); + // signIn with redirect: false returns a result object instead of throwing + if (result?.error) { + throw new Error(`NextAuth sign-in failed: ${result.error}`); + } + if (!result?.ok) { + throw new Error('NextAuth sign-in failed: unknown error'); + } + } finally { + setIsLoggingIn(false); } }, [auth]); @@ -428,6 +438,7 @@ export function useImmutableAuth(): UseImmutableAuthReturn { user, session, isLoading, + isLoggingIn, isAuthenticated, signIn: handleSignIn, signOut: handleSignOut, diff --git a/packages/auth-nextjs/src/constants.ts b/packages/auth-nextjs/src/constants.ts index af450ce5fe..d9bb941727 100644 --- a/packages/auth-nextjs/src/constants.ts +++ b/packages/auth-nextjs/src/constants.ts @@ -48,4 +48,4 @@ export const TOKEN_EXPIRY_BUFFER_SECONDS = 60; * Default session max age in seconds (30 days) * This is how long the NextAuth session cookie will be valid */ -export const DEFAULT_SESSION_MAX_AGE_SECONDS = 30 * 24 * 60 * 60; +export const DEFAULT_SESSION_MAX_AGE_SECONDS = 365 * 24 * 60 * 60; diff --git a/packages/auth-nextjs/src/refresh.ts b/packages/auth-nextjs/src/refresh.ts index 39acabb017..9fb93bac22 100644 --- a/packages/auth-nextjs/src/refresh.ts +++ b/packages/auth-nextjs/src/refresh.ts @@ -59,7 +59,7 @@ export async function refreshAccessToken( throw new Error('Invalid token response: missing access_token'); } - // Calculate expiry (access_token typically expires in 1 hour) + // Calculate expiry const expiresIn = data.expires_in || DEFAULT_TOKEN_EXPIRY_SECONDS; const accessTokenExpires = Date.now() + expiresIn * 1000; diff --git a/packages/auth-nextjs/src/types.ts b/packages/auth-nextjs/src/types.ts index 0735868590..233eb83e4b 100644 --- a/packages/auth-nextjs/src/types.ts +++ b/packages/auth-nextjs/src/types.ts @@ -185,9 +185,13 @@ export interface UseImmutableAuthReturn { */ session: Session | null; /** - * Whether authentication state is loading + * Whether authentication state is loading (initial session fetch) */ isLoading: boolean; + /** + * Whether a login flow is in progress (popup open, waiting for OAuth callback) + */ + isLoggingIn: boolean; /** * Whether user is authenticated */ From fde7d71990e7299edbf32db0f4460e300db4131c Mon Sep 17 00:00:00 2001 From: Shine Li Date: Fri, 9 Jan 2026 17:11:20 +1100 Subject: [PATCH 52/52] change doc --- packages/auth-nextjs/README.md | 2 +- packages/auth-nextjs/src/config.ts | 2 +- packages/auth-nextjs/src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/auth-nextjs/README.md b/packages/auth-nextjs/README.md index c5bac77953..284bcc5af2 100644 --- a/packages/auth-nextjs/README.md +++ b/packages/auth-nextjs/README.md @@ -368,7 +368,7 @@ export default function Callback() { ## Handling Token Refresh Errors -When a refresh token expires or becomes invalid (e.g., after 30 days of inactivity, or revoked from another session), the session will contain an `error` property. You should handle this gracefully: +When a refresh token expires or becomes invalid (e.g., after 365 days of inactivity, or revoked from another session), the session will contain an `error` property. You should handle this gracefully: ### Server Components diff --git a/packages/auth-nextjs/src/config.ts b/packages/auth-nextjs/src/config.ts index f25c8642f8..6b909681a8 100644 --- a/packages/auth-nextjs/src/config.ts +++ b/packages/auth-nextjs/src/config.ts @@ -219,7 +219,7 @@ export function createAuthConfig(config: ImmutableAuthConfig): NextAuthConfig { session: { strategy: 'jwt', - // Session max age in seconds (30 days default) + // Session max age in seconds (365 days default) maxAge: DEFAULT_SESSION_MAX_AGE_SECONDS, }, }; diff --git a/packages/auth-nextjs/src/constants.ts b/packages/auth-nextjs/src/constants.ts index d9bb941727..a4e367b54a 100644 --- a/packages/auth-nextjs/src/constants.ts +++ b/packages/auth-nextjs/src/constants.ts @@ -45,7 +45,7 @@ export const DEFAULT_TOKEN_EXPIRY_MS = DEFAULT_TOKEN_EXPIRY_SECONDS * 1000; export const TOKEN_EXPIRY_BUFFER_SECONDS = 60; /** - * Default session max age in seconds (30 days) + * Default session max age in seconds (365 days) * This is how long the NextAuth session cookie will be valid */ export const DEFAULT_SESSION_MAX_AGE_SECONDS = 365 * 24 * 60 * 60;