@react-native-firebase/database 25.1.0 → 26.1.0
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 +21 -0
- package/RNFBDatabase.podspec +20 -7
- package/android/build.gradle +19 -0
- package/android/src/main/java/io/invertase/firebase/database/UniversalFirebaseDatabaseModule.java +4 -14
- package/android/src/reactnative/java/io/invertase/firebase/database/DatabaseTurboModuleSupport.java +56 -0
- package/android/src/reactnative/java/io/invertase/firebase/database/{ReactNativeFirebaseDatabaseModule.java → NativeRNFBTurboDatabase.java} +16 -36
- package/android/src/reactnative/java/io/invertase/firebase/database/{ReactNativeFirebaseDatabaseOnDisconnectModule.java → NativeRNFBTurboDatabaseOnDisconnect.java} +19 -14
- package/android/src/reactnative/java/io/invertase/firebase/database/{ReactNativeFirebaseDatabaseQueryModule.java → NativeRNFBTurboDatabaseQuery.java} +41 -105
- package/android/src/reactnative/java/io/invertase/firebase/database/{ReactNativeFirebaseDatabaseReferenceModule.java → NativeRNFBTurboDatabaseReference.java} +27 -20
- package/android/src/reactnative/java/io/invertase/firebase/database/{ReactNativeFirebaseDatabaseTransactionModule.java → NativeRNFBTurboDatabaseTransaction.java} +41 -19
- package/android/src/reactnative/java/io/invertase/firebase/database/ReactNativeFirebaseDatabasePackage.java +5 -5
- package/android/src/reactnative/java/io/invertase/firebase/database/ReactNativeFirebaseDatabaseTransactionHandler.java +11 -0
- package/android/src/reactnative/java/io/invertase/firebase/database/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboDatabaseOnDisconnectSpec.java +55 -0
- package/android/src/reactnative/java/io/invertase/firebase/database/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboDatabaseQuerySpec.java +52 -0
- package/android/src/reactnative/java/io/invertase/firebase/database/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboDatabaseReferenceSpec.java +55 -0
- package/android/src/reactnative/java/io/invertase/firebase/database/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboDatabaseSpec.java +57 -0
- package/android/src/reactnative/java/io/invertase/firebase/database/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboDatabaseTransactionSpec.java +42 -0
- package/android/src/reactnative/java/io/invertase/firebase/database/generated/jni/CMakeLists.txt +36 -0
- package/android/src/reactnative/java/io/invertase/firebase/database/generated/jni/RNFBDatabaseTurboModules-generated.cpp +182 -0
- package/android/src/reactnative/java/io/invertase/firebase/database/generated/jni/RNFBDatabaseTurboModules.h +63 -0
- package/android/src/reactnative/java/io/invertase/firebase/database/generated/jni/react/renderer/components/RNFBDatabaseTurboModules/RNFBDatabaseTurboModulesJSI-generated.cpp +257 -0
- package/android/src/reactnative/java/io/invertase/firebase/database/generated/jni/react/renderer/components/RNFBDatabaseTurboModules/RNFBDatabaseTurboModulesJSI.h +440 -0
- package/dist/module/DatabaseDataSnapshot.js +20 -6
- package/dist/module/DatabaseDataSnapshot.js.map +1 -1
- package/dist/module/DatabaseOnDisconnect.js.map +1 -1
- package/dist/module/DatabaseQuery.js +13 -16
- package/dist/module/DatabaseQuery.js.map +1 -1
- package/dist/module/DatabaseReference.js +16 -15
- package/dist/module/DatabaseReference.js.map +1 -1
- package/dist/module/DatabaseSyncTree.js +5 -4
- package/dist/module/DatabaseSyncTree.js.map +1 -1
- package/dist/module/DatabaseThenableReference.js +1 -2
- package/dist/module/DatabaseThenableReference.js.map +1 -1
- package/dist/module/index.js +210 -5
- package/dist/module/index.js.map +1 -1
- package/dist/module/modular/query.js +14 -15
- package/dist/module/modular/query.js.map +1 -1
- package/dist/module/modular/transaction.js +1 -2
- package/dist/module/modular/transaction.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/module/web/RNFBDatabaseModule.js +4 -8
- package/dist/module/web/RNFBDatabaseModule.js.map +1 -1
- package/dist/typescript/lib/DatabaseDataSnapshot.d.ts +9 -7
- package/dist/typescript/lib/DatabaseDataSnapshot.d.ts.map +1 -1
- package/dist/typescript/lib/DatabaseOnDisconnect.d.ts +3 -3
- package/dist/typescript/lib/DatabaseOnDisconnect.d.ts.map +1 -1
- package/dist/typescript/lib/DatabaseQuery.d.ts +18 -18
- package/dist/typescript/lib/DatabaseQuery.d.ts.map +1 -1
- package/dist/typescript/lib/DatabaseReference.d.ts +8 -8
- package/dist/typescript/lib/DatabaseReference.d.ts.map +1 -1
- package/dist/typescript/lib/DatabaseSyncTree.d.ts +2 -2
- package/dist/typescript/lib/DatabaseSyncTree.d.ts.map +1 -1
- package/dist/typescript/lib/DatabaseThenableReference.d.ts +8 -8
- package/dist/typescript/lib/DatabaseThenableReference.d.ts.map +1 -1
- package/dist/typescript/lib/index.d.ts +57 -4
- package/dist/typescript/lib/index.d.ts.map +1 -1
- package/dist/typescript/lib/modular/query.d.ts.map +1 -1
- package/dist/typescript/lib/modular/transaction.d.ts.map +1 -1
- package/dist/typescript/lib/types/database.d.ts +5 -5
- package/dist/typescript/lib/types/database.d.ts.map +1 -1
- package/dist/typescript/lib/types/internal.d.ts +32 -31
- package/dist/typescript/lib/types/internal.d.ts.map +1 -1
- package/dist/typescript/lib/version.d.ts +1 -1
- package/dist/typescript/lib/web/RNFBDatabaseModule.d.ts.map +1 -1
- package/ios/RNFBDatabase/RNFBDatabaseCommon.h +13 -6
- package/ios/RNFBDatabase/RNFBDatabaseCommon.m +2 -10
- package/ios/RNFBDatabase/RNFBDatabaseConstants.h +25 -0
- package/ios/RNFBDatabase/RNFBDatabaseModule.mm +90 -0
- package/ios/RNFBDatabase/RNFBDatabaseModuleHelper.h +39 -0
- package/ios/RNFBDatabase/RNFBDatabaseModuleHelper.m +64 -0
- package/ios/RNFBDatabase/RNFBDatabaseOnDisconnectHelper.h +59 -0
- package/ios/RNFBDatabase/{RNFBDatabaseOnDisconnectModule.m → RNFBDatabaseOnDisconnectHelper.m} +41 -47
- package/ios/RNFBDatabase/RNFBDatabaseOnDisconnectModule.mm +121 -0
- package/ios/RNFBDatabase/RNFBDatabaseQuery.h +11 -0
- package/ios/RNFBDatabase/RNFBDatabaseQueryHelper.h +49 -0
- package/ios/RNFBDatabase/{RNFBDatabaseQueryModule.m → RNFBDatabaseQueryHelper.m} +77 -91
- package/ios/RNFBDatabase/RNFBDatabaseQueryModule.h +5 -1
- package/ios/RNFBDatabase/RNFBDatabaseQueryModule.mm +105 -0
- package/ios/RNFBDatabase/RNFBDatabaseQueue.h +29 -0
- package/ios/RNFBDatabase/RNFBDatabaseQueue.m +31 -0
- package/ios/RNFBDatabase/RNFBDatabaseReferenceHelper.h +59 -0
- package/ios/RNFBDatabase/{RNFBDatabaseReferenceModule.m → RNFBDatabaseReferenceHelper.m} +42 -48
- package/ios/RNFBDatabase/RNFBDatabaseReferenceModule.mm +125 -0
- package/ios/RNFBDatabase/RNFBDatabaseTransactionHelper.h +38 -0
- package/ios/RNFBDatabase/{RNFBDatabaseTransactionModule.m → RNFBDatabaseTransactionHelper.m} +52 -51
- package/ios/RNFBDatabase/RNFBDatabaseTransactionModule.h +0 -1
- package/ios/RNFBDatabase/RNFBDatabaseTransactionModule.mm +86 -0
- package/ios/RNFBDatabase.xcodeproj/project.pbxproj +24 -24
- package/ios/generated/RCTAppDependencyProvider.h +25 -0
- package/ios/generated/RCTAppDependencyProvider.mm +55 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
- package/ios/generated/RNFBDatabaseTurboModules/RNFBDatabaseTurboModules-generated.mm +254 -0
- package/ios/generated/RNFBDatabaseTurboModules/RNFBDatabaseTurboModules.h +264 -0
- package/ios/generated/RNFBDatabaseTurboModulesJSI-generated.cpp +257 -0
- package/ios/generated/RNFBDatabaseTurboModulesJSI.h +440 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/lib/DatabaseDataSnapshot.ts +43 -38
- package/lib/DatabaseOnDisconnect.ts +3 -3
- package/lib/DatabaseQuery.ts +45 -77
- package/lib/DatabaseReference.ts +37 -66
- package/lib/DatabaseSyncTree.ts +8 -11
- package/lib/DatabaseThenableReference.ts +9 -17
- package/lib/index.ts +325 -6
- package/lib/modular/query.ts +14 -70
- package/lib/modular/transaction.ts +1 -4
- package/lib/types/database.ts +5 -5
- package/lib/types/internal.ts +31 -56
- package/lib/version.ts +1 -1
- package/lib/web/RNFBDatabaseModule.ts +6 -10
- package/package.json +26 -4
- package/react-native.config.js +10 -0
- package/specs/NativeRNFBTurboDatabase.ts +13 -0
- package/specs/NativeRNFBTurboDatabaseOnDisconnect.ts +18 -0
- package/specs/NativeRNFBTurboDatabaseQuery.ts +25 -0
- package/specs/NativeRNFBTurboDatabaseReference.ts +13 -0
- package/specs/NativeRNFBTurboDatabaseTransaction.ts +16 -0
- package/typedoc.json +1 -1
- package/dist/module/modular.js +0 -76
- package/dist/module/modular.js.map +0 -1
- package/dist/module/namespaced.js +0 -147
- package/dist/module/namespaced.js.map +0 -1
- package/dist/module/types/namespaced.js +0 -67
- package/dist/module/types/namespaced.js.map +0 -1
- package/dist/typescript/lib/modular.d.ts +0 -24
- package/dist/typescript/lib/modular.d.ts.map +0 -1
- package/dist/typescript/lib/namespaced.d.ts +0 -13
- package/dist/typescript/lib/namespaced.d.ts.map +0 -1
- package/dist/typescript/lib/types/namespaced.d.ts +0 -1230
- package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
- package/ios/RNFBDatabase/RNFBDatabaseModule.m +0 -100
- package/lib/modular.ts +0 -134
- package/lib/namespaced.ts +0 -253
- package/lib/types/namespaced.ts +0 -1366
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this library except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
import { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Firebase Database package for React Native.
|
|
24
|
-
*
|
|
25
|
-
* #### Example 1
|
|
26
|
-
*
|
|
27
|
-
* Access the firebase export from the `database` package:
|
|
28
|
-
*
|
|
29
|
-
* ```js
|
|
30
|
-
* import { firebase } from '@react-native-firebase/database';
|
|
31
|
-
*
|
|
32
|
-
* // firebase.database().X
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* #### Example 2
|
|
36
|
-
*
|
|
37
|
-
* Using the default export from the `database` package:
|
|
38
|
-
*
|
|
39
|
-
* ```js
|
|
40
|
-
* import database from '@react-native-firebase/database';
|
|
41
|
-
*
|
|
42
|
-
* // database().X
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* #### Example 3
|
|
46
|
-
*
|
|
47
|
-
* Using the default export from the `app` package:
|
|
48
|
-
*
|
|
49
|
-
* ```js
|
|
50
|
-
* import firebase from '@react-native-firebase/app';
|
|
51
|
-
* import '@react-native-firebase/database';
|
|
52
|
-
*
|
|
53
|
-
* // firebase.database().X
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* @firebase database
|
|
57
|
-
*/
|
|
58
|
-
/**
|
|
59
|
-
* @deprecated Use the exported types directly instead.
|
|
60
|
-
* FirebaseDatabaseTypes namespace is kept for backwards compatibility.
|
|
61
|
-
*/
|
|
62
|
-
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
63
|
-
export let FirebaseDatabaseTypes;
|
|
64
|
-
/**
|
|
65
|
-
* Attach namespace to `firebase.` and `FirebaseApp.`.
|
|
66
|
-
*/
|
|
67
|
-
//# sourceMappingURL=namespaced.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ReactNativeFirebase","FirebaseDatabaseTypes"],"sourceRoot":"../../../lib","sources":["types/namespaced.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAAQ,4BAA4B;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,WACiBC,qBAAqB;AAuwCtC;AACA;AACA","ignoreList":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
2
|
-
import type { Database, DatabaseReference, EmulatorMockTokenOptions } from './types/database';
|
|
3
|
-
type FirebaseApp = ReactNativeFirebase.FirebaseApp;
|
|
4
|
-
export declare function getDatabase(app?: FirebaseApp, url?: string): Database;
|
|
5
|
-
export declare function connectDatabaseEmulator(db: Database, host: string, port: number, options?: {
|
|
6
|
-
mockUserToken?: EmulatorMockTokenOptions | string;
|
|
7
|
-
}): void;
|
|
8
|
-
export declare function goOffline(db: Database): void;
|
|
9
|
-
export declare function goOnline(db: Database): void;
|
|
10
|
-
export declare function ref(db: Database, path?: string): DatabaseReference;
|
|
11
|
-
export declare function refFromURL(db: Database, url: string): DatabaseReference;
|
|
12
|
-
export declare function setPersistenceEnabled(db: Database, enabled: boolean): Promise<void>;
|
|
13
|
-
export declare function setLoggingEnabled(db: Database, enabled: boolean): Promise<void>;
|
|
14
|
-
export declare function setPersistenceCacheSizeBytes(db: Database, bytes: number): Promise<void>;
|
|
15
|
-
export declare function forceLongPolling(): void;
|
|
16
|
-
export declare function forceWebSockets(): void;
|
|
17
|
-
export declare function serverTimestamp(): object;
|
|
18
|
-
export declare function getServerTime(db: Database): Date;
|
|
19
|
-
export declare function increment(delta: number): object;
|
|
20
|
-
export declare function enableLogging(enabled: boolean, persistent?: boolean): any;
|
|
21
|
-
export declare function enableLogging(logger: (message: string) => unknown): any;
|
|
22
|
-
export * from './modular/query';
|
|
23
|
-
export * from './modular/transaction';
|
|
24
|
-
//# sourceMappingURL=modular.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modular.d.ts","sourceRoot":"","sources":["../../../lib/modular.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAS9F,KAAK,WAAW,GAAG,mBAAmB,CAAC,WAAW,CAAC;AAEnD,wBAAgB,WAAW,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,QAAQ,CAQrE;AAED,wBAAgB,uBAAuB,CACrC,EAAE,EAAE,QAAQ,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IACR,aAAa,CAAC,EAAE,wBAAwB,GAAG,MAAM,CAAC;CACnD,GACA,IAAI,CAQN;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAE5C;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAE3C;AAED,wBAAgB,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAElE;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAEvE;AAED,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAMnF;AAED,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAM/E;AAED,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMvF;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAEhD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAM/C;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;AAC3E,wBAAgB,aAAa,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,GAAG,GAAG,CAAC;AAQzE,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
2
|
-
import type { FirebaseDatabaseTypes } from './types/namespaced';
|
|
3
|
-
import './types/internal';
|
|
4
|
-
export declare const SDK_VERSION = "25.1.0";
|
|
5
|
-
type DatabaseNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<FirebaseDatabaseTypes.Module, FirebaseDatabaseTypes.Statics> & {
|
|
6
|
-
database: ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<FirebaseDatabaseTypes.Module, FirebaseDatabaseTypes.Statics>;
|
|
7
|
-
firebase: ReactNativeFirebase.Module;
|
|
8
|
-
app(name?: string): ReactNativeFirebase.FirebaseApp;
|
|
9
|
-
};
|
|
10
|
-
declare const _default: DatabaseNamespace;
|
|
11
|
-
export default _default;
|
|
12
|
-
export declare const firebase: ReactNativeFirebase.FirebaseNamespacedExport<"database", FirebaseDatabaseTypes.Module, FirebaseDatabaseTypes.Statics, true>;
|
|
13
|
-
//# sourceMappingURL=namespaced.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"namespaced.d.ts","sourceRoot":"","sources":["../../../lib/namespaced.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAOtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,kBAAkB,CAAC;AA+K1B,eAAO,MAAM,WAAW,WAAU,CAAC;AAanC,KAAK,iBAAiB,GAAG,mBAAmB,CAAC,+BAA+B,CAC1E,qBAAqB,CAAC,MAAM,EAC5B,qBAAqB,CAAC,OAAO,CAC9B,GAAG;IACF,QAAQ,EAAE,mBAAmB,CAAC,+BAA+B,CAC3D,qBAAqB,CAAC,MAAM,EAC5B,qBAAqB,CAAC,OAAO,CAC9B,CAAC;IACF,QAAQ,EAAE,mBAAmB,CAAC,MAAM,CAAC;IACrC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC,WAAW,CAAC;CACrD,CAAC;wBAE6C,iBAAiB;AAAhE,wBAAiE;AAEjE,eAAO,MAAM,QAAQ,EACa,mBAAmB,CAAC,wBAAwB,CAC1E,UAAU,EACV,qBAAqB,CAAC,MAAM,EAC5B,qBAAqB,CAAC,OAAO,EAC7B,IAAI,CACL,CAAC"}
|