@umituz/react-native-firebase 1.13.59 → 1.13.60
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 +10 -5
- package/src/auth/infrastructure/config/initializers/FirebaseAuthInitializer.ts +1 -1
- package/src/auth/infrastructure/stores/auth.store.ts +1 -1
- package/src/auth/presentation/hooks/useAnonymousAuth.ts +4 -4
- package/src/auth/presentation/hooks/utils/auth-state-change.handler.ts +1 -1
- package/src/firestore/infrastructure/config/FirestoreClient.ts +1 -1
- package/src/firestore/infrastructure/repositories/BaseRepository.ts +1 -1
- package/src/firestore/infrastructure/services/RequestLoggerService.ts +4 -4
- package/src/infrastructure/config/FirebaseClient.ts +1 -1
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-firebase",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.60",
|
|
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",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build:scripts": "tsc -p tsconfig.scripts.json",
|
|
9
9
|
"prepublishOnly": "npm run build:scripts",
|
|
10
|
-
"typecheck": "
|
|
11
|
-
"lint": "
|
|
10
|
+
"typecheck": "tsc --noEmit",
|
|
11
|
+
"lint": "eslint src --ext .ts,.tsx --max-warnings 0",
|
|
12
12
|
"version:patch": "npm version patch -m 'chore: release v%s'",
|
|
13
13
|
"version:minor": "npm version minor -m 'chore: release v%s'",
|
|
14
14
|
"version:major": "npm version major -m 'chore: release v%s'"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"url": "https://github.com/umituz/react-native-firebase"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@umituz/react-native-storage": "
|
|
35
|
+
"@umituz/react-native-storage": "*",
|
|
36
36
|
"expo-apple-authentication": ">=6.0.0",
|
|
37
37
|
"expo-crypto": ">=13.0.0",
|
|
38
38
|
"firebase": ">=10.0.0",
|
|
@@ -43,7 +43,12 @@
|
|
|
43
43
|
"@react-native-async-storage/async-storage": "^2.2.0",
|
|
44
44
|
"@types/jest": "^30.0.0",
|
|
45
45
|
"@types/react": "~19.1.10",
|
|
46
|
-
"@
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "^8.52.0",
|
|
47
|
+
"@typescript-eslint/parser": "^8.52.0",
|
|
48
|
+
"@umituz/react-native-storage": "*",
|
|
49
|
+
"eslint": "^9.39.2",
|
|
50
|
+
"eslint-plugin-react": "^7.37.5",
|
|
51
|
+
"eslint-plugin-react-native": "^5.0.0",
|
|
47
52
|
"expo-apple-authentication": "^8.0.8",
|
|
48
53
|
"expo-crypto": "^15.0.8",
|
|
49
54
|
"firebase": "^12.6.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import {
|
|
9
9
|
initializeAuth,
|
|
10
10
|
getAuth,
|
|
11
|
-
// @ts-
|
|
11
|
+
// @ts-expect-error: getReactNativePersistence exists in the React Native bundle but missing from type definitions
|
|
12
12
|
// See: https://github.com/firebase/firebase-js-sdk/issues/9316
|
|
13
13
|
getReactNativePersistence,
|
|
14
14
|
} from 'firebase/auth';
|
|
@@ -47,7 +47,7 @@ export const useFirebaseAuthStore = createStore<AuthState, AuthActions>({
|
|
|
47
47
|
|
|
48
48
|
unsubscribe = onAuthStateChanged(auth, (currentUser: User | null) => {
|
|
49
49
|
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
console.log(
|
|
52
52
|
"[FirebaseAuthStore] Auth state changed:",
|
|
53
53
|
currentUser?.uid || "null"
|
|
@@ -84,7 +84,7 @@ export function useAnonymousAuth(auth: Auth | null): UseAnonymousAuthResult {
|
|
|
84
84
|
// Listen to auth state changes
|
|
85
85
|
unsubscribeRef.current = onAuthStateChanged(auth, (user) => {
|
|
86
86
|
if (__DEV__) {
|
|
87
|
-
|
|
87
|
+
|
|
88
88
|
console.log("[useAnonymousAuth] onAuthStateChanged fired", {
|
|
89
89
|
hasUser: !!user,
|
|
90
90
|
uid: user?.uid,
|
|
@@ -99,7 +99,7 @@ export function useAnonymousAuth(auth: Auth | null): UseAnonymousAuthResult {
|
|
|
99
99
|
setError(authError);
|
|
100
100
|
setLoading(false);
|
|
101
101
|
if (__DEV__) {
|
|
102
|
-
|
|
102
|
+
|
|
103
103
|
console.error("[useAnonymousAuth] Auth listener setup error", authError);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -129,7 +129,7 @@ export function useAnonymousAuth(auth: Auth | null): UseAnonymousAuthResult {
|
|
|
129
129
|
handleAuthStateChange(result.user);
|
|
130
130
|
|
|
131
131
|
if (__DEV__) {
|
|
132
|
-
|
|
132
|
+
|
|
133
133
|
console.log("[useAnonymousAuth] Successfully signed in anonymously", {
|
|
134
134
|
uid: result.anonymousUser.uid,
|
|
135
135
|
wasAlreadySignedIn: result.wasAlreadySignedIn,
|
|
@@ -141,7 +141,7 @@ export function useAnonymousAuth(auth: Auth | null): UseAnonymousAuthResult {
|
|
|
141
141
|
const authError = err instanceof Error ? err : new Error('Anonymous sign in failed');
|
|
142
142
|
setError(authError);
|
|
143
143
|
if (__DEV__) {
|
|
144
|
-
|
|
144
|
+
|
|
145
145
|
console.error("[useAnonymousAuth] Sign in error", authError);
|
|
146
146
|
}
|
|
147
147
|
throw authError;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Use @umituz/react-native-firebase to initialize Firebase App.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
if (typeof __DEV__ !== "undefined" && __DEV__) console.log("📍 [LIFECYCLE] FirestoreClient.ts - Module loading");
|
|
13
13
|
|
|
14
14
|
import type { Firestore } from 'firebase/firestore';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* It provides a consistent interface for Firestore operations.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
if (typeof __DEV__ !== "undefined" && __DEV__) console.log("📍 [LIFECYCLE] BaseRepository.ts - Module loading");
|
|
19
19
|
|
|
20
20
|
import type { Firestore } from "firebase/firestore";
|
|
@@ -36,10 +36,10 @@ export class RequestLoggerService {
|
|
|
36
36
|
: fullLog.collection;
|
|
37
37
|
|
|
38
38
|
if (fullLog.success) {
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
console.log(`${prefix} ${status} ${operation}: ${details}`);
|
|
41
41
|
} else {
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
console.error(`${prefix} ${status} ${operation}: ${details}`, fullLog.error);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -125,9 +125,9 @@ export class RequestLoggerService {
|
|
|
125
125
|
try {
|
|
126
126
|
listener(log);
|
|
127
127
|
} catch (error) {
|
|
128
|
-
|
|
128
|
+
|
|
129
129
|
if (__DEV__) {
|
|
130
|
-
|
|
130
|
+
|
|
131
131
|
console.error('[RequestLogger] Listener error:', error);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* - Dependency Inversion: Depends on abstractions (interfaces), not concrete implementations
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
if (typeof __DEV__ !== "undefined" && __DEV__) console.log("📍 [LIFECYCLE] FirebaseClient.ts - Module loading");
|
|
21
21
|
|
|
22
22
|
import type { FirebaseConfig } from '../../domain/value-objects/FirebaseConfig';
|