Files
supabase/packages
Charis Lam 30f6660e68 refactor: make AuthProvider and FeatureFlagProvider injectable
Phase 2 of the DI plan. Enables mock clients/fetchers to be injected
in integration tests without touching the HTTP layer.

packages/common/auth.tsx
- Add AuthClient interface (initialize, onAuthStateChange, refreshSession)
  — narrow type covering only the methods AuthProvider uses
- Add optional gotrueClient?: AuthClient prop to AuthProvider with
  singleton fallback for backward compatibility

packages/common/feature-flags.tsx
- Add optional getPostHogFlags prop to FeatureFlagProvider; used in
  place of the hardcoded getFeatureFlags() call when provided, falls
  back to existing behavior when omitted

apps/studio/lib/app-providers.tsx
- Wire registry.featureFlags.getPostHogFlags into FeatureFlagProvider
2026-03-03 13:25:41 -05:00
..
2026-02-18 14:44:07 +01:00