@react-native-firebase/crashlytics 23.7.0 → 23.8.1
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/CHANGELOG.md +10 -0
- package/dist/commonjs/handlers.js +175 -0
- package/dist/commonjs/handlers.js.map +1 -0
- package/dist/commonjs/index.js +38 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/modular.js +256 -0
- package/dist/commonjs/modular.js.map +1 -0
- package/dist/commonjs/namespaced.js +138 -0
- package/dist/commonjs/namespaced.js.map +1 -0
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/types/crashlytics.js +47 -0
- package/dist/commonjs/types/crashlytics.js.map +1 -0
- package/dist/commonjs/version.js +9 -0
- package/dist/commonjs/version.js.map +1 -0
- package/{lib → dist/module}/handlers.js +39 -36
- package/dist/module/handlers.js.map +1 -0
- package/dist/module/index.js +28 -0
- package/dist/module/index.js.map +1 -0
- package/{lib/modular/index.js → dist/module/modular.js} +37 -43
- package/dist/module/modular.js.map +1 -0
- package/dist/module/namespaced.js +135 -0
- package/dist/module/namespaced.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/types/crashlytics.js +43 -0
- package/dist/module/types/crashlytics.js.map +1 -0
- package/dist/module/version.js +5 -0
- package/dist/module/version.js.map +1 -0
- package/dist/typescript/commonjs/lib/handlers.d.ts +28 -0
- package/dist/typescript/commonjs/lib/handlers.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/index.d.ts +5 -0
- package/dist/typescript/commonjs/lib/index.d.ts.map +1 -0
- package/{lib/modular/index.d.ts → dist/typescript/commonjs/lib/modular.d.ts} +37 -40
- package/dist/typescript/commonjs/lib/modular.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/namespaced.d.ts +12 -0
- package/dist/typescript/commonjs/lib/namespaced.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/types/crashlytics.d.ts +117 -0
- package/dist/typescript/commonjs/lib/types/crashlytics.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/version.d.ts +2 -0
- package/dist/typescript/commonjs/lib/version.d.ts.map +1 -0
- package/dist/typescript/commonjs/package.json +1 -0
- package/dist/typescript/module/lib/handlers.d.ts +28 -0
- package/dist/typescript/module/lib/handlers.d.ts.map +1 -0
- package/dist/typescript/module/lib/index.d.ts +5 -0
- package/dist/typescript/module/lib/index.d.ts.map +1 -0
- package/dist/typescript/module/lib/modular.d.ts +193 -0
- package/dist/typescript/module/lib/modular.d.ts.map +1 -0
- package/dist/typescript/module/lib/namespaced.d.ts +12 -0
- package/dist/typescript/module/lib/namespaced.d.ts.map +1 -0
- package/dist/typescript/module/lib/types/crashlytics.d.ts +117 -0
- package/dist/typescript/module/lib/types/crashlytics.d.ts.map +1 -0
- package/dist/typescript/module/lib/version.d.ts +2 -0
- package/dist/typescript/module/lib/version.d.ts.map +1 -0
- package/dist/typescript/module/package.json +1 -0
- package/lib/handlers.ts +196 -0
- package/lib/index.ts +26 -0
- package/lib/modular.ts +249 -0
- package/lib/{index.js → namespaced.ts} +51 -22
- package/lib/types/crashlytics.ts +159 -0
- package/lib/version.ts +2 -0
- package/package.json +50 -8
- package/tsconfig.json +21 -0
- package/lib/index.d.ts +0 -287
- package/lib/version.js +0 -2
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
isOther,
|
|
26
26
|
MODULAR_DEPRECATION_ARG,
|
|
27
27
|
} from '@react-native-firebase/app/lib/common';
|
|
28
|
+
import type { ModuleConfig } from '@react-native-firebase/app/lib/internal';
|
|
28
29
|
import {
|
|
29
30
|
createModuleNamespace,
|
|
30
31
|
FirebaseModule,
|
|
@@ -36,28 +37,36 @@ import {
|
|
|
36
37
|
setGlobalErrorHandler,
|
|
37
38
|
setOnUnhandledPromiseRejectionHandler,
|
|
38
39
|
} from './handlers';
|
|
39
|
-
import version from './version';
|
|
40
|
+
import { version } from './version';
|
|
41
|
+
import type { Crashlytics, Statics } from './types/crashlytics';
|
|
42
|
+
import type { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
40
43
|
|
|
41
|
-
const statics = {};
|
|
44
|
+
const statics: Partial<Statics> = {};
|
|
42
45
|
|
|
43
46
|
const namespace = 'crashlytics';
|
|
44
47
|
|
|
45
48
|
const nativeModuleName = 'RNFBCrashlyticsModule';
|
|
46
49
|
|
|
47
50
|
class FirebaseCrashlyticsModule extends FirebaseModule {
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
_isCrashlyticsCollectionEnabled: boolean;
|
|
52
|
+
|
|
53
|
+
constructor(
|
|
54
|
+
app: ReactNativeFirebase.FirebaseAppBase,
|
|
55
|
+
config: ModuleConfig,
|
|
56
|
+
customUrlOrRegion?: string | null,
|
|
57
|
+
) {
|
|
58
|
+
super(app, config, customUrlOrRegion);
|
|
50
59
|
setGlobalErrorHandler(this.native);
|
|
51
60
|
setOnUnhandledPromiseRejectionHandler(this.native);
|
|
52
61
|
this._isCrashlyticsCollectionEnabled = this.native.isCrashlyticsCollectionEnabled;
|
|
53
62
|
}
|
|
54
63
|
|
|
55
|
-
get isCrashlyticsCollectionEnabled() {
|
|
64
|
+
get isCrashlyticsCollectionEnabled(): boolean {
|
|
56
65
|
// Purposefully did not deprecate this as I think it should remain a property rather than a method.
|
|
57
66
|
return this._isCrashlyticsCollectionEnabled;
|
|
58
67
|
}
|
|
59
68
|
|
|
60
|
-
checkForUnsentReports() {
|
|
69
|
+
checkForUnsentReports(): Promise<boolean> {
|
|
61
70
|
if (this.isCrashlyticsCollectionEnabled) {
|
|
62
71
|
throw new Error(
|
|
63
72
|
"firebase.crashlytics().setCrashlyticsCollectionEnabled(*) has been set to 'true', all reports are automatically sent.",
|
|
@@ -66,23 +75,23 @@ class FirebaseCrashlyticsModule extends FirebaseModule {
|
|
|
66
75
|
return this.native.checkForUnsentReports();
|
|
67
76
|
}
|
|
68
77
|
|
|
69
|
-
crash() {
|
|
78
|
+
crash(): void {
|
|
70
79
|
this.native.crash();
|
|
71
80
|
}
|
|
72
81
|
|
|
73
|
-
async deleteUnsentReports() {
|
|
82
|
+
async deleteUnsentReports(): Promise<void> {
|
|
74
83
|
await this.native.deleteUnsentReports();
|
|
75
84
|
}
|
|
76
85
|
|
|
77
|
-
didCrashOnPreviousExecution() {
|
|
86
|
+
didCrashOnPreviousExecution(): Promise<boolean> {
|
|
78
87
|
return this.native.didCrashOnPreviousExecution();
|
|
79
88
|
}
|
|
80
89
|
|
|
81
|
-
log(message) {
|
|
90
|
+
log(message: string): void {
|
|
82
91
|
this.native.log(`${message}`);
|
|
83
92
|
}
|
|
84
93
|
|
|
85
|
-
setAttribute(name, value) {
|
|
94
|
+
setAttribute(name: string, value: string): Promise<null> {
|
|
86
95
|
if (!isString(name)) {
|
|
87
96
|
throw new Error(
|
|
88
97
|
'firebase.crashlytics().setAttribute(*, _): The supplied property name must be a string.',
|
|
@@ -98,7 +107,7 @@ class FirebaseCrashlyticsModule extends FirebaseModule {
|
|
|
98
107
|
return this.native.setAttribute(name, value);
|
|
99
108
|
}
|
|
100
109
|
|
|
101
|
-
setAttributes(object) {
|
|
110
|
+
setAttributes(object: { [key: string]: string }): Promise<null> {
|
|
102
111
|
if (!isObject(object)) {
|
|
103
112
|
throw new Error(
|
|
104
113
|
'firebase.crashlytics().setAttributes(*): The supplied arg must be an object of key value strings.',
|
|
@@ -108,7 +117,7 @@ class FirebaseCrashlyticsModule extends FirebaseModule {
|
|
|
108
117
|
return this.native.setAttributes(object);
|
|
109
118
|
}
|
|
110
119
|
|
|
111
|
-
setUserId(userId) {
|
|
120
|
+
setUserId(userId: string): Promise<null> {
|
|
112
121
|
if (!isString(userId)) {
|
|
113
122
|
throw new Error(
|
|
114
123
|
'firebase.crashlytics().setUserId(*): The supplied userId must be a string value.',
|
|
@@ -118,7 +127,7 @@ class FirebaseCrashlyticsModule extends FirebaseModule {
|
|
|
118
127
|
return this.native.setUserId(userId);
|
|
119
128
|
}
|
|
120
129
|
|
|
121
|
-
recordError(error, jsErrorName) {
|
|
130
|
+
recordError(error: Error, jsErrorName?: string): void {
|
|
122
131
|
if (isError(error)) {
|
|
123
132
|
StackTrace.fromError(error, { offline: true }).then(stackFrames => {
|
|
124
133
|
this.native.recordError(createNativeErrorObj(error, stackFrames, false, jsErrorName));
|
|
@@ -130,13 +139,13 @@ class FirebaseCrashlyticsModule extends FirebaseModule {
|
|
|
130
139
|
}
|
|
131
140
|
}
|
|
132
141
|
|
|
133
|
-
sendUnsentReports() {
|
|
142
|
+
sendUnsentReports(): void {
|
|
134
143
|
if (this.isCrashlyticsCollectionEnabled) {
|
|
135
144
|
this.native.sendUnsentReports();
|
|
136
145
|
}
|
|
137
146
|
}
|
|
138
147
|
|
|
139
|
-
setCrashlyticsCollectionEnabled(enabled) {
|
|
148
|
+
setCrashlyticsCollectionEnabled(enabled: boolean): Promise<null> {
|
|
140
149
|
if (!isBoolean(enabled)) {
|
|
141
150
|
throw new Error(
|
|
142
151
|
"firebase.crashlytics().setCrashlyticsCollectionEnabled(*) 'enabled' must be a boolean.",
|
|
@@ -148,14 +157,10 @@ class FirebaseCrashlyticsModule extends FirebaseModule {
|
|
|
148
157
|
}
|
|
149
158
|
}
|
|
150
159
|
|
|
151
|
-
export * from './modular';
|
|
152
|
-
|
|
153
160
|
// import { SDK_VERSION } from '@react-native-firebase/crashlytics';
|
|
154
161
|
export const SDK_VERSION = version;
|
|
155
162
|
|
|
156
|
-
|
|
157
|
-
// crashlytics().X(...);
|
|
158
|
-
export default createModuleNamespace({
|
|
163
|
+
const crashlyticsNamespace = createModuleNamespace({
|
|
159
164
|
statics,
|
|
160
165
|
version,
|
|
161
166
|
namespace,
|
|
@@ -166,12 +171,36 @@ export default createModuleNamespace({
|
|
|
166
171
|
ModuleClass: FirebaseCrashlyticsModule,
|
|
167
172
|
});
|
|
168
173
|
|
|
174
|
+
type CrashlyticsNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<
|
|
175
|
+
Crashlytics,
|
|
176
|
+
Statics
|
|
177
|
+
> & {
|
|
178
|
+
crashlytics: ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<Crashlytics, Statics>;
|
|
179
|
+
firebase: ReactNativeFirebase.Module;
|
|
180
|
+
app(name?: string): ReactNativeFirebase.FirebaseApp;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
// import crashlytics from '@react-native-firebase/crashlytics';
|
|
184
|
+
// crashlytics().X(...);
|
|
185
|
+
export default crashlyticsNamespace as unknown as CrashlyticsNamespace;
|
|
186
|
+
|
|
169
187
|
// import crashlytics, { firebase } from '@react-native-firebase/crashlytics';
|
|
170
188
|
// crashlytics().X(...);
|
|
171
189
|
// firebase.crashlytics().X(...);
|
|
172
|
-
export const firebase =
|
|
190
|
+
export const firebase =
|
|
191
|
+
getFirebaseRoot() as unknown as ReactNativeFirebase.FirebaseNamespacedExport<
|
|
192
|
+
'crashlytics',
|
|
193
|
+
Crashlytics,
|
|
194
|
+
Statics,
|
|
195
|
+
false
|
|
196
|
+
>;
|
|
197
|
+
|
|
198
|
+
// Register the interop module for non-native platforms.
|
|
199
|
+
// Note: This package doesn't have a web fallback module like functions does
|
|
200
|
+
// setReactNativeModule(nativeModuleName, fallBackModule);
|
|
173
201
|
|
|
174
202
|
// This will throw with 'Default App Not initialized' if the default app is not configured.
|
|
175
203
|
if (!isOther) {
|
|
204
|
+
// @ts-ignore - Extra arg used by deprecation proxy to detect namespaced calls
|
|
176
205
|
firebase.crashlytics.call(null, getApp(), MODULAR_DEPRECATION_ARG);
|
|
177
206
|
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this library except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
19
|
+
|
|
20
|
+
// ============ Module Interface ============
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Crashlytics module instance - returned from firebase.crashlytics() or firebase.app().crashlytics()
|
|
24
|
+
*/
|
|
25
|
+
export interface Crashlytics extends ReactNativeFirebase.FirebaseModule {
|
|
26
|
+
/** The FirebaseApp this module is associated with */
|
|
27
|
+
app: ReactNativeFirebase.FirebaseApp;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Whether Crashlytics reporting is enabled.
|
|
31
|
+
*/
|
|
32
|
+
readonly isCrashlyticsCollectionEnabled: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Determines whether there are any unsent crash reports cached on the device.
|
|
36
|
+
* The callback only executes if automatic data collection is disabled.
|
|
37
|
+
*
|
|
38
|
+
* @throws Error if Crashlytics collection is enabled (reports are automatically sent)
|
|
39
|
+
*/
|
|
40
|
+
checkForUnsentReports(): Promise<boolean>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Cause your app to crash for testing purposes. This is a native crash and will not contain a javascript stack trace.
|
|
44
|
+
* Note that crashes are intercepted by debuggers on iOS so no report will be seen under those conditions.
|
|
45
|
+
*/
|
|
46
|
+
crash(): void;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Deletes any unsent reports on the device. This method only applies if automatic data collection is disabled.
|
|
50
|
+
*/
|
|
51
|
+
deleteUnsentReports(): Promise<void>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Returns a boolean value indicating whether the app crashed during the previous execution.
|
|
55
|
+
*/
|
|
56
|
+
didCrashOnPreviousExecution(): Promise<boolean>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Log a message that will appear in any subsequent Crash or Non-fatal error reports.
|
|
60
|
+
*
|
|
61
|
+
* @param message The message to log.
|
|
62
|
+
*/
|
|
63
|
+
log(message: string): void;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Record a JavaScript Error.
|
|
67
|
+
*
|
|
68
|
+
* The JavaScript stack trace is converted into a mock native iOS or Android exception before submission.
|
|
69
|
+
*
|
|
70
|
+
* @param error Expects an instance of Error; e.g. classes that extend Error will also be supported.
|
|
71
|
+
* @param jsErrorName Optional string containing Javascript error name
|
|
72
|
+
*/
|
|
73
|
+
recordError(error: Error, jsErrorName?: string): void;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Enqueues any unsent reports on the device to upload to Crashlytics. This method only applies if
|
|
77
|
+
* automatic data collection is disabled.
|
|
78
|
+
*/
|
|
79
|
+
sendUnsentReports(): void;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Sets a string value to be associated with the given attribute name which will be visible in the Firebase Crashlytics console.
|
|
83
|
+
*
|
|
84
|
+
* @param name The name of the attribute to set.
|
|
85
|
+
* @param value A string value for the given attribute.
|
|
86
|
+
*/
|
|
87
|
+
setAttribute(name: string, value: string): Promise<null>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Like `setAttribute` but for multiple attributes.
|
|
91
|
+
*
|
|
92
|
+
* @param attributes An object of key/value attribute name and values.
|
|
93
|
+
*/
|
|
94
|
+
setAttributes(attributes: { [key: string]: string }): Promise<null>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Specify a user identifier which will be visible in the Firebase Crashlytics console.
|
|
98
|
+
*
|
|
99
|
+
* It is recommended for privacy purposes that this value be a value that's meaningless to a third-party
|
|
100
|
+
* observer; such as an arbitrary string that ties an end-user to a record in your system e.g. a database record id.
|
|
101
|
+
*
|
|
102
|
+
* @param userId An arbitrary string that ties an end-user to a record in your system e.g. a database record id.
|
|
103
|
+
*/
|
|
104
|
+
setUserId(userId: string): Promise<null>;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Enable/disable Crashlytics reporting.
|
|
108
|
+
*
|
|
109
|
+
* Use this for opt-in first user data collection flows combined with `firebase.json` settings to disable auto collection.
|
|
110
|
+
*
|
|
111
|
+
* @param enabled A boolean value representing whether to enable Crashlytics error collection.
|
|
112
|
+
*/
|
|
113
|
+
setCrashlyticsCollectionEnabled(enabled: boolean): Promise<null>;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// ============ Statics Interface ============
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Static properties available on firebase.crashlytics
|
|
120
|
+
*/
|
|
121
|
+
export interface Statics {
|
|
122
|
+
SDK_VERSION: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* FirebaseApp type with crashlytics() method.
|
|
127
|
+
* @deprecated Import FirebaseApp from '@react-native-firebase/app' instead.
|
|
128
|
+
* The crashlytics() method is added via module augmentation.
|
|
129
|
+
*/
|
|
130
|
+
export type FirebaseApp = ReactNativeFirebase.FirebaseApp;
|
|
131
|
+
|
|
132
|
+
// ============ Module Augmentation ============
|
|
133
|
+
|
|
134
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
135
|
+
declare module '@react-native-firebase/app' {
|
|
136
|
+
namespace ReactNativeFirebase {
|
|
137
|
+
interface Module {
|
|
138
|
+
crashlytics: FirebaseModuleWithStaticsAndApp<Crashlytics, Statics>;
|
|
139
|
+
}
|
|
140
|
+
interface FirebaseApp {
|
|
141
|
+
crashlytics(): Crashlytics;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/* eslint-enable @typescript-eslint/no-namespace */
|
|
146
|
+
// ============ Backwards Compatibility Namespace - to be removed with namespaced exports ============
|
|
147
|
+
type _Statics = Statics;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @deprecated Use the exported types directly instead.
|
|
151
|
+
* FirebaseCrashlyticsTypes namespace is kept for backwards compatibility.
|
|
152
|
+
*/
|
|
153
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
154
|
+
export namespace FirebaseCrashlyticsTypes {
|
|
155
|
+
// Short name aliases referencing top-level types
|
|
156
|
+
export type Module = Crashlytics;
|
|
157
|
+
export type Statics = _Statics;
|
|
158
|
+
}
|
|
159
|
+
/* eslint-enable @typescript-eslint/no-namespace */
|
package/lib/version.ts
ADDED
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-firebase/crashlytics",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.8.1",
|
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
|
5
5
|
"description": "React Native Firebase - Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize, and fix stability issues that erode your app quality. React Native Firebase provides automatic crash reporting for both native and JavaScript errors, including unhandled promise rejections.",
|
|
6
|
-
"main": "
|
|
7
|
-
"
|
|
6
|
+
"main": "./dist/commonjs/index.js",
|
|
7
|
+
"module": "./dist/module/index.js",
|
|
8
|
+
"types": "./dist/typescript/commonjs/lib/index.d.ts",
|
|
8
9
|
"scripts": {
|
|
9
|
-
"build": "genversion --semi lib/version.
|
|
10
|
+
"build": "genversion --esm --semi lib/version.ts",
|
|
10
11
|
"build:clean": "rimraf android/build && rimraf ios/build",
|
|
11
12
|
"build:plugin": "rimraf plugin/build && tsc --build plugin",
|
|
12
13
|
"lint:plugin": "eslint plugin/src/*",
|
|
13
|
-
"
|
|
14
|
+
"compile": "bob build",
|
|
15
|
+
"prepare": "yarn run build && yarn run build:plugin && yarn compile"
|
|
14
16
|
},
|
|
15
17
|
"repository": {
|
|
16
18
|
"type": "git",
|
|
@@ -29,14 +31,16 @@
|
|
|
29
31
|
"crashlytics"
|
|
30
32
|
],
|
|
31
33
|
"peerDependencies": {
|
|
32
|
-
"@react-native-firebase/app": "23.
|
|
34
|
+
"@react-native-firebase/app": "23.8.1",
|
|
33
35
|
"expo": ">=47.0.0"
|
|
34
36
|
},
|
|
35
37
|
"dependencies": {
|
|
36
38
|
"stacktrace-js": "^2.0.2"
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
39
|
-
"expo": "^54.0.27"
|
|
41
|
+
"expo": "^54.0.27",
|
|
42
|
+
"react-native-builder-bob": "^0.40.17",
|
|
43
|
+
"typescript": "^5.9.3"
|
|
40
44
|
},
|
|
41
45
|
"peerDependenciesMeta": {
|
|
42
46
|
"expo": {
|
|
@@ -47,5 +51,43 @@
|
|
|
47
51
|
"access": "public",
|
|
48
52
|
"provenance": true
|
|
49
53
|
},
|
|
50
|
-
"
|
|
54
|
+
"exports": {
|
|
55
|
+
".": {
|
|
56
|
+
"source": "./lib/index.ts",
|
|
57
|
+
"import": {
|
|
58
|
+
"types": "./dist/typescript/module/lib/index.d.ts",
|
|
59
|
+
"default": "./dist/module/index.js"
|
|
60
|
+
},
|
|
61
|
+
"require": {
|
|
62
|
+
"types": "./dist/typescript/commonjs/lib/index.d.ts",
|
|
63
|
+
"default": "./dist/commonjs/index.js"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"./package.json": "./package.json"
|
|
67
|
+
},
|
|
68
|
+
"react-native-builder-bob": {
|
|
69
|
+
"source": "lib",
|
|
70
|
+
"output": "dist",
|
|
71
|
+
"targets": [
|
|
72
|
+
[
|
|
73
|
+
"module",
|
|
74
|
+
{
|
|
75
|
+
"esm": true
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
"commonjs",
|
|
80
|
+
{
|
|
81
|
+
"esm": true
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
[
|
|
85
|
+
"typescript",
|
|
86
|
+
{
|
|
87
|
+
"tsc": "../../node_modules/.bin/tsc"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"gitHead": "46b06d2b1100ec03c7807b4ff34b583b773a19d7"
|
|
51
93
|
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.packages.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"baseUrl": ".",
|
|
5
|
+
"rootDir": ".",
|
|
6
|
+
"paths": {
|
|
7
|
+
"@react-native-firebase/app/lib/common/*": ["../app/dist/typescript/commonjs/lib/common/*"],
|
|
8
|
+
"@react-native-firebase/app/lib/common": ["../app/dist/typescript/commonjs/lib/common"],
|
|
9
|
+
"@react-native-firebase/app/lib/internal/web/*": [
|
|
10
|
+
"../app/dist/typescript/commonjs/lib/internal/web/*"
|
|
11
|
+
],
|
|
12
|
+
"@react-native-firebase/app/lib/internal/*": [
|
|
13
|
+
"../app/dist/typescript/commonjs/lib/internal/*"
|
|
14
|
+
],
|
|
15
|
+
"@react-native-firebase/app/lib/internal": ["../app/dist/typescript/commonjs/lib/internal"],
|
|
16
|
+
"@react-native-firebase/app": ["../app/dist/typescript/commonjs/lib"]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"include": ["lib/**/*", "../app/lib/internal/global.d.ts"],
|
|
20
|
+
"exclude": ["node_modules", "dist", "__tests__", "**/*.test.ts"]
|
|
21
|
+
}
|