@betterstart/cli 0.1.63 → 0.1.64

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/cli.js CHANGED
@@ -8694,6 +8694,7 @@ export const { signIn, signUp, signOut, useSession } = authClient
8694
8694
  function authMiddlewareTemplate() {
8695
8695
  return `import { headers } from 'next/headers'
8696
8696
  import { redirect } from 'next/navigation'
8697
+ import { connection } from 'next/server'
8697
8698
  import { auth, type User } from './auth'
8698
8699
 
8699
8700
  export enum UserRole {
@@ -8710,6 +8711,7 @@ export function isUserRole(value: unknown): value is UserRole {
8710
8711
  * Get the current session from Better Auth
8711
8712
  */
8712
8713
  export async function getSession() {
8714
+ await connection()
8713
8715
  const session = await auth.api.getSession({
8714
8716
  headers: await headers(),
8715
8717
  })