INNER CODE UNIT · TypeScript

isCloudSyncConfigured

phase-rs/phase · client/src/services/cloudSync/index.ts:12

export function isCloudSyncConfigured(): boolean {
  return isSupabaseConfigured();
}

/**
 * Returns the configured cloud-sync provider, or null when the deployment has
 * none (self-hosters with no Supabase build env). Callers treat null as "cloud
 * sync unavailable" and fall back to file backup. Resolved once and cached.
 */
export function getCloudSyncProvider(): CloudSyncProvider | null {
  if (!resolved) {
    const supabase = new SupabaseSyncProvider();
    provider = supabase.isConfigured() ? supabase : null;
    resolved = true;
  }
  return provider;
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…