Skip to content

Commit 6525e28

Browse files
committed
fix(build): export SignOutOptions, externalize consola
1 parent 9e7f653 commit 6525e28

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

build.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineBuildConfig } from 'unbuild'
2+
3+
export default defineBuildConfig({
4+
externals: ['consola'],
5+
})

src/runtime/app/composables/useUserSession.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { createAppAuthClient } from '#auth/client'
33
import { computed, useRequestHeaders, useRequestURL, useRuntimeConfig, useState, watch } from '#imports'
44
import { consola } from 'consola'
55

6+
export interface SignOutOptions { onSuccess?: () => void | Promise<void> }
7+
68
// Singleton client instance to ensure consistent state across all useUserSession calls
79
let _client: AppAuthClient | null = null
810
function getClient(baseURL: string): AppAuthClient {
@@ -189,8 +191,6 @@ export function useUserSession() {
189191
}
190192
}
191193

192-
interface SignOutOptions { onSuccess?: () => void | Promise<void> }
193-
194194
async function signOut(options?: SignOutOptions) {
195195
if (!client)
196196
throw new Error('signOut can only be called on client-side')

0 commit comments

Comments
 (0)