File size: 826 Bytes
81ff144 ffac2f3 81ff144 ffac2f3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | interface RuntimeConfig {
apiUrl?: string;
supabaseUrl?: string;
supabaseAnonKey?: string;
sentryDsn?: string;
appVersion?: string;
}
declare global {
interface Window {
__AUBM_CONFIG__?: RuntimeConfig;
}
}
const runtimeConfig = window.__AUBM_CONFIG__ ?? {};
export const getApiUrl = () => import.meta.env.VITE_API_URL || runtimeConfig.apiUrl || '';
export const getSupabaseUrl = () => (
import.meta.env.VITE_SUPABASE_URL || runtimeConfig.supabaseUrl || ''
);
export const getSupabaseAnonKey = () => (
import.meta.env.VITE_SUPABASE_ANON_KEY || runtimeConfig.supabaseAnonKey || ''
);
export const getSentryDsn = () => (
import.meta.env.VITE_SENTRY_DSN || runtimeConfig.sentryDsn || ''
);
export const getAppVersion = () => runtimeConfig.appVersion || import.meta.env.VITE_APP_VERSION || '0.7.0';
|