@thunderid/nextjs 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{types/ThunderIDNextClient.d.ts → ThunderIDNextClient.d.ts} +1 -7
- package/dist/ThunderIDNextClient.d.ts.map +1 -0
- package/dist/ThunderIDNextClient.js +161 -0
- package/dist/ThunderIDNextClient.js.map +1 -0
- package/dist/cjs/ThunderIDNextClient.cjs +163 -0
- package/dist/cjs/ThunderIDNextClient.cjs.map +1 -0
- package/dist/cjs/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/cjs/client/components/actions/SignInButton/SignInButton.cjs +79 -0
- package/dist/cjs/client/components/actions/SignInButton/SignInButton.cjs.map +1 -0
- package/dist/cjs/client/components/actions/SignOutButton/SignOutButton.cjs +61 -0
- package/dist/cjs/client/components/actions/SignOutButton/SignOutButton.cjs.map +1 -0
- package/dist/cjs/client/components/actions/SignUpButton/SignUpButton.cjs +91 -0
- package/dist/cjs/client/components/actions/SignUpButton/SignUpButton.cjs.map +1 -0
- package/dist/cjs/client/components/control/SignedIn/SignedIn.cjs +34 -0
- package/dist/cjs/client/components/control/SignedIn/SignedIn.cjs.map +1 -0
- package/dist/cjs/client/components/control/SignedOut/SignedOut.cjs +34 -0
- package/dist/cjs/client/components/control/SignedOut/SignedOut.cjs.map +1 -0
- package/dist/cjs/client/components/presentation/SignIn/SignIn.cjs +37 -0
- package/dist/cjs/client/components/presentation/SignIn/SignIn.cjs.map +1 -0
- package/dist/cjs/client/components/presentation/SignUp/SignUp.cjs +79 -0
- package/dist/cjs/client/components/presentation/SignUp/SignUp.cjs.map +1 -0
- package/dist/cjs/client/components/presentation/User/User.cjs +49 -0
- package/dist/cjs/client/components/presentation/User/User.cjs.map +1 -0
- package/dist/cjs/client/components/presentation/UserDropdown/UserDropdown.cjs +114 -0
- package/dist/cjs/client/components/presentation/UserDropdown/UserDropdown.cjs.map +1 -0
- package/dist/cjs/client/components/presentation/UserProfile/UserProfile.cjs +52 -0
- package/dist/cjs/client/components/presentation/UserProfile/UserProfile.cjs.map +1 -0
- package/dist/cjs/client/contexts/ThunderID/ThunderIDContext.cjs +34 -0
- package/dist/cjs/client/contexts/ThunderID/ThunderIDContext.cjs.map +1 -0
- package/dist/cjs/client/contexts/ThunderID/ThunderIDProvider.cjs +165 -0
- package/dist/cjs/client/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -0
- package/dist/cjs/client/contexts/ThunderID/useThunderID.cjs +19 -0
- package/dist/cjs/client/contexts/ThunderID/useThunderID.cjs.map +1 -0
- package/dist/cjs/client/index.cjs +11 -0
- package/dist/cjs/constants/sessionConstants.cjs +55 -0
- package/dist/cjs/constants/sessionConstants.cjs.map +1 -0
- package/dist/cjs/index.cjs +35 -990
- package/dist/cjs/server/ThunderIDProvider.cjs +114 -0
- package/dist/cjs/server/ThunderIDProvider.cjs.map +1 -0
- package/dist/cjs/server/actions/clearSession.cjs +41 -0
- package/dist/cjs/server/actions/clearSession.cjs.map +1 -0
- package/dist/cjs/server/actions/getAccessToken.cjs +27 -0
- package/dist/cjs/server/actions/getAccessToken.cjs.map +1 -0
- package/dist/cjs/server/actions/getClientOrigin.cjs +18 -0
- package/dist/cjs/server/actions/getClientOrigin.cjs.map +1 -0
- package/dist/cjs/server/actions/getSessionId.cjs +28 -0
- package/dist/cjs/server/actions/getSessionId.cjs.map +1 -0
- package/dist/cjs/server/actions/getSessionPayload.cjs +29 -0
- package/dist/cjs/server/actions/getSessionPayload.cjs.map +1 -0
- package/dist/cjs/server/actions/getUserAction.cjs +30 -0
- package/dist/cjs/server/actions/getUserAction.cjs.map +1 -0
- package/dist/cjs/server/actions/getUserProfileAction.cjs +34 -0
- package/dist/cjs/server/actions/getUserProfileAction.cjs.map +1 -0
- package/dist/cjs/server/actions/handleOAuthCallbackAction.cjs +89 -0
- package/dist/cjs/server/actions/handleOAuthCallbackAction.cjs.map +1 -0
- package/dist/cjs/server/actions/isSignedIn.cjs +40 -0
- package/dist/cjs/server/actions/isSignedIn.cjs.map +1 -0
- package/dist/cjs/server/actions/refreshToken.cjs +61 -0
- package/dist/cjs/server/actions/refreshToken.cjs.map +1 -0
- package/dist/cjs/server/actions/signInAction.cjs +95 -0
- package/dist/cjs/server/actions/signInAction.cjs.map +1 -0
- package/dist/cjs/server/actions/signOutAction.cjs +57 -0
- package/dist/cjs/server/actions/signOutAction.cjs.map +1 -0
- package/dist/cjs/server/actions/signUpAction.cjs +27 -0
- package/dist/cjs/server/actions/signUpAction.cjs.map +1 -0
- package/dist/cjs/server/actions/updateUserProfileAction.cjs +30 -0
- package/dist/cjs/server/actions/updateUserProfileAction.cjs.map +1 -0
- package/dist/cjs/server/getClient.cjs +19 -0
- package/dist/cjs/server/getClient.cjs.map +1 -0
- package/dist/cjs/server/index.cjs +9 -0
- package/dist/cjs/server/proxy/createRouteMatcher.cjs +36 -0
- package/dist/cjs/server/proxy/createRouteMatcher.cjs.map +1 -0
- package/dist/cjs/server/proxy/thunderIDProxy.cjs +182 -0
- package/dist/cjs/server/proxy/thunderIDProxy.cjs.map +1 -0
- package/dist/cjs/server/thunderid.cjs +27 -0
- package/dist/cjs/server/thunderid.cjs.map +1 -0
- package/dist/cjs/utils/SessionManager.cjs +150 -0
- package/dist/cjs/utils/SessionManager.cjs.map +1 -0
- package/dist/cjs/utils/decorateConfigWithNextEnv.cjs +28 -0
- package/dist/cjs/utils/decorateConfigWithNextEnv.cjs.map +1 -0
- package/dist/cjs/utils/handleRefreshToken.cjs +62 -0
- package/dist/cjs/utils/handleRefreshToken.cjs.map +1 -0
- package/dist/cjs/utils/logger.cjs +11 -0
- package/dist/cjs/utils/logger.cjs.map +1 -0
- package/dist/cjs/utils/sessionUtils.cjs +40 -0
- package/dist/cjs/utils/sessionUtils.cjs.map +1 -0
- package/dist/client/components/actions/SignInButton/SignInButton.d.ts.map +1 -0
- package/dist/client/components/actions/SignInButton/SignInButton.js +73 -0
- package/dist/client/components/actions/SignInButton/SignInButton.js.map +1 -0
- package/dist/client/components/actions/SignOutButton/SignOutButton.d.ts.map +1 -0
- package/dist/client/components/actions/SignOutButton/SignOutButton.js +57 -0
- package/dist/client/components/actions/SignOutButton/SignOutButton.js.map +1 -0
- package/dist/client/components/actions/SignUpButton/SignUpButton.d.ts.map +1 -0
- package/dist/client/components/actions/SignUpButton/SignUpButton.js +85 -0
- package/dist/client/components/actions/SignUpButton/SignUpButton.js.map +1 -0
- package/dist/client/components/control/Loading/Loading.d.ts.map +1 -0
- package/dist/client/components/control/SignedIn/SignedIn.d.ts.map +1 -0
- package/dist/client/components/control/SignedIn/SignedIn.js +32 -0
- package/dist/client/components/control/SignedIn/SignedIn.js.map +1 -0
- package/dist/client/components/control/SignedOut/SignedOut.d.ts.map +1 -0
- package/dist/client/components/control/SignedOut/SignedOut.js +32 -0
- package/dist/client/components/control/SignedOut/SignedOut.js.map +1 -0
- package/dist/client/components/presentation/SignIn/SignIn.d.ts.map +1 -0
- package/dist/client/components/presentation/SignIn/SignIn.js +33 -0
- package/dist/client/components/presentation/SignIn/SignIn.js.map +1 -0
- package/dist/client/components/presentation/SignUp/SignUp.d.ts.map +1 -0
- package/dist/client/components/presentation/SignUp/SignUp.js +75 -0
- package/dist/client/components/presentation/SignUp/SignUp.js.map +1 -0
- package/dist/client/components/presentation/User/User.d.ts.map +1 -0
- package/dist/client/components/presentation/User/User.js +46 -0
- package/dist/client/components/presentation/User/User.js.map +1 -0
- package/dist/client/components/presentation/UserDropdown/UserDropdown.d.ts.map +1 -0
- package/dist/client/components/presentation/UserDropdown/UserDropdown.js +110 -0
- package/dist/client/components/presentation/UserDropdown/UserDropdown.js.map +1 -0
- package/dist/client/components/presentation/UserProfile/UserProfile.d.ts.map +1 -0
- package/dist/client/components/presentation/UserProfile/UserProfile.js +49 -0
- package/dist/client/components/presentation/UserProfile/UserProfile.js.map +1 -0
- package/dist/client/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -0
- package/dist/client/contexts/ThunderID/ThunderIDContext.js +32 -0
- package/dist/client/contexts/ThunderID/ThunderIDContext.js.map +1 -0
- package/dist/{types/client → client}/contexts/ThunderID/ThunderIDProvider.d.ts +1 -8
- package/dist/client/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -0
- package/dist/client/contexts/ThunderID/ThunderIDProvider.js +159 -0
- package/dist/client/contexts/ThunderID/ThunderIDProvider.js.map +1 -0
- package/dist/client/contexts/ThunderID/useThunderID.d.ts.map +1 -0
- package/dist/client/contexts/ThunderID/useThunderID.js +17 -0
- package/dist/client/contexts/ThunderID/useThunderID.js.map +1 -0
- package/dist/{types/client → client}/index.d.ts +2 -10
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +13 -0
- package/dist/configs/InternalAuthAPIRoutesConfig.d.ts.map +1 -0
- package/dist/constants/sessionConstants.d.ts.map +1 -0
- package/dist/constants/sessionConstants.js +53 -0
- package/dist/constants/sessionConstants.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -934
- package/dist/models/api.d.ts.map +1 -0
- package/dist/models/config.d.ts.map +1 -0
- package/dist/server/ThunderIDProvider.d.ts.map +1 -0
- package/dist/server/ThunderIDProvider.js +111 -0
- package/dist/server/ThunderIDProvider.js.map +1 -0
- package/dist/server/actions/clearSession.d.ts.map +1 -0
- package/dist/server/actions/clearSession.js +39 -0
- package/dist/server/actions/clearSession.js.map +1 -0
- package/dist/server/actions/getAccessToken.d.ts.map +1 -0
- package/dist/{getAccessToken-oRxArjVC.js → server/actions/getAccessToken.js} +8 -5
- package/dist/server/actions/getAccessToken.js.map +1 -0
- package/dist/server/actions/getClientOrigin.d.ts.map +1 -0
- package/dist/server/actions/getClientOrigin.js +16 -0
- package/dist/server/actions/getClientOrigin.js.map +1 -0
- package/dist/server/actions/getSessionId.d.ts.map +1 -0
- package/dist/{getSessionId-_7hj8QSX.js → server/actions/getSessionId.js} +8 -5
- package/dist/server/actions/getSessionId.js.map +1 -0
- package/dist/server/actions/getSessionPayload.d.ts.map +1 -0
- package/dist/server/actions/getSessionPayload.js +27 -0
- package/dist/server/actions/getSessionPayload.js.map +1 -0
- package/dist/server/actions/getUserAction.d.ts.map +1 -0
- package/dist/server/actions/getUserAction.js +30 -0
- package/dist/server/actions/getUserAction.js.map +1 -0
- package/dist/server/actions/getUserProfileAction.d.ts.map +1 -0
- package/dist/server/actions/getUserProfileAction.js +34 -0
- package/dist/server/actions/getUserProfileAction.js.map +1 -0
- package/dist/server/actions/handleOAuthCallbackAction.d.ts.map +1 -0
- package/dist/server/actions/handleOAuthCallbackAction.js +87 -0
- package/dist/server/actions/handleOAuthCallbackAction.js.map +1 -0
- package/dist/server/actions/isSignedIn.d.ts.map +1 -0
- package/dist/server/actions/isSignedIn.js +40 -0
- package/dist/server/actions/isSignedIn.js.map +1 -0
- package/dist/server/actions/refreshToken.d.ts.map +1 -0
- package/dist/server/actions/refreshToken.js +58 -0
- package/dist/server/actions/refreshToken.js.map +1 -0
- package/dist/server/actions/signInAction.d.ts.map +1 -0
- package/dist/server/actions/signInAction.js +92 -0
- package/dist/server/actions/signInAction.js.map +1 -0
- package/dist/server/actions/signOutAction.d.ts.map +1 -0
- package/dist/server/actions/signOutAction.js +55 -0
- package/dist/server/actions/signOutAction.js.map +1 -0
- package/dist/server/actions/signUpAction.d.ts.map +1 -0
- package/dist/server/actions/signUpAction.js +27 -0
- package/dist/server/actions/signUpAction.js.map +1 -0
- package/dist/server/actions/updateUserProfileAction.d.ts.map +1 -0
- package/dist/server/actions/updateUserProfileAction.js +30 -0
- package/dist/server/actions/updateUserProfileAction.js.map +1 -0
- package/dist/server/getClient.d.ts.map +1 -0
- package/dist/server/getClient.js +19 -0
- package/dist/server/getClient.js.map +1 -0
- package/dist/{types/server → server}/index.d.ts +3 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +6 -0
- package/dist/server/proxy/createRouteMatcher.d.ts.map +1 -0
- package/dist/server/proxy/createRouteMatcher.js +35 -0
- package/dist/server/proxy/createRouteMatcher.js.map +1 -0
- package/dist/{types/server/middleware/thunderIDMiddleware.d.ts → server/proxy/thunderIDProxy.d.ts} +13 -13
- package/dist/server/proxy/thunderIDProxy.d.ts.map +1 -0
- package/dist/server/proxy/thunderIDProxy.js +180 -0
- package/dist/server/proxy/thunderIDProxy.js.map +1 -0
- package/dist/server/thunderid.d.ts.map +1 -0
- package/dist/server/thunderid.js +27 -0
- package/dist/server/thunderid.js.map +1 -0
- package/dist/utils/SessionManager.d.ts.map +1 -0
- package/dist/utils/SessionManager.js +147 -0
- package/dist/utils/SessionManager.js.map +1 -0
- package/dist/utils/createRouteMatcher.d.ts.map +1 -0
- package/dist/utils/decorateConfigWithNextEnv.d.ts.map +1 -0
- package/dist/utils/decorateConfigWithNextEnv.js +27 -0
- package/dist/utils/decorateConfigWithNextEnv.js.map +1 -0
- package/dist/utils/handleRefreshToken.d.ts.map +1 -0
- package/dist/utils/handleRefreshToken.js +62 -0
- package/dist/utils/handleRefreshToken.js.map +1 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +9 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/sessionUtils.d.ts.map +1 -0
- package/dist/utils/sessionUtils.js +39 -0
- package/dist/utils/sessionUtils.js.map +1 -0
- package/package.json +6 -16
- package/dist/SessionManager-BvmZ19QF.js +0 -1384
- package/dist/cache-DOmEIb7_.js +0 -6329
- package/dist/cjs/SessionManager-x03qrCM_.js +0 -1397
- package/dist/cjs/cache-Bw8u7jYk.js +0 -6332
- package/dist/cjs/dynamic-rendering-DY0EUx64.js +0 -1510
- package/dist/cjs/getAccessToken-eJk739AD.js +0 -22
- package/dist/cjs/getSessionId-BXqdO0BZ.js +0 -28
- package/dist/cjs/getSessionId-j-ERy_WP.js +0 -5
- package/dist/cjs/index2.cjs +0 -8
- package/dist/cjs/middleware.cjs +0 -5151
- package/dist/cjs/segment-CViTHaAn.js +0 -52
- package/dist/cjs/server-ABSmm73r.js +0 -2426
- package/dist/dynamic-rendering-CXn-s32e.js +0 -1429
- package/dist/getSessionId-6IipYdCB.js +0 -5
- package/dist/index2.js +0 -7
- package/dist/middleware.js +0 -5152
- package/dist/segment-DRUZ6e3T.js +0 -47
- package/dist/server-BUNp5d6D.js +0 -2376
- package/dist/types/ThunderIDNextClient.d.ts.map +0 -1
- package/dist/types/client/components/actions/SignInButton/SignInButton.d.ts.map +0 -1
- package/dist/types/client/components/actions/SignOutButton/SignOutButton.d.ts.map +0 -1
- package/dist/types/client/components/actions/SignUpButton/SignUpButton.d.ts.map +0 -1
- package/dist/types/client/components/control/Loading/Loading.d.ts.map +0 -1
- package/dist/types/client/components/control/SignedIn/SignedIn.d.ts.map +0 -1
- package/dist/types/client/components/control/SignedOut/SignedOut.d.ts.map +0 -1
- package/dist/types/client/components/presentation/CreateOrganization/CreateOrganization.d.ts +0 -68
- package/dist/types/client/components/presentation/CreateOrganization/CreateOrganization.d.ts.map +0 -1
- package/dist/types/client/components/presentation/Organization/Organization.d.ts +0 -67
- package/dist/types/client/components/presentation/Organization/Organization.d.ts.map +0 -1
- package/dist/types/client/components/presentation/OrganizationList/OrganizationList.d.ts +0 -93
- package/dist/types/client/components/presentation/OrganizationList/OrganizationList.d.ts.map +0 -1
- package/dist/types/client/components/presentation/OrganizationProfile/OrganizationProfile.d.ts +0 -120
- package/dist/types/client/components/presentation/OrganizationProfile/OrganizationProfile.d.ts.map +0 -1
- package/dist/types/client/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts +0 -72
- package/dist/types/client/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts.map +0 -1
- package/dist/types/client/components/presentation/SignIn/SignIn.d.ts.map +0 -1
- package/dist/types/client/components/presentation/SignUp/SignUp.d.ts.map +0 -1
- package/dist/types/client/components/presentation/User/User.d.ts.map +0 -1
- package/dist/types/client/components/presentation/UserDropdown/UserDropdown.d.ts.map +0 -1
- package/dist/types/client/components/presentation/UserProfile/UserProfile.d.ts.map +0 -1
- package/dist/types/client/contexts/ThunderID/ThunderIDContext.d.ts.map +0 -1
- package/dist/types/client/contexts/ThunderID/ThunderIDProvider.d.ts.map +0 -1
- package/dist/types/client/contexts/ThunderID/useThunderID.d.ts.map +0 -1
- package/dist/types/client/index.d.ts.map +0 -1
- package/dist/types/configs/InternalAuthAPIRoutesConfig.d.ts.map +0 -1
- package/dist/types/constants/sessionConstants.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/middleware.d.ts +0 -35
- package/dist/types/middleware.d.ts.map +0 -1
- package/dist/types/models/api.d.ts.map +0 -1
- package/dist/types/models/config.d.ts.map +0 -1
- package/dist/types/server/ThunderIDProvider.d.ts.map +0 -1
- package/dist/types/server/actions/clearSession.d.ts.map +0 -1
- package/dist/types/server/actions/createOrganization.d.ts +0 -24
- package/dist/types/server/actions/createOrganization.d.ts.map +0 -1
- package/dist/types/server/actions/getAccessToken.d.ts.map +0 -1
- package/dist/types/server/actions/getAllOrganizations.d.ts +0 -24
- package/dist/types/server/actions/getAllOrganizations.d.ts.map +0 -1
- package/dist/types/server/actions/getBrandingPreference.d.ts +0 -24
- package/dist/types/server/actions/getBrandingPreference.d.ts.map +0 -1
- package/dist/types/server/actions/getClientOrigin.d.ts.map +0 -1
- package/dist/types/server/actions/getCurrentOrganizationAction.d.ts +0 -31
- package/dist/types/server/actions/getCurrentOrganizationAction.d.ts.map +0 -1
- package/dist/types/server/actions/getMyOrganizations.d.ts +0 -24
- package/dist/types/server/actions/getMyOrganizations.d.ts.map +0 -1
- package/dist/types/server/actions/getOrganizationAction.d.ts +0 -31
- package/dist/types/server/actions/getOrganizationAction.d.ts.map +0 -1
- package/dist/types/server/actions/getSessionId.d.ts.map +0 -1
- package/dist/types/server/actions/getSessionPayload.d.ts.map +0 -1
- package/dist/types/server/actions/getUserAction.d.ts.map +0 -1
- package/dist/types/server/actions/getUserProfileAction.d.ts.map +0 -1
- package/dist/types/server/actions/handleOAuthCallbackAction.d.ts.map +0 -1
- package/dist/types/server/actions/isSignedIn.d.ts.map +0 -1
- package/dist/types/server/actions/refreshToken.d.ts.map +0 -1
- package/dist/types/server/actions/signInAction.d.ts.map +0 -1
- package/dist/types/server/actions/signOutAction.d.ts.map +0 -1
- package/dist/types/server/actions/signUpAction.d.ts.map +0 -1
- package/dist/types/server/actions/switchOrganization.d.ts +0 -24
- package/dist/types/server/actions/switchOrganization.d.ts.map +0 -1
- package/dist/types/server/actions/updateUserProfileAction.d.ts.map +0 -1
- package/dist/types/server/getClient.d.ts.map +0 -1
- package/dist/types/server/index.d.ts.map +0 -1
- package/dist/types/server/middleware/createRouteMatcher.d.ts.map +0 -1
- package/dist/types/server/middleware/thunderIDMiddleware.d.ts.map +0 -1
- package/dist/types/server/thunderid.d.ts.map +0 -1
- package/dist/types/utils/SessionManager.d.ts.map +0 -1
- package/dist/types/utils/createRouteMatcher.d.ts.map +0 -1
- package/dist/types/utils/decorateConfigWithNextEnv.d.ts.map +0 -1
- package/dist/types/utils/handleRefreshToken.d.ts.map +0 -1
- package/dist/types/utils/logger.d.ts.map +0 -1
- package/dist/types/utils/sessionUtils.d.ts.map +0 -1
- /package/dist/{types/client → client}/components/actions/SignInButton/SignInButton.d.ts +0 -0
- /package/dist/{types/client → client}/components/actions/SignOutButton/SignOutButton.d.ts +0 -0
- /package/dist/{types/client → client}/components/actions/SignUpButton/SignUpButton.d.ts +0 -0
- /package/dist/{types/client → client}/components/control/Loading/Loading.d.ts +0 -0
- /package/dist/{types/client → client}/components/control/SignedIn/SignedIn.d.ts +0 -0
- /package/dist/{types/client → client}/components/control/SignedOut/SignedOut.d.ts +0 -0
- /package/dist/{types/client → client}/components/presentation/SignIn/SignIn.d.ts +0 -0
- /package/dist/{types/client → client}/components/presentation/SignUp/SignUp.d.ts +0 -0
- /package/dist/{types/client → client}/components/presentation/User/User.d.ts +0 -0
- /package/dist/{types/client → client}/components/presentation/UserDropdown/UserDropdown.d.ts +0 -0
- /package/dist/{types/client → client}/components/presentation/UserProfile/UserProfile.d.ts +0 -0
- /package/dist/{types/client → client}/contexts/ThunderID/ThunderIDContext.d.ts +0 -0
- /package/dist/{types/client → client}/contexts/ThunderID/useThunderID.d.ts +0 -0
- /package/dist/{types/configs → configs}/InternalAuthAPIRoutesConfig.d.ts +0 -0
- /package/dist/{types/constants → constants}/sessionConstants.d.ts +0 -0
- /package/dist/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/{types/models → models}/api.d.ts +0 -0
- /package/dist/{types/models → models}/config.d.ts +0 -0
- /package/dist/{types/server → server}/ThunderIDProvider.d.ts +0 -0
- /package/dist/{types/server → server}/actions/clearSession.d.ts +0 -0
- /package/dist/{types/server → server}/actions/getAccessToken.d.ts +0 -0
- /package/dist/{types/server → server}/actions/getClientOrigin.d.ts +0 -0
- /package/dist/{types/server → server}/actions/getSessionId.d.ts +0 -0
- /package/dist/{types/server → server}/actions/getSessionPayload.d.ts +0 -0
- /package/dist/{types/server → server}/actions/getUserAction.d.ts +0 -0
- /package/dist/{types/server → server}/actions/getUserProfileAction.d.ts +0 -0
- /package/dist/{types/server → server}/actions/handleOAuthCallbackAction.d.ts +0 -0
- /package/dist/{types/server → server}/actions/isSignedIn.d.ts +0 -0
- /package/dist/{types/server → server}/actions/refreshToken.d.ts +0 -0
- /package/dist/{types/server → server}/actions/signInAction.d.ts +0 -0
- /package/dist/{types/server → server}/actions/signOutAction.d.ts +0 -0
- /package/dist/{types/server → server}/actions/signUpAction.d.ts +0 -0
- /package/dist/{types/server → server}/actions/updateUserProfileAction.d.ts +0 -0
- /package/dist/{types/server → server}/getClient.d.ts +0 -0
- /package/dist/{types/server/middleware → server/proxy}/createRouteMatcher.d.ts +0 -0
- /package/dist/{types/server → server}/thunderid.d.ts +0 -0
- /package/dist/{types/utils → utils}/SessionManager.d.ts +0 -0
- /package/dist/{types/utils → utils}/createRouteMatcher.d.ts +0 -0
- /package/dist/{types/utils → utils}/decorateConfigWithNextEnv.d.ts +0 -0
- /package/dist/{types/utils → utils}/handleRefreshToken.d.ts +0 -0
- /package/dist/{types/utils → utils}/logger.d.ts +0 -0
- /package/dist/{types/utils → utils}/sessionUtils.d.ts +0 -0
|
@@ -1,1397 +0,0 @@
|
|
|
1
|
-
const require_dynamic_rendering$1 = require('./dynamic-rendering-DY0EUx64.js');
|
|
2
|
-
let __thunderid_node = require("@thunderid/node");
|
|
3
|
-
__thunderid_node = require_dynamic_rendering$1.__toESM(__thunderid_node);
|
|
4
|
-
let jose = require("jose");
|
|
5
|
-
jose = require_dynamic_rendering$1.__toESM(jose);
|
|
6
|
-
|
|
7
|
-
//#region ../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/web/spec-extension/adapters/reflect.js
|
|
8
|
-
var require_reflect = /* @__PURE__ */ require_dynamic_rendering$1.__commonJS({ "../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/web/spec-extension/adapters/reflect.js": ((exports) => {
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
Object.defineProperty(exports, "ReflectAdapter", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function() {
|
|
13
|
-
return ReflectAdapter;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
var ReflectAdapter = class {
|
|
17
|
-
static get(target, prop, receiver) {
|
|
18
|
-
const value = Reflect.get(target, prop, receiver);
|
|
19
|
-
if (typeof value === "function") return value.bind(target);
|
|
20
|
-
return value;
|
|
21
|
-
}
|
|
22
|
-
static set(target, prop, value, receiver) {
|
|
23
|
-
return Reflect.set(target, prop, value, receiver);
|
|
24
|
-
}
|
|
25
|
-
static has(target, prop) {
|
|
26
|
-
return Reflect.has(target, prop);
|
|
27
|
-
}
|
|
28
|
-
static deleteProperty(target, prop) {
|
|
29
|
-
return Reflect.deleteProperty(target, prop);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
}) });
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region ../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js
|
|
36
|
-
var require_request_cookies = /* @__PURE__ */ require_dynamic_rendering$1.__commonJS({ "../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js": ((exports) => {
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
function _export$2(target, all) {
|
|
39
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
40
|
-
enumerable: true,
|
|
41
|
-
get: all[name]
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
_export$2(exports, {
|
|
45
|
-
MutableRequestCookiesAdapter: function() {
|
|
46
|
-
return MutableRequestCookiesAdapter;
|
|
47
|
-
},
|
|
48
|
-
ReadonlyRequestCookiesError: function() {
|
|
49
|
-
return ReadonlyRequestCookiesError;
|
|
50
|
-
},
|
|
51
|
-
RequestCookiesAdapter: function() {
|
|
52
|
-
return RequestCookiesAdapter;
|
|
53
|
-
},
|
|
54
|
-
appendMutableCookies: function() {
|
|
55
|
-
return appendMutableCookies;
|
|
56
|
-
},
|
|
57
|
-
areCookiesMutableInCurrentPhase: function() {
|
|
58
|
-
return areCookiesMutableInCurrentPhase;
|
|
59
|
-
},
|
|
60
|
-
createCookiesWithMutableAccessCheck: function() {
|
|
61
|
-
return createCookiesWithMutableAccessCheck;
|
|
62
|
-
},
|
|
63
|
-
getModifiedCookieValues: function() {
|
|
64
|
-
return getModifiedCookieValues;
|
|
65
|
-
},
|
|
66
|
-
responseCookiesToRequestCookies: function() {
|
|
67
|
-
return responseCookiesToRequestCookies;
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
const _cookies$1 = require_dynamic_rendering$1.require_cookies();
|
|
71
|
-
const _reflect$4 = require_reflect();
|
|
72
|
-
const _workasyncstorageexternal$3 = require_dynamic_rendering$1.require_work_async_storage_external();
|
|
73
|
-
var ReadonlyRequestCookiesError = class ReadonlyRequestCookiesError extends Error {
|
|
74
|
-
constructor() {
|
|
75
|
-
super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options");
|
|
76
|
-
}
|
|
77
|
-
static callable() {
|
|
78
|
-
throw new ReadonlyRequestCookiesError();
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
var RequestCookiesAdapter = class {
|
|
82
|
-
static seal(cookies$1) {
|
|
83
|
-
return new Proxy(cookies$1, { get(target, prop, receiver) {
|
|
84
|
-
switch (prop) {
|
|
85
|
-
case "clear":
|
|
86
|
-
case "delete":
|
|
87
|
-
case "set": return ReadonlyRequestCookiesError.callable;
|
|
88
|
-
default: return _reflect$4.ReflectAdapter.get(target, prop, receiver);
|
|
89
|
-
}
|
|
90
|
-
} });
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for("next.mutated.cookies");
|
|
94
|
-
function getModifiedCookieValues(cookies$1) {
|
|
95
|
-
const modified = cookies$1[SYMBOL_MODIFY_COOKIE_VALUES];
|
|
96
|
-
if (!modified || !Array.isArray(modified) || modified.length === 0) return [];
|
|
97
|
-
return modified;
|
|
98
|
-
}
|
|
99
|
-
function appendMutableCookies(headers$1, mutableCookies) {
|
|
100
|
-
const modifiedCookieValues = getModifiedCookieValues(mutableCookies);
|
|
101
|
-
if (modifiedCookieValues.length === 0) return false;
|
|
102
|
-
const resCookies = new _cookies$1.ResponseCookies(headers$1);
|
|
103
|
-
const returnedCookies = resCookies.getAll();
|
|
104
|
-
for (const cookie of modifiedCookieValues) resCookies.set(cookie);
|
|
105
|
-
for (const cookie of returnedCookies) resCookies.set(cookie);
|
|
106
|
-
return true;
|
|
107
|
-
}
|
|
108
|
-
var MutableRequestCookiesAdapter = class {
|
|
109
|
-
static wrap(cookies$1, onUpdateCookies) {
|
|
110
|
-
const responseCookies = new _cookies$1.ResponseCookies(new Headers());
|
|
111
|
-
for (const cookie of cookies$1.getAll()) responseCookies.set(cookie);
|
|
112
|
-
let modifiedValues = [];
|
|
113
|
-
const modifiedCookies = /* @__PURE__ */ new Set();
|
|
114
|
-
const updateResponseCookies = () => {
|
|
115
|
-
const workStore = _workasyncstorageexternal$3.workAsyncStorage.getStore();
|
|
116
|
-
if (workStore) workStore.pathWasRevalidated = true;
|
|
117
|
-
modifiedValues = responseCookies.getAll().filter((c) => modifiedCookies.has(c.name));
|
|
118
|
-
if (onUpdateCookies) {
|
|
119
|
-
const serializedCookies = [];
|
|
120
|
-
for (const cookie of modifiedValues) {
|
|
121
|
-
const tempCookies = new _cookies$1.ResponseCookies(new Headers());
|
|
122
|
-
tempCookies.set(cookie);
|
|
123
|
-
serializedCookies.push(tempCookies.toString());
|
|
124
|
-
}
|
|
125
|
-
onUpdateCookies(serializedCookies);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
const wrappedCookies = new Proxy(responseCookies, { get(target, prop, receiver) {
|
|
129
|
-
switch (prop) {
|
|
130
|
-
case SYMBOL_MODIFY_COOKIE_VALUES: return modifiedValues;
|
|
131
|
-
case "delete": return function(...args) {
|
|
132
|
-
modifiedCookies.add(typeof args[0] === "string" ? args[0] : args[0].name);
|
|
133
|
-
try {
|
|
134
|
-
target.delete(...args);
|
|
135
|
-
return wrappedCookies;
|
|
136
|
-
} finally {
|
|
137
|
-
updateResponseCookies();
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
case "set": return function(...args) {
|
|
141
|
-
modifiedCookies.add(typeof args[0] === "string" ? args[0] : args[0].name);
|
|
142
|
-
try {
|
|
143
|
-
target.set(...args);
|
|
144
|
-
return wrappedCookies;
|
|
145
|
-
} finally {
|
|
146
|
-
updateResponseCookies();
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
default: return _reflect$4.ReflectAdapter.get(target, prop, receiver);
|
|
150
|
-
}
|
|
151
|
-
} });
|
|
152
|
-
return wrappedCookies;
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
function createCookiesWithMutableAccessCheck(requestStore) {
|
|
156
|
-
const wrappedCookies = new Proxy(requestStore.mutableCookies, { get(target, prop, receiver) {
|
|
157
|
-
switch (prop) {
|
|
158
|
-
case "delete": return function(...args) {
|
|
159
|
-
ensureCookiesAreStillMutable(requestStore, "cookies().delete");
|
|
160
|
-
target.delete(...args);
|
|
161
|
-
return wrappedCookies;
|
|
162
|
-
};
|
|
163
|
-
case "set": return function(...args) {
|
|
164
|
-
ensureCookiesAreStillMutable(requestStore, "cookies().set");
|
|
165
|
-
target.set(...args);
|
|
166
|
-
return wrappedCookies;
|
|
167
|
-
};
|
|
168
|
-
default: return _reflect$4.ReflectAdapter.get(target, prop, receiver);
|
|
169
|
-
}
|
|
170
|
-
} });
|
|
171
|
-
return wrappedCookies;
|
|
172
|
-
}
|
|
173
|
-
function areCookiesMutableInCurrentPhase(requestStore) {
|
|
174
|
-
return requestStore.phase === "action";
|
|
175
|
-
}
|
|
176
|
-
/** Ensure that cookies() starts throwing on mutation
|
|
177
|
-
* if we changed phases and can no longer mutate.
|
|
178
|
-
*
|
|
179
|
-
* This can happen when going:
|
|
180
|
-
* 'render' -> 'after'
|
|
181
|
-
* 'action' -> 'render'
|
|
182
|
-
* */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) {
|
|
183
|
-
if (!areCookiesMutableInCurrentPhase(requestStore)) throw new ReadonlyRequestCookiesError();
|
|
184
|
-
}
|
|
185
|
-
function responseCookiesToRequestCookies(responseCookies) {
|
|
186
|
-
const requestCookies = new _cookies$1.RequestCookies(new Headers());
|
|
187
|
-
for (const cookie of responseCookies.getAll()) requestCookies.set(cookie);
|
|
188
|
-
return requestCookies;
|
|
189
|
-
}
|
|
190
|
-
}) });
|
|
191
|
-
|
|
192
|
-
//#endregion
|
|
193
|
-
//#region ../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/create-deduped-by-callsite-server-error-logger.js
|
|
194
|
-
var require_create_deduped_by_callsite_server_error_logger = /* @__PURE__ */ require_dynamic_rendering$1.__commonJS({ "../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/create-deduped-by-callsite-server-error-logger.js": ((exports) => {
|
|
195
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
196
|
-
Object.defineProperty(exports, "createDedupedByCallsiteServerErrorLoggerDev", {
|
|
197
|
-
enumerable: true,
|
|
198
|
-
get: function() {
|
|
199
|
-
return createDedupedByCallsiteServerErrorLoggerDev;
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
const _react = /* @__PURE__ */ _interop_require_wildcard(require("react"));
|
|
203
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
204
|
-
if (typeof WeakMap !== "function") return null;
|
|
205
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
206
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
207
|
-
return (_getRequireWildcardCache = function(nodeInterop$1) {
|
|
208
|
-
return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop;
|
|
209
|
-
})(nodeInterop);
|
|
210
|
-
}
|
|
211
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
212
|
-
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
213
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
|
|
214
|
-
var cache$1 = _getRequireWildcardCache(nodeInterop);
|
|
215
|
-
if (cache$1 && cache$1.has(obj)) return cache$1.get(obj);
|
|
216
|
-
var newObj = { __proto__: null };
|
|
217
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
218
|
-
for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
219
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
220
|
-
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
221
|
-
else newObj[key] = obj[key];
|
|
222
|
-
}
|
|
223
|
-
newObj.default = obj;
|
|
224
|
-
if (cache$1) cache$1.set(obj, newObj);
|
|
225
|
-
return newObj;
|
|
226
|
-
}
|
|
227
|
-
const errorRef = { current: null };
|
|
228
|
-
const cache = typeof _react.cache === "function" ? _react.cache : (fn) => fn;
|
|
229
|
-
const logErrorOrWarn = process.env.__NEXT_CACHE_COMPONENTS ? console.error : console.warn;
|
|
230
|
-
const flushCurrentErrorIfNew = cache((key) => {
|
|
231
|
-
try {
|
|
232
|
-
logErrorOrWarn(errorRef.current);
|
|
233
|
-
} finally {
|
|
234
|
-
errorRef.current = null;
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
function createDedupedByCallsiteServerErrorLoggerDev(getMessage) {
|
|
238
|
-
return function logDedupedError(...args) {
|
|
239
|
-
const message = getMessage(...args);
|
|
240
|
-
if (process.env.NODE_ENV !== "production") {
|
|
241
|
-
var _stack;
|
|
242
|
-
const callStackFrames = (_stack = (/* @__PURE__ */ new Error()).stack) == null ? void 0 : _stack.split("\n");
|
|
243
|
-
if (callStackFrames === void 0 || callStackFrames.length < 4) logErrorOrWarn(message);
|
|
244
|
-
else {
|
|
245
|
-
const key = callStackFrames[4];
|
|
246
|
-
errorRef.current = message;
|
|
247
|
-
flushCurrentErrorIfNew(key);
|
|
248
|
-
}
|
|
249
|
-
} else logErrorOrWarn(message);
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
}) });
|
|
253
|
-
|
|
254
|
-
//#endregion
|
|
255
|
-
//#region ../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/app-render/after-task-async-storage-instance.js
|
|
256
|
-
var require_after_task_async_storage_instance = /* @__PURE__ */ require_dynamic_rendering$1.__commonJS({ "../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/app-render/after-task-async-storage-instance.js": ((exports) => {
|
|
257
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
258
|
-
Object.defineProperty(exports, "afterTaskAsyncStorageInstance", {
|
|
259
|
-
enumerable: true,
|
|
260
|
-
get: function() {
|
|
261
|
-
return afterTaskAsyncStorageInstance;
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
const afterTaskAsyncStorageInstance = (0, require_dynamic_rendering$1.require_async_local_storage().createAsyncLocalStorage)();
|
|
265
|
-
}) });
|
|
266
|
-
|
|
267
|
-
//#endregion
|
|
268
|
-
//#region ../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/app-render/after-task-async-storage.external.js
|
|
269
|
-
var require_after_task_async_storage_external = /* @__PURE__ */ require_dynamic_rendering$1.__commonJS({ "../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/app-render/after-task-async-storage.external.js": ((exports) => {
|
|
270
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
271
|
-
Object.defineProperty(exports, "afterTaskAsyncStorage", {
|
|
272
|
-
enumerable: true,
|
|
273
|
-
get: function() {
|
|
274
|
-
return _aftertaskasyncstorageinstance.afterTaskAsyncStorageInstance;
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
|
-
const _aftertaskasyncstorageinstance = require_after_task_async_storage_instance();
|
|
278
|
-
}) });
|
|
279
|
-
|
|
280
|
-
//#endregion
|
|
281
|
-
//#region ../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/request/utils.js
|
|
282
|
-
var require_utils = /* @__PURE__ */ require_dynamic_rendering$1.__commonJS({ "../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/request/utils.js": ((exports) => {
|
|
283
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
284
|
-
function _export$1(target, all) {
|
|
285
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
286
|
-
enumerable: true,
|
|
287
|
-
get: all[name]
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
_export$1(exports, {
|
|
291
|
-
isRequestAPICallableInsideAfter: function() {
|
|
292
|
-
return isRequestAPICallableInsideAfter;
|
|
293
|
-
},
|
|
294
|
-
throwForSearchParamsAccessInUseCache: function() {
|
|
295
|
-
return throwForSearchParamsAccessInUseCache;
|
|
296
|
-
},
|
|
297
|
-
throwWithStaticGenerationBailoutError: function() {
|
|
298
|
-
return throwWithStaticGenerationBailoutError;
|
|
299
|
-
},
|
|
300
|
-
throwWithStaticGenerationBailoutErrorWithDynamicError: function() {
|
|
301
|
-
return throwWithStaticGenerationBailoutErrorWithDynamicError;
|
|
302
|
-
}
|
|
303
|
-
});
|
|
304
|
-
const _staticgenerationbailout$3 = require_dynamic_rendering$1.require_static_generation_bailout();
|
|
305
|
-
const _aftertaskasyncstorageexternal = require_after_task_async_storage_external();
|
|
306
|
-
function throwWithStaticGenerationBailoutError(route, expression) {
|
|
307
|
-
throw Object.defineProperty(new _staticgenerationbailout$3.StaticGenBailoutError(`Route ${route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", {
|
|
308
|
-
value: "E576",
|
|
309
|
-
enumerable: false,
|
|
310
|
-
configurable: true
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) {
|
|
314
|
-
throw Object.defineProperty(new _staticgenerationbailout$3.StaticGenBailoutError(`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", {
|
|
315
|
-
value: "E543",
|
|
316
|
-
enumerable: false,
|
|
317
|
-
configurable: true
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) {
|
|
321
|
-
const error = Object.defineProperty(/* @__PURE__ */ new Error(`Route ${workStore.route} used "searchParams" inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await "searchParams" outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", {
|
|
322
|
-
value: "E779",
|
|
323
|
-
enumerable: false,
|
|
324
|
-
configurable: true
|
|
325
|
-
});
|
|
326
|
-
Error.captureStackTrace(error, constructorOpt);
|
|
327
|
-
workStore.invalidDynamicUsageError ??= error;
|
|
328
|
-
throw error;
|
|
329
|
-
}
|
|
330
|
-
function isRequestAPICallableInsideAfter() {
|
|
331
|
-
const afterTaskStore = _aftertaskasyncstorageexternal.afterTaskAsyncStorage.getStore();
|
|
332
|
-
return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === "action";
|
|
333
|
-
}
|
|
334
|
-
}) });
|
|
335
|
-
|
|
336
|
-
//#endregion
|
|
337
|
-
//#region ../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/request/cookies.js
|
|
338
|
-
var require_cookies = /* @__PURE__ */ require_dynamic_rendering$1.__commonJS({ "../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/request/cookies.js": ((exports) => {
|
|
339
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
340
|
-
Object.defineProperty(exports, "cookies", {
|
|
341
|
-
enumerable: true,
|
|
342
|
-
get: function() {
|
|
343
|
-
return cookies;
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
const _requestcookies = require_request_cookies();
|
|
347
|
-
const _cookies = require_dynamic_rendering$1.require_cookies();
|
|
348
|
-
const _workasyncstorageexternal$2 = require_dynamic_rendering$1.require_work_async_storage_external();
|
|
349
|
-
const _workunitasyncstorageexternal$2 = require_dynamic_rendering$1.require_work_unit_async_storage_external();
|
|
350
|
-
const _dynamicrendering$2 = require_dynamic_rendering$1.require_dynamic_rendering();
|
|
351
|
-
const _staticgenerationbailout$2 = require_dynamic_rendering$1.require_static_generation_bailout();
|
|
352
|
-
const _dynamicrenderingutils$1 = require_dynamic_rendering$1.require_dynamic_rendering_utils();
|
|
353
|
-
const _creatededupedbycallsiteservererrorlogger$2 = require_create_deduped_by_callsite_server_error_logger();
|
|
354
|
-
const _utils$1 = require_utils();
|
|
355
|
-
const _invarianterror$2 = require_dynamic_rendering$1.require_invariant_error();
|
|
356
|
-
const _reflect$3 = require_reflect();
|
|
357
|
-
function cookies() {
|
|
358
|
-
const callingExpression = "cookies";
|
|
359
|
-
const workStore = _workasyncstorageexternal$2.workAsyncStorage.getStore();
|
|
360
|
-
const workUnitStore = _workunitasyncstorageexternal$2.workUnitAsyncStorage.getStore();
|
|
361
|
-
if (workStore) {
|
|
362
|
-
if (workUnitStore && workUnitStore.phase === "after" && !(0, _utils$1.isRequestAPICallableInsideAfter)()) throw Object.defineProperty(/* @__PURE__ */ new Error(`Route ${workStore.route} used "cookies" inside "after(...)". This is not supported. If you need this data inside an "after" callback, use "cookies" outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", {
|
|
363
|
-
value: "E88",
|
|
364
|
-
enumerable: false,
|
|
365
|
-
configurable: true
|
|
366
|
-
});
|
|
367
|
-
if (workStore.forceStatic) return makeUntrackedExoticCookies(createEmptyCookies());
|
|
368
|
-
if (workStore.dynamicShouldError) throw Object.defineProperty(new _staticgenerationbailout$2.StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", {
|
|
369
|
-
value: "E549",
|
|
370
|
-
enumerable: false,
|
|
371
|
-
configurable: true
|
|
372
|
-
});
|
|
373
|
-
if (workUnitStore) switch (workUnitStore.type) {
|
|
374
|
-
case "cache":
|
|
375
|
-
const error = Object.defineProperty(/* @__PURE__ */ new Error(`Route ${workStore.route} used "cookies" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "cookies" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", {
|
|
376
|
-
value: "E398",
|
|
377
|
-
enumerable: false,
|
|
378
|
-
configurable: true
|
|
379
|
-
});
|
|
380
|
-
Error.captureStackTrace(error, cookies);
|
|
381
|
-
workStore.invalidDynamicUsageError ??= error;
|
|
382
|
-
throw error;
|
|
383
|
-
case "unstable-cache": throw Object.defineProperty(/* @__PURE__ */ new Error(`Route ${workStore.route} used "cookies" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "cookies" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", {
|
|
384
|
-
value: "E157",
|
|
385
|
-
enumerable: false,
|
|
386
|
-
configurable: true
|
|
387
|
-
});
|
|
388
|
-
case "prerender": return makeHangingCookies(workStore, workUnitStore);
|
|
389
|
-
case "prerender-client":
|
|
390
|
-
const exportName = "`cookies`";
|
|
391
|
-
throw Object.defineProperty(new _invarianterror$2.InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
|
|
392
|
-
value: "E693",
|
|
393
|
-
enumerable: false,
|
|
394
|
-
configurable: true
|
|
395
|
-
});
|
|
396
|
-
case "prerender-ppr": return (0, _dynamicrendering$2.postponeWithTracking)(workStore.route, callingExpression, workUnitStore.dynamicTracking);
|
|
397
|
-
case "prerender-legacy": return (0, _dynamicrendering$2.throwToInterruptStaticGeneration)(callingExpression, workStore, workUnitStore);
|
|
398
|
-
case "prerender-runtime": return (0, _dynamicrendering$2.delayUntilRuntimeStage)(workUnitStore, makeUntrackedCookies(workUnitStore.cookies));
|
|
399
|
-
case "private-cache":
|
|
400
|
-
if (process.env.__NEXT_CACHE_COMPONENTS) return makeUntrackedCookies(workUnitStore.cookies);
|
|
401
|
-
return makeUntrackedExoticCookies(workUnitStore.cookies);
|
|
402
|
-
case "request":
|
|
403
|
-
(0, _dynamicrendering$2.trackDynamicDataInDynamicRender)(workUnitStore);
|
|
404
|
-
let underlyingCookies;
|
|
405
|
-
if ((0, _requestcookies.areCookiesMutableInCurrentPhase)(workUnitStore)) underlyingCookies = workUnitStore.userspaceMutableCookies;
|
|
406
|
-
else underlyingCookies = workUnitStore.cookies;
|
|
407
|
-
if (process.env.NODE_ENV === "development") {
|
|
408
|
-
if (process.env.__NEXT_CACHE_COMPONENTS) return makeUntrackedCookiesWithDevWarnings(underlyingCookies, workStore == null ? void 0 : workStore.route);
|
|
409
|
-
return makeUntrackedExoticCookiesWithDevWarnings(underlyingCookies, workStore == null ? void 0 : workStore.route);
|
|
410
|
-
} else {
|
|
411
|
-
if (process.env.__NEXT_CACHE_COMPONENTS) return makeUntrackedCookies(underlyingCookies);
|
|
412
|
-
return makeUntrackedExoticCookies(underlyingCookies);
|
|
413
|
-
}
|
|
414
|
-
default:
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
(0, _workunitasyncstorageexternal$2.throwForMissingRequestStore)(callingExpression);
|
|
418
|
-
}
|
|
419
|
-
function createEmptyCookies() {
|
|
420
|
-
return _requestcookies.RequestCookiesAdapter.seal(new _cookies.RequestCookies(new Headers({})));
|
|
421
|
-
}
|
|
422
|
-
const CachedCookies = /* @__PURE__ */ new WeakMap();
|
|
423
|
-
function makeHangingCookies(workStore, prerenderStore) {
|
|
424
|
-
const cachedPromise = CachedCookies.get(prerenderStore);
|
|
425
|
-
if (cachedPromise) return cachedPromise;
|
|
426
|
-
const promise = (0, _dynamicrenderingutils$1.makeHangingPromise)(prerenderStore.renderSignal, workStore.route, "`cookies()`");
|
|
427
|
-
CachedCookies.set(prerenderStore, promise);
|
|
428
|
-
return promise;
|
|
429
|
-
}
|
|
430
|
-
function makeUntrackedCookies(underlyingCookies) {
|
|
431
|
-
const cachedCookies = CachedCookies.get(underlyingCookies);
|
|
432
|
-
if (cachedCookies) return cachedCookies;
|
|
433
|
-
const promise = Promise.resolve(underlyingCookies);
|
|
434
|
-
CachedCookies.set(underlyingCookies, promise);
|
|
435
|
-
return promise;
|
|
436
|
-
}
|
|
437
|
-
function makeUntrackedExoticCookies(underlyingCookies) {
|
|
438
|
-
const cachedCookies = CachedCookies.get(underlyingCookies);
|
|
439
|
-
if (cachedCookies) return cachedCookies;
|
|
440
|
-
const promise = Promise.resolve(underlyingCookies);
|
|
441
|
-
CachedCookies.set(underlyingCookies, promise);
|
|
442
|
-
Object.defineProperties(promise, {
|
|
443
|
-
[Symbol.iterator]: { value: underlyingCookies[Symbol.iterator] ? underlyingCookies[Symbol.iterator].bind(underlyingCookies) : polyfilledResponseCookiesIterator.bind(underlyingCookies) },
|
|
444
|
-
size: { get() {
|
|
445
|
-
return underlyingCookies.size;
|
|
446
|
-
} },
|
|
447
|
-
get: { value: underlyingCookies.get.bind(underlyingCookies) },
|
|
448
|
-
getAll: { value: underlyingCookies.getAll.bind(underlyingCookies) },
|
|
449
|
-
has: { value: underlyingCookies.has.bind(underlyingCookies) },
|
|
450
|
-
set: { value: underlyingCookies.set.bind(underlyingCookies) },
|
|
451
|
-
delete: { value: underlyingCookies.delete.bind(underlyingCookies) },
|
|
452
|
-
clear: { value: typeof underlyingCookies.clear === "function" ? underlyingCookies.clear.bind(underlyingCookies) : polyfilledResponseCookiesClear.bind(underlyingCookies, promise) },
|
|
453
|
-
toString: { value: underlyingCookies.toString.bind(underlyingCookies) }
|
|
454
|
-
});
|
|
455
|
-
return promise;
|
|
456
|
-
}
|
|
457
|
-
function makeUntrackedExoticCookiesWithDevWarnings(underlyingCookies, route) {
|
|
458
|
-
const cachedCookies = CachedCookies.get(underlyingCookies);
|
|
459
|
-
if (cachedCookies) return cachedCookies;
|
|
460
|
-
const promise = (0, _dynamicrenderingutils$1.makeDevtoolsIOAwarePromise)(underlyingCookies);
|
|
461
|
-
CachedCookies.set(underlyingCookies, promise);
|
|
462
|
-
Object.defineProperties(promise, {
|
|
463
|
-
[Symbol.iterator]: {
|
|
464
|
-
value: function() {
|
|
465
|
-
syncIODev$2(route, "`...cookies()` or similar iteration");
|
|
466
|
-
return underlyingCookies[Symbol.iterator] ? underlyingCookies[Symbol.iterator].apply(underlyingCookies, arguments) : polyfilledResponseCookiesIterator.call(underlyingCookies);
|
|
467
|
-
},
|
|
468
|
-
writable: false
|
|
469
|
-
},
|
|
470
|
-
size: { get() {
|
|
471
|
-
syncIODev$2(route, "`cookies().size`");
|
|
472
|
-
return underlyingCookies.size;
|
|
473
|
-
} },
|
|
474
|
-
get: {
|
|
475
|
-
value: function get() {
|
|
476
|
-
let expression;
|
|
477
|
-
if (arguments.length === 0) expression = "`cookies().get()`";
|
|
478
|
-
else expression = `\`cookies().get(${describeNameArg$1(arguments[0])})\``;
|
|
479
|
-
syncIODev$2(route, expression);
|
|
480
|
-
return underlyingCookies.get.apply(underlyingCookies, arguments);
|
|
481
|
-
},
|
|
482
|
-
writable: false
|
|
483
|
-
},
|
|
484
|
-
getAll: {
|
|
485
|
-
value: function getAll() {
|
|
486
|
-
let expression;
|
|
487
|
-
if (arguments.length === 0) expression = "`cookies().getAll()`";
|
|
488
|
-
else expression = `\`cookies().getAll(${describeNameArg$1(arguments[0])})\``;
|
|
489
|
-
syncIODev$2(route, expression);
|
|
490
|
-
return underlyingCookies.getAll.apply(underlyingCookies, arguments);
|
|
491
|
-
},
|
|
492
|
-
writable: false
|
|
493
|
-
},
|
|
494
|
-
has: {
|
|
495
|
-
value: function get() {
|
|
496
|
-
let expression;
|
|
497
|
-
if (arguments.length === 0) expression = "`cookies().has()`";
|
|
498
|
-
else expression = `\`cookies().has(${describeNameArg$1(arguments[0])})\``;
|
|
499
|
-
syncIODev$2(route, expression);
|
|
500
|
-
return underlyingCookies.has.apply(underlyingCookies, arguments);
|
|
501
|
-
},
|
|
502
|
-
writable: false
|
|
503
|
-
},
|
|
504
|
-
set: {
|
|
505
|
-
value: function set() {
|
|
506
|
-
let expression;
|
|
507
|
-
if (arguments.length === 0) expression = "`cookies().set()`";
|
|
508
|
-
else {
|
|
509
|
-
const arg = arguments[0];
|
|
510
|
-
if (arg) expression = `\`cookies().set(${describeNameArg$1(arg)}, ...)\``;
|
|
511
|
-
else expression = "`cookies().set(...)`";
|
|
512
|
-
}
|
|
513
|
-
syncIODev$2(route, expression);
|
|
514
|
-
return underlyingCookies.set.apply(underlyingCookies, arguments);
|
|
515
|
-
},
|
|
516
|
-
writable: false
|
|
517
|
-
},
|
|
518
|
-
delete: {
|
|
519
|
-
value: function() {
|
|
520
|
-
let expression;
|
|
521
|
-
if (arguments.length === 0) expression = "`cookies().delete()`";
|
|
522
|
-
else if (arguments.length === 1) expression = `\`cookies().delete(${describeNameArg$1(arguments[0])})\``;
|
|
523
|
-
else expression = `\`cookies().delete(${describeNameArg$1(arguments[0])}, ...)\``;
|
|
524
|
-
syncIODev$2(route, expression);
|
|
525
|
-
return underlyingCookies.delete.apply(underlyingCookies, arguments);
|
|
526
|
-
},
|
|
527
|
-
writable: false
|
|
528
|
-
},
|
|
529
|
-
clear: {
|
|
530
|
-
value: function clear() {
|
|
531
|
-
syncIODev$2(route, "`cookies().clear()`");
|
|
532
|
-
return typeof underlyingCookies.clear === "function" ? underlyingCookies.clear.apply(underlyingCookies, arguments) : polyfilledResponseCookiesClear.call(underlyingCookies, promise);
|
|
533
|
-
},
|
|
534
|
-
writable: false
|
|
535
|
-
},
|
|
536
|
-
toString: {
|
|
537
|
-
value: function toString() {
|
|
538
|
-
syncIODev$2(route, "`cookies().toString()` or implicit casting");
|
|
539
|
-
return underlyingCookies.toString.apply(underlyingCookies, arguments);
|
|
540
|
-
},
|
|
541
|
-
writable: false
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
return promise;
|
|
545
|
-
}
|
|
546
|
-
function makeUntrackedCookiesWithDevWarnings(underlyingCookies, route) {
|
|
547
|
-
const cachedCookies = CachedCookies.get(underlyingCookies);
|
|
548
|
-
if (cachedCookies) return cachedCookies;
|
|
549
|
-
const promise = (0, _dynamicrenderingutils$1.makeDevtoolsIOAwarePromise)(underlyingCookies);
|
|
550
|
-
const proxiedPromise = new Proxy(promise, { get(target, prop, receiver) {
|
|
551
|
-
switch (prop) {
|
|
552
|
-
case Symbol.iterator:
|
|
553
|
-
warnForSyncAccess$2(route, "`...cookies()` or similar iteration");
|
|
554
|
-
break;
|
|
555
|
-
case "size":
|
|
556
|
-
case "get":
|
|
557
|
-
case "getAll":
|
|
558
|
-
case "has":
|
|
559
|
-
case "set":
|
|
560
|
-
case "delete":
|
|
561
|
-
case "clear":
|
|
562
|
-
case "toString":
|
|
563
|
-
warnForSyncAccess$2(route, `\`cookies().${prop}\``);
|
|
564
|
-
break;
|
|
565
|
-
default:
|
|
566
|
-
}
|
|
567
|
-
return _reflect$3.ReflectAdapter.get(target, prop, receiver);
|
|
568
|
-
} });
|
|
569
|
-
CachedCookies.set(underlyingCookies, proxiedPromise);
|
|
570
|
-
return proxiedPromise;
|
|
571
|
-
}
|
|
572
|
-
function describeNameArg$1(arg) {
|
|
573
|
-
return typeof arg === "object" && arg !== null && typeof arg.name === "string" ? `'${arg.name}'` : typeof arg === "string" ? `'${arg}'` : "...";
|
|
574
|
-
}
|
|
575
|
-
function syncIODev$2(route, expression) {
|
|
576
|
-
const workUnitStore = _workunitasyncstorageexternal$2.workUnitAsyncStorage.getStore();
|
|
577
|
-
if (workUnitStore) switch (workUnitStore.type) {
|
|
578
|
-
case "request":
|
|
579
|
-
if (workUnitStore.prerenderPhase === true) (0, _dynamicrendering$2.trackSynchronousRequestDataAccessInDev)(workUnitStore);
|
|
580
|
-
break;
|
|
581
|
-
case "prerender":
|
|
582
|
-
case "prerender-client":
|
|
583
|
-
case "prerender-runtime":
|
|
584
|
-
case "prerender-ppr":
|
|
585
|
-
case "prerender-legacy":
|
|
586
|
-
case "cache":
|
|
587
|
-
case "private-cache":
|
|
588
|
-
case "unstable-cache": break;
|
|
589
|
-
default:
|
|
590
|
-
}
|
|
591
|
-
warnForSyncAccess$2(route, expression);
|
|
592
|
-
}
|
|
593
|
-
const warnForSyncAccess$2 = (0, _creatededupedbycallsiteservererrorlogger$2.createDedupedByCallsiteServerErrorLoggerDev)(createCookiesAccessError);
|
|
594
|
-
function createCookiesAccessError(route, expression) {
|
|
595
|
-
const prefix = route ? `Route "${route}" ` : "This route ";
|
|
596
|
-
return Object.defineProperty(/* @__PURE__ */ new Error(`${prefix}used ${expression}. \`cookies()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`), "__NEXT_ERROR_CODE", {
|
|
597
|
-
value: "E223",
|
|
598
|
-
enumerable: false,
|
|
599
|
-
configurable: true
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
function polyfilledResponseCookiesIterator() {
|
|
603
|
-
return this.getAll().map((c) => [c.name, c]).values();
|
|
604
|
-
}
|
|
605
|
-
function polyfilledResponseCookiesClear(returnable) {
|
|
606
|
-
for (const cookie of this.getAll()) this.delete(cookie.name);
|
|
607
|
-
return returnable;
|
|
608
|
-
}
|
|
609
|
-
}) });
|
|
610
|
-
|
|
611
|
-
//#endregion
|
|
612
|
-
//#region ../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/web/spec-extension/adapters/headers.js
|
|
613
|
-
var require_headers$2 = /* @__PURE__ */ require_dynamic_rendering$1.__commonJS({ "../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/web/spec-extension/adapters/headers.js": ((exports) => {
|
|
614
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
615
|
-
function _export(target, all) {
|
|
616
|
-
for (var name in all) Object.defineProperty(target, name, {
|
|
617
|
-
enumerable: true,
|
|
618
|
-
get: all[name]
|
|
619
|
-
});
|
|
620
|
-
}
|
|
621
|
-
_export(exports, {
|
|
622
|
-
HeadersAdapter: function() {
|
|
623
|
-
return HeadersAdapter;
|
|
624
|
-
},
|
|
625
|
-
ReadonlyHeadersError: function() {
|
|
626
|
-
return ReadonlyHeadersError;
|
|
627
|
-
}
|
|
628
|
-
});
|
|
629
|
-
const _reflect$2 = require_reflect();
|
|
630
|
-
var ReadonlyHeadersError = class ReadonlyHeadersError extends Error {
|
|
631
|
-
constructor() {
|
|
632
|
-
super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers");
|
|
633
|
-
}
|
|
634
|
-
static callable() {
|
|
635
|
-
throw new ReadonlyHeadersError();
|
|
636
|
-
}
|
|
637
|
-
};
|
|
638
|
-
var HeadersAdapter = class HeadersAdapter extends Headers {
|
|
639
|
-
constructor(headers$1) {
|
|
640
|
-
super();
|
|
641
|
-
this.headers = new Proxy(headers$1, {
|
|
642
|
-
get(target, prop, receiver) {
|
|
643
|
-
if (typeof prop === "symbol") return _reflect$2.ReflectAdapter.get(target, prop, receiver);
|
|
644
|
-
const lowercased = prop.toLowerCase();
|
|
645
|
-
const original = Object.keys(headers$1).find((o) => o.toLowerCase() === lowercased);
|
|
646
|
-
if (typeof original === "undefined") return;
|
|
647
|
-
return _reflect$2.ReflectAdapter.get(target, original, receiver);
|
|
648
|
-
},
|
|
649
|
-
set(target, prop, value, receiver) {
|
|
650
|
-
if (typeof prop === "symbol") return _reflect$2.ReflectAdapter.set(target, prop, value, receiver);
|
|
651
|
-
const lowercased = prop.toLowerCase();
|
|
652
|
-
const original = Object.keys(headers$1).find((o) => o.toLowerCase() === lowercased);
|
|
653
|
-
return _reflect$2.ReflectAdapter.set(target, original ?? prop, value, receiver);
|
|
654
|
-
},
|
|
655
|
-
has(target, prop) {
|
|
656
|
-
if (typeof prop === "symbol") return _reflect$2.ReflectAdapter.has(target, prop);
|
|
657
|
-
const lowercased = prop.toLowerCase();
|
|
658
|
-
const original = Object.keys(headers$1).find((o) => o.toLowerCase() === lowercased);
|
|
659
|
-
if (typeof original === "undefined") return false;
|
|
660
|
-
return _reflect$2.ReflectAdapter.has(target, original);
|
|
661
|
-
},
|
|
662
|
-
deleteProperty(target, prop) {
|
|
663
|
-
if (typeof prop === "symbol") return _reflect$2.ReflectAdapter.deleteProperty(target, prop);
|
|
664
|
-
const lowercased = prop.toLowerCase();
|
|
665
|
-
const original = Object.keys(headers$1).find((o) => o.toLowerCase() === lowercased);
|
|
666
|
-
if (typeof original === "undefined") return true;
|
|
667
|
-
return _reflect$2.ReflectAdapter.deleteProperty(target, original);
|
|
668
|
-
}
|
|
669
|
-
});
|
|
670
|
-
}
|
|
671
|
-
/**
|
|
672
|
-
* Seals a Headers instance to prevent modification by throwing an error when
|
|
673
|
-
* any mutating method is called.
|
|
674
|
-
*/ static seal(headers$1) {
|
|
675
|
-
return new Proxy(headers$1, { get(target, prop, receiver) {
|
|
676
|
-
switch (prop) {
|
|
677
|
-
case "append":
|
|
678
|
-
case "delete":
|
|
679
|
-
case "set": return ReadonlyHeadersError.callable;
|
|
680
|
-
default: return _reflect$2.ReflectAdapter.get(target, prop, receiver);
|
|
681
|
-
}
|
|
682
|
-
} });
|
|
683
|
-
}
|
|
684
|
-
/**
|
|
685
|
-
* Merges a header value into a string. This stores multiple values as an
|
|
686
|
-
* array, so we need to merge them into a string.
|
|
687
|
-
*
|
|
688
|
-
* @param value a header value
|
|
689
|
-
* @returns a merged header value (a string)
|
|
690
|
-
*/ merge(value) {
|
|
691
|
-
if (Array.isArray(value)) return value.join(", ");
|
|
692
|
-
return value;
|
|
693
|
-
}
|
|
694
|
-
/**
|
|
695
|
-
* Creates a Headers instance from a plain object or a Headers instance.
|
|
696
|
-
*
|
|
697
|
-
* @param headers a plain object or a Headers instance
|
|
698
|
-
* @returns a headers instance
|
|
699
|
-
*/ static from(headers$1) {
|
|
700
|
-
if (headers$1 instanceof Headers) return headers$1;
|
|
701
|
-
return new HeadersAdapter(headers$1);
|
|
702
|
-
}
|
|
703
|
-
append(name, value) {
|
|
704
|
-
const existing = this.headers[name];
|
|
705
|
-
if (typeof existing === "string") this.headers[name] = [existing, value];
|
|
706
|
-
else if (Array.isArray(existing)) existing.push(value);
|
|
707
|
-
else this.headers[name] = value;
|
|
708
|
-
}
|
|
709
|
-
delete(name) {
|
|
710
|
-
delete this.headers[name];
|
|
711
|
-
}
|
|
712
|
-
get(name) {
|
|
713
|
-
const value = this.headers[name];
|
|
714
|
-
if (typeof value !== "undefined") return this.merge(value);
|
|
715
|
-
return null;
|
|
716
|
-
}
|
|
717
|
-
has(name) {
|
|
718
|
-
return typeof this.headers[name] !== "undefined";
|
|
719
|
-
}
|
|
720
|
-
set(name, value) {
|
|
721
|
-
this.headers[name] = value;
|
|
722
|
-
}
|
|
723
|
-
forEach(callbackfn, thisArg) {
|
|
724
|
-
for (const [name, value] of this.entries()) callbackfn.call(thisArg, value, name, this);
|
|
725
|
-
}
|
|
726
|
-
*entries() {
|
|
727
|
-
for (const key of Object.keys(this.headers)) {
|
|
728
|
-
const name = key.toLowerCase();
|
|
729
|
-
yield [name, this.get(name)];
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
*keys() {
|
|
733
|
-
for (const key of Object.keys(this.headers)) yield key.toLowerCase();
|
|
734
|
-
}
|
|
735
|
-
*values() {
|
|
736
|
-
for (const key of Object.keys(this.headers)) yield this.get(key);
|
|
737
|
-
}
|
|
738
|
-
[Symbol.iterator]() {
|
|
739
|
-
return this.entries();
|
|
740
|
-
}
|
|
741
|
-
};
|
|
742
|
-
}) });
|
|
743
|
-
|
|
744
|
-
//#endregion
|
|
745
|
-
//#region ../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/request/headers.js
|
|
746
|
-
var require_headers$1 = /* @__PURE__ */ require_dynamic_rendering$1.__commonJS({ "../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/request/headers.js": ((exports) => {
|
|
747
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
748
|
-
Object.defineProperty(exports, "headers", {
|
|
749
|
-
enumerable: true,
|
|
750
|
-
get: function() {
|
|
751
|
-
return headers;
|
|
752
|
-
}
|
|
753
|
-
});
|
|
754
|
-
const _headers = require_headers$2();
|
|
755
|
-
const _workasyncstorageexternal$1 = require_dynamic_rendering$1.require_work_async_storage_external();
|
|
756
|
-
const _workunitasyncstorageexternal$1 = require_dynamic_rendering$1.require_work_unit_async_storage_external();
|
|
757
|
-
const _dynamicrendering$1 = require_dynamic_rendering$1.require_dynamic_rendering();
|
|
758
|
-
const _staticgenerationbailout$1 = require_dynamic_rendering$1.require_static_generation_bailout();
|
|
759
|
-
const _dynamicrenderingutils = require_dynamic_rendering$1.require_dynamic_rendering_utils();
|
|
760
|
-
const _creatededupedbycallsiteservererrorlogger$1 = require_create_deduped_by_callsite_server_error_logger();
|
|
761
|
-
const _utils = require_utils();
|
|
762
|
-
const _invarianterror$1 = require_dynamic_rendering$1.require_invariant_error();
|
|
763
|
-
const _reflect$1 = require_reflect();
|
|
764
|
-
function headers() {
|
|
765
|
-
const callingExpression = "headers";
|
|
766
|
-
const workStore = _workasyncstorageexternal$1.workAsyncStorage.getStore();
|
|
767
|
-
const workUnitStore = _workunitasyncstorageexternal$1.workUnitAsyncStorage.getStore();
|
|
768
|
-
if (workStore) {
|
|
769
|
-
if (workUnitStore && workUnitStore.phase === "after" && !(0, _utils.isRequestAPICallableInsideAfter)()) throw Object.defineProperty(/* @__PURE__ */ new Error(`Route ${workStore.route} used "headers" inside "after(...)". This is not supported. If you need this data inside an "after" callback, use "headers" outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", {
|
|
770
|
-
value: "E367",
|
|
771
|
-
enumerable: false,
|
|
772
|
-
configurable: true
|
|
773
|
-
});
|
|
774
|
-
if (workStore.forceStatic) return makeUntrackedExoticHeaders(_headers.HeadersAdapter.seal(new Headers({})));
|
|
775
|
-
if (workUnitStore) switch (workUnitStore.type) {
|
|
776
|
-
case "cache": {
|
|
777
|
-
const error = Object.defineProperty(/* @__PURE__ */ new Error(`Route ${workStore.route} used "headers" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "headers" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", {
|
|
778
|
-
value: "E304",
|
|
779
|
-
enumerable: false,
|
|
780
|
-
configurable: true
|
|
781
|
-
});
|
|
782
|
-
Error.captureStackTrace(error, headers);
|
|
783
|
-
workStore.invalidDynamicUsageError ??= error;
|
|
784
|
-
throw error;
|
|
785
|
-
}
|
|
786
|
-
case "private-cache": {
|
|
787
|
-
const error = Object.defineProperty(/* @__PURE__ */ new Error(`Route ${workStore.route} used "headers" inside "use cache: private". Accessing "headers" inside a private cache scope is not supported. If you need this data inside a cached function use "headers" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", {
|
|
788
|
-
value: "E742",
|
|
789
|
-
enumerable: false,
|
|
790
|
-
configurable: true
|
|
791
|
-
});
|
|
792
|
-
Error.captureStackTrace(error, headers);
|
|
793
|
-
workStore.invalidDynamicUsageError ??= error;
|
|
794
|
-
throw error;
|
|
795
|
-
}
|
|
796
|
-
case "unstable-cache": throw Object.defineProperty(/* @__PURE__ */ new Error(`Route ${workStore.route} used "headers" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "headers" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", {
|
|
797
|
-
value: "E127",
|
|
798
|
-
enumerable: false,
|
|
799
|
-
configurable: true
|
|
800
|
-
});
|
|
801
|
-
case "prerender":
|
|
802
|
-
case "prerender-client":
|
|
803
|
-
case "prerender-runtime":
|
|
804
|
-
case "prerender-ppr":
|
|
805
|
-
case "prerender-legacy":
|
|
806
|
-
case "request": break;
|
|
807
|
-
default:
|
|
808
|
-
}
|
|
809
|
-
if (workStore.dynamicShouldError) throw Object.defineProperty(new _staticgenerationbailout$1.StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", {
|
|
810
|
-
value: "E525",
|
|
811
|
-
enumerable: false,
|
|
812
|
-
configurable: true
|
|
813
|
-
});
|
|
814
|
-
if (workUnitStore) switch (workUnitStore.type) {
|
|
815
|
-
case "prerender":
|
|
816
|
-
case "prerender-runtime": return makeHangingHeaders(workStore, workUnitStore);
|
|
817
|
-
case "prerender-client":
|
|
818
|
-
const exportName = "`headers`";
|
|
819
|
-
throw Object.defineProperty(new _invarianterror$1.InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
|
|
820
|
-
value: "E693",
|
|
821
|
-
enumerable: false,
|
|
822
|
-
configurable: true
|
|
823
|
-
});
|
|
824
|
-
case "prerender-ppr": return (0, _dynamicrendering$1.postponeWithTracking)(workStore.route, callingExpression, workUnitStore.dynamicTracking);
|
|
825
|
-
case "prerender-legacy": return (0, _dynamicrendering$1.throwToInterruptStaticGeneration)(callingExpression, workStore, workUnitStore);
|
|
826
|
-
case "request":
|
|
827
|
-
(0, _dynamicrendering$1.trackDynamicDataInDynamicRender)(workUnitStore);
|
|
828
|
-
if (process.env.NODE_ENV === "development") {
|
|
829
|
-
if (process.env.__NEXT_CACHE_COMPONENTS) return makeUntrackedHeadersWithDevWarnings(workUnitStore.headers, workStore == null ? void 0 : workStore.route);
|
|
830
|
-
return makeUntrackedExoticHeadersWithDevWarnings(workUnitStore.headers, workStore == null ? void 0 : workStore.route);
|
|
831
|
-
} else {
|
|
832
|
-
if (process.env.__NEXT_CACHE_COMPONENTS) return makeUntrackedHeaders(workUnitStore.headers);
|
|
833
|
-
return makeUntrackedExoticHeaders(workUnitStore.headers);
|
|
834
|
-
}
|
|
835
|
-
break;
|
|
836
|
-
default:
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
(0, _workunitasyncstorageexternal$1.throwForMissingRequestStore)(callingExpression);
|
|
840
|
-
}
|
|
841
|
-
const CachedHeaders = /* @__PURE__ */ new WeakMap();
|
|
842
|
-
function makeHangingHeaders(workStore, prerenderStore) {
|
|
843
|
-
const cachedHeaders = CachedHeaders.get(prerenderStore);
|
|
844
|
-
if (cachedHeaders) return cachedHeaders;
|
|
845
|
-
const promise = (0, _dynamicrenderingutils.makeHangingPromise)(prerenderStore.renderSignal, workStore.route, "`headers()`");
|
|
846
|
-
CachedHeaders.set(prerenderStore, promise);
|
|
847
|
-
return promise;
|
|
848
|
-
}
|
|
849
|
-
function makeUntrackedHeaders(underlyingHeaders) {
|
|
850
|
-
const cachedHeaders = CachedHeaders.get(underlyingHeaders);
|
|
851
|
-
if (cachedHeaders) return cachedHeaders;
|
|
852
|
-
const promise = Promise.resolve(underlyingHeaders);
|
|
853
|
-
CachedHeaders.set(underlyingHeaders, promise);
|
|
854
|
-
return promise;
|
|
855
|
-
}
|
|
856
|
-
function makeUntrackedExoticHeaders(underlyingHeaders) {
|
|
857
|
-
const cachedHeaders = CachedHeaders.get(underlyingHeaders);
|
|
858
|
-
if (cachedHeaders) return cachedHeaders;
|
|
859
|
-
const promise = Promise.resolve(underlyingHeaders);
|
|
860
|
-
CachedHeaders.set(underlyingHeaders, promise);
|
|
861
|
-
Object.defineProperties(promise, {
|
|
862
|
-
append: { value: underlyingHeaders.append.bind(underlyingHeaders) },
|
|
863
|
-
delete: { value: underlyingHeaders.delete.bind(underlyingHeaders) },
|
|
864
|
-
get: { value: underlyingHeaders.get.bind(underlyingHeaders) },
|
|
865
|
-
has: { value: underlyingHeaders.has.bind(underlyingHeaders) },
|
|
866
|
-
set: { value: underlyingHeaders.set.bind(underlyingHeaders) },
|
|
867
|
-
getSetCookie: { value: underlyingHeaders.getSetCookie.bind(underlyingHeaders) },
|
|
868
|
-
forEach: { value: underlyingHeaders.forEach.bind(underlyingHeaders) },
|
|
869
|
-
keys: { value: underlyingHeaders.keys.bind(underlyingHeaders) },
|
|
870
|
-
values: { value: underlyingHeaders.values.bind(underlyingHeaders) },
|
|
871
|
-
entries: { value: underlyingHeaders.entries.bind(underlyingHeaders) },
|
|
872
|
-
[Symbol.iterator]: { value: underlyingHeaders[Symbol.iterator].bind(underlyingHeaders) }
|
|
873
|
-
});
|
|
874
|
-
return promise;
|
|
875
|
-
}
|
|
876
|
-
function makeUntrackedExoticHeadersWithDevWarnings(underlyingHeaders, route) {
|
|
877
|
-
const cachedHeaders = CachedHeaders.get(underlyingHeaders);
|
|
878
|
-
if (cachedHeaders) return cachedHeaders;
|
|
879
|
-
const promise = (0, _dynamicrenderingutils.makeDevtoolsIOAwarePromise)(underlyingHeaders);
|
|
880
|
-
CachedHeaders.set(underlyingHeaders, promise);
|
|
881
|
-
Object.defineProperties(promise, {
|
|
882
|
-
append: { value: function append() {
|
|
883
|
-
syncIODev$1(route, `\`headers().append(${describeNameArg(arguments[0])}, ...)\``);
|
|
884
|
-
return underlyingHeaders.append.apply(underlyingHeaders, arguments);
|
|
885
|
-
} },
|
|
886
|
-
delete: { value: function _delete() {
|
|
887
|
-
syncIODev$1(route, `\`headers().delete(${describeNameArg(arguments[0])})\``);
|
|
888
|
-
return underlyingHeaders.delete.apply(underlyingHeaders, arguments);
|
|
889
|
-
} },
|
|
890
|
-
get: { value: function get() {
|
|
891
|
-
syncIODev$1(route, `\`headers().get(${describeNameArg(arguments[0])})\``);
|
|
892
|
-
return underlyingHeaders.get.apply(underlyingHeaders, arguments);
|
|
893
|
-
} },
|
|
894
|
-
has: { value: function has() {
|
|
895
|
-
syncIODev$1(route, `\`headers().has(${describeNameArg(arguments[0])})\``);
|
|
896
|
-
return underlyingHeaders.has.apply(underlyingHeaders, arguments);
|
|
897
|
-
} },
|
|
898
|
-
set: { value: function set() {
|
|
899
|
-
syncIODev$1(route, `\`headers().set(${describeNameArg(arguments[0])}, ...)\``);
|
|
900
|
-
return underlyingHeaders.set.apply(underlyingHeaders, arguments);
|
|
901
|
-
} },
|
|
902
|
-
getSetCookie: { value: function getSetCookie() {
|
|
903
|
-
syncIODev$1(route, "`headers().getSetCookie()`");
|
|
904
|
-
return underlyingHeaders.getSetCookie.apply(underlyingHeaders, arguments);
|
|
905
|
-
} },
|
|
906
|
-
forEach: { value: function forEach() {
|
|
907
|
-
syncIODev$1(route, "`headers().forEach(...)`");
|
|
908
|
-
return underlyingHeaders.forEach.apply(underlyingHeaders, arguments);
|
|
909
|
-
} },
|
|
910
|
-
keys: { value: function keys() {
|
|
911
|
-
syncIODev$1(route, "`headers().keys()`");
|
|
912
|
-
return underlyingHeaders.keys.apply(underlyingHeaders, arguments);
|
|
913
|
-
} },
|
|
914
|
-
values: { value: function values() {
|
|
915
|
-
syncIODev$1(route, "`headers().values()`");
|
|
916
|
-
return underlyingHeaders.values.apply(underlyingHeaders, arguments);
|
|
917
|
-
} },
|
|
918
|
-
entries: { value: function entries() {
|
|
919
|
-
syncIODev$1(route, "`headers().entries()`");
|
|
920
|
-
return underlyingHeaders.entries.apply(underlyingHeaders, arguments);
|
|
921
|
-
} },
|
|
922
|
-
[Symbol.iterator]: { value: function() {
|
|
923
|
-
syncIODev$1(route, "`...headers()` or similar iteration");
|
|
924
|
-
return underlyingHeaders[Symbol.iterator].apply(underlyingHeaders, arguments);
|
|
925
|
-
} }
|
|
926
|
-
});
|
|
927
|
-
return promise;
|
|
928
|
-
}
|
|
929
|
-
function makeUntrackedHeadersWithDevWarnings(underlyingHeaders, route) {
|
|
930
|
-
const cachedHeaders = CachedHeaders.get(underlyingHeaders);
|
|
931
|
-
if (cachedHeaders) return cachedHeaders;
|
|
932
|
-
const promise = (0, _dynamicrenderingutils.makeDevtoolsIOAwarePromise)(underlyingHeaders);
|
|
933
|
-
const proxiedPromise = new Proxy(promise, { get(target, prop, receiver) {
|
|
934
|
-
switch (prop) {
|
|
935
|
-
case Symbol.iterator:
|
|
936
|
-
warnForSyncAccess$1(route, "`...headers()` or similar iteration");
|
|
937
|
-
break;
|
|
938
|
-
case "append":
|
|
939
|
-
case "delete":
|
|
940
|
-
case "get":
|
|
941
|
-
case "has":
|
|
942
|
-
case "set":
|
|
943
|
-
case "getSetCookie":
|
|
944
|
-
case "forEach":
|
|
945
|
-
case "keys":
|
|
946
|
-
case "values":
|
|
947
|
-
case "entries":
|
|
948
|
-
warnForSyncAccess$1(route, `\`headers().${prop}\``);
|
|
949
|
-
break;
|
|
950
|
-
default:
|
|
951
|
-
}
|
|
952
|
-
return _reflect$1.ReflectAdapter.get(target, prop, receiver);
|
|
953
|
-
} });
|
|
954
|
-
CachedHeaders.set(underlyingHeaders, proxiedPromise);
|
|
955
|
-
return proxiedPromise;
|
|
956
|
-
}
|
|
957
|
-
function describeNameArg(arg) {
|
|
958
|
-
return typeof arg === "string" ? `'${arg}'` : "...";
|
|
959
|
-
}
|
|
960
|
-
function syncIODev$1(route, expression) {
|
|
961
|
-
const workUnitStore = _workunitasyncstorageexternal$1.workUnitAsyncStorage.getStore();
|
|
962
|
-
if (workUnitStore) switch (workUnitStore.type) {
|
|
963
|
-
case "request":
|
|
964
|
-
if (workUnitStore.prerenderPhase === true) (0, _dynamicrendering$1.trackSynchronousRequestDataAccessInDev)(workUnitStore);
|
|
965
|
-
break;
|
|
966
|
-
case "prerender":
|
|
967
|
-
case "prerender-client":
|
|
968
|
-
case "prerender-runtime":
|
|
969
|
-
case "prerender-ppr":
|
|
970
|
-
case "prerender-legacy":
|
|
971
|
-
case "cache":
|
|
972
|
-
case "private-cache":
|
|
973
|
-
case "unstable-cache": break;
|
|
974
|
-
default:
|
|
975
|
-
}
|
|
976
|
-
warnForSyncAccess$1(route, expression);
|
|
977
|
-
}
|
|
978
|
-
const warnForSyncAccess$1 = (0, _creatededupedbycallsiteservererrorlogger$1.createDedupedByCallsiteServerErrorLoggerDev)(createHeadersAccessError);
|
|
979
|
-
function createHeadersAccessError(route, expression) {
|
|
980
|
-
const prefix = route ? `Route "${route}" ` : "This route ";
|
|
981
|
-
return Object.defineProperty(/* @__PURE__ */ new Error(`${prefix}used ${expression}. \`headers()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`), "__NEXT_ERROR_CODE", {
|
|
982
|
-
value: "E277",
|
|
983
|
-
enumerable: false,
|
|
984
|
-
configurable: true
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
}) });
|
|
988
|
-
|
|
989
|
-
//#endregion
|
|
990
|
-
//#region ../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/request/draft-mode.js
|
|
991
|
-
var require_draft_mode = /* @__PURE__ */ require_dynamic_rendering$1.__commonJS({ "../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/server/request/draft-mode.js": ((exports) => {
|
|
992
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
993
|
-
Object.defineProperty(exports, "draftMode", {
|
|
994
|
-
enumerable: true,
|
|
995
|
-
get: function() {
|
|
996
|
-
return draftMode;
|
|
997
|
-
}
|
|
998
|
-
});
|
|
999
|
-
const _workunitasyncstorageexternal = require_dynamic_rendering$1.require_work_unit_async_storage_external();
|
|
1000
|
-
const _workasyncstorageexternal = require_dynamic_rendering$1.require_work_async_storage_external();
|
|
1001
|
-
const _dynamicrendering = require_dynamic_rendering$1.require_dynamic_rendering();
|
|
1002
|
-
const _creatededupedbycallsiteservererrorlogger = require_create_deduped_by_callsite_server_error_logger();
|
|
1003
|
-
const _staticgenerationbailout = require_dynamic_rendering$1.require_static_generation_bailout();
|
|
1004
|
-
const _hooksservercontext = require_dynamic_rendering$1.require_hooks_server_context();
|
|
1005
|
-
const _invarianterror = require_dynamic_rendering$1.require_invariant_error();
|
|
1006
|
-
const _reflect = require_reflect();
|
|
1007
|
-
function draftMode() {
|
|
1008
|
-
const callingExpression = "draftMode";
|
|
1009
|
-
const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
|
|
1010
|
-
const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
|
1011
|
-
if (!workStore || !workUnitStore) (0, _workunitasyncstorageexternal.throwForMissingRequestStore)(callingExpression);
|
|
1012
|
-
switch (workUnitStore.type) {
|
|
1013
|
-
case "prerender-runtime": return (0, _dynamicrendering.delayUntilRuntimeStage)(workUnitStore, createOrGetCachedDraftMode(workUnitStore.draftMode, workStore));
|
|
1014
|
-
case "request": return createOrGetCachedDraftMode(workUnitStore.draftMode, workStore);
|
|
1015
|
-
case "cache":
|
|
1016
|
-
case "private-cache":
|
|
1017
|
-
case "unstable-cache":
|
|
1018
|
-
const draftModeProvider = (0, _workunitasyncstorageexternal.getDraftModeProviderForCacheScope)(workStore, workUnitStore);
|
|
1019
|
-
if (draftModeProvider) return createOrGetCachedDraftMode(draftModeProvider, workStore);
|
|
1020
|
-
case "prerender":
|
|
1021
|
-
case "prerender-client":
|
|
1022
|
-
case "prerender-ppr":
|
|
1023
|
-
case "prerender-legacy": return createOrGetCachedDraftMode(null, workStore);
|
|
1024
|
-
default: return workUnitStore;
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
function createOrGetCachedDraftMode(draftModeProvider, workStore) {
|
|
1028
|
-
const cacheKey = draftModeProvider ?? NullDraftMode;
|
|
1029
|
-
const cachedDraftMode = CachedDraftModes.get(cacheKey);
|
|
1030
|
-
if (cachedDraftMode) return cachedDraftMode;
|
|
1031
|
-
let promise;
|
|
1032
|
-
if (process.env.NODE_ENV === "development" && !(workStore == null ? void 0 : workStore.isPrefetchRequest)) {
|
|
1033
|
-
const route = workStore == null ? void 0 : workStore.route;
|
|
1034
|
-
if (process.env.__NEXT_CACHE_COMPONENTS) return createDraftModeWithDevWarnings(draftModeProvider, route);
|
|
1035
|
-
promise = createExoticDraftModeWithDevWarnings(draftModeProvider, route);
|
|
1036
|
-
} else {
|
|
1037
|
-
if (process.env.__NEXT_CACHE_COMPONENTS) return Promise.resolve(new DraftMode(draftModeProvider));
|
|
1038
|
-
promise = createExoticDraftMode(draftModeProvider);
|
|
1039
|
-
}
|
|
1040
|
-
CachedDraftModes.set(cacheKey, promise);
|
|
1041
|
-
return promise;
|
|
1042
|
-
}
|
|
1043
|
-
const NullDraftMode = {};
|
|
1044
|
-
const CachedDraftModes = /* @__PURE__ */ new WeakMap();
|
|
1045
|
-
function createExoticDraftMode(underlyingProvider) {
|
|
1046
|
-
const instance = new DraftMode(underlyingProvider);
|
|
1047
|
-
const promise = Promise.resolve(instance);
|
|
1048
|
-
Object.defineProperty(promise, "isEnabled", {
|
|
1049
|
-
get() {
|
|
1050
|
-
return instance.isEnabled;
|
|
1051
|
-
},
|
|
1052
|
-
enumerable: true,
|
|
1053
|
-
configurable: true
|
|
1054
|
-
});
|
|
1055
|
-
promise.enable = instance.enable.bind(instance);
|
|
1056
|
-
promise.disable = instance.disable.bind(instance);
|
|
1057
|
-
return promise;
|
|
1058
|
-
}
|
|
1059
|
-
function createExoticDraftModeWithDevWarnings(underlyingProvider, route) {
|
|
1060
|
-
const instance = new DraftMode(underlyingProvider);
|
|
1061
|
-
const promise = Promise.resolve(instance);
|
|
1062
|
-
Object.defineProperty(promise, "isEnabled", {
|
|
1063
|
-
get() {
|
|
1064
|
-
syncIODev(route, "`draftMode().isEnabled`");
|
|
1065
|
-
return instance.isEnabled;
|
|
1066
|
-
},
|
|
1067
|
-
enumerable: true,
|
|
1068
|
-
configurable: true
|
|
1069
|
-
});
|
|
1070
|
-
Object.defineProperty(promise, "enable", { value: function get() {
|
|
1071
|
-
syncIODev(route, "`draftMode().enable()`");
|
|
1072
|
-
return instance.enable.apply(instance, arguments);
|
|
1073
|
-
} });
|
|
1074
|
-
Object.defineProperty(promise, "disable", { value: function get() {
|
|
1075
|
-
syncIODev(route, "`draftMode().disable()`");
|
|
1076
|
-
return instance.disable.apply(instance, arguments);
|
|
1077
|
-
} });
|
|
1078
|
-
return promise;
|
|
1079
|
-
}
|
|
1080
|
-
function createDraftModeWithDevWarnings(underlyingProvider, route) {
|
|
1081
|
-
const instance = new DraftMode(underlyingProvider);
|
|
1082
|
-
const promise = Promise.resolve(instance);
|
|
1083
|
-
return new Proxy(promise, { get(target, prop, receiver) {
|
|
1084
|
-
switch (prop) {
|
|
1085
|
-
case "isEnabled":
|
|
1086
|
-
warnForSyncAccess(route, `\`draftMode().${prop}\``);
|
|
1087
|
-
break;
|
|
1088
|
-
case "enable":
|
|
1089
|
-
case "disable":
|
|
1090
|
-
warnForSyncAccess(route, `\`draftMode().${prop}()\``);
|
|
1091
|
-
break;
|
|
1092
|
-
default:
|
|
1093
|
-
}
|
|
1094
|
-
return _reflect.ReflectAdapter.get(target, prop, receiver);
|
|
1095
|
-
} });
|
|
1096
|
-
}
|
|
1097
|
-
var DraftMode = class {
|
|
1098
|
-
constructor(provider) {
|
|
1099
|
-
this._provider = provider;
|
|
1100
|
-
}
|
|
1101
|
-
get isEnabled() {
|
|
1102
|
-
if (this._provider !== null) return this._provider.isEnabled;
|
|
1103
|
-
return false;
|
|
1104
|
-
}
|
|
1105
|
-
enable() {
|
|
1106
|
-
trackDynamicDraftMode("draftMode().enable()", this.enable);
|
|
1107
|
-
if (this._provider !== null) this._provider.enable();
|
|
1108
|
-
}
|
|
1109
|
-
disable() {
|
|
1110
|
-
trackDynamicDraftMode("draftMode().disable()", this.disable);
|
|
1111
|
-
if (this._provider !== null) this._provider.disable();
|
|
1112
|
-
}
|
|
1113
|
-
};
|
|
1114
|
-
function syncIODev(route, expression) {
|
|
1115
|
-
const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
|
1116
|
-
if (workUnitStore) switch (workUnitStore.type) {
|
|
1117
|
-
case "request":
|
|
1118
|
-
if (workUnitStore.prerenderPhase === true) (0, _dynamicrendering.trackSynchronousRequestDataAccessInDev)(workUnitStore);
|
|
1119
|
-
break;
|
|
1120
|
-
case "prerender":
|
|
1121
|
-
case "prerender-client":
|
|
1122
|
-
case "prerender-runtime":
|
|
1123
|
-
case "prerender-ppr":
|
|
1124
|
-
case "prerender-legacy":
|
|
1125
|
-
case "cache":
|
|
1126
|
-
case "private-cache":
|
|
1127
|
-
case "unstable-cache": break;
|
|
1128
|
-
default:
|
|
1129
|
-
}
|
|
1130
|
-
warnForSyncAccess(route, expression);
|
|
1131
|
-
}
|
|
1132
|
-
const warnForSyncAccess = (0, _creatededupedbycallsiteservererrorlogger.createDedupedByCallsiteServerErrorLoggerDev)(createDraftModeAccessError);
|
|
1133
|
-
function createDraftModeAccessError(route, expression) {
|
|
1134
|
-
const prefix = route ? `Route "${route}" ` : "This route ";
|
|
1135
|
-
return Object.defineProperty(/* @__PURE__ */ new Error(`${prefix}used ${expression}. \`draftMode()\` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`), "__NEXT_ERROR_CODE", {
|
|
1136
|
-
value: "E377",
|
|
1137
|
-
enumerable: false,
|
|
1138
|
-
configurable: true
|
|
1139
|
-
});
|
|
1140
|
-
}
|
|
1141
|
-
function trackDynamicDraftMode(expression, constructorOpt) {
|
|
1142
|
-
const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
|
|
1143
|
-
const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
|
1144
|
-
if (workStore) {
|
|
1145
|
-
if ((workUnitStore == null ? void 0 : workUnitStore.phase) === "after") throw Object.defineProperty(/* @__PURE__ */ new Error(`Route ${workStore.route} used "${expression}" inside \`after\`. The enabled status of draftMode can be read inside \`after\` but you cannot enable or disable draftMode. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`), "__NEXT_ERROR_CODE", {
|
|
1146
|
-
value: "E348",
|
|
1147
|
-
enumerable: false,
|
|
1148
|
-
configurable: true
|
|
1149
|
-
});
|
|
1150
|
-
if (workStore.dynamicShouldError) throw Object.defineProperty(new _staticgenerationbailout.StaticGenBailoutError(`Route ${workStore.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", {
|
|
1151
|
-
value: "E553",
|
|
1152
|
-
enumerable: false,
|
|
1153
|
-
configurable: true
|
|
1154
|
-
});
|
|
1155
|
-
if (workUnitStore) switch (workUnitStore.type) {
|
|
1156
|
-
case "cache":
|
|
1157
|
-
case "private-cache": {
|
|
1158
|
-
const error = Object.defineProperty(/* @__PURE__ */ new Error(`Route ${workStore.route} used "${expression}" inside "use cache". The enabled status of draftMode can be read in caches but you must not enable or disable draftMode inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", {
|
|
1159
|
-
value: "E246",
|
|
1160
|
-
enumerable: false,
|
|
1161
|
-
configurable: true
|
|
1162
|
-
});
|
|
1163
|
-
Error.captureStackTrace(error, constructorOpt);
|
|
1164
|
-
workStore.invalidDynamicUsageError ??= error;
|
|
1165
|
-
throw error;
|
|
1166
|
-
}
|
|
1167
|
-
case "unstable-cache": throw Object.defineProperty(/* @__PURE__ */ new Error(`Route ${workStore.route} used "${expression}" inside a function cached with "unstable_cache(...)". The enabled status of draftMode can be read in caches but you must not enable or disable draftMode inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`), "__NEXT_ERROR_CODE", {
|
|
1168
|
-
value: "E259",
|
|
1169
|
-
enumerable: false,
|
|
1170
|
-
configurable: true
|
|
1171
|
-
});
|
|
1172
|
-
case "prerender":
|
|
1173
|
-
case "prerender-runtime": {
|
|
1174
|
-
const error = Object.defineProperty(/* @__PURE__ */ new Error(`Route ${workStore.route} used ${expression} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`), "__NEXT_ERROR_CODE", {
|
|
1175
|
-
value: "E126",
|
|
1176
|
-
enumerable: false,
|
|
1177
|
-
configurable: true
|
|
1178
|
-
});
|
|
1179
|
-
return (0, _dynamicrendering.abortAndThrowOnSynchronousRequestDataAccess)(workStore.route, expression, error, workUnitStore);
|
|
1180
|
-
}
|
|
1181
|
-
case "prerender-client":
|
|
1182
|
-
const exportName = "`draftMode`";
|
|
1183
|
-
throw Object.defineProperty(new _invarianterror.InvariantError(`${exportName} must not be used within a client component. Next.js should be preventing ${exportName} from being included in client components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
|
|
1184
|
-
value: "E693",
|
|
1185
|
-
enumerable: false,
|
|
1186
|
-
configurable: true
|
|
1187
|
-
});
|
|
1188
|
-
case "prerender-ppr": return (0, _dynamicrendering.postponeWithTracking)(workStore.route, expression, workUnitStore.dynamicTracking);
|
|
1189
|
-
case "prerender-legacy":
|
|
1190
|
-
workUnitStore.revalidate = 0;
|
|
1191
|
-
const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${workStore.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", {
|
|
1192
|
-
value: "E558",
|
|
1193
|
-
enumerable: false,
|
|
1194
|
-
configurable: true
|
|
1195
|
-
});
|
|
1196
|
-
workStore.dynamicUsageDescription = expression;
|
|
1197
|
-
workStore.dynamicUsageStack = err.stack;
|
|
1198
|
-
throw err;
|
|
1199
|
-
case "request":
|
|
1200
|
-
(0, _dynamicrendering.trackDynamicDataInDynamicRender)(workUnitStore);
|
|
1201
|
-
break;
|
|
1202
|
-
default:
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
}) });
|
|
1207
|
-
|
|
1208
|
-
//#endregion
|
|
1209
|
-
//#region ../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/headers.js
|
|
1210
|
-
var require_headers = /* @__PURE__ */ require_dynamic_rendering$1.__commonJS({ "../../node_modules/.pnpm/next@15.5.18_@playwright+test@1.60.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/headers.js": ((exports, module) => {
|
|
1211
|
-
module.exports.cookies = require_cookies().cookies;
|
|
1212
|
-
module.exports.headers = require_headers$1().headers;
|
|
1213
|
-
module.exports.draftMode = require_draft_mode().draftMode;
|
|
1214
|
-
}) });
|
|
1215
|
-
|
|
1216
|
-
//#endregion
|
|
1217
|
-
//#region src/constants/sessionConstants.ts
|
|
1218
|
-
/**
|
|
1219
|
-
* Default session cookie lifetime in seconds (24 hours).
|
|
1220
|
-
*
|
|
1221
|
-
* Used when no explicit session cookie expiry is configured. The session cookie
|
|
1222
|
-
* lifetime can be overridden in two ways (evaluated in this order):
|
|
1223
|
-
*
|
|
1224
|
-
* 1. `sessionCookie.expiryTime` in `ThunderIDNodeConfig` — set programmatically
|
|
1225
|
-
* when initialising the SDK.
|
|
1226
|
-
* 2. `THUNDERID_SESSION_COOKIE_EXPIRY_TIME` environment variable — set in `.env`
|
|
1227
|
-
* (e.g. `THUNDERID_SESSION_COOKIE_EXPIRY_TIME=86400`).
|
|
1228
|
-
* 3. This constant — applied when neither of the above is present.
|
|
1229
|
-
*
|
|
1230
|
-
* Two independent expiry bounds apply to the session and they are generally
|
|
1231
|
-
* NOT the same value:
|
|
1232
|
-
*
|
|
1233
|
-
* - JWT `exp` claim — set by `SessionManager.createSessionToken(...)` from
|
|
1234
|
-
* the `accessTokenTtlSeconds` argument (i.e. the access token's `expires_in`
|
|
1235
|
-
* returned by the auth server, typically ~1 hour). This controls when
|
|
1236
|
-
* `verifySessionToken` rejects the token and is the trigger for a refresh.
|
|
1237
|
-
* - Browser cookie `maxAge` — set by the caller (sign-in / refresh / org-switch
|
|
1238
|
-
* actions) from `SessionManager.resolveSessionCookieExpiry(...)`, which returns
|
|
1239
|
-
* this constant by default (24 hours). This controls how long the browser
|
|
1240
|
-
* holds the cookie before discarding it.
|
|
1241
|
-
*/
|
|
1242
|
-
const DEFAULT_SESSION_COOKIE_EXPIRY_TIME = 86400;
|
|
1243
|
-
|
|
1244
|
-
//#endregion
|
|
1245
|
-
//#region src/utils/SessionManager.ts
|
|
1246
|
-
/**
|
|
1247
|
-
* Session management utility class for JWT-based session cookies
|
|
1248
|
-
*/
|
|
1249
|
-
var SessionManager = class {
|
|
1250
|
-
/**
|
|
1251
|
-
* Get the signing secret from environment variable
|
|
1252
|
-
* Throws error in production if not set
|
|
1253
|
-
*/
|
|
1254
|
-
static getSecret() {
|
|
1255
|
-
const secret = process.env["THUNDERID_SECRET"];
|
|
1256
|
-
if (!secret) {
|
|
1257
|
-
if (process.env["NODE_ENV"] === "production") throw new __thunderid_node.ThunderIDRuntimeError("THUNDERID_SECRET environment variable is required in production", "session-secret-required", "nextjs", "Set the THUNDERID_SECRET environment variable with a secure random string");
|
|
1258
|
-
console.warn("Using default secret for development. Set THUNDERID_SECRET for production!");
|
|
1259
|
-
return new TextEncoder().encode("development-secret-not-for-production");
|
|
1260
|
-
}
|
|
1261
|
-
return new TextEncoder().encode(secret);
|
|
1262
|
-
}
|
|
1263
|
-
/**
|
|
1264
|
-
* Create a temporary session cookie for login initiation
|
|
1265
|
-
*/
|
|
1266
|
-
static async createTempSession(sessionId) {
|
|
1267
|
-
const secret = this.getSecret();
|
|
1268
|
-
return await new jose.SignJWT({
|
|
1269
|
-
sessionId,
|
|
1270
|
-
type: "temp"
|
|
1271
|
-
}).setProtectedHeader({ alg: "HS256" }).setIssuedAt().setExpirationTime("15m").sign(secret);
|
|
1272
|
-
}
|
|
1273
|
-
/**
|
|
1274
|
-
* Resolve the session cookie expiry time in seconds.
|
|
1275
|
-
*
|
|
1276
|
-
* Resolution order (first defined value wins):
|
|
1277
|
-
* 1. `configuredExpiry` — value from `ThunderIDNodeConfig.sessionCookie?.expiryTime`
|
|
1278
|
-
* 2. `THUNDERID_SESSION_COOKIE_EXPIRY_TIME` environment variable
|
|
1279
|
-
* 3. `DEFAULT_SESSION_COOKIE_EXPIRY_TIME` (24 hours)
|
|
1280
|
-
*/
|
|
1281
|
-
static resolveSessionCookieExpiry(configuredExpiry) {
|
|
1282
|
-
if (configuredExpiry != null && configuredExpiry > 0) return configuredExpiry;
|
|
1283
|
-
const envValue = process.env["THUNDERID_SESSION_COOKIE_EXPIRY_TIME"];
|
|
1284
|
-
if (envValue) {
|
|
1285
|
-
const parsed = parseInt(envValue, 10);
|
|
1286
|
-
if (!Number.isNaN(parsed) && parsed > 0) return parsed;
|
|
1287
|
-
}
|
|
1288
|
-
return DEFAULT_SESSION_COOKIE_EXPIRY_TIME;
|
|
1289
|
-
}
|
|
1290
|
-
static async createSessionToken(accessToken, userId, sessionId, scopes, accessTokenTtlSeconds, refreshToken, organizationId) {
|
|
1291
|
-
const secret = this.getSecret();
|
|
1292
|
-
return await new jose.SignJWT({
|
|
1293
|
-
accessToken,
|
|
1294
|
-
organizationId,
|
|
1295
|
-
refreshToken,
|
|
1296
|
-
scopes,
|
|
1297
|
-
sessionId,
|
|
1298
|
-
type: "session"
|
|
1299
|
-
}).setProtectedHeader({ alg: "HS256" }).setSubject(userId).setIssuedAt().setExpirationTime(Math.floor(Date.now() / 1e3) + accessTokenTtlSeconds).sign(secret);
|
|
1300
|
-
}
|
|
1301
|
-
/**
|
|
1302
|
-
* Verify and decode a session token
|
|
1303
|
-
*/
|
|
1304
|
-
static async verifySessionToken(token) {
|
|
1305
|
-
try {
|
|
1306
|
-
const { payload } = await (0, jose.jwtVerify)(token, this.getSecret());
|
|
1307
|
-
if (payload["type"] !== "session") throw new Error("Invalid token type");
|
|
1308
|
-
return payload;
|
|
1309
|
-
} catch (error) {
|
|
1310
|
-
throw new __thunderid_node.ThunderIDRuntimeError(`Invalid session token: ${error instanceof Error ? error.message : "Unknown error"}`, "invalid-session-token", "nextjs", "Session token verification failed");
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
/**
|
|
1314
|
-
* Verify a session token for refresh. Validates the HMAC signature and the
|
|
1315
|
-
* `type === 'session'` discriminant but intentionally skips the `exp` check
|
|
1316
|
-
* so an expired access token can still be exchanged for a new one.
|
|
1317
|
-
*
|
|
1318
|
-
* Session lifetime is still bounded — the cookie's `maxAge` is set from
|
|
1319
|
-
* `sessionCookieExpiryTime`, so the browser drops an over-age session regardless
|
|
1320
|
-
* of the access-token exp embedded in the JWT.
|
|
1321
|
-
*
|
|
1322
|
-
* Never use the returned payload for authorization.
|
|
1323
|
-
*/
|
|
1324
|
-
static async verifySessionTokenForRefresh(token) {
|
|
1325
|
-
try {
|
|
1326
|
-
const { payload: rawPayload } = await (0, jose.compactVerify)(token, this.getSecret());
|
|
1327
|
-
const payload = JSON.parse(new TextDecoder().decode(rawPayload));
|
|
1328
|
-
if (payload.type !== "session") throw new Error("Invalid token type");
|
|
1329
|
-
return payload;
|
|
1330
|
-
} catch (error) {
|
|
1331
|
-
throw new __thunderid_node.ThunderIDRuntimeError(`Invalid session token: ${error instanceof Error ? error.message : "Unknown error"}`, "invalid-session-token-for-refresh", "nextjs", "Session token signature or type check failed during refresh");
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
/**
|
|
1335
|
-
* Verify and decode a temporary session token
|
|
1336
|
-
*/
|
|
1337
|
-
static async verifyTempSession(token) {
|
|
1338
|
-
try {
|
|
1339
|
-
const { payload } = await (0, jose.jwtVerify)(token, this.getSecret());
|
|
1340
|
-
if (payload["type"] !== "temp") throw new Error("Invalid token type");
|
|
1341
|
-
return { sessionId: payload["sessionId"] };
|
|
1342
|
-
} catch (error) {
|
|
1343
|
-
throw new __thunderid_node.ThunderIDRuntimeError(`Invalid temporary session token: ${error instanceof Error ? error.message : "Unknown error"}`, "invalid-temp-session-token", "nextjs", "Temporary session token verification failed");
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
/**
|
|
1347
|
-
* Get session cookie options
|
|
1348
|
-
*/
|
|
1349
|
-
static getSessionCookieOptions(maxAge) {
|
|
1350
|
-
return {
|
|
1351
|
-
httpOnly: true,
|
|
1352
|
-
maxAge,
|
|
1353
|
-
path: "/",
|
|
1354
|
-
sameSite: "lax",
|
|
1355
|
-
secure: process.env["NODE_ENV"] === "production"
|
|
1356
|
-
};
|
|
1357
|
-
}
|
|
1358
|
-
/**
|
|
1359
|
-
* Get temporary session cookie options
|
|
1360
|
-
*/
|
|
1361
|
-
static getTempSessionCookieOptions() {
|
|
1362
|
-
return {
|
|
1363
|
-
httpOnly: true,
|
|
1364
|
-
maxAge: 900,
|
|
1365
|
-
path: "/",
|
|
1366
|
-
sameSite: "lax",
|
|
1367
|
-
secure: process.env["NODE_ENV"] === "production"
|
|
1368
|
-
};
|
|
1369
|
-
}
|
|
1370
|
-
/**
|
|
1371
|
-
* Get session cookie name
|
|
1372
|
-
*/
|
|
1373
|
-
static getSessionCookieName() {
|
|
1374
|
-
return __thunderid_node.CookieConfig.SESSION_COOKIE_NAME;
|
|
1375
|
-
}
|
|
1376
|
-
/**
|
|
1377
|
-
* Get temporary session cookie name
|
|
1378
|
-
*/
|
|
1379
|
-
static getTempSessionCookieName() {
|
|
1380
|
-
return __thunderid_node.CookieConfig.TEMP_SESSION_COOKIE_NAME;
|
|
1381
|
-
}
|
|
1382
|
-
};
|
|
1383
|
-
var SessionManager_default = SessionManager;
|
|
1384
|
-
|
|
1385
|
-
//#endregion
|
|
1386
|
-
Object.defineProperty(exports, 'SessionManager_default', {
|
|
1387
|
-
enumerable: true,
|
|
1388
|
-
get: function () {
|
|
1389
|
-
return SessionManager_default;
|
|
1390
|
-
}
|
|
1391
|
-
});
|
|
1392
|
-
Object.defineProperty(exports, 'require_headers', {
|
|
1393
|
-
enumerable: true,
|
|
1394
|
-
get: function () {
|
|
1395
|
-
return require_headers;
|
|
1396
|
-
}
|
|
1397
|
-
});
|