@umituz/react-native-firebase 1.13.148 → 1.13.150

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/package.json +1 -1
  2. package/src/auth/infrastructure/services/apple-auth.service.ts +10 -2
  3. package/src/auth/infrastructure/services/google-auth.service.ts +10 -2
  4. package/src/auth/infrastructure/services/reauthentication.service.ts +5 -1
  5. package/src/auth/presentation/hooks/shared/auth-hooks.util.ts +60 -0
  6. package/src/auth/presentation/hooks/shared/hook-utils.util.ts +14 -216
  7. package/src/auth/presentation/hooks/shared/safe-state-hooks.util.ts +76 -0
  8. package/src/auth/presentation/hooks/shared/state-hooks.util.ts +97 -0
  9. package/src/domain/utils/async-executor.util.ts +16 -169
  10. package/src/domain/utils/error-handler.util.ts +18 -170
  11. package/src/domain/utils/error-handlers/error-checkers.ts +120 -0
  12. package/src/domain/utils/error-handlers/error-converters.ts +48 -0
  13. package/src/domain/utils/error-handlers/error-messages.ts +18 -0
  14. package/src/domain/utils/executors/advanced-executors.util.ts +59 -0
  15. package/src/domain/utils/executors/basic-executors.util.ts +56 -0
  16. package/src/domain/utils/executors/batch-executors.util.ts +42 -0
  17. package/src/domain/utils/executors/error-converters.util.ts +45 -0
  18. package/src/domain/utils/result/result-creators.ts +49 -0
  19. package/src/domain/utils/result/result-helpers.ts +60 -0
  20. package/src/domain/utils/result/result-types.ts +40 -0
  21. package/src/domain/utils/result.util.ts +28 -127
  22. package/src/domain/utils/validation.util.ts +38 -209
  23. package/src/domain/utils/validators/composite.validator.ts +24 -0
  24. package/src/domain/utils/validators/firebase.validator.ts +45 -0
  25. package/src/domain/utils/validators/generic.validator.ts +59 -0
  26. package/src/domain/utils/validators/string.validator.ts +25 -0
  27. package/src/domain/utils/validators/url.validator.ts +36 -0
  28. package/src/domain/utils/validators/user-input.validator.ts +54 -0
  29. package/src/firestore/infrastructure/middleware/QuotaTrackingMiddleware.ts +10 -3
  30. package/src/firestore/utils/deduplication/timer-manager.util.ts +2 -2
  31. package/src/firestore/utils/pagination.helper.ts +3 -1
  32. package/src/infrastructure/config/FirebaseClient.ts +28 -189
  33. package/src/infrastructure/config/clients/FirebaseClientSingleton.ts +82 -0
  34. package/src/infrastructure/config/services/FirebaseInitializationService.ts +115 -0
  35. package/src/init/createFirebaseInitModule.ts +9 -3
@@ -52,13 +52,17 @@ export function createFirebaseInitModule(
52
52
 
53
53
  // Check if initialization was successful
54
54
  if (!result.app) {
55
- console.error('[Firebase] Initialization failed: Firebase app not initialized');
55
+ if (__DEV__) {
56
+ console.error('[Firebase] Initialization failed: Firebase app not initialized');
57
+ }
56
58
  return false;
57
59
  }
58
60
 
59
61
  // Check if auth initialization failed
60
62
  if (result.auth === false && result.authError) {
61
- console.error(`[Firebase] Auth initialization failed: ${result.authError}`);
63
+ if (__DEV__) {
64
+ console.error(`[Firebase] Auth initialization failed: ${result.authError}`);
65
+ }
62
66
  // Auth failure is not critical for the app to function
63
67
  // Log the error but don't fail the entire initialization
64
68
  }
@@ -66,7 +70,9 @@ export function createFirebaseInitModule(
66
70
  return true;
67
71
  } catch (error) {
68
72
  const errorMessage = error instanceof Error ? error.message : 'Unknown error';
69
- console.error(`[Firebase] Initialization failed: ${errorMessage}`);
73
+ if (__DEV__) {
74
+ console.error(`[Firebase] Initialization failed: ${errorMessage}`);
75
+ }
70
76
  return false;
71
77
  }
72
78
  },