@umituz/react-native-firebase 1.13.42 → 1.13.44

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-firebase",
3
- "version": "1.13.42",
3
+ "version": "1.13.44",
4
4
  "description": "Unified Firebase package for React Native apps - Auth and Firestore services using Firebase JS SDK (no native modules).",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -5,7 +5,6 @@
5
5
 
6
6
  import { signInAnonymously, type Auth, type User } from "firebase/auth";
7
7
  import { toAnonymousUser, type AnonymousUser } from "../../domain/entities/AnonymousUser";
8
- import { checkAuthState } from "./auth-utils.service";
9
8
 
10
9
  export interface AnonymousAuthResult {
11
10
  readonly user: User;
@@ -13,7 +12,11 @@ export interface AnonymousAuthResult {
13
12
  readonly wasAlreadySignedIn: boolean;
14
13
  }
15
14
 
16
- export class AnonymousAuthService {
15
+ export interface AnonymousAuthServiceInterface {
16
+ signInAnonymously(auth: Auth): Promise<AnonymousAuthResult>;
17
+ }
18
+
19
+ export class AnonymousAuthService implements AnonymousAuthServiceInterface {
17
20
  async signInAnonymously(auth: Auth): Promise<AnonymousAuthResult> {
18
21
  if (!auth) throw new Error("Firebase Auth instance is required");
19
22
 
@@ -41,11 +41,12 @@ export class FirebaseFirestoreInitializationError extends FirebaseFirestoreError
41
41
  * This error is NOT retryable - quota won't increase by retrying
42
42
  */
43
43
  export class FirebaseFirestoreQuotaError extends FirebaseFirestoreError {
44
+ readonly isQuotaError = true;
45
+ override readonly code = 'resource-exhausted';
46
+
44
47
  constructor(message: string, originalError?: unknown) {
45
48
  super(message, originalError);
46
49
  this.name = 'FirebaseFirestoreQuotaError';
47
- (this as any).isQuotaError = true;
48
- (this as any).code = 'resource-exhausted';
49
50
  Object.setPrototypeOf(this, FirebaseFirestoreQuotaError.prototype);
50
51
  }
51
52
  }
@@ -18,10 +18,10 @@ function extractStoragePath(downloadUrl: string): string | null {
18
18
  }
19
19
 
20
20
  try {
21
- const urlObj = new URL(downloadUrl) as any;
21
+ const urlObj = new URL(downloadUrl);
22
22
  const pathMatch = urlObj.pathname.match(/\/o\/(.+)/);
23
23
 
24
- if (!pathMatch) {
24
+ if (!pathMatch || !pathMatch[1]) {
25
25
  return null;
26
26
  }
27
27