@react-native-firebase/app 23.7.0 → 23.8.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/dist/commonjs/FirebaseApp.js +85 -0
- package/dist/commonjs/FirebaseApp.js.map +1 -0
- package/dist/commonjs/common/Base64.js +106 -0
- package/dist/commonjs/common/Base64.js.map +1 -0
- package/dist/commonjs/common/MutatableParams.js +50 -0
- package/dist/commonjs/common/MutatableParams.js.map +1 -0
- package/dist/commonjs/common/ReferenceBase.js +49 -0
- package/dist/commonjs/common/ReferenceBase.js.map +1 -0
- package/dist/commonjs/common/deeps.js +82 -0
- package/dist/commonjs/common/deeps.js.map +1 -0
- package/dist/commonjs/common/id.js +88 -0
- package/dist/commonjs/common/id.js.map +1 -0
- package/dist/commonjs/common/index.js +799 -0
- package/dist/commonjs/common/index.js.map +1 -0
- package/dist/commonjs/common/path.js +133 -0
- package/dist/commonjs/common/path.js.map +1 -0
- package/dist/commonjs/common/promise.js +65 -0
- package/dist/commonjs/common/promise.js.map +1 -0
- package/dist/commonjs/common/serialize.js +48 -0
- package/dist/commonjs/common/serialize.js.map +1 -0
- package/dist/commonjs/common/unitTestUtils.js +54 -0
- package/dist/commonjs/common/unitTestUtils.js.map +1 -0
- package/dist/commonjs/common/validate.js +236 -0
- package/dist/commonjs/common/validate.js.map +1 -0
- package/dist/commonjs/index.js +42 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/internal/FirebaseModule.js +63 -0
- package/dist/commonjs/internal/FirebaseModule.js.map +1 -0
- package/dist/commonjs/internal/NativeFirebaseError.js +92 -0
- package/dist/commonjs/internal/NativeFirebaseError.js.map +1 -0
- package/dist/commonjs/internal/NativeModules.js +6 -0
- package/dist/commonjs/internal/NativeModules.js.map +1 -0
- package/dist/commonjs/internal/RNFBNativeEventEmitter.js +118 -0
- package/dist/commonjs/internal/RNFBNativeEventEmitter.js.map +1 -0
- package/dist/commonjs/internal/SharedEventEmitter.js +26 -0
- package/dist/commonjs/internal/SharedEventEmitter.js.map +1 -0
- package/dist/commonjs/internal/asyncStorage.js +83 -0
- package/dist/commonjs/internal/asyncStorage.js.map +1 -0
- package/dist/commonjs/internal/constants.js +27 -0
- package/dist/commonjs/internal/constants.js.map +1 -0
- package/dist/commonjs/internal/index.js +109 -0
- package/dist/commonjs/internal/index.js.map +1 -0
- package/dist/commonjs/internal/logger.js +256 -0
- package/dist/commonjs/internal/logger.js.map +1 -0
- package/dist/commonjs/internal/nativeModule.android.js +19 -0
- package/dist/commonjs/internal/nativeModule.android.js.map +1 -0
- package/dist/commonjs/internal/nativeModule.ios.js +19 -0
- package/dist/commonjs/internal/nativeModule.ios.js.map +1 -0
- package/dist/commonjs/internal/nativeModule.js +19 -0
- package/dist/commonjs/internal/nativeModule.js.map +1 -0
- package/dist/commonjs/internal/nativeModuleAndroidIos.js +51 -0
- package/dist/commonjs/internal/nativeModuleAndroidIos.js.map +1 -0
- package/dist/commonjs/internal/nativeModuleWeb.js +52 -0
- package/dist/commonjs/internal/nativeModuleWeb.js.map +1 -0
- package/dist/commonjs/internal/nullSerialization.js +162 -0
- package/dist/commonjs/internal/nullSerialization.js.map +1 -0
- package/dist/commonjs/internal/registry/app.js +238 -0
- package/dist/commonjs/internal/registry/app.js.map +1 -0
- package/dist/commonjs/internal/registry/namespace.js +269 -0
- package/dist/commonjs/internal/registry/namespace.js.map +1 -0
- package/dist/commonjs/internal/registry/nativeModule.js +224 -0
- package/dist/commonjs/internal/registry/nativeModule.js.map +1 -0
- package/dist/commonjs/internal/web/RNFBAppModule.js +273 -0
- package/dist/commonjs/internal/web/RNFBAppModule.js.map +1 -0
- package/dist/commonjs/internal/web/firebaseApp.js +17 -0
- package/dist/commonjs/internal/web/firebaseApp.js.map +1 -0
- package/dist/commonjs/internal/web/firebaseAppCheck.js +36 -0
- package/dist/commonjs/internal/web/firebaseAppCheck.js.map +1 -0
- package/dist/commonjs/internal/web/firebaseAuth.js +28 -0
- package/dist/commonjs/internal/web/firebaseAuth.js.map +1 -0
- package/dist/commonjs/internal/web/firebaseDatabase.js +28 -0
- package/dist/commonjs/internal/web/firebaseDatabase.js.map +1 -0
- package/dist/commonjs/internal/web/firebaseFirestore.js +28 -0
- package/dist/commonjs/internal/web/firebaseFirestore.js.map +1 -0
- package/dist/commonjs/internal/web/firebaseFunctions.js +28 -0
- package/dist/commonjs/internal/web/firebaseFunctions.js.map +1 -0
- package/dist/commonjs/internal/web/firebaseInstallations.js +36 -0
- package/dist/commonjs/internal/web/firebaseInstallations.js.map +1 -0
- package/dist/commonjs/internal/web/firebaseRemoteConfig.js +36 -0
- package/dist/commonjs/internal/web/firebaseRemoteConfig.js.map +1 -0
- package/dist/commonjs/internal/web/firebaseStorage.js +28 -0
- package/dist/commonjs/internal/web/firebaseStorage.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/FDBCursor.js +479 -0
- package/dist/commonjs/internal/web/memidb/FDBCursor.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/FDBCursorWithValue.js +19 -0
- package/dist/commonjs/internal/web/memidb/FDBCursorWithValue.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/FDBDatabase.js +163 -0
- package/dist/commonjs/internal/web/memidb/FDBDatabase.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/FDBFactory.js +264 -0
- package/dist/commonjs/internal/web/memidb/FDBFactory.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/FDBIndex.js +191 -0
- package/dist/commonjs/internal/web/memidb/FDBIndex.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/FDBKeyRange.js +78 -0
- package/dist/commonjs/internal/web/memidb/FDBKeyRange.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/FDBObjectStore.js +383 -0
- package/dist/commonjs/internal/web/memidb/FDBObjectStore.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/FDBOpenDBRequest.js +17 -0
- package/dist/commonjs/internal/web/memidb/FDBOpenDBRequest.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/FDBRequest.js +41 -0
- package/dist/commonjs/internal/web/memidb/FDBRequest.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/FDBTransaction.js +221 -0
- package/dist/commonjs/internal/web/memidb/FDBTransaction.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/FDBVersionChangeEvent.js +20 -0
- package/dist/commonjs/internal/web/memidb/FDBVersionChangeEvent.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/LICENSE +208 -0
- package/dist/commonjs/internal/web/memidb/index.js +45 -0
- package/dist/commonjs/internal/web/memidb/index.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/Database.js +38 -0
- package/dist/commonjs/internal/web/memidb/lib/Database.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/FakeDOMStringList.js +78 -0
- package/dist/commonjs/internal/web/memidb/lib/FakeDOMStringList.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/FakeEvent.js +45 -0
- package/dist/commonjs/internal/web/memidb/lib/FakeEvent.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/FakeEventTarget.js +111 -0
- package/dist/commonjs/internal/web/memidb/lib/FakeEventTarget.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/Index.js +164 -0
- package/dist/commonjs/internal/web/memidb/lib/Index.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/KeyGenerator.js +29 -0
- package/dist/commonjs/internal/web/memidb/lib/KeyGenerator.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/ObjectStore.js +180 -0
- package/dist/commonjs/internal/web/memidb/lib/ObjectStore.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/RecordStore.js +141 -0
- package/dist/commonjs/internal/web/memidb/lib/RecordStore.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/binarySearch.js +86 -0
- package/dist/commonjs/internal/web/memidb/lib/binarySearch.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/canInjectKey.js +30 -0
- package/dist/commonjs/internal/web/memidb/lib/canInjectKey.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/cmp.js +85 -0
- package/dist/commonjs/internal/web/memidb/lib/cmp.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/enforceRange.js +20 -0
- package/dist/commonjs/internal/web/memidb/lib/enforceRange.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/errors.js +95 -0
- package/dist/commonjs/internal/web/memidb/lib/errors.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/extractKey.js +46 -0
- package/dist/commonjs/internal/web/memidb/lib/extractKey.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/scheduling.js +37 -0
- package/dist/commonjs/internal/web/memidb/lib/scheduling.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/types.js +6 -0
- package/dist/commonjs/internal/web/memidb/lib/types.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/validateKeyPath.js +51 -0
- package/dist/commonjs/internal/web/memidb/lib/validateKeyPath.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/valueToKey.js +62 -0
- package/dist/commonjs/internal/web/memidb/lib/valueToKey.js.map +1 -0
- package/dist/commonjs/internal/web/memidb/lib/valueToKeyRange.js +26 -0
- package/dist/commonjs/internal/web/memidb/lib/valueToKeyRange.js.map +1 -0
- package/dist/commonjs/internal/web/structuredClone/index.js +239 -0
- package/dist/commonjs/internal/web/structuredClone/index.js.map +1 -0
- package/dist/commonjs/internal/web/utils.js +59 -0
- package/dist/commonjs/internal/web/utils.js.map +1 -0
- package/dist/commonjs/modular.js +190 -0
- package/dist/commonjs/modular.js.map +1 -0
- package/{android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseAppRegistrar.java → dist/commonjs/namespaced.js} +17 -17
- package/dist/commonjs/namespaced.js.map +1 -0
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/types/app.js +139 -0
- package/dist/commonjs/types/app.js.map +1 -0
- package/dist/commonjs/types/internal.js +6 -0
- package/dist/commonjs/types/internal.js.map +1 -0
- package/dist/commonjs/utils/UtilsStatics.js +59 -0
- package/dist/commonjs/utils/UtilsStatics.js.map +1 -0
- package/dist/commonjs/utils/index.js +94 -0
- package/dist/commonjs/utils/index.js.map +1 -0
- package/dist/commonjs/version.js +9 -0
- package/dist/commonjs/version.js.map +1 -0
- package/{lib → dist/module}/FirebaseApp.js +14 -14
- package/dist/module/FirebaseApp.js.map +1 -0
- package/dist/module/common/Base64.js +100 -0
- package/dist/module/common/Base64.js.map +1 -0
- package/{lib → dist/module}/common/MutatableParams.js +4 -6
- package/dist/module/common/MutatableParams.js.map +1 -0
- package/{lib → dist/module}/common/ReferenceBase.js +3 -2
- package/dist/module/common/ReferenceBase.js.map +1 -0
- package/{lib → dist/module}/common/deeps.js +5 -9
- package/dist/module/common/deeps.js.map +1 -0
- package/{lib → dist/module}/common/id.js +20 -11
- package/dist/module/common/id.js.map +1 -0
- package/dist/module/common/index.js +701 -0
- package/dist/module/common/index.js.map +1 -0
- package/{lib → dist/module}/common/path.js +4 -8
- package/dist/module/common/path.js.map +1 -0
- package/{lib → dist/module}/common/promise.js +21 -23
- package/dist/module/common/promise.js.map +1 -0
- package/dist/module/common/serialize.js +43 -0
- package/dist/module/common/serialize.js.map +1 -0
- package/dist/module/common/unitTestUtils.js +48 -0
- package/dist/module/common/unitTestUtils.js.map +1 -0
- package/{lib → dist/module}/common/validate.js +20 -16
- package/dist/module/common/validate.js.map +1 -0
- package/{ios/RNFBApp/RNFBVersion.m → dist/module/index.js} +6 -5
- package/dist/module/index.js.map +1 -0
- package/{lib → dist/module}/internal/FirebaseModule.js +6 -11
- package/dist/module/internal/FirebaseModule.js.map +1 -0
- package/{lib → dist/module}/internal/NativeFirebaseError.js +19 -24
- package/dist/module/internal/NativeFirebaseError.js.map +1 -0
- package/dist/module/internal/NativeModules.js +4 -0
- package/dist/module/internal/NativeModules.js.map +1 -0
- package/{lib → dist/module}/internal/RNFBNativeEventEmitter.js +30 -21
- package/dist/module/internal/RNFBNativeEventEmitter.js.map +1 -0
- package/{android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseVersion.java → dist/module/internal/SharedEventEmitter.js} +5 -5
- package/dist/module/internal/SharedEventEmitter.js.map +1 -0
- package/dist/module/internal/asyncStorage.js +73 -0
- package/dist/module/internal/asyncStorage.js.map +1 -0
- package/dist/module/internal/constants.js +23 -0
- package/dist/module/internal/constants.js.map +1 -0
- package/dist/module/internal/index.js +30 -0
- package/dist/module/internal/index.js.map +1 -0
- package/{lib → dist/module}/internal/logger.js +65 -55
- package/dist/module/internal/logger.js.map +1 -0
- package/dist/module/internal/nativeModule.android.js +5 -0
- package/dist/module/internal/nativeModule.android.js.map +1 -0
- package/dist/module/internal/nativeModule.ios.js +5 -0
- package/dist/module/internal/nativeModule.ios.js.map +1 -0
- package/dist/module/internal/nativeModule.js +7 -0
- package/dist/module/internal/nativeModule.js.map +1 -0
- package/dist/module/internal/nativeModuleAndroidIos.js +46 -0
- package/dist/module/internal/nativeModuleAndroidIos.js.map +1 -0
- package/dist/module/internal/nativeModuleWeb.js +45 -0
- package/dist/module/internal/nativeModuleWeb.js.map +1 -0
- package/dist/module/internal/nullSerialization.js +158 -0
- package/dist/module/internal/nullSerialization.js.map +1 -0
- package/{lib → dist/module}/internal/registry/app.js +41 -79
- package/dist/module/internal/registry/app.js.map +1 -0
- package/dist/module/internal/registry/namespace.js +262 -0
- package/dist/module/internal/registry/namespace.js.map +1 -0
- package/{lib → dist/module}/internal/registry/nativeModule.js +46 -62
- package/dist/module/internal/registry/nativeModule.js.map +1 -0
- package/{lib → dist/module}/internal/web/RNFBAppModule.js +76 -67
- package/dist/module/internal/web/RNFBAppModule.js.map +1 -0
- package/{android/src/reactnative/java/io/invertase/firebase/interfaces/NativeEvent.java → dist/module/internal/web/firebaseApp.js} +5 -10
- package/dist/module/internal/web/firebaseApp.js.map +1 -0
- package/{android/src/reactnative/java/io/invertase/firebase/interfaces/NativeError.java → dist/module/internal/web/firebaseAppCheck.js} +8 -14
- package/dist/module/internal/web/firebaseAppCheck.js.map +1 -0
- package/dist/module/internal/web/firebaseAuth.js +24 -0
- package/dist/module/internal/web/firebaseAuth.js.map +1 -0
- package/dist/module/internal/web/firebaseDatabase.js +24 -0
- package/dist/module/internal/web/firebaseDatabase.js.map +1 -0
- package/dist/module/internal/web/firebaseFirestore.js +24 -0
- package/dist/module/internal/web/firebaseFirestore.js.map +1 -0
- package/dist/module/internal/web/firebaseFunctions.js +24 -0
- package/dist/module/internal/web/firebaseFunctions.js.map +1 -0
- package/dist/module/internal/web/firebaseInstallations.js +26 -0
- package/dist/module/internal/web/firebaseInstallations.js.map +1 -0
- package/{android/src/reactnative/java/io/invertase/firebase/interfaces/ContextProvider.java → dist/module/internal/web/firebaseRemoteConfig.js} +8 -12
- package/dist/module/internal/web/firebaseRemoteConfig.js.map +1 -0
- package/dist/module/internal/web/firebaseStorage.js +24 -0
- package/dist/module/internal/web/firebaseStorage.js.map +1 -0
- package/dist/module/internal/web/memidb/FDBCursor.js +474 -0
- package/dist/module/internal/web/memidb/FDBCursor.js.map +1 -0
- package/dist/module/internal/web/memidb/FDBCursorWithValue.js +14 -0
- package/dist/module/internal/web/memidb/FDBCursorWithValue.js.map +1 -0
- package/dist/module/internal/web/memidb/FDBDatabase.js +158 -0
- package/dist/module/internal/web/memidb/FDBDatabase.js.map +1 -0
- package/dist/module/internal/web/memidb/FDBFactory.js +259 -0
- package/dist/module/internal/web/memidb/FDBFactory.js.map +1 -0
- package/dist/module/internal/web/memidb/FDBIndex.js +186 -0
- package/dist/module/internal/web/memidb/FDBIndex.js.map +1 -0
- package/dist/module/internal/web/memidb/FDBKeyRange.js +74 -0
- package/dist/module/internal/web/memidb/FDBKeyRange.js.map +1 -0
- package/dist/module/internal/web/memidb/FDBObjectStore.js +378 -0
- package/dist/module/internal/web/memidb/FDBObjectStore.js.map +1 -0
- package/dist/module/internal/web/memidb/FDBOpenDBRequest.js +12 -0
- package/dist/module/internal/web/memidb/FDBOpenDBRequest.js.map +1 -0
- package/dist/module/internal/web/memidb/FDBRequest.js +36 -0
- package/dist/module/internal/web/memidb/FDBRequest.js.map +1 -0
- package/dist/module/internal/web/memidb/FDBTransaction.js +216 -0
- package/dist/module/internal/web/memidb/FDBTransaction.js.map +1 -0
- package/dist/module/internal/web/memidb/FDBVersionChangeEvent.js +15 -0
- package/dist/module/internal/web/memidb/FDBVersionChangeEvent.js.map +1 -0
- package/dist/module/internal/web/memidb/LICENSE +208 -0
- package/dist/module/internal/web/memidb/index.js +41 -0
- package/dist/module/internal/web/memidb/index.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/Database.js +35 -0
- package/dist/module/internal/web/memidb/lib/Database.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/FakeDOMStringList.js +75 -0
- package/dist/module/internal/web/memidb/lib/FakeDOMStringList.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/FakeEvent.js +41 -0
- package/dist/module/internal/web/memidb/lib/FakeEvent.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/FakeEventTarget.js +107 -0
- package/dist/module/internal/web/memidb/lib/FakeEventTarget.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/Index.js +160 -0
- package/dist/module/internal/web/memidb/lib/Index.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/KeyGenerator.js +25 -0
- package/dist/module/internal/web/memidb/lib/KeyGenerator.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/ObjectStore.js +175 -0
- package/dist/module/internal/web/memidb/lib/ObjectStore.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/RecordStore.js +136 -0
- package/dist/module/internal/web/memidb/lib/RecordStore.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/binarySearch.js +77 -0
- package/dist/module/internal/web/memidb/lib/binarySearch.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/canInjectKey.js +26 -0
- package/dist/module/internal/web/memidb/lib/canInjectKey.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/cmp.js +80 -0
- package/dist/module/internal/web/memidb/lib/cmp.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/enforceRange.js +16 -0
- package/dist/module/internal/web/memidb/lib/enforceRange.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/errors.js +81 -0
- package/dist/module/internal/web/memidb/lib/errors.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/extractKey.js +42 -0
- package/dist/module/internal/web/memidb/lib/extractKey.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/scheduling.js +32 -0
- package/dist/module/internal/web/memidb/lib/scheduling.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/types.js +4 -0
- package/dist/module/internal/web/memidb/lib/types.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/validateKeyPath.js +47 -0
- package/dist/module/internal/web/memidb/lib/validateKeyPath.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/valueToKey.js +58 -0
- package/dist/module/internal/web/memidb/lib/valueToKey.js.map +1 -0
- package/dist/module/internal/web/memidb/lib/valueToKeyRange.js +22 -0
- package/dist/module/internal/web/memidb/lib/valueToKeyRange.js.map +1 -0
- package/dist/module/internal/web/structuredClone/index.js +235 -0
- package/dist/module/internal/web/structuredClone/index.js.map +1 -0
- package/{lib → dist/module}/internal/web/utils.js +24 -5
- package/dist/module/internal/web/utils.js.map +1 -0
- package/dist/module/modular.js +172 -0
- package/dist/module/modular.js.map +1 -0
- package/dist/module/namespaced.js +25 -0
- package/dist/module/namespaced.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/types/app.js +135 -0
- package/dist/module/types/app.js.map +1 -0
- package/dist/module/types/internal.js +4 -0
- package/dist/module/types/internal.js.map +1 -0
- package/dist/module/utils/UtilsStatics.js +55 -0
- package/dist/module/utils/UtilsStatics.js.map +1 -0
- package/{lib → dist/module}/utils/index.js +13 -15
- package/dist/module/utils/index.js.map +1 -0
- package/dist/module/version.js +5 -0
- package/dist/module/version.js.map +1 -0
- package/dist/typescript/commonjs/lib/FirebaseApp.d.ts +21 -0
- package/dist/typescript/commonjs/lib/FirebaseApp.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/common/Base64.d.ts +23 -0
- package/dist/typescript/commonjs/lib/common/Base64.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/common/MutatableParams.d.ts +10 -0
- package/dist/typescript/commonjs/lib/common/MutatableParams.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/common/ReferenceBase.d.ts +12 -0
- package/dist/typescript/commonjs/lib/common/ReferenceBase.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/common/deeps.d.ts +19 -0
- package/dist/typescript/commonjs/lib/common/deeps.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/common/id.d.ts +12 -0
- package/dist/typescript/commonjs/lib/common/id.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/common/index.d.ts +33 -0
- package/dist/typescript/commonjs/lib/common/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/common/path.d.ts +51 -0
- package/dist/typescript/commonjs/lib/common/path.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/common/promise.d.ts +12 -0
- package/dist/typescript/commonjs/lib/common/promise.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/common/serialize.d.ts +4 -0
- package/dist/typescript/commonjs/lib/common/serialize.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/common/unitTestUtils.d.ts +4 -0
- package/dist/typescript/commonjs/lib/common/unitTestUtils.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/common/validate.d.ts +100 -0
- package/dist/typescript/commonjs/lib/common/validate.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/index.d.ts +4 -0
- package/dist/typescript/commonjs/lib/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/FirebaseModule.d.ts +17 -0
- package/dist/typescript/commonjs/lib/internal/FirebaseModule.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/NativeFirebaseError.d.ts +20 -0
- package/dist/typescript/commonjs/lib/internal/NativeFirebaseError.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/NativeModules.d.ts +83 -0
- package/dist/typescript/commonjs/lib/internal/NativeModules.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/RNFBNativeEventEmitter.d.ts +13 -0
- package/dist/typescript/commonjs/lib/internal/RNFBNativeEventEmitter.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/SharedEventEmitter.d.ts +4 -0
- package/dist/typescript/commonjs/lib/internal/SharedEventEmitter.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/asyncStorage.d.ts +10 -0
- package/dist/typescript/commonjs/lib/internal/asyncStorage.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/constants.d.ts +5 -0
- package/dist/typescript/commonjs/lib/internal/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/index.d.ts +12 -0
- package/dist/typescript/commonjs/lib/internal/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/logger.d.ts +83 -0
- package/dist/typescript/commonjs/lib/internal/logger.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/nativeModule.android.d.ts +3 -0
- package/dist/typescript/commonjs/lib/internal/nativeModule.android.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/nativeModule.d.ts +3 -0
- package/dist/typescript/commonjs/lib/internal/nativeModule.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/nativeModule.ios.d.ts +3 -0
- package/dist/typescript/commonjs/lib/internal/nativeModule.ios.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/nativeModuleAndroidIos.d.ts +10 -0
- package/dist/typescript/commonjs/lib/internal/nativeModuleAndroidIos.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/nativeModuleWeb.d.ts +3 -0
- package/dist/typescript/commonjs/lib/internal/nativeModuleWeb.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/nullSerialization.d.ts +16 -0
- package/dist/typescript/commonjs/lib/internal/nullSerialization.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/registry/app.d.ts +47 -0
- package/dist/typescript/commonjs/lib/internal/registry/app.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/registry/namespace.d.ts +26 -0
- package/dist/typescript/commonjs/lib/internal/registry/namespace.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/registry/nativeModule.d.ts +17 -0
- package/dist/typescript/commonjs/lib/internal/registry/nativeModule.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/web/RNFBAppModule.d.ts +139 -0
- package/dist/typescript/commonjs/lib/internal/web/RNFBAppModule.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/web/firebaseApp.d.ts +2 -0
- package/dist/typescript/commonjs/lib/internal/web/firebaseApp.d.ts.map +1 -0
- package/{lib/internal/web/firebaseAppCheck.js → dist/typescript/commonjs/lib/internal/web/firebaseAppCheck.d.ts} +1 -2
- package/dist/typescript/commonjs/lib/internal/web/firebaseAppCheck.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/web/firebaseAuth.d.ts +3 -0
- package/dist/typescript/commonjs/lib/internal/web/firebaseAuth.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/web/firebaseDatabase.d.ts +3 -0
- package/dist/typescript/commonjs/lib/internal/web/firebaseDatabase.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/web/firebaseFirestore.d.ts +3 -0
- package/dist/typescript/commonjs/lib/internal/web/firebaseFirestore.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/web/firebaseFunctions.d.ts +3 -0
- package/dist/typescript/commonjs/lib/internal/web/firebaseFunctions.d.ts.map +1 -0
- package/{lib/internal/web/firebaseInstallations.js → dist/typescript/commonjs/lib/internal/web/firebaseInstallations.d.ts} +1 -2
- package/dist/typescript/commonjs/lib/internal/web/firebaseInstallations.d.ts.map +1 -0
- package/{lib/internal/web/firebaseRemoteConfig.js → dist/typescript/commonjs/lib/internal/web/firebaseRemoteConfig.d.ts} +1 -2
- package/dist/typescript/commonjs/lib/internal/web/firebaseRemoteConfig.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/web/firebaseStorage.d.ts +3 -0
- package/dist/typescript/commonjs/lib/internal/web/firebaseStorage.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/internal/web/utils.d.ts +13 -0
- package/dist/typescript/commonjs/lib/internal/web/utils.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/modular.d.ts +95 -0
- package/dist/typescript/commonjs/lib/modular.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/namespaced.d.ts +5 -0
- package/dist/typescript/commonjs/lib/namespaced.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/types/app.d.ts +561 -0
- package/dist/typescript/commonjs/lib/types/app.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/types/internal.d.ts +101 -0
- package/dist/typescript/commonjs/lib/types/internal.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/utils/UtilsStatics.d.ts +4 -0
- package/dist/typescript/commonjs/lib/utils/UtilsStatics.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/utils/index.d.ts +4 -0
- package/dist/typescript/commonjs/lib/utils/index.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/FirebaseApp.d.ts +21 -0
- package/dist/typescript/module/lib/FirebaseApp.d.ts.map +1 -0
- package/dist/typescript/module/lib/common/Base64.d.ts +23 -0
- package/dist/typescript/module/lib/common/Base64.d.ts.map +1 -0
- package/dist/typescript/module/lib/common/MutatableParams.d.ts +10 -0
- package/dist/typescript/module/lib/common/MutatableParams.d.ts.map +1 -0
- package/dist/typescript/module/lib/common/ReferenceBase.d.ts +12 -0
- package/dist/typescript/module/lib/common/ReferenceBase.d.ts.map +1 -0
- package/dist/typescript/module/lib/common/deeps.d.ts +19 -0
- package/dist/typescript/module/lib/common/deeps.d.ts.map +1 -0
- package/dist/typescript/module/lib/common/id.d.ts +12 -0
- package/dist/typescript/module/lib/common/id.d.ts.map +1 -0
- package/dist/typescript/module/lib/common/index.d.ts +33 -0
- package/dist/typescript/module/lib/common/index.d.ts.map +1 -0
- package/dist/typescript/module/lib/common/path.d.ts +51 -0
- package/dist/typescript/module/lib/common/path.d.ts.map +1 -0
- package/dist/typescript/module/lib/common/promise.d.ts +12 -0
- package/dist/typescript/module/lib/common/promise.d.ts.map +1 -0
- package/dist/typescript/module/lib/common/serialize.d.ts +4 -0
- package/dist/typescript/module/lib/common/serialize.d.ts.map +1 -0
- package/dist/typescript/module/lib/common/unitTestUtils.d.ts +4 -0
- package/dist/typescript/module/lib/common/unitTestUtils.d.ts.map +1 -0
- package/dist/typescript/module/lib/common/validate.d.ts +100 -0
- package/dist/typescript/module/lib/common/validate.d.ts.map +1 -0
- package/dist/typescript/module/lib/index.d.ts +4 -0
- package/dist/typescript/module/lib/index.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/FirebaseModule.d.ts +17 -0
- package/dist/typescript/module/lib/internal/FirebaseModule.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/NativeFirebaseError.d.ts +20 -0
- package/dist/typescript/module/lib/internal/NativeFirebaseError.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/NativeModules.d.ts +83 -0
- package/dist/typescript/module/lib/internal/NativeModules.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/RNFBNativeEventEmitter.d.ts +13 -0
- package/dist/typescript/module/lib/internal/RNFBNativeEventEmitter.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/SharedEventEmitter.d.ts +4 -0
- package/dist/typescript/module/lib/internal/SharedEventEmitter.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/asyncStorage.d.ts +10 -0
- package/dist/typescript/module/lib/internal/asyncStorage.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/constants.d.ts +5 -0
- package/dist/typescript/module/lib/internal/constants.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/index.d.ts +12 -0
- package/dist/typescript/module/lib/internal/index.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/logger.d.ts +83 -0
- package/dist/typescript/module/lib/internal/logger.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/nativeModule.android.d.ts +3 -0
- package/dist/typescript/module/lib/internal/nativeModule.android.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/nativeModule.d.ts +3 -0
- package/dist/typescript/module/lib/internal/nativeModule.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/nativeModule.ios.d.ts +3 -0
- package/dist/typescript/module/lib/internal/nativeModule.ios.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/nativeModuleAndroidIos.d.ts +10 -0
- package/dist/typescript/module/lib/internal/nativeModuleAndroidIos.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/nativeModuleWeb.d.ts +3 -0
- package/dist/typescript/module/lib/internal/nativeModuleWeb.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/nullSerialization.d.ts +16 -0
- package/dist/typescript/module/lib/internal/nullSerialization.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/registry/app.d.ts +47 -0
- package/dist/typescript/module/lib/internal/registry/app.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/registry/namespace.d.ts +26 -0
- package/dist/typescript/module/lib/internal/registry/namespace.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/registry/nativeModule.d.ts +17 -0
- package/dist/typescript/module/lib/internal/registry/nativeModule.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/web/RNFBAppModule.d.ts +139 -0
- package/dist/typescript/module/lib/internal/web/RNFBAppModule.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/web/firebaseApp.d.ts +2 -0
- package/dist/typescript/module/lib/internal/web/firebaseApp.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/web/firebaseAppCheck.d.ts +5 -0
- package/dist/typescript/module/lib/internal/web/firebaseAppCheck.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/web/firebaseAuth.d.ts +3 -0
- package/dist/typescript/module/lib/internal/web/firebaseAuth.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/web/firebaseDatabase.d.ts +3 -0
- package/dist/typescript/module/lib/internal/web/firebaseDatabase.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/web/firebaseFirestore.d.ts +3 -0
- package/dist/typescript/module/lib/internal/web/firebaseFirestore.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/web/firebaseFunctions.d.ts +3 -0
- package/dist/typescript/module/lib/internal/web/firebaseFunctions.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/web/firebaseInstallations.d.ts +5 -0
- package/dist/typescript/module/lib/internal/web/firebaseInstallations.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/web/firebaseRemoteConfig.d.ts +5 -0
- package/dist/typescript/module/lib/internal/web/firebaseRemoteConfig.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/web/firebaseStorage.d.ts +3 -0
- package/dist/typescript/module/lib/internal/web/firebaseStorage.d.ts.map +1 -0
- package/dist/typescript/module/lib/internal/web/utils.d.ts +13 -0
- package/dist/typescript/module/lib/internal/web/utils.d.ts.map +1 -0
- package/dist/typescript/module/lib/modular.d.ts +95 -0
- package/dist/typescript/module/lib/modular.d.ts.map +1 -0
- package/dist/typescript/module/lib/namespaced.d.ts +5 -0
- package/dist/typescript/module/lib/namespaced.d.ts.map +1 -0
- package/dist/typescript/module/lib/types/app.d.ts +561 -0
- package/dist/typescript/module/lib/types/app.d.ts.map +1 -0
- package/dist/typescript/module/lib/types/internal.d.ts +101 -0
- package/dist/typescript/module/lib/types/internal.d.ts.map +1 -0
- package/dist/typescript/module/lib/utils/UtilsStatics.d.ts +4 -0
- package/dist/typescript/module/lib/utils/UtilsStatics.d.ts.map +1 -0
- package/dist/typescript/module/lib/utils/index.d.ts +4 -0
- package/dist/typescript/module/lib/utils/index.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/FirebaseApp.ts +98 -0
- package/lib/common/{Base64.js → Base64.ts} +19 -11
- package/lib/common/MutatableParams.ts +50 -0
- package/lib/common/ReferenceBase.ts +45 -0
- package/lib/common/deeps.ts +92 -0
- package/lib/common/id.ts +91 -0
- package/lib/common/{index.js → index.ts} +60 -38
- package/lib/common/path.ts +124 -0
- package/lib/common/promise.ts +68 -0
- package/lib/common/{serialize.js → serialize.ts} +3 -2
- package/lib/common/unitTestUtils.ts +5 -4
- package/lib/common/validate.ts +232 -0
- package/lib/index.ts +27 -0
- package/lib/internal/FirebaseModule.ts +78 -0
- package/lib/internal/NativeFirebaseError.ts +111 -0
- package/lib/internal/NativeModules.ts +116 -0
- package/lib/internal/RNFBNativeEventEmitter.ts +139 -0
- package/lib/internal/asyncStorage.ts +76 -0
- package/lib/internal/{constants.js → constants.ts} +3 -1
- package/{ios/RNFBApp/RCTConvert+FIRApp.m → lib/internal/global.d.ts} +14 -12
- package/lib/internal/{index.js → index.ts} +2 -0
- package/lib/internal/logger.ts +270 -0
- package/lib/internal/nativeModuleAndroidIos.ts +55 -0
- package/lib/internal/nativeModuleWeb.ts +60 -0
- package/lib/internal/nullSerialization.ts +186 -0
- package/lib/internal/registry/app.ts +278 -0
- package/lib/internal/registry/{namespace.js → namespace.ts} +93 -54
- package/lib/internal/registry/nativeModule.ts +282 -0
- package/lib/internal/web/RNFBAppModule.ts +318 -0
- package/{ios/RNFBApp/RCTConvert+FIRApp.h → lib/internal/web/firebaseApp.ts} +4 -7
- package/lib/internal/web/firebaseAppCheck.ts +23 -0
- package/lib/internal/web/firebaseAuth.ts +21 -0
- package/lib/internal/web/firebaseDatabase.ts +21 -0
- package/{android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseAppInitProvider.java → lib/internal/web/firebaseFirestore.ts} +4 -5
- package/lib/internal/web/firebaseFunctions.ts +21 -0
- package/lib/internal/web/firebaseInstallations.ts +23 -0
- package/lib/internal/web/firebaseRemoteConfig.ts +23 -0
- package/lib/internal/web/firebaseStorage.ts +21 -0
- package/{ios/RNFBApp/RNFBVersion.h → lib/internal/web/memidb/index.d.ts} +5 -4
- package/lib/internal/web/memidb/lib/errors.js +17 -0
- package/lib/internal/web/utils.ts +57 -0
- package/lib/modular.ts +219 -0
- package/lib/{index.js → namespaced.ts} +2 -2
- package/lib/{index.d.ts → types/app.ts} +81 -40
- package/lib/types/internal.ts +142 -0
- package/lib/utils/{UtilsStatics.js → UtilsStatics.ts} +20 -12
- package/lib/utils/index.ts +94 -0
- package/lib/version.ts +2 -0
- package/package.json +106 -9
- package/CHANGELOG.md +0 -1525
- package/RNFBApp.podspec +0 -49
- package/android/.editorconfig +0 -10
- package/android/build.gradle +0 -129
- package/android/firebase-json.gradle +0 -73
- package/android/gradle.properties +0 -2
- package/android/lint.xml +0 -5
- package/android/settings.gradle +0 -1
- package/android/src/main/AndroidManifest.xml +0 -24
- package/android/src/main/java/io/invertase/firebase/app/.gitkeep +0 -0
- package/android/src/main/java/io/invertase/firebase/common/TaskExecutorService.java +0 -124
- package/android/src/main/java/io/invertase/firebase/common/UniversalFirebaseModule.java +0 -62
- package/android/src/main/java/io/invertase/firebase/common/UniversalFirebasePreferences.java +0 -91
- package/android/src/main/java/io/invertase/firebase/interfaces/.gitkeep +0 -0
- package/android/src/reactnative/AndroidManifest.xml +0 -2
- package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseApp.java +0 -46
- package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseAppModule.java +0 -186
- package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseAppPackage.java +0 -49
- package/android/src/reactnative/java/io/invertase/firebase/common/RCTConvertFirebase.java +0 -191
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseEvent.java +0 -53
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseEventEmitter.java +0 -151
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseInitProvider.java +0 -78
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseJSON.java +0 -107
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseMeta.java +0 -93
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebaseModule.java +0 -146
- package/android/src/reactnative/java/io/invertase/firebase/common/ReactNativeFirebasePreferences.java +0 -88
- package/android/src/reactnative/java/io/invertase/firebase/common/SharedUtils.java +0 -440
- package/android/src/reactnative/java/io/invertase/firebase/utils/ReactNativeFirebaseUtilsModule.java +0 -191
- package/app.plugin.js +0 -1
- package/firebase-schema.json +0 -149
- package/firebase_json.rb +0 -72
- package/ios/RNFBApp/RCTConvert+FIROptions.h +0 -23
- package/ios/RNFBApp/RCTConvert+FIROptions.m +0 -36
- package/ios/RNFBApp/RNFBAppModule.h +0 -28
- package/ios/RNFBApp/RNFBAppModule.m +0 -305
- package/ios/RNFBApp/RNFBJSON.h +0 -36
- package/ios/RNFBApp/RNFBJSON.m +0 -99
- package/ios/RNFBApp/RNFBMeta.h +0 -30
- package/ios/RNFBApp/RNFBMeta.m +0 -61
- package/ios/RNFBApp/RNFBPreferences.h +0 -44
- package/ios/RNFBApp/RNFBPreferences.m +0 -94
- package/ios/RNFBApp/RNFBRCTEventEmitter.h +0 -73
- package/ios/RNFBApp/RNFBRCTEventEmitter.m +0 -151
- package/ios/RNFBApp/RNFBSharedUtils.h +0 -65
- package/ios/RNFBApp/RNFBSharedUtils.m +0 -167
- package/ios/RNFBApp/RNFBUtilsModule.h +0 -30
- package/ios/RNFBApp/RNFBUtilsModule.m +0 -100
- package/ios/RNFBApp.xcodeproj/project.pbxproj +0 -405
- package/ios/RNFBApp.xcodeproj/xcshareddata/IDETemplateMacros.plist +0 -24
- package/ios_config.sh +0 -269
- package/lib/internal/asyncStorage.js +0 -47
- package/lib/internal/logger.d.ts +0 -85
- package/lib/internal/nativeModuleAndroidIos.js +0 -45
- package/lib/internal/nativeModuleWeb.js +0 -49
- package/lib/internal/web/firebaseApp.js +0 -3
- package/lib/internal/web/firebaseAuth.js +0 -4
- package/lib/internal/web/firebaseDatabase.js +0 -4
- package/lib/internal/web/firebaseFirestore.js +0 -4
- package/lib/internal/web/firebaseFunctions.js +0 -4
- package/lib/internal/web/firebaseStorage.js +0 -4
- package/lib/modular/index.d.ts +0 -131
- package/lib/modular/index.js +0 -150
- package/lib/version.js +0 -2
- package/plugin/build/android/applyPlugin.d.ts +0 -6
- package/plugin/build/android/applyPlugin.js +0 -29
- package/plugin/build/android/buildscriptDependency.d.ts +0 -6
- package/plugin/build/android/buildscriptDependency.js +0 -31
- package/plugin/build/android/constants.d.ts +0 -4
- package/plugin/build/android/constants.js +0 -8
- package/plugin/build/android/copyGoogleServices.d.ts +0 -5
- package/plugin/build/android/copyGoogleServices.js +0 -33
- package/plugin/build/android/index.d.ts +0 -4
- package/plugin/build/android/index.js +0 -9
- package/plugin/build/index.d.ts +0 -3
- package/plugin/build/index.js +0 -21
- package/plugin/build/ios/appDelegate.d.ts +0 -6
- package/plugin/build/ios/appDelegate.js +0 -116
- package/plugin/build/ios/googleServicesPlist.d.ts +0 -7
- package/plugin/build/ios/googleServicesPlist.js +0 -42
- package/plugin/build/ios/index.d.ts +0 -3
- package/plugin/build/ios/index.js +0 -7
- package/plugin/src/android/applyPlugin.ts +0 -30
- package/plugin/src/android/buildscriptDependency.ts +0 -33
- package/plugin/src/android/constants.ts +0 -7
- package/plugin/src/android/copyGoogleServices.ts +0 -36
- package/plugin/src/android/index.ts +0 -5
- package/plugin/src/index.ts +0 -27
- package/plugin/src/ios/appDelegate.ts +0 -140
- package/plugin/src/ios/googleServicesPlist.ts +0 -55
- package/plugin/src/ios/index.ts +0 -4
- package/plugin/tsconfig.json +0 -9
- package/plugin/tsconfig.tsbuildinfo +0 -1
- package/react-native.config.js +0 -19
- /package/lib/internal/{SharedEventEmitter.js → SharedEventEmitter.ts} +0 -0
- /package/lib/internal/{nativeModule.android.js → nativeModule.android.ts} +0 -0
- /package/lib/internal/{nativeModule.ios.js → nativeModule.ios.ts} +0 -0
- /package/lib/internal/{nativeModule.js → nativeModule.ts} +0 -0
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import FDBKeyRange from './FDBKeyRange.js';
|
|
4
|
+
import FDBObjectStore from './FDBObjectStore.js';
|
|
5
|
+
import cmp from './lib/cmp.js';
|
|
6
|
+
import { DataError, InvalidAccessError, InvalidStateError, ReadOnlyError, TransactionInactiveError } from './lib/errors.js';
|
|
7
|
+
import extractKey from './lib/extractKey.js';
|
|
8
|
+
import valueToKey from './lib/valueToKey.js';
|
|
9
|
+
const getEffectiveObjectStore = cursor => {
|
|
10
|
+
if (cursor.source instanceof FDBObjectStore) {
|
|
11
|
+
return cursor.source;
|
|
12
|
+
}
|
|
13
|
+
return cursor.source.objectStore;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
// This takes a key range, a list of lower bounds, and a list of upper bounds and combines them all into a single key
|
|
17
|
+
// range. It does not handle gt/gte distinctions, because it doesn't really matter much anyway, since for next/prev
|
|
18
|
+
// cursor iteration it'd also have to look at values to be precise, which would be complicated. This should get us 99%
|
|
19
|
+
// of the way there.
|
|
20
|
+
const makeKeyRange = (range, lowers, uppers) => {
|
|
21
|
+
// Start with bounds from range
|
|
22
|
+
let lower = range !== undefined ? range.lower : undefined;
|
|
23
|
+
let upper = range !== undefined ? range.upper : undefined;
|
|
24
|
+
|
|
25
|
+
// Augment with values from lowers and uppers
|
|
26
|
+
for (const lowerTemp of lowers) {
|
|
27
|
+
if (lowerTemp === undefined) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (lower === undefined || cmp(lower, lowerTemp) === 1) {
|
|
31
|
+
lower = lowerTemp;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
for (const upperTemp of uppers) {
|
|
35
|
+
if (upperTemp === undefined) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
if (upper === undefined || cmp(upper, upperTemp) === -1) {
|
|
39
|
+
upper = upperTemp;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (lower !== undefined && upper !== undefined) {
|
|
43
|
+
return FDBKeyRange.bound(lower, upper);
|
|
44
|
+
}
|
|
45
|
+
if (lower !== undefined) {
|
|
46
|
+
return FDBKeyRange.lowerBound(lower);
|
|
47
|
+
}
|
|
48
|
+
if (upper !== undefined) {
|
|
49
|
+
return FDBKeyRange.upperBound(upper);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#cursor
|
|
54
|
+
class FDBCursor {
|
|
55
|
+
_gotValue = false;
|
|
56
|
+
_position = undefined; // Key of previously returned record
|
|
57
|
+
_objectStorePosition = undefined;
|
|
58
|
+
_keyOnly = false;
|
|
59
|
+
_key = undefined;
|
|
60
|
+
_primaryKey = undefined;
|
|
61
|
+
constructor(source, range, direction = 'next', request, keyOnly = false) {
|
|
62
|
+
this._range = range;
|
|
63
|
+
this._source = source;
|
|
64
|
+
this._direction = direction;
|
|
65
|
+
this._request = request;
|
|
66
|
+
this._keyOnly = keyOnly;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Read only properties
|
|
70
|
+
get source() {
|
|
71
|
+
return this._source;
|
|
72
|
+
}
|
|
73
|
+
set source(val) {
|
|
74
|
+
/* For babel */
|
|
75
|
+
}
|
|
76
|
+
get request() {
|
|
77
|
+
return this._request;
|
|
78
|
+
}
|
|
79
|
+
set request(val) {
|
|
80
|
+
/* For babel */
|
|
81
|
+
}
|
|
82
|
+
get direction() {
|
|
83
|
+
return this._direction;
|
|
84
|
+
}
|
|
85
|
+
set direction(val) {
|
|
86
|
+
/* For babel */
|
|
87
|
+
}
|
|
88
|
+
get key() {
|
|
89
|
+
return this._key;
|
|
90
|
+
}
|
|
91
|
+
set key(val) {
|
|
92
|
+
/* For babel */
|
|
93
|
+
}
|
|
94
|
+
get primaryKey() {
|
|
95
|
+
return this._primaryKey;
|
|
96
|
+
}
|
|
97
|
+
set primaryKey(val) {
|
|
98
|
+
/* For babel */
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// https://w3c.github.io/IndexedDB/#iterate-a-cursor
|
|
102
|
+
_iterate(key, primaryKey) {
|
|
103
|
+
const sourceIsObjectStore = this.source instanceof FDBObjectStore;
|
|
104
|
+
|
|
105
|
+
// Can't use sourceIsObjectStore because TypeScript
|
|
106
|
+
const records = this.source instanceof FDBObjectStore ? this.source._rawObjectStore.records : this.source._rawIndex.records;
|
|
107
|
+
let foundRecord;
|
|
108
|
+
if (this.direction === 'next') {
|
|
109
|
+
const range = makeKeyRange(this._range, [key, this._position], []);
|
|
110
|
+
for (const record of records.values(range)) {
|
|
111
|
+
const cmpResultKey = key !== undefined ? cmp(record.key, key) : undefined;
|
|
112
|
+
const cmpResultPosition = this._position !== undefined ? cmp(record.key, this._position) : undefined;
|
|
113
|
+
if (key !== undefined) {
|
|
114
|
+
if (cmpResultKey === -1) {
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (primaryKey !== undefined) {
|
|
119
|
+
if (cmpResultKey === -1) {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
const cmpResultPrimaryKey = cmp(record.value, primaryKey);
|
|
123
|
+
if (cmpResultKey === 0 && cmpResultPrimaryKey === -1) {
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (this._position !== undefined && sourceIsObjectStore) {
|
|
128
|
+
if (cmpResultPosition !== 1) {
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (this._position !== undefined && !sourceIsObjectStore) {
|
|
133
|
+
if (cmpResultPosition === -1) {
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
if (cmpResultPosition === 0 && cmp(record.value, this._objectStorePosition) !== 1) {
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (this._range !== undefined) {
|
|
141
|
+
if (!this._range.includes(record.key)) {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
foundRecord = record;
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
} else if (this.direction === 'nextunique') {
|
|
149
|
+
// This could be done without iterating, if the range was defined slightly better (to handle gt/gte cases).
|
|
150
|
+
// But the performance difference should be small, and that wouldn't work anyway for directions where the
|
|
151
|
+
// value needs to be used (like next and prev).
|
|
152
|
+
const range = makeKeyRange(this._range, [key, this._position], []);
|
|
153
|
+
for (const record of records.values(range)) {
|
|
154
|
+
if (key !== undefined) {
|
|
155
|
+
if (cmp(record.key, key) === -1) {
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (this._position !== undefined) {
|
|
160
|
+
if (cmp(record.key, this._position) !== 1) {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (this._range !== undefined) {
|
|
165
|
+
if (!this._range.includes(record.key)) {
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
foundRecord = record;
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
} else if (this.direction === 'prev') {
|
|
173
|
+
const range = makeKeyRange(this._range, [], [key, this._position]);
|
|
174
|
+
for (const record of records.values(range, 'prev')) {
|
|
175
|
+
const cmpResultKey = key !== undefined ? cmp(record.key, key) : undefined;
|
|
176
|
+
const cmpResultPosition = this._position !== undefined ? cmp(record.key, this._position) : undefined;
|
|
177
|
+
if (key !== undefined) {
|
|
178
|
+
if (cmpResultKey === 1) {
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (primaryKey !== undefined) {
|
|
183
|
+
if (cmpResultKey === 1) {
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
const cmpResultPrimaryKey = cmp(record.value, primaryKey);
|
|
187
|
+
if (cmpResultKey === 0 && cmpResultPrimaryKey === 1) {
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (this._position !== undefined && sourceIsObjectStore) {
|
|
192
|
+
if (cmpResultPosition !== -1) {
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (this._position !== undefined && !sourceIsObjectStore) {
|
|
197
|
+
if (cmpResultPosition === 1) {
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
if (cmpResultPosition === 0 && cmp(record.value, this._objectStorePosition) !== -1) {
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (this._range !== undefined) {
|
|
205
|
+
if (!this._range.includes(record.key)) {
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
foundRecord = record;
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
} else if (this.direction === 'prevunique') {
|
|
213
|
+
let tempRecord;
|
|
214
|
+
const range = makeKeyRange(this._range, [], [key, this._position]);
|
|
215
|
+
for (const record of records.values(range, 'prev')) {
|
|
216
|
+
if (key !== undefined) {
|
|
217
|
+
if (cmp(record.key, key) === 1) {
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (this._position !== undefined) {
|
|
222
|
+
if (cmp(record.key, this._position) !== -1) {
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (this._range !== undefined) {
|
|
227
|
+
if (!this._range.includes(record.key)) {
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
tempRecord = record;
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
if (tempRecord) {
|
|
235
|
+
foundRecord = records.get(tempRecord.key);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
let result;
|
|
239
|
+
if (!foundRecord) {
|
|
240
|
+
this._key = undefined;
|
|
241
|
+
if (!sourceIsObjectStore) {
|
|
242
|
+
this._objectStorePosition = undefined;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// "this instanceof FDBCursorWithValue" would be better and not require (this as any), but causes runtime
|
|
246
|
+
// error due to circular dependency.
|
|
247
|
+
if (!this._keyOnly && this.toString() === '[object IDBCursorWithValue]') {
|
|
248
|
+
this.value = undefined;
|
|
249
|
+
}
|
|
250
|
+
result = null;
|
|
251
|
+
} else {
|
|
252
|
+
this._position = foundRecord.key;
|
|
253
|
+
if (!sourceIsObjectStore) {
|
|
254
|
+
this._objectStorePosition = foundRecord.value;
|
|
255
|
+
}
|
|
256
|
+
this._key = foundRecord.key;
|
|
257
|
+
if (sourceIsObjectStore) {
|
|
258
|
+
this._primaryKey = structuredClone(foundRecord.key);
|
|
259
|
+
if (!this._keyOnly && this.toString() === '[object IDBCursorWithValue]') {
|
|
260
|
+
this.value = structuredClone(foundRecord.value);
|
|
261
|
+
}
|
|
262
|
+
} else {
|
|
263
|
+
this._primaryKey = structuredClone(foundRecord.value);
|
|
264
|
+
if (!this._keyOnly && this.toString() === '[object IDBCursorWithValue]') {
|
|
265
|
+
if (this.source instanceof FDBObjectStore) {
|
|
266
|
+
// Can't use sourceIsObjectStore because TypeScript
|
|
267
|
+
throw new Error('This should never happen');
|
|
268
|
+
}
|
|
269
|
+
const value = this.source.objectStore._rawObjectStore.getValue(foundRecord.value);
|
|
270
|
+
this.value = structuredClone(value);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
this._gotValue = true;
|
|
274
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
275
|
+
result = this;
|
|
276
|
+
}
|
|
277
|
+
return result;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#widl-IDBCursor-update-IDBRequest-any-value
|
|
281
|
+
update(value) {
|
|
282
|
+
if (value === undefined) {
|
|
283
|
+
throw new TypeError();
|
|
284
|
+
}
|
|
285
|
+
const effectiveObjectStore = getEffectiveObjectStore(this);
|
|
286
|
+
const effectiveKey = Object.hasOwn(this.source, '_rawIndex') ? this.primaryKey : this._position;
|
|
287
|
+
const transaction = effectiveObjectStore.transaction;
|
|
288
|
+
if (transaction._state !== 'active') {
|
|
289
|
+
throw new TransactionInactiveError();
|
|
290
|
+
}
|
|
291
|
+
if (transaction.mode === 'readonly') {
|
|
292
|
+
throw new ReadOnlyError();
|
|
293
|
+
}
|
|
294
|
+
if (effectiveObjectStore._rawObjectStore.deleted) {
|
|
295
|
+
throw new InvalidStateError();
|
|
296
|
+
}
|
|
297
|
+
if (!(this.source instanceof FDBObjectStore) && this.source._rawIndex.deleted) {
|
|
298
|
+
throw new InvalidStateError();
|
|
299
|
+
}
|
|
300
|
+
if (!this._gotValue || !Object.hasOwn(this, 'value')) {
|
|
301
|
+
throw new InvalidStateError();
|
|
302
|
+
}
|
|
303
|
+
const clone = structuredClone(value);
|
|
304
|
+
if (effectiveObjectStore.keyPath !== null) {
|
|
305
|
+
let tempKey;
|
|
306
|
+
try {
|
|
307
|
+
tempKey = extractKey(effectiveObjectStore.keyPath, clone);
|
|
308
|
+
} catch (_) {
|
|
309
|
+
/* Handled immediately below */
|
|
310
|
+
}
|
|
311
|
+
if (cmp(tempKey, effectiveKey) !== 0) {
|
|
312
|
+
throw new DataError();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
const record = {
|
|
316
|
+
key: effectiveKey,
|
|
317
|
+
value: clone
|
|
318
|
+
};
|
|
319
|
+
return transaction._execRequestAsync({
|
|
320
|
+
operation: effectiveObjectStore._rawObjectStore.storeRecord.bind(effectiveObjectStore._rawObjectStore, record, false, transaction._rollbackLog),
|
|
321
|
+
source: this
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#widl-IDBCursor-advance-void-unsigned-long-count
|
|
326
|
+
advance(count) {
|
|
327
|
+
if (!Number.isInteger(count) || count <= 0) {
|
|
328
|
+
throw new TypeError();
|
|
329
|
+
}
|
|
330
|
+
const effectiveObjectStore = getEffectiveObjectStore(this);
|
|
331
|
+
const transaction = effectiveObjectStore.transaction;
|
|
332
|
+
if (transaction._state !== 'active') {
|
|
333
|
+
throw new TransactionInactiveError();
|
|
334
|
+
}
|
|
335
|
+
if (effectiveObjectStore._rawObjectStore.deleted) {
|
|
336
|
+
throw new InvalidStateError();
|
|
337
|
+
}
|
|
338
|
+
if (!(this.source instanceof FDBObjectStore) && this.source._rawIndex.deleted) {
|
|
339
|
+
throw new InvalidStateError();
|
|
340
|
+
}
|
|
341
|
+
if (!this._gotValue) {
|
|
342
|
+
throw new InvalidStateError();
|
|
343
|
+
}
|
|
344
|
+
if (this._request) {
|
|
345
|
+
this._request.readyState = 'pending';
|
|
346
|
+
}
|
|
347
|
+
transaction._execRequestAsync({
|
|
348
|
+
operation: () => {
|
|
349
|
+
let result;
|
|
350
|
+
for (let i = 0; i < count; i++) {
|
|
351
|
+
result = this._iterate();
|
|
352
|
+
|
|
353
|
+
// Not sure why this is needed
|
|
354
|
+
if (!result) {
|
|
355
|
+
break;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
return result;
|
|
359
|
+
},
|
|
360
|
+
request: this._request,
|
|
361
|
+
source: this.source
|
|
362
|
+
});
|
|
363
|
+
this._gotValue = false;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#widl-IDBCursor-continue-void-any-key
|
|
367
|
+
continue(key) {
|
|
368
|
+
const effectiveObjectStore = getEffectiveObjectStore(this);
|
|
369
|
+
const transaction = effectiveObjectStore.transaction;
|
|
370
|
+
if (transaction._state !== 'active') {
|
|
371
|
+
throw new TransactionInactiveError();
|
|
372
|
+
}
|
|
373
|
+
if (effectiveObjectStore._rawObjectStore.deleted) {
|
|
374
|
+
throw new InvalidStateError();
|
|
375
|
+
}
|
|
376
|
+
if (!(this.source instanceof FDBObjectStore) && this.source._rawIndex.deleted) {
|
|
377
|
+
throw new InvalidStateError();
|
|
378
|
+
}
|
|
379
|
+
if (!this._gotValue) {
|
|
380
|
+
throw new InvalidStateError();
|
|
381
|
+
}
|
|
382
|
+
if (key !== undefined) {
|
|
383
|
+
key = valueToKey(key);
|
|
384
|
+
const cmpResult = cmp(key, this._position);
|
|
385
|
+
if (cmpResult <= 0 && (this.direction === 'next' || this.direction === 'nextunique') || cmpResult >= 0 && (this.direction === 'prev' || this.direction === 'prevunique')) {
|
|
386
|
+
throw new DataError();
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
if (this._request) {
|
|
390
|
+
this._request.readyState = 'pending';
|
|
391
|
+
}
|
|
392
|
+
transaction._execRequestAsync({
|
|
393
|
+
operation: this._iterate.bind(this, key),
|
|
394
|
+
request: this._request,
|
|
395
|
+
source: this.source
|
|
396
|
+
});
|
|
397
|
+
this._gotValue = false;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// hthttps://w3c.github.io/IndexedDB/#dom-idbcursor-continueprimarykey
|
|
401
|
+
continuePrimaryKey(key, primaryKey) {
|
|
402
|
+
const effectiveObjectStore = getEffectiveObjectStore(this);
|
|
403
|
+
const transaction = effectiveObjectStore.transaction;
|
|
404
|
+
if (transaction._state !== 'active') {
|
|
405
|
+
throw new TransactionInactiveError();
|
|
406
|
+
}
|
|
407
|
+
if (effectiveObjectStore._rawObjectStore.deleted) {
|
|
408
|
+
throw new InvalidStateError();
|
|
409
|
+
}
|
|
410
|
+
if (!(this.source instanceof FDBObjectStore) && this.source._rawIndex.deleted) {
|
|
411
|
+
throw new InvalidStateError();
|
|
412
|
+
}
|
|
413
|
+
if (this.source instanceof FDBObjectStore || this.direction !== 'next' && this.direction !== 'prev') {
|
|
414
|
+
throw new InvalidAccessError();
|
|
415
|
+
}
|
|
416
|
+
if (!this._gotValue) {
|
|
417
|
+
throw new InvalidStateError();
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
// Not sure about this
|
|
421
|
+
if (key === undefined || primaryKey === undefined) {
|
|
422
|
+
throw new DataError();
|
|
423
|
+
}
|
|
424
|
+
key = valueToKey(key);
|
|
425
|
+
const cmpResult = cmp(key, this._position);
|
|
426
|
+
if (cmpResult === -1 && this.direction === 'next' || cmpResult === 1 && this.direction === 'prev') {
|
|
427
|
+
throw new DataError();
|
|
428
|
+
}
|
|
429
|
+
const cmpResult2 = cmp(primaryKey, this._objectStorePosition);
|
|
430
|
+
if (cmpResult === 0) {
|
|
431
|
+
if (cmpResult2 <= 0 && this.direction === 'next' || cmpResult2 >= 0 && this.direction === 'prev') {
|
|
432
|
+
throw new DataError();
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
if (this._request) {
|
|
436
|
+
this._request.readyState = 'pending';
|
|
437
|
+
}
|
|
438
|
+
transaction._execRequestAsync({
|
|
439
|
+
operation: this._iterate.bind(this, key, primaryKey),
|
|
440
|
+
request: this._request,
|
|
441
|
+
source: this.source
|
|
442
|
+
});
|
|
443
|
+
this._gotValue = false;
|
|
444
|
+
}
|
|
445
|
+
delete() {
|
|
446
|
+
const effectiveObjectStore = getEffectiveObjectStore(this);
|
|
447
|
+
const effectiveKey = Object.hasOwn(this.source, '_rawIndex') ? this.primaryKey : this._position;
|
|
448
|
+
const transaction = effectiveObjectStore.transaction;
|
|
449
|
+
if (transaction._state !== 'active') {
|
|
450
|
+
throw new TransactionInactiveError();
|
|
451
|
+
}
|
|
452
|
+
if (transaction.mode === 'readonly') {
|
|
453
|
+
throw new ReadOnlyError();
|
|
454
|
+
}
|
|
455
|
+
if (effectiveObjectStore._rawObjectStore.deleted) {
|
|
456
|
+
throw new InvalidStateError();
|
|
457
|
+
}
|
|
458
|
+
if (!(this.source instanceof FDBObjectStore) && this.source._rawIndex.deleted) {
|
|
459
|
+
throw new InvalidStateError();
|
|
460
|
+
}
|
|
461
|
+
if (!this._gotValue || !Object.hasOwn(this, 'value')) {
|
|
462
|
+
throw new InvalidStateError();
|
|
463
|
+
}
|
|
464
|
+
return transaction._execRequestAsync({
|
|
465
|
+
operation: effectiveObjectStore._rawObjectStore.deleteRecord.bind(effectiveObjectStore._rawObjectStore, effectiveKey, transaction._rollbackLog),
|
|
466
|
+
source: this
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
toString() {
|
|
470
|
+
return '[object IDBCursor]';
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
export default FDBCursor;
|
|
474
|
+
//# sourceMappingURL=FDBCursor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FDBKeyRange","FDBObjectStore","cmp","DataError","InvalidAccessError","InvalidStateError","ReadOnlyError","TransactionInactiveError","extractKey","valueToKey","getEffectiveObjectStore","cursor","source","objectStore","makeKeyRange","range","lowers","uppers","lower","undefined","upper","lowerTemp","upperTemp","bound","lowerBound","upperBound","FDBCursor","_gotValue","_position","_objectStorePosition","_keyOnly","_key","_primaryKey","constructor","direction","request","keyOnly","_range","_source","_direction","_request","val","key","primaryKey","_iterate","sourceIsObjectStore","records","_rawObjectStore","_rawIndex","foundRecord","record","values","cmpResultKey","cmpResultPosition","cmpResultPrimaryKey","value","includes","tempRecord","get","result","toString","structuredClone","Error","getValue","update","TypeError","effectiveObjectStore","effectiveKey","Object","hasOwn","transaction","_state","mode","deleted","clone","keyPath","tempKey","_","_execRequestAsync","operation","storeRecord","bind","_rollbackLog","advance","count","Number","isInteger","readyState","i","continue","cmpResult","continuePrimaryKey","cmpResult2","delete","deleteRecord"],"sourceRoot":"../../../../../lib","sources":["internal/web/memidb/FDBCursor.js"],"mappings":";;AAAA,OAAOA,WAAW,MAAM,k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AAW,CAACQ,iBAAiB,CAAC;MACnCC,SAAS,EAAEb,oBAAoB,CAACnB,eAAe,CAAC+C,YAAY,CAACb,IAAI,CAC/Df,oBAAoB,CAACnB,eAAe,EACpCoB,YAAY,EACZG,WAAW,CAACY,YACd,CAAC;MACDtE,MAAM,EAAE;IACV,CAAC,CAAC;EACJ;EACAgD,QAAQA,CAAA,EAAG;IACT,OAAO,oBAAoB;EAC7B;AACF;AACA,eAAelC,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import FDBCursor from './FDBCursor.js';
|
|
4
|
+
class FDBCursorWithValue extends FDBCursor {
|
|
5
|
+
value = undefined;
|
|
6
|
+
constructor(source, range, direction, request) {
|
|
7
|
+
super(source, range, direction, request);
|
|
8
|
+
}
|
|
9
|
+
toString() {
|
|
10
|
+
return '[object IDBCursorWithValue]';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export default FDBCursorWithValue;
|
|
14
|
+
//# sourceMappingURL=FDBCursorWithValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FDBCursor","FDBCursorWithValue","value","undefined","constructor","source","range","direction","request","toString"],"sourceRoot":"../../../../../lib","sources":["internal/web/memidb/FDBCursorWithValue.js"],"mappings":";;AAAA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,MAAMC,kBAAkB,SAASD,SAAS,CAAC;EACzCE,KAAK,GAAGC,SAAS;EACjBC,WAAWA,CAACC,MAAM,EAAEC,KAAK,EAAEC,SAAS,EAAEC,OAAO,EAAE;IAC7C,KAAK,CAACH,MAAM,EAAEC,KAAK,EAAEC,SAAS,EAAEC,OAAO,CAAC;EAC1C;EACAC,QAAQA,CAAA,EAAG;IACT,OAAO,6BAA6B;EACtC;AACF;AACA,eAAeR,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import FDBTransaction from './FDBTransaction.js';
|
|
4
|
+
import { ConstraintError, InvalidAccessError, InvalidStateError, NotFoundError, TransactionInactiveError } from './lib/errors.js';
|
|
5
|
+
import FakeDOMStringList from './lib/FakeDOMStringList.js';
|
|
6
|
+
import FakeEventTarget from './lib/FakeEventTarget.js';
|
|
7
|
+
import ObjectStore from './lib/ObjectStore.js';
|
|
8
|
+
import { queueTask } from './lib/scheduling.js';
|
|
9
|
+
import validateKeyPath from './lib/validateKeyPath.js';
|
|
10
|
+
const confirmActiveVersionchangeTransaction = database => {
|
|
11
|
+
if (!database._runningVersionchangeTransaction) {
|
|
12
|
+
throw new InvalidStateError();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Find the latest versionchange transaction
|
|
16
|
+
const transactions = database._rawDatabase.transactions.filter(tx => {
|
|
17
|
+
return tx.mode === 'versionchange';
|
|
18
|
+
});
|
|
19
|
+
const transaction = transactions[transactions.length - 1];
|
|
20
|
+
if (!transaction || transaction._state === 'finished') {
|
|
21
|
+
throw new InvalidStateError();
|
|
22
|
+
}
|
|
23
|
+
if (transaction._state !== 'active') {
|
|
24
|
+
throw new TransactionInactiveError();
|
|
25
|
+
}
|
|
26
|
+
return transaction;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#database-closing-steps
|
|
30
|
+
const closeConnection = connection => {
|
|
31
|
+
connection._closePending = true;
|
|
32
|
+
const transactionsComplete = connection._rawDatabase.transactions.every(transaction => {
|
|
33
|
+
return transaction._state === 'finished';
|
|
34
|
+
});
|
|
35
|
+
if (transactionsComplete) {
|
|
36
|
+
connection._closed = true;
|
|
37
|
+
connection._rawDatabase.connections = connection._rawDatabase.connections.filter(otherConnection => {
|
|
38
|
+
return connection !== otherConnection;
|
|
39
|
+
});
|
|
40
|
+
} else {
|
|
41
|
+
queueTask(() => {
|
|
42
|
+
closeConnection(connection);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#database-interface
|
|
48
|
+
class FDBDatabase extends FakeEventTarget {
|
|
49
|
+
_closePending = false;
|
|
50
|
+
_closed = false;
|
|
51
|
+
_runningVersionchangeTransaction = false;
|
|
52
|
+
constructor(rawDatabase) {
|
|
53
|
+
super();
|
|
54
|
+
this._rawDatabase = rawDatabase;
|
|
55
|
+
this._rawDatabase.connections.push(this);
|
|
56
|
+
this.name = rawDatabase.name;
|
|
57
|
+
this.version = rawDatabase.version;
|
|
58
|
+
this.objectStoreNames = new FakeDOMStringList(...Array.from(rawDatabase.rawObjectStores.keys()).sort());
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// http://w3c.github.io/IndexedDB/#dom-idbdatabase-createobjectstore
|
|
62
|
+
createObjectStore(name, options = {}) {
|
|
63
|
+
if (name === undefined) {
|
|
64
|
+
throw new TypeError();
|
|
65
|
+
}
|
|
66
|
+
const transaction = confirmActiveVersionchangeTransaction(this);
|
|
67
|
+
const keyPath = options !== null && options.keyPath !== undefined ? options.keyPath : null;
|
|
68
|
+
const autoIncrement = options !== null && options.autoIncrement !== undefined ? options.autoIncrement : false;
|
|
69
|
+
if (keyPath !== null) {
|
|
70
|
+
validateKeyPath(keyPath);
|
|
71
|
+
}
|
|
72
|
+
if (this._rawDatabase.rawObjectStores.has(name)) {
|
|
73
|
+
throw new ConstraintError();
|
|
74
|
+
}
|
|
75
|
+
if (autoIncrement && (keyPath === '' || Array.isArray(keyPath))) {
|
|
76
|
+
throw new InvalidAccessError();
|
|
77
|
+
}
|
|
78
|
+
const objectStoreNames = [...this.objectStoreNames];
|
|
79
|
+
transaction._rollbackLog.push(() => {
|
|
80
|
+
const objectStore = this._rawDatabase.rawObjectStores.get(name);
|
|
81
|
+
if (objectStore) {
|
|
82
|
+
objectStore.deleted = true;
|
|
83
|
+
}
|
|
84
|
+
this.objectStoreNames = new FakeDOMStringList(...objectStoreNames);
|
|
85
|
+
transaction._scope.delete(name);
|
|
86
|
+
this._rawDatabase.rawObjectStores.delete(name);
|
|
87
|
+
});
|
|
88
|
+
const rawObjectStore = new ObjectStore(this._rawDatabase, name, keyPath, autoIncrement);
|
|
89
|
+
this.objectStoreNames._push(name);
|
|
90
|
+
this.objectStoreNames._sort();
|
|
91
|
+
transaction._scope.add(name);
|
|
92
|
+
this._rawDatabase.rawObjectStores.set(name, rawObjectStore);
|
|
93
|
+
transaction.objectStoreNames = new FakeDOMStringList(...this.objectStoreNames);
|
|
94
|
+
return transaction.objectStore(name);
|
|
95
|
+
}
|
|
96
|
+
deleteObjectStore(name) {
|
|
97
|
+
if (name === undefined) {
|
|
98
|
+
throw new TypeError();
|
|
99
|
+
}
|
|
100
|
+
const transaction = confirmActiveVersionchangeTransaction(this);
|
|
101
|
+
const store = this._rawDatabase.rawObjectStores.get(name);
|
|
102
|
+
if (store === undefined) {
|
|
103
|
+
throw new NotFoundError();
|
|
104
|
+
}
|
|
105
|
+
this.objectStoreNames = new FakeDOMStringList(...Array.from(this.objectStoreNames).filter(objectStoreName => {
|
|
106
|
+
return objectStoreName !== name;
|
|
107
|
+
}));
|
|
108
|
+
transaction.objectStoreNames = new FakeDOMStringList(...this.objectStoreNames);
|
|
109
|
+
transaction._rollbackLog.push(() => {
|
|
110
|
+
store.deleted = false;
|
|
111
|
+
this._rawDatabase.rawObjectStores.set(name, store);
|
|
112
|
+
this.objectStoreNames._push(name);
|
|
113
|
+
this.objectStoreNames._sort();
|
|
114
|
+
});
|
|
115
|
+
store.deleted = true;
|
|
116
|
+
this._rawDatabase.rawObjectStores.delete(name);
|
|
117
|
+
transaction._objectStoresCache.delete(name);
|
|
118
|
+
}
|
|
119
|
+
transaction(storeNames, mode) {
|
|
120
|
+
mode = mode !== undefined ? mode : 'readonly';
|
|
121
|
+
if (mode !== 'readonly' && mode !== 'readwrite' && mode !== 'versionchange') {
|
|
122
|
+
throw new TypeError('Invalid mode: ' + mode);
|
|
123
|
+
}
|
|
124
|
+
const hasActiveVersionchange = this._rawDatabase.transactions.some(transaction => {
|
|
125
|
+
return transaction._state === 'active' && transaction.mode === 'versionchange' && transaction.db === this;
|
|
126
|
+
});
|
|
127
|
+
if (hasActiveVersionchange) {
|
|
128
|
+
throw new InvalidStateError();
|
|
129
|
+
}
|
|
130
|
+
if (this._closePending) {
|
|
131
|
+
throw new InvalidStateError();
|
|
132
|
+
}
|
|
133
|
+
if (!Array.isArray(storeNames)) {
|
|
134
|
+
storeNames = [storeNames];
|
|
135
|
+
}
|
|
136
|
+
if (storeNames.length === 0 && mode !== 'versionchange') {
|
|
137
|
+
throw new InvalidAccessError();
|
|
138
|
+
}
|
|
139
|
+
for (const storeName of storeNames) {
|
|
140
|
+
if (!this.objectStoreNames.contains(storeName)) {
|
|
141
|
+
throw new NotFoundError('No objectStore named ' + storeName + ' in this database');
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
const tx = new FDBTransaction(storeNames, mode, this);
|
|
145
|
+
this._rawDatabase.transactions.push(tx);
|
|
146
|
+
this._rawDatabase.processTransactions(); // See if can start right away (async)
|
|
147
|
+
|
|
148
|
+
return tx;
|
|
149
|
+
}
|
|
150
|
+
close() {
|
|
151
|
+
closeConnection(this);
|
|
152
|
+
}
|
|
153
|
+
toString() {
|
|
154
|
+
return '[object IDBDatabase]';
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
export default FDBDatabase;
|
|
158
|
+
//# sourceMappingURL=FDBDatabase.js.map
|