@umituz/react-native-firebase 1.12.1 → 1.12.2

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.12.1",
3
+ "version": "1.12.2",
4
4
  "description": "Unified Firebase package for React Native apps - Centralized initialization and core services (Analytics, Crashlytics).",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -52,4 +52,4 @@
52
52
  "README.md",
53
53
  "LICENSE"
54
54
  ]
55
- }
55
+ }
@@ -9,11 +9,11 @@ import {
9
9
  log,
10
10
  recordError,
11
11
  setAttribute,
12
+ setUserId,
12
13
  } from '@react-native-firebase/crashlytics';
14
+ import type { FirebaseCrashlyticsTypes } from '@react-native-firebase/crashlytics';
13
15
 
14
- export interface CrashlyticsInstance {
15
- // Instance is now opaque - methods are called via modular functions
16
- }
16
+ export type CrashlyticsInstance = FirebaseCrashlyticsTypes.Module;
17
17
 
18
18
  export interface NativeCrashlyticsAdapter {
19
19
  getCrashlytics(): CrashlyticsInstance;
@@ -25,12 +25,11 @@ export interface NativeCrashlyticsAdapter {
25
25
 
26
26
  export const nativeCrashlyticsAdapter: NativeCrashlyticsAdapter = {
27
27
  getCrashlytics(): CrashlyticsInstance {
28
- return getCrashlytics() as CrashlyticsInstance;
28
+ return getCrashlytics();
29
29
  },
30
30
  async setUserId(crashlytics: CrashlyticsInstance, userId: string): Promise<void> {
31
31
  try {
32
- // Note: setUserId is a method on the crashlytics instance, not a modular function
33
- await (crashlytics as any).setUserId(userId);
32
+ await setUserId(crashlytics, userId);
34
33
  } catch (error) {
35
34
  /* eslint-disable-next-line no-console */
36
35
  if (__DEV__) {