feat(release): prepare 1.1.0 candidate

This commit is contained in:
Yun Chan 2026-08-29 18:33:45 +09:00
parent 5a34f66981
commit 5205dcdfa9
736 changed files with 115667 additions and 12203 deletions

View file

@ -20,25 +20,37 @@ export interface CreateClientOptions {
}
}
/**
* Supabase .
* url anonKey가 "dummy" .
* env가 /SSR이 .
*/
export function createD3roSupabaseClient(options: CreateClientOptions): D3roSupabaseClient {
const { url, anonKey, auth } = options
export class SupabaseConfigurationError extends Error {
readonly code = 'SUPABASE_CONFIGURATION_MISSING'
constructor() {
super('Supabase public URL and anonymous key are required.')
this.name = 'SupabaseConfigurationError'
}
}
export function requireSupabasePublicConfig(options: CreateClientOptions): {
url: string
anonKey: string
} {
const url = options.url?.trim()
const anonKey = options.anonKey?.trim()
if (!url || !anonKey) {
// Env가 없으면 fallback URL로 생성. 실제 호출은 런타임에 실패하지만
// 빌드/타입체크는 통과. 앱 상단에서 isClientConfigured()로 체크해야 함.
return createClient<Database>('https://placeholder.supabase.co', 'placeholder-anon-key', {
auth: {
persistSession: false,
autoRefreshToken: false
}
})
throw new SupabaseConfigurationError()
}
return { url, anonKey }
}
/**
* Supabase .
* .
*/
export function createD3roSupabaseClient(options: CreateClientOptions): D3roSupabaseClient {
const { auth } = options
const { url, anonKey } = requireSupabasePublicConfig(options)
return createClient<Database>(url, anonKey, {
auth: {
persistSession: auth?.persistSession ?? true,
@ -52,5 +64,5 @@ export function createD3roSupabaseClient(options: CreateClientOptions): D3roSupa
* Env가 . UI에서 "Supabase 미설정" .
*/
export function isClientConfigured(options: CreateClientOptions): boolean {
return Boolean(options.url && options.anonKey)
return Boolean(options.url?.trim() && options.anonKey?.trim())
}