@react-native-firebase/app 23.8.2 → 23.8.4
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 +17 -0
- package/RNFBApp.podspec +5 -1
- package/android/src/reactnative/java/io/invertase/firebase/app/ReactNativeFirebaseVersion.java +1 -1
- package/dist/module/internal/NativeFirebaseError.js +7 -7
- package/dist/module/internal/NativeFirebaseError.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/lib/FirebaseApp.d.ts.map +1 -0
- package/dist/typescript/lib/common/Base64.d.ts.map +1 -0
- package/dist/typescript/lib/common/MutatableParams.d.ts.map +1 -0
- package/dist/typescript/lib/common/ReferenceBase.d.ts.map +1 -0
- package/dist/typescript/lib/common/deeps.d.ts.map +1 -0
- package/dist/typescript/lib/common/id.d.ts.map +1 -0
- package/dist/typescript/lib/common/index.d.ts.map +1 -0
- package/dist/typescript/lib/common/path.d.ts.map +1 -0
- package/dist/typescript/lib/common/promise.d.ts.map +1 -0
- package/dist/typescript/lib/common/serialize.d.ts.map +1 -0
- package/dist/typescript/lib/common/unitTestUtils.d.ts.map +1 -0
- package/dist/typescript/lib/common/validate.d.ts.map +1 -0
- package/dist/typescript/lib/index.d.ts.map +1 -0
- package/dist/typescript/lib/internal/FirebaseModule.d.ts.map +1 -0
- package/dist/typescript/lib/internal/NativeFirebaseError.d.ts.map +1 -0
- package/dist/typescript/lib/internal/NativeModules.d.ts.map +1 -0
- package/dist/typescript/lib/internal/RNFBNativeEventEmitter.d.ts.map +1 -0
- package/dist/typescript/lib/internal/SharedEventEmitter.d.ts.map +1 -0
- package/dist/typescript/lib/internal/asyncStorage.d.ts.map +1 -0
- package/dist/typescript/lib/internal/constants.d.ts.map +1 -0
- package/dist/typescript/lib/internal/index.d.ts.map +1 -0
- package/dist/typescript/lib/internal/logger.d.ts.map +1 -0
- package/dist/typescript/lib/internal/nativeModule.android.d.ts.map +1 -0
- package/dist/typescript/lib/internal/nativeModule.d.ts.map +1 -0
- package/dist/typescript/lib/internal/nativeModule.ios.d.ts.map +1 -0
- package/dist/typescript/lib/internal/nativeModuleAndroidIos.d.ts.map +1 -0
- package/dist/typescript/lib/internal/nativeModuleWeb.d.ts.map +1 -0
- package/dist/typescript/lib/internal/nullSerialization.d.ts.map +1 -0
- package/dist/typescript/lib/internal/registry/app.d.ts.map +1 -0
- package/dist/typescript/lib/internal/registry/namespace.d.ts.map +1 -0
- package/dist/typescript/lib/internal/registry/nativeModule.d.ts.map +1 -0
- package/dist/typescript/lib/internal/web/RNFBAppModule.d.ts.map +1 -0
- package/dist/typescript/lib/internal/web/firebaseApp.d.ts.map +1 -0
- package/dist/typescript/lib/internal/web/firebaseAppCheck.d.ts.map +1 -0
- package/dist/typescript/lib/internal/web/firebaseAuth.d.ts.map +1 -0
- package/dist/typescript/lib/internal/web/firebaseDatabase.d.ts.map +1 -0
- package/dist/typescript/lib/internal/web/firebaseFirestore.d.ts.map +1 -0
- package/dist/typescript/lib/internal/web/firebaseFunctions.d.ts.map +1 -0
- package/dist/typescript/lib/internal/web/firebaseInstallations.d.ts.map +1 -0
- package/dist/typescript/lib/internal/web/firebaseRemoteConfig.d.ts.map +1 -0
- package/dist/typescript/lib/internal/web/firebaseStorage.d.ts.map +1 -0
- package/dist/typescript/lib/internal/web/utils.d.ts.map +1 -0
- package/dist/typescript/{commonjs/lib → lib}/modular.d.ts +1 -1
- package/dist/typescript/lib/modular.d.ts.map +1 -0
- package/dist/typescript/lib/namespaced.d.ts.map +1 -0
- package/dist/typescript/lib/types/app.d.ts.map +1 -0
- package/dist/typescript/{module/lib → lib}/types/internal.d.ts +1 -1
- package/dist/typescript/lib/types/internal.d.ts.map +1 -0
- package/dist/typescript/lib/utils/UtilsStatics.d.ts.map +1 -0
- package/dist/typescript/lib/utils/index.d.ts.map +1 -0
- package/dist/typescript/lib/version.d.ts +2 -0
- package/dist/typescript/lib/version.d.ts.map +1 -0
- package/ios/RNFBApp/RNFBVersion.m +1 -1
- package/lib/internal/NativeFirebaseError.ts +7 -7
- package/lib/types/internal.ts +1 -1
- package/lib/version.ts +1 -1
- package/package.json +21 -57
- package/dist/commonjs/FirebaseApp.js +0 -85
- package/dist/commonjs/FirebaseApp.js.map +0 -1
- package/dist/commonjs/common/Base64.js +0 -106
- package/dist/commonjs/common/Base64.js.map +0 -1
- package/dist/commonjs/common/MutatableParams.js +0 -50
- package/dist/commonjs/common/MutatableParams.js.map +0 -1
- package/dist/commonjs/common/ReferenceBase.js +0 -49
- package/dist/commonjs/common/ReferenceBase.js.map +0 -1
- package/dist/commonjs/common/deeps.js +0 -82
- package/dist/commonjs/common/deeps.js.map +0 -1
- package/dist/commonjs/common/id.js +0 -88
- package/dist/commonjs/common/id.js.map +0 -1
- package/dist/commonjs/common/index.js +0 -799
- package/dist/commonjs/common/index.js.map +0 -1
- package/dist/commonjs/common/path.js +0 -133
- package/dist/commonjs/common/path.js.map +0 -1
- package/dist/commonjs/common/promise.js +0 -65
- package/dist/commonjs/common/promise.js.map +0 -1
- package/dist/commonjs/common/serialize.js +0 -48
- package/dist/commonjs/common/serialize.js.map +0 -1
- package/dist/commonjs/common/unitTestUtils.js +0 -54
- package/dist/commonjs/common/unitTestUtils.js.map +0 -1
- package/dist/commonjs/common/validate.js +0 -236
- package/dist/commonjs/common/validate.js.map +0 -1
- package/dist/commonjs/index.js +0 -42
- package/dist/commonjs/index.js.map +0 -1
- package/dist/commonjs/internal/FirebaseModule.js +0 -63
- package/dist/commonjs/internal/FirebaseModule.js.map +0 -1
- package/dist/commonjs/internal/NativeFirebaseError.js +0 -92
- package/dist/commonjs/internal/NativeFirebaseError.js.map +0 -1
- package/dist/commonjs/internal/NativeModules.js +0 -6
- package/dist/commonjs/internal/NativeModules.js.map +0 -1
- package/dist/commonjs/internal/RNFBNativeEventEmitter.js +0 -118
- package/dist/commonjs/internal/RNFBNativeEventEmitter.js.map +0 -1
- package/dist/commonjs/internal/SharedEventEmitter.js +0 -26
- package/dist/commonjs/internal/SharedEventEmitter.js.map +0 -1
- package/dist/commonjs/internal/asyncStorage.js +0 -83
- package/dist/commonjs/internal/asyncStorage.js.map +0 -1
- package/dist/commonjs/internal/constants.js +0 -27
- package/dist/commonjs/internal/constants.js.map +0 -1
- package/dist/commonjs/internal/index.js +0 -109
- package/dist/commonjs/internal/index.js.map +0 -1
- package/dist/commonjs/internal/logger.js +0 -256
- package/dist/commonjs/internal/logger.js.map +0 -1
- package/dist/commonjs/internal/nativeModule.android.js +0 -19
- package/dist/commonjs/internal/nativeModule.android.js.map +0 -1
- package/dist/commonjs/internal/nativeModule.ios.js +0 -19
- package/dist/commonjs/internal/nativeModule.ios.js.map +0 -1
- package/dist/commonjs/internal/nativeModule.js +0 -19
- package/dist/commonjs/internal/nativeModule.js.map +0 -1
- package/dist/commonjs/internal/nativeModuleAndroidIos.js +0 -51
- package/dist/commonjs/internal/nativeModuleAndroidIos.js.map +0 -1
- package/dist/commonjs/internal/nativeModuleWeb.js +0 -52
- package/dist/commonjs/internal/nativeModuleWeb.js.map +0 -1
- package/dist/commonjs/internal/nullSerialization.js +0 -162
- package/dist/commonjs/internal/nullSerialization.js.map +0 -1
- package/dist/commonjs/internal/registry/app.js +0 -238
- package/dist/commonjs/internal/registry/app.js.map +0 -1
- package/dist/commonjs/internal/registry/namespace.js +0 -269
- package/dist/commonjs/internal/registry/namespace.js.map +0 -1
- package/dist/commonjs/internal/registry/nativeModule.js +0 -224
- package/dist/commonjs/internal/registry/nativeModule.js.map +0 -1
- package/dist/commonjs/internal/web/RNFBAppModule.js +0 -273
- package/dist/commonjs/internal/web/RNFBAppModule.js.map +0 -1
- package/dist/commonjs/internal/web/firebaseApp.js +0 -17
- package/dist/commonjs/internal/web/firebaseApp.js.map +0 -1
- package/dist/commonjs/internal/web/firebaseAppCheck.js +0 -36
- package/dist/commonjs/internal/web/firebaseAppCheck.js.map +0 -1
- package/dist/commonjs/internal/web/firebaseAuth.js +0 -28
- package/dist/commonjs/internal/web/firebaseAuth.js.map +0 -1
- package/dist/commonjs/internal/web/firebaseDatabase.js +0 -28
- package/dist/commonjs/internal/web/firebaseDatabase.js.map +0 -1
- package/dist/commonjs/internal/web/firebaseFirestore.js +0 -28
- package/dist/commonjs/internal/web/firebaseFirestore.js.map +0 -1
- package/dist/commonjs/internal/web/firebaseFunctions.js +0 -28
- package/dist/commonjs/internal/web/firebaseFunctions.js.map +0 -1
- package/dist/commonjs/internal/web/firebaseInstallations.js +0 -36
- package/dist/commonjs/internal/web/firebaseInstallations.js.map +0 -1
- package/dist/commonjs/internal/web/firebaseRemoteConfig.js +0 -36
- package/dist/commonjs/internal/web/firebaseRemoteConfig.js.map +0 -1
- package/dist/commonjs/internal/web/firebaseStorage.js +0 -28
- package/dist/commonjs/internal/web/firebaseStorage.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/FDBCursor.js +0 -479
- package/dist/commonjs/internal/web/memidb/FDBCursor.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/FDBCursorWithValue.js +0 -19
- package/dist/commonjs/internal/web/memidb/FDBCursorWithValue.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/FDBDatabase.js +0 -163
- package/dist/commonjs/internal/web/memidb/FDBDatabase.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/FDBFactory.js +0 -264
- package/dist/commonjs/internal/web/memidb/FDBFactory.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/FDBIndex.js +0 -191
- package/dist/commonjs/internal/web/memidb/FDBIndex.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/FDBKeyRange.js +0 -78
- package/dist/commonjs/internal/web/memidb/FDBKeyRange.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/FDBObjectStore.js +0 -383
- package/dist/commonjs/internal/web/memidb/FDBObjectStore.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/FDBOpenDBRequest.js +0 -17
- package/dist/commonjs/internal/web/memidb/FDBOpenDBRequest.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/FDBRequest.js +0 -41
- package/dist/commonjs/internal/web/memidb/FDBRequest.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/FDBTransaction.js +0 -221
- package/dist/commonjs/internal/web/memidb/FDBTransaction.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/FDBVersionChangeEvent.js +0 -20
- package/dist/commonjs/internal/web/memidb/FDBVersionChangeEvent.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/LICENSE +0 -208
- package/dist/commonjs/internal/web/memidb/index.js +0 -45
- package/dist/commonjs/internal/web/memidb/index.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/Database.js +0 -38
- package/dist/commonjs/internal/web/memidb/lib/Database.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/FakeDOMStringList.js +0 -78
- package/dist/commonjs/internal/web/memidb/lib/FakeDOMStringList.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/FakeEvent.js +0 -45
- package/dist/commonjs/internal/web/memidb/lib/FakeEvent.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/FakeEventTarget.js +0 -111
- package/dist/commonjs/internal/web/memidb/lib/FakeEventTarget.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/Index.js +0 -164
- package/dist/commonjs/internal/web/memidb/lib/Index.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/KeyGenerator.js +0 -29
- package/dist/commonjs/internal/web/memidb/lib/KeyGenerator.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/ObjectStore.js +0 -180
- package/dist/commonjs/internal/web/memidb/lib/ObjectStore.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/RecordStore.js +0 -141
- package/dist/commonjs/internal/web/memidb/lib/RecordStore.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/binarySearch.js +0 -86
- package/dist/commonjs/internal/web/memidb/lib/binarySearch.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/canInjectKey.js +0 -30
- package/dist/commonjs/internal/web/memidb/lib/canInjectKey.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/cmp.js +0 -85
- package/dist/commonjs/internal/web/memidb/lib/cmp.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/enforceRange.js +0 -20
- package/dist/commonjs/internal/web/memidb/lib/enforceRange.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/errors.js +0 -95
- package/dist/commonjs/internal/web/memidb/lib/errors.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/extractKey.js +0 -46
- package/dist/commonjs/internal/web/memidb/lib/extractKey.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/scheduling.js +0 -37
- package/dist/commonjs/internal/web/memidb/lib/scheduling.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/types.js +0 -6
- package/dist/commonjs/internal/web/memidb/lib/types.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/validateKeyPath.js +0 -51
- package/dist/commonjs/internal/web/memidb/lib/validateKeyPath.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/valueToKey.js +0 -62
- package/dist/commonjs/internal/web/memidb/lib/valueToKey.js.map +0 -1
- package/dist/commonjs/internal/web/memidb/lib/valueToKeyRange.js +0 -26
- package/dist/commonjs/internal/web/memidb/lib/valueToKeyRange.js.map +0 -1
- package/dist/commonjs/internal/web/structuredClone/index.js +0 -239
- package/dist/commonjs/internal/web/structuredClone/index.js.map +0 -1
- package/dist/commonjs/internal/web/utils.js +0 -59
- package/dist/commonjs/internal/web/utils.js.map +0 -1
- package/dist/commonjs/modular.js +0 -190
- package/dist/commonjs/modular.js.map +0 -1
- package/dist/commonjs/namespaced.js +0 -35
- package/dist/commonjs/namespaced.js.map +0 -1
- package/dist/commonjs/package.json +0 -1
- package/dist/commonjs/types/app.js +0 -139
- package/dist/commonjs/types/app.js.map +0 -1
- package/dist/commonjs/types/internal.js +0 -6
- package/dist/commonjs/types/internal.js.map +0 -1
- package/dist/commonjs/utils/UtilsStatics.js +0 -59
- package/dist/commonjs/utils/UtilsStatics.js.map +0 -1
- package/dist/commonjs/utils/index.js +0 -94
- package/dist/commonjs/utils/index.js.map +0 -1
- package/dist/commonjs/version.js +0 -9
- package/dist/commonjs/version.js.map +0 -1
- package/dist/typescript/commonjs/lib/FirebaseApp.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/common/Base64.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/common/MutatableParams.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/common/ReferenceBase.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/common/deeps.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/common/id.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/common/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/common/path.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/common/promise.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/common/serialize.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/common/unitTestUtils.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/common/validate.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/FirebaseModule.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/NativeFirebaseError.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/NativeModules.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/RNFBNativeEventEmitter.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/SharedEventEmitter.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/asyncStorage.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/logger.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/nativeModule.android.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/nativeModule.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/nativeModule.ios.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/nativeModuleAndroidIos.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/nativeModuleWeb.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/nullSerialization.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/registry/app.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/registry/namespace.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/registry/nativeModule.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/web/RNFBAppModule.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/web/firebaseApp.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/web/firebaseAppCheck.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/web/firebaseAuth.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/web/firebaseDatabase.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/web/firebaseFirestore.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/web/firebaseFunctions.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/web/firebaseInstallations.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/web/firebaseRemoteConfig.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/web/firebaseStorage.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/internal/web/utils.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/modular.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/namespaced.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/types/app.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/types/internal.d.ts +0 -101
- package/dist/typescript/commonjs/lib/types/internal.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/utils/UtilsStatics.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/utils/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/version.d.ts +0 -2
- package/dist/typescript/commonjs/lib/version.d.ts.map +0 -1
- package/dist/typescript/commonjs/package.json +0 -1
- package/dist/typescript/module/lib/FirebaseApp.d.ts +0 -21
- package/dist/typescript/module/lib/FirebaseApp.d.ts.map +0 -1
- package/dist/typescript/module/lib/common/Base64.d.ts +0 -23
- package/dist/typescript/module/lib/common/Base64.d.ts.map +0 -1
- package/dist/typescript/module/lib/common/MutatableParams.d.ts +0 -10
- package/dist/typescript/module/lib/common/MutatableParams.d.ts.map +0 -1
- package/dist/typescript/module/lib/common/ReferenceBase.d.ts +0 -12
- package/dist/typescript/module/lib/common/ReferenceBase.d.ts.map +0 -1
- package/dist/typescript/module/lib/common/deeps.d.ts +0 -19
- package/dist/typescript/module/lib/common/deeps.d.ts.map +0 -1
- package/dist/typescript/module/lib/common/id.d.ts +0 -12
- package/dist/typescript/module/lib/common/id.d.ts.map +0 -1
- package/dist/typescript/module/lib/common/index.d.ts +0 -33
- package/dist/typescript/module/lib/common/index.d.ts.map +0 -1
- package/dist/typescript/module/lib/common/path.d.ts +0 -51
- package/dist/typescript/module/lib/common/path.d.ts.map +0 -1
- package/dist/typescript/module/lib/common/promise.d.ts +0 -12
- package/dist/typescript/module/lib/common/promise.d.ts.map +0 -1
- package/dist/typescript/module/lib/common/serialize.d.ts +0 -4
- package/dist/typescript/module/lib/common/serialize.d.ts.map +0 -1
- package/dist/typescript/module/lib/common/unitTestUtils.d.ts +0 -4
- package/dist/typescript/module/lib/common/unitTestUtils.d.ts.map +0 -1
- package/dist/typescript/module/lib/common/validate.d.ts +0 -100
- package/dist/typescript/module/lib/common/validate.d.ts.map +0 -1
- package/dist/typescript/module/lib/index.d.ts +0 -4
- package/dist/typescript/module/lib/index.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/FirebaseModule.d.ts +0 -17
- package/dist/typescript/module/lib/internal/FirebaseModule.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/NativeFirebaseError.d.ts +0 -20
- package/dist/typescript/module/lib/internal/NativeFirebaseError.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/NativeModules.d.ts +0 -83
- package/dist/typescript/module/lib/internal/NativeModules.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/RNFBNativeEventEmitter.d.ts +0 -13
- package/dist/typescript/module/lib/internal/RNFBNativeEventEmitter.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/SharedEventEmitter.d.ts +0 -4
- package/dist/typescript/module/lib/internal/SharedEventEmitter.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/asyncStorage.d.ts +0 -10
- package/dist/typescript/module/lib/internal/asyncStorage.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/constants.d.ts +0 -5
- package/dist/typescript/module/lib/internal/constants.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/index.d.ts +0 -12
- package/dist/typescript/module/lib/internal/index.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/logger.d.ts +0 -83
- package/dist/typescript/module/lib/internal/logger.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/nativeModule.android.d.ts +0 -3
- package/dist/typescript/module/lib/internal/nativeModule.android.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/nativeModule.d.ts +0 -3
- package/dist/typescript/module/lib/internal/nativeModule.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/nativeModule.ios.d.ts +0 -3
- package/dist/typescript/module/lib/internal/nativeModule.ios.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/nativeModuleAndroidIos.d.ts +0 -10
- package/dist/typescript/module/lib/internal/nativeModuleAndroidIos.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/nativeModuleWeb.d.ts +0 -3
- package/dist/typescript/module/lib/internal/nativeModuleWeb.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/nullSerialization.d.ts +0 -16
- package/dist/typescript/module/lib/internal/nullSerialization.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/registry/app.d.ts +0 -47
- package/dist/typescript/module/lib/internal/registry/app.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/registry/namespace.d.ts +0 -26
- package/dist/typescript/module/lib/internal/registry/namespace.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/registry/nativeModule.d.ts +0 -17
- package/dist/typescript/module/lib/internal/registry/nativeModule.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/web/RNFBAppModule.d.ts +0 -139
- package/dist/typescript/module/lib/internal/web/RNFBAppModule.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/web/firebaseApp.d.ts +0 -2
- package/dist/typescript/module/lib/internal/web/firebaseApp.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/web/firebaseAppCheck.d.ts +0 -5
- package/dist/typescript/module/lib/internal/web/firebaseAppCheck.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/web/firebaseAuth.d.ts +0 -3
- package/dist/typescript/module/lib/internal/web/firebaseAuth.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/web/firebaseDatabase.d.ts +0 -3
- package/dist/typescript/module/lib/internal/web/firebaseDatabase.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/web/firebaseFirestore.d.ts +0 -3
- package/dist/typescript/module/lib/internal/web/firebaseFirestore.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/web/firebaseFunctions.d.ts +0 -3
- package/dist/typescript/module/lib/internal/web/firebaseFunctions.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/web/firebaseInstallations.d.ts +0 -5
- package/dist/typescript/module/lib/internal/web/firebaseInstallations.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/web/firebaseRemoteConfig.d.ts +0 -5
- package/dist/typescript/module/lib/internal/web/firebaseRemoteConfig.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/web/firebaseStorage.d.ts +0 -3
- package/dist/typescript/module/lib/internal/web/firebaseStorage.d.ts.map +0 -1
- package/dist/typescript/module/lib/internal/web/utils.d.ts +0 -13
- package/dist/typescript/module/lib/internal/web/utils.d.ts.map +0 -1
- package/dist/typescript/module/lib/modular.d.ts +0 -95
- package/dist/typescript/module/lib/modular.d.ts.map +0 -1
- package/dist/typescript/module/lib/namespaced.d.ts +0 -5
- package/dist/typescript/module/lib/namespaced.d.ts.map +0 -1
- package/dist/typescript/module/lib/types/app.d.ts +0 -561
- package/dist/typescript/module/lib/types/app.d.ts.map +0 -1
- package/dist/typescript/module/lib/types/internal.d.ts.map +0 -1
- package/dist/typescript/module/lib/utils/UtilsStatics.d.ts +0 -4
- package/dist/typescript/module/lib/utils/UtilsStatics.d.ts.map +0 -1
- package/dist/typescript/module/lib/utils/index.d.ts +0 -4
- package/dist/typescript/module/lib/utils/index.d.ts.map +0 -1
- package/dist/typescript/module/lib/version.d.ts +0 -2
- package/dist/typescript/module/lib/version.d.ts.map +0 -1
- /package/dist/typescript/{commonjs/lib → lib}/FirebaseApp.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/common/Base64.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/common/MutatableParams.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/common/ReferenceBase.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/common/deeps.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/common/id.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/common/index.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/common/path.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/common/promise.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/common/serialize.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/common/unitTestUtils.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/common/validate.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/index.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/FirebaseModule.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/NativeFirebaseError.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/NativeModules.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/RNFBNativeEventEmitter.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/SharedEventEmitter.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/asyncStorage.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/constants.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/index.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/logger.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/nativeModule.android.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/nativeModule.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/nativeModule.ios.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/nativeModuleAndroidIos.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/nativeModuleWeb.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/nullSerialization.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/registry/app.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/registry/namespace.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/registry/nativeModule.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/web/RNFBAppModule.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/web/firebaseApp.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/web/firebaseAppCheck.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/web/firebaseAuth.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/web/firebaseDatabase.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/web/firebaseFirestore.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/web/firebaseFunctions.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/web/firebaseInstallations.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/web/firebaseRemoteConfig.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/web/firebaseStorage.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/internal/web/utils.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/namespaced.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/types/app.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/utils/UtilsStatics.d.ts +0 -0
- /package/dist/typescript/{commonjs/lib → lib}/utils/index.d.ts +0 -0
- /package/dist/typescript/{module/package.json → package.json} +0 -0
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _FDBCursor = _interopRequireDefault(require("./FDBCursor.js"));
|
|
8
|
-
var _FDBCursorWithValue = _interopRequireDefault(require("./FDBCursorWithValue.js"));
|
|
9
|
-
var _FDBKeyRange = _interopRequireDefault(require("./FDBKeyRange.js"));
|
|
10
|
-
var _FDBRequest = _interopRequireDefault(require("./FDBRequest.js"));
|
|
11
|
-
var _enforceRange = _interopRequireDefault(require("./lib/enforceRange.js"));
|
|
12
|
-
var _errors = require("./lib/errors.js");
|
|
13
|
-
var _FakeDOMStringList = _interopRequireDefault(require("./lib/FakeDOMStringList.js"));
|
|
14
|
-
var _valueToKey = _interopRequireDefault(require("./lib/valueToKey.js"));
|
|
15
|
-
var _valueToKeyRange = _interopRequireDefault(require("./lib/valueToKeyRange.js"));
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
const confirmActiveTransaction = index => {
|
|
18
|
-
if (index._rawIndex.deleted || index.objectStore._rawObjectStore.deleted) {
|
|
19
|
-
throw new _errors.InvalidStateError();
|
|
20
|
-
}
|
|
21
|
-
if (index.objectStore.transaction._state !== 'active') {
|
|
22
|
-
throw new _errors.TransactionInactiveError();
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#idl-def-IDBIndex
|
|
27
|
-
class FDBIndex {
|
|
28
|
-
constructor(objectStore, rawIndex) {
|
|
29
|
-
this._rawIndex = rawIndex;
|
|
30
|
-
this._name = rawIndex.name;
|
|
31
|
-
this.objectStore = objectStore;
|
|
32
|
-
this.keyPath = rawIndex.keyPath;
|
|
33
|
-
this.multiEntry = rawIndex.multiEntry;
|
|
34
|
-
this.unique = rawIndex.unique;
|
|
35
|
-
}
|
|
36
|
-
get name() {
|
|
37
|
-
return this._name;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// https://w3c.github.io/IndexedDB/#dom-idbindex-name
|
|
41
|
-
set name(name) {
|
|
42
|
-
const transaction = this.objectStore.transaction;
|
|
43
|
-
if (!transaction.db._runningVersionchangeTransaction) {
|
|
44
|
-
throw new _errors.InvalidStateError();
|
|
45
|
-
}
|
|
46
|
-
if (transaction._state !== 'active') {
|
|
47
|
-
throw new _errors.TransactionInactiveError();
|
|
48
|
-
}
|
|
49
|
-
if (this._rawIndex.deleted || this.objectStore._rawObjectStore.deleted) {
|
|
50
|
-
throw new _errors.InvalidStateError();
|
|
51
|
-
}
|
|
52
|
-
name = String(name);
|
|
53
|
-
if (name === this._name) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
if (this.objectStore.indexNames.contains(name)) {
|
|
57
|
-
throw new _errors.ConstraintError();
|
|
58
|
-
}
|
|
59
|
-
const oldName = this._name;
|
|
60
|
-
const oldIndexNames = [...this.objectStore.indexNames];
|
|
61
|
-
this._name = name;
|
|
62
|
-
this._rawIndex.name = name;
|
|
63
|
-
this.objectStore._indexesCache.delete(oldName);
|
|
64
|
-
this.objectStore._indexesCache.set(name, this);
|
|
65
|
-
this.objectStore._rawObjectStore.rawIndexes.delete(oldName);
|
|
66
|
-
this.objectStore._rawObjectStore.rawIndexes.set(name, this._rawIndex);
|
|
67
|
-
this.objectStore.indexNames = new _FakeDOMStringList.default(...Array.from(this.objectStore._rawObjectStore.rawIndexes.keys()).filter(indexName => {
|
|
68
|
-
const index = this.objectStore._rawObjectStore.rawIndexes.get(indexName);
|
|
69
|
-
return index && !index.deleted;
|
|
70
|
-
}).sort());
|
|
71
|
-
transaction._rollbackLog.push(() => {
|
|
72
|
-
this._name = oldName;
|
|
73
|
-
this._rawIndex.name = oldName;
|
|
74
|
-
this.objectStore._indexesCache.delete(name);
|
|
75
|
-
this.objectStore._indexesCache.set(oldName, this);
|
|
76
|
-
this.objectStore._rawObjectStore.rawIndexes.delete(name);
|
|
77
|
-
this.objectStore._rawObjectStore.rawIndexes.set(oldName, this._rawIndex);
|
|
78
|
-
this.objectStore.indexNames = new _FakeDOMStringList.default(...oldIndexNames);
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#widl-IDBIndex-openCursor-IDBRequest-any-range-IDBCursorDirection-direction
|
|
83
|
-
openCursor(range, direction) {
|
|
84
|
-
confirmActiveTransaction(this);
|
|
85
|
-
if (range === null) {
|
|
86
|
-
range = undefined;
|
|
87
|
-
}
|
|
88
|
-
if (range !== undefined && !(range instanceof _FDBKeyRange.default)) {
|
|
89
|
-
range = _FDBKeyRange.default.only((0, _valueToKey.default)(range));
|
|
90
|
-
}
|
|
91
|
-
const request = new _FDBRequest.default();
|
|
92
|
-
request.source = this;
|
|
93
|
-
request.transaction = this.objectStore.transaction;
|
|
94
|
-
const cursor = new _FDBCursorWithValue.default(this, range, direction, request);
|
|
95
|
-
return this.objectStore.transaction._execRequestAsync({
|
|
96
|
-
operation: cursor._iterate.bind(cursor),
|
|
97
|
-
request,
|
|
98
|
-
source: this
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#widl-IDBIndex-openKeyCursor-IDBRequest-any-range-IDBCursorDirection-direction
|
|
103
|
-
openKeyCursor(range, direction) {
|
|
104
|
-
confirmActiveTransaction(this);
|
|
105
|
-
if (range === null) {
|
|
106
|
-
range = undefined;
|
|
107
|
-
}
|
|
108
|
-
if (range !== undefined && !(range instanceof _FDBKeyRange.default)) {
|
|
109
|
-
range = _FDBKeyRange.default.only((0, _valueToKey.default)(range));
|
|
110
|
-
}
|
|
111
|
-
const request = new _FDBRequest.default();
|
|
112
|
-
request.source = this;
|
|
113
|
-
request.transaction = this.objectStore.transaction;
|
|
114
|
-
const cursor = new _FDBCursor.default(this, range, direction, request, true);
|
|
115
|
-
return this.objectStore.transaction._execRequestAsync({
|
|
116
|
-
operation: cursor._iterate.bind(cursor),
|
|
117
|
-
request,
|
|
118
|
-
source: this
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
get(key) {
|
|
122
|
-
confirmActiveTransaction(this);
|
|
123
|
-
if (!(key instanceof _FDBKeyRange.default)) {
|
|
124
|
-
key = (0, _valueToKey.default)(key);
|
|
125
|
-
}
|
|
126
|
-
return this.objectStore.transaction._execRequestAsync({
|
|
127
|
-
operation: this._rawIndex.getValue.bind(this._rawIndex, key),
|
|
128
|
-
source: this
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// http://w3c.github.io/IndexedDB/#dom-idbindex-getall
|
|
133
|
-
getAll(query, count) {
|
|
134
|
-
if (arguments.length > 1 && count !== undefined) {
|
|
135
|
-
count = (0, _enforceRange.default)(count, 'unsigned long');
|
|
136
|
-
}
|
|
137
|
-
confirmActiveTransaction(this);
|
|
138
|
-
const range = (0, _valueToKeyRange.default)(query);
|
|
139
|
-
return this.objectStore.transaction._execRequestAsync({
|
|
140
|
-
operation: this._rawIndex.getAllValues.bind(this._rawIndex, range, count),
|
|
141
|
-
source: this
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#widl-IDBIndex-getKey-IDBRequest-any-key
|
|
146
|
-
getKey(key) {
|
|
147
|
-
confirmActiveTransaction(this);
|
|
148
|
-
if (!(key instanceof _FDBKeyRange.default)) {
|
|
149
|
-
key = (0, _valueToKey.default)(key);
|
|
150
|
-
}
|
|
151
|
-
return this.objectStore.transaction._execRequestAsync({
|
|
152
|
-
operation: this._rawIndex.getKey.bind(this._rawIndex, key),
|
|
153
|
-
source: this
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// http://w3c.github.io/IndexedDB/#dom-idbindex-getallkeys
|
|
158
|
-
getAllKeys(query, count) {
|
|
159
|
-
if (arguments.length > 1 && count !== undefined) {
|
|
160
|
-
count = (0, _enforceRange.default)(count, 'unsigned long');
|
|
161
|
-
}
|
|
162
|
-
confirmActiveTransaction(this);
|
|
163
|
-
const range = (0, _valueToKeyRange.default)(query);
|
|
164
|
-
return this.objectStore.transaction._execRequestAsync({
|
|
165
|
-
operation: this._rawIndex.getAllKeys.bind(this._rawIndex, range, count),
|
|
166
|
-
source: this
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#widl-IDBIndex-count-IDBRequest-any-key
|
|
171
|
-
count(key) {
|
|
172
|
-
confirmActiveTransaction(this);
|
|
173
|
-
if (key === null) {
|
|
174
|
-
key = undefined;
|
|
175
|
-
}
|
|
176
|
-
if (key !== undefined && !(key instanceof _FDBKeyRange.default)) {
|
|
177
|
-
key = _FDBKeyRange.default.only((0, _valueToKey.default)(key));
|
|
178
|
-
}
|
|
179
|
-
return this.objectStore.transaction._execRequestAsync({
|
|
180
|
-
operation: () => {
|
|
181
|
-
return this._rawIndex.count(key);
|
|
182
|
-
},
|
|
183
|
-
source: this
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
toString() {
|
|
187
|
-
return '[object IDBIndex]';
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
var _default = exports.default = FDBIndex;
|
|
191
|
-
//# sourceMappingURL=FDBIndex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_FDBCursor","_interopRequireDefault","require","_FDBCursorWithValue","_FDBKeyRange","_FDBRequest","_enforceRange","_errors","_FakeDOMStringList","_valueToKey","_valueToKeyRange","e","__esModule","default","confirmActiveTransaction","index","_rawIndex","deleted","objectStore","_rawObjectStore","InvalidStateError","transaction","_state","TransactionInactiveError","FDBIndex","constructor","rawIndex","_name","name","keyPath","multiEntry","unique","db","_runningVersionchangeTransaction","String","indexNames","contains","ConstraintError","oldName","oldIndexNames","_indexesCache","delete","set","rawIndexes","FakeDOMStringList","Array","from","keys","filter","indexName","get","sort","_rollbackLog","push","openCursor","range","direction","undefined","FDBKeyRange","only","valueToKey","request","FDBRequest","source","cursor","FDBCursorWithValue","_execRequestAsync","operation","_iterate","bind","openKeyCursor","FDBCursor","key","getValue","getAll","query","count","arguments","length","enforceRange","valueToKeyRange","getAllValues","getKey","getAllKeys","toString","_default","exports"],"sourceRoot":"../../../../../lib","sources":["internal/web/memidb/FDBIndex.js"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,aAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,WAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ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ACH,KAAK,EAAE,eAAe,CAAC;IAC9C;IACA9D,wBAAwB,CAAC,IAAI,CAAC;IAC9B,MAAMyC,KAAK,GAAG,IAAAyB,wBAAe,EAACL,KAAK,CAAC;IACpC,OAAO,IAAI,CAACzD,WAAW,CAACG,WAAW,CAAC6C,iBAAiB,CAAC;MACpDC,SAAS,EAAE,IAAI,CAACnD,SAAS,CAACmE,UAAU,CAACd,IAAI,CAAC,IAAI,CAACrD,SAAS,EAAEuC,KAAK,EAAEqB,KAAK,CAAC;MACvEb,MAAM,EAAE;IACV,CAAC,CAAC;EACJ;;EAEA;EACAa,KAAKA,CAACJ,GAAG,EAAE;IACT1D,wBAAwB,CAAC,IAAI,CAAC;IAC9B,IAAI0D,GAAG,KAAK,IAAI,EAAE;MAChBA,GAAG,GAAGf,SAAS;IACjB;IACA,IAAIe,GAAG,KAAKf,SAAS,IAAI,EAAEe,GAAG,YAAYd,oBAAW,CAAC,EAAE;MACtDc,GAAG,GAAGd,oBAAW,CAACC,IAAI,CAAC,IAAAC,mBAAU,EAACY,GAAG,CAAC,CAAC;IACzC;IACA,OAAO,IAAI,CAACtD,WAAW,CAACG,WAAW,CAAC6C,iBAAiB,CAAC;MACpDC,SAAS,EAAEA,CAAA,KAAM;QACf,OAAO,IAAI,CAACnD,SAAS,CAAC4D,KAAK,CAACJ,GAAG,CAAC;MAClC,CAAC;MACDT,MAAM,EAAE;IACV,CAAC,CAAC;EACJ;EACAqB,QAAQA,CAAA,EAAG;IACT,OAAO,mBAAmB;EAC5B;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzE,OAAA,GACcW,QAAQ","ignoreList":[]}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _cmp = _interopRequireDefault(require("./lib/cmp.js"));
|
|
8
|
-
var _errors = require("./lib/errors.js");
|
|
9
|
-
var _valueToKey = _interopRequireDefault(require("./lib/valueToKey.js"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#range-concept
|
|
12
|
-
class FDBKeyRange {
|
|
13
|
-
static only(value) {
|
|
14
|
-
if (arguments.length === 0) {
|
|
15
|
-
throw new TypeError();
|
|
16
|
-
}
|
|
17
|
-
value = (0, _valueToKey.default)(value);
|
|
18
|
-
return new FDBKeyRange(value, value, false, false);
|
|
19
|
-
}
|
|
20
|
-
static lowerBound(lower, open = false) {
|
|
21
|
-
if (arguments.length === 0) {
|
|
22
|
-
throw new TypeError();
|
|
23
|
-
}
|
|
24
|
-
lower = (0, _valueToKey.default)(lower);
|
|
25
|
-
return new FDBKeyRange(lower, undefined, open, true);
|
|
26
|
-
}
|
|
27
|
-
static upperBound(upper, open = false) {
|
|
28
|
-
if (arguments.length === 0) {
|
|
29
|
-
throw new TypeError();
|
|
30
|
-
}
|
|
31
|
-
upper = (0, _valueToKey.default)(upper);
|
|
32
|
-
return new FDBKeyRange(undefined, upper, true, open);
|
|
33
|
-
}
|
|
34
|
-
static bound(lower, upper, lowerOpen = false, upperOpen = false) {
|
|
35
|
-
if (arguments.length < 2) {
|
|
36
|
-
throw new TypeError();
|
|
37
|
-
}
|
|
38
|
-
const cmpResult = (0, _cmp.default)(lower, upper);
|
|
39
|
-
if (cmpResult === 1 || cmpResult === 0 && (lowerOpen || upperOpen)) {
|
|
40
|
-
throw new _errors.DataError();
|
|
41
|
-
}
|
|
42
|
-
lower = (0, _valueToKey.default)(lower);
|
|
43
|
-
upper = (0, _valueToKey.default)(upper);
|
|
44
|
-
return new FDBKeyRange(lower, upper, lowerOpen, upperOpen);
|
|
45
|
-
}
|
|
46
|
-
constructor(lower, upper, lowerOpen, upperOpen) {
|
|
47
|
-
this.lower = lower;
|
|
48
|
-
this.upper = upper;
|
|
49
|
-
this.lowerOpen = lowerOpen;
|
|
50
|
-
this.upperOpen = upperOpen;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// https://w3c.github.io/IndexedDB/#dom-idbkeyrange-includes
|
|
54
|
-
includes(key) {
|
|
55
|
-
if (arguments.length === 0) {
|
|
56
|
-
throw new TypeError();
|
|
57
|
-
}
|
|
58
|
-
key = (0, _valueToKey.default)(key);
|
|
59
|
-
if (this.lower !== undefined) {
|
|
60
|
-
const cmpResult = (0, _cmp.default)(this.lower, key);
|
|
61
|
-
if (cmpResult === 1 || cmpResult === 0 && this.lowerOpen) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
if (this.upper !== undefined) {
|
|
66
|
-
const cmpResult = (0, _cmp.default)(this.upper, key);
|
|
67
|
-
if (cmpResult === -1 || cmpResult === 0 && this.upperOpen) {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
toString() {
|
|
74
|
-
return '[object IDBKeyRange]';
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
var _default = exports.default = FDBKeyRange;
|
|
78
|
-
//# sourceMappingURL=FDBKeyRange.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_cmp","_interopRequireDefault","require","_errors","_valueToKey","e","__esModule","default","FDBKeyRange","only","value","arguments","length","TypeError","valueToKey","lowerBound","lower","open","undefined","upperBound","upper","bound","lowerOpen","upperOpen","cmpResult","cmp","DataError","constructor","includes","key","toString","_default","exports"],"sourceRoot":"../../../../../lib","sources":["internal/web/memidb/FDBKeyRange.js"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AAA6C,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,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AAO,IAAI;EACb;EACAO,QAAQA,CAAA,EAAG;IACT,OAAO,sBAAsB;EAC/B;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GACcC,WAAW","ignoreList":[]}
|
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _FDBCursor = _interopRequireDefault(require("./FDBCursor.js"));
|
|
8
|
-
var _FDBCursorWithValue = _interopRequireDefault(require("./FDBCursorWithValue.js"));
|
|
9
|
-
var _FDBIndex = _interopRequireDefault(require("./FDBIndex.js"));
|
|
10
|
-
var _FDBKeyRange = _interopRequireDefault(require("./FDBKeyRange.js"));
|
|
11
|
-
var _FDBRequest = _interopRequireDefault(require("./FDBRequest.js"));
|
|
12
|
-
var _canInjectKey = _interopRequireDefault(require("./lib/canInjectKey.js"));
|
|
13
|
-
var _enforceRange = _interopRequireDefault(require("./lib/enforceRange.js"));
|
|
14
|
-
var _errors = require("./lib/errors.js");
|
|
15
|
-
var _extractKey = _interopRequireDefault(require("./lib/extractKey.js"));
|
|
16
|
-
var _FakeDOMStringList = _interopRequireDefault(require("./lib/FakeDOMStringList.js"));
|
|
17
|
-
var _Index = _interopRequireDefault(require("./lib/Index.js"));
|
|
18
|
-
var _validateKeyPath = _interopRequireDefault(require("./lib/validateKeyPath.js"));
|
|
19
|
-
var _valueToKey = _interopRequireDefault(require("./lib/valueToKey.js"));
|
|
20
|
-
var _valueToKeyRange = _interopRequireDefault(require("./lib/valueToKeyRange.js"));
|
|
21
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
-
const confirmActiveTransaction = objectStore => {
|
|
23
|
-
if (objectStore._rawObjectStore.deleted) {
|
|
24
|
-
throw new _errors.InvalidStateError();
|
|
25
|
-
}
|
|
26
|
-
if (objectStore.transaction._state !== 'active') {
|
|
27
|
-
throw new _errors.TransactionInactiveError();
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const buildRecordAddPut = (objectStore, value, key) => {
|
|
31
|
-
confirmActiveTransaction(objectStore);
|
|
32
|
-
if (objectStore.transaction.mode === 'readonly') {
|
|
33
|
-
throw new _errors.ReadOnlyError();
|
|
34
|
-
}
|
|
35
|
-
if (objectStore.keyPath !== null) {
|
|
36
|
-
if (key !== undefined) {
|
|
37
|
-
throw new _errors.DataError();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
const clone = structuredClone(value);
|
|
41
|
-
if (objectStore.keyPath !== null) {
|
|
42
|
-
const tempKey = (0, _extractKey.default)(objectStore.keyPath, clone);
|
|
43
|
-
if (tempKey !== undefined) {
|
|
44
|
-
(0, _valueToKey.default)(tempKey);
|
|
45
|
-
} else {
|
|
46
|
-
if (!objectStore._rawObjectStore.keyGenerator) {
|
|
47
|
-
throw new _errors.DataError();
|
|
48
|
-
} else if (!(0, _canInjectKey.default)(objectStore.keyPath, clone)) {
|
|
49
|
-
throw new _errors.DataError();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (objectStore.keyPath === null && objectStore._rawObjectStore.keyGenerator === null && key === undefined) {
|
|
54
|
-
throw new _errors.DataError();
|
|
55
|
-
}
|
|
56
|
-
if (key !== undefined) {
|
|
57
|
-
key = (0, _valueToKey.default)(key);
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
key,
|
|
61
|
-
value: clone
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#object-store
|
|
66
|
-
class FDBObjectStore {
|
|
67
|
-
_indexesCache = new Map();
|
|
68
|
-
constructor(transaction, rawObjectStore) {
|
|
69
|
-
this._rawObjectStore = rawObjectStore;
|
|
70
|
-
this._name = rawObjectStore.name;
|
|
71
|
-
this.keyPath = rawObjectStore.keyPath;
|
|
72
|
-
this.autoIncrement = rawObjectStore.autoIncrement;
|
|
73
|
-
this.transaction = transaction;
|
|
74
|
-
this.indexNames = new _FakeDOMStringList.default(...Array.from(rawObjectStore.rawIndexes.keys()).sort());
|
|
75
|
-
}
|
|
76
|
-
get name() {
|
|
77
|
-
return this._name;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// http://w3c.github.io/IndexedDB/#dom-idbobjectstore-name
|
|
81
|
-
set name(name) {
|
|
82
|
-
const transaction = this.transaction;
|
|
83
|
-
if (!transaction.db._runningVersionchangeTransaction) {
|
|
84
|
-
throw new _errors.InvalidStateError();
|
|
85
|
-
}
|
|
86
|
-
confirmActiveTransaction(this);
|
|
87
|
-
name = String(name);
|
|
88
|
-
if (name === this._name) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
if (this._rawObjectStore.rawDatabase.rawObjectStores.has(name)) {
|
|
92
|
-
throw new _errors.ConstraintError();
|
|
93
|
-
}
|
|
94
|
-
const oldName = this._name;
|
|
95
|
-
const oldObjectStoreNames = [...transaction.db.objectStoreNames];
|
|
96
|
-
this._name = name;
|
|
97
|
-
this._rawObjectStore.name = name;
|
|
98
|
-
this.transaction._objectStoresCache.delete(oldName);
|
|
99
|
-
this.transaction._objectStoresCache.set(name, this);
|
|
100
|
-
this._rawObjectStore.rawDatabase.rawObjectStores.delete(oldName);
|
|
101
|
-
this._rawObjectStore.rawDatabase.rawObjectStores.set(name, this._rawObjectStore);
|
|
102
|
-
transaction.db.objectStoreNames = new _FakeDOMStringList.default(...Array.from(this._rawObjectStore.rawDatabase.rawObjectStores.keys()).filter(objectStoreName => {
|
|
103
|
-
const objectStore = this._rawObjectStore.rawDatabase.rawObjectStores.get(objectStoreName);
|
|
104
|
-
return objectStore && !objectStore.deleted;
|
|
105
|
-
}).sort());
|
|
106
|
-
const oldScope = new Set(transaction._scope);
|
|
107
|
-
const oldTransactionObjectStoreNames = [...transaction.objectStoreNames];
|
|
108
|
-
this.transaction._scope.delete(oldName);
|
|
109
|
-
transaction._scope.add(name);
|
|
110
|
-
transaction.objectStoreNames = new _FakeDOMStringList.default(...Array.from(transaction._scope).sort());
|
|
111
|
-
transaction._rollbackLog.push(() => {
|
|
112
|
-
this._name = oldName;
|
|
113
|
-
this._rawObjectStore.name = oldName;
|
|
114
|
-
this.transaction._objectStoresCache.delete(name);
|
|
115
|
-
this.transaction._objectStoresCache.set(oldName, this);
|
|
116
|
-
this._rawObjectStore.rawDatabase.rawObjectStores.delete(name);
|
|
117
|
-
this._rawObjectStore.rawDatabase.rawObjectStores.set(oldName, this._rawObjectStore);
|
|
118
|
-
transaction.db.objectStoreNames = new _FakeDOMStringList.default(...oldObjectStoreNames);
|
|
119
|
-
transaction._scope = oldScope;
|
|
120
|
-
transaction.objectStoreNames = new _FakeDOMStringList.default(...oldTransactionObjectStoreNames);
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
put(value, key) {
|
|
124
|
-
if (arguments.length === 0) {
|
|
125
|
-
throw new TypeError();
|
|
126
|
-
}
|
|
127
|
-
const record = buildRecordAddPut(this, value, key);
|
|
128
|
-
return this.transaction._execRequestAsync({
|
|
129
|
-
operation: this._rawObjectStore.storeRecord.bind(this._rawObjectStore, record, false, this.transaction._rollbackLog),
|
|
130
|
-
source: this
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
add(value, key) {
|
|
134
|
-
if (arguments.length === 0) {
|
|
135
|
-
throw new TypeError();
|
|
136
|
-
}
|
|
137
|
-
const record = buildRecordAddPut(this, value, key);
|
|
138
|
-
return this.transaction._execRequestAsync({
|
|
139
|
-
operation: this._rawObjectStore.storeRecord.bind(this._rawObjectStore, record, true, this.transaction._rollbackLog),
|
|
140
|
-
source: this
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
delete(key) {
|
|
144
|
-
if (arguments.length === 0) {
|
|
145
|
-
throw new TypeError();
|
|
146
|
-
}
|
|
147
|
-
confirmActiveTransaction(this);
|
|
148
|
-
if (this.transaction.mode === 'readonly') {
|
|
149
|
-
throw new _errors.ReadOnlyError();
|
|
150
|
-
}
|
|
151
|
-
if (!(key instanceof _FDBKeyRange.default)) {
|
|
152
|
-
key = (0, _valueToKey.default)(key);
|
|
153
|
-
}
|
|
154
|
-
return this.transaction._execRequestAsync({
|
|
155
|
-
operation: this._rawObjectStore.deleteRecord.bind(this._rawObjectStore, key, this.transaction._rollbackLog),
|
|
156
|
-
source: this
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
get(key) {
|
|
160
|
-
if (arguments.length === 0) {
|
|
161
|
-
throw new TypeError();
|
|
162
|
-
}
|
|
163
|
-
confirmActiveTransaction(this);
|
|
164
|
-
if (!(key instanceof _FDBKeyRange.default)) {
|
|
165
|
-
key = (0, _valueToKey.default)(key);
|
|
166
|
-
}
|
|
167
|
-
return this.transaction._execRequestAsync({
|
|
168
|
-
operation: this._rawObjectStore.getValue.bind(this._rawObjectStore, key),
|
|
169
|
-
source: this
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// http://w3c.github.io/IndexedDB/#dom-idbobjectstore-getall
|
|
174
|
-
getAll(query, count) {
|
|
175
|
-
if (arguments.length > 1 && count !== undefined) {
|
|
176
|
-
count = (0, _enforceRange.default)(count, 'unsigned long');
|
|
177
|
-
}
|
|
178
|
-
confirmActiveTransaction(this);
|
|
179
|
-
const range = (0, _valueToKeyRange.default)(query);
|
|
180
|
-
return this.transaction._execRequestAsync({
|
|
181
|
-
operation: this._rawObjectStore.getAllValues.bind(this._rawObjectStore, range, count),
|
|
182
|
-
source: this
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// http://w3c.github.io/IndexedDB/#dom-idbobjectstore-getkey
|
|
187
|
-
getKey(key) {
|
|
188
|
-
if (arguments.length === 0) {
|
|
189
|
-
throw new TypeError();
|
|
190
|
-
}
|
|
191
|
-
confirmActiveTransaction(this);
|
|
192
|
-
if (!(key instanceof _FDBKeyRange.default)) {
|
|
193
|
-
key = (0, _valueToKey.default)(key);
|
|
194
|
-
}
|
|
195
|
-
return this.transaction._execRequestAsync({
|
|
196
|
-
operation: this._rawObjectStore.getKey.bind(this._rawObjectStore, key),
|
|
197
|
-
source: this
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// http://w3c.github.io/IndexedDB/#dom-idbobjectstore-getallkeys
|
|
202
|
-
getAllKeys(query, count) {
|
|
203
|
-
if (arguments.length > 1 && count !== undefined) {
|
|
204
|
-
count = (0, _enforceRange.default)(count, 'unsigned long');
|
|
205
|
-
}
|
|
206
|
-
confirmActiveTransaction(this);
|
|
207
|
-
const range = (0, _valueToKeyRange.default)(query);
|
|
208
|
-
return this.transaction._execRequestAsync({
|
|
209
|
-
operation: this._rawObjectStore.getAllKeys.bind(this._rawObjectStore, range, count),
|
|
210
|
-
source: this
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
clear() {
|
|
214
|
-
confirmActiveTransaction(this);
|
|
215
|
-
if (this.transaction.mode === 'readonly') {
|
|
216
|
-
throw new _errors.ReadOnlyError();
|
|
217
|
-
}
|
|
218
|
-
return this.transaction._execRequestAsync({
|
|
219
|
-
operation: this._rawObjectStore.clear.bind(this._rawObjectStore, this.transaction._rollbackLog),
|
|
220
|
-
source: this
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
openCursor(range, direction) {
|
|
224
|
-
confirmActiveTransaction(this);
|
|
225
|
-
if (range === null) {
|
|
226
|
-
range = undefined;
|
|
227
|
-
}
|
|
228
|
-
if (range !== undefined && !(range instanceof _FDBKeyRange.default)) {
|
|
229
|
-
range = _FDBKeyRange.default.only((0, _valueToKey.default)(range));
|
|
230
|
-
}
|
|
231
|
-
const request = new _FDBRequest.default();
|
|
232
|
-
request.source = this;
|
|
233
|
-
request.transaction = this.transaction;
|
|
234
|
-
const cursor = new _FDBCursorWithValue.default(this, range, direction, request);
|
|
235
|
-
return this.transaction._execRequestAsync({
|
|
236
|
-
operation: cursor._iterate.bind(cursor),
|
|
237
|
-
request,
|
|
238
|
-
source: this
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
openKeyCursor(range, direction) {
|
|
242
|
-
confirmActiveTransaction(this);
|
|
243
|
-
if (range === null) {
|
|
244
|
-
range = undefined;
|
|
245
|
-
}
|
|
246
|
-
if (range !== undefined && !(range instanceof _FDBKeyRange.default)) {
|
|
247
|
-
range = _FDBKeyRange.default.only((0, _valueToKey.default)(range));
|
|
248
|
-
}
|
|
249
|
-
const request = new _FDBRequest.default();
|
|
250
|
-
request.source = this;
|
|
251
|
-
request.transaction = this.transaction;
|
|
252
|
-
const cursor = new _FDBCursor.default(this, range, direction, request, true);
|
|
253
|
-
return this.transaction._execRequestAsync({
|
|
254
|
-
operation: cursor._iterate.bind(cursor),
|
|
255
|
-
request,
|
|
256
|
-
source: this
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
// tslint:-next-line max-line-length
|
|
261
|
-
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#widl-IDBObjectStore-createIndex-IDBIndex-DOMString-name-DOMString-sequence-DOMString--keyPath-IDBIndexParameters-optionalParameters
|
|
262
|
-
createIndex(name, keyPath, optionalParameters = {}) {
|
|
263
|
-
if (arguments.length < 2) {
|
|
264
|
-
throw new TypeError();
|
|
265
|
-
}
|
|
266
|
-
const multiEntry = optionalParameters.multiEntry !== undefined ? optionalParameters.multiEntry : false;
|
|
267
|
-
const unique = optionalParameters.unique !== undefined ? optionalParameters.unique : false;
|
|
268
|
-
if (this.transaction.mode !== 'versionchange') {
|
|
269
|
-
throw new _errors.InvalidStateError();
|
|
270
|
-
}
|
|
271
|
-
confirmActiveTransaction(this);
|
|
272
|
-
if (this.indexNames.contains(name)) {
|
|
273
|
-
throw new _errors.ConstraintError();
|
|
274
|
-
}
|
|
275
|
-
(0, _validateKeyPath.default)(keyPath);
|
|
276
|
-
if (Array.isArray(keyPath) && multiEntry) {
|
|
277
|
-
throw new _errors.InvalidAccessError();
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
// The index that is requested to be created can contain constraints on the data allowed in the index's
|
|
281
|
-
// referenced object store, such as requiring uniqueness of the values referenced by the index's keyPath. If the
|
|
282
|
-
// referenced object store already contains data which violates these constraints, this MUST NOT cause the
|
|
283
|
-
// implementation of createIndex to throw an exception or affect what it returns. The implementation MUST still
|
|
284
|
-
// create and return an IDBIndex object. Instead the implementation must queue up an operation to abort the
|
|
285
|
-
// "versionchange" transaction which was used for the createIndex call.
|
|
286
|
-
|
|
287
|
-
const indexNames = [...this.indexNames];
|
|
288
|
-
this.transaction._rollbackLog.push(() => {
|
|
289
|
-
const index2 = this._rawObjectStore.rawIndexes.get(name);
|
|
290
|
-
if (index2) {
|
|
291
|
-
index2.deleted = true;
|
|
292
|
-
}
|
|
293
|
-
this.indexNames = new _FakeDOMStringList.default(...indexNames);
|
|
294
|
-
this._rawObjectStore.rawIndexes.delete(name);
|
|
295
|
-
});
|
|
296
|
-
const index = new _Index.default(this._rawObjectStore, name, keyPath, multiEntry, unique);
|
|
297
|
-
this.indexNames._push(name);
|
|
298
|
-
this.indexNames._sort();
|
|
299
|
-
this._rawObjectStore.rawIndexes.set(name, index);
|
|
300
|
-
index.initialize(this.transaction); // This is async by design
|
|
301
|
-
|
|
302
|
-
return new _FDBIndex.default(this, index);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
// https://w3c.github.io/IndexedDB/#dom-idbobjectstore-index
|
|
306
|
-
index(name) {
|
|
307
|
-
if (arguments.length === 0) {
|
|
308
|
-
throw new TypeError();
|
|
309
|
-
}
|
|
310
|
-
if (this._rawObjectStore.deleted || this.transaction._state === 'finished') {
|
|
311
|
-
throw new _errors.InvalidStateError();
|
|
312
|
-
}
|
|
313
|
-
const index = this._indexesCache.get(name);
|
|
314
|
-
if (index !== undefined) {
|
|
315
|
-
return index;
|
|
316
|
-
}
|
|
317
|
-
const rawIndex = this._rawObjectStore.rawIndexes.get(name);
|
|
318
|
-
if (!this.indexNames.contains(name) || rawIndex === undefined) {
|
|
319
|
-
throw new _errors.NotFoundError();
|
|
320
|
-
}
|
|
321
|
-
const index2 = new _FDBIndex.default(this, rawIndex);
|
|
322
|
-
this._indexesCache.set(name, index2);
|
|
323
|
-
return index2;
|
|
324
|
-
}
|
|
325
|
-
deleteIndex(name) {
|
|
326
|
-
if (arguments.length === 0) {
|
|
327
|
-
throw new TypeError();
|
|
328
|
-
}
|
|
329
|
-
if (this.transaction.mode !== 'versionchange') {
|
|
330
|
-
throw new _errors.InvalidStateError();
|
|
331
|
-
}
|
|
332
|
-
confirmActiveTransaction(this);
|
|
333
|
-
const rawIndex = this._rawObjectStore.rawIndexes.get(name);
|
|
334
|
-
if (rawIndex === undefined) {
|
|
335
|
-
throw new _errors.NotFoundError();
|
|
336
|
-
}
|
|
337
|
-
this.transaction._rollbackLog.push(() => {
|
|
338
|
-
rawIndex.deleted = false;
|
|
339
|
-
this._rawObjectStore.rawIndexes.set(name, rawIndex);
|
|
340
|
-
this.indexNames._push(name);
|
|
341
|
-
this.indexNames._sort();
|
|
342
|
-
});
|
|
343
|
-
this.indexNames = new _FakeDOMStringList.default(...Array.from(this.indexNames).filter(indexName => {
|
|
344
|
-
return indexName !== name;
|
|
345
|
-
}));
|
|
346
|
-
rawIndex.deleted = true; // Not sure if this is supposed to happen synchronously
|
|
347
|
-
|
|
348
|
-
this.transaction._execRequestAsync({
|
|
349
|
-
operation: () => {
|
|
350
|
-
const rawIndex2 = this._rawObjectStore.rawIndexes.get(name);
|
|
351
|
-
|
|
352
|
-
// Hack in case another index is given this name before this async request is processed. It'd be better
|
|
353
|
-
// to have a real unique ID for each index.
|
|
354
|
-
if (rawIndex === rawIndex2) {
|
|
355
|
-
this._rawObjectStore.rawIndexes.delete(name);
|
|
356
|
-
}
|
|
357
|
-
},
|
|
358
|
-
source: this
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
// http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#widl-IDBObjectStore-count-IDBRequest-any-key
|
|
363
|
-
count(key) {
|
|
364
|
-
confirmActiveTransaction(this);
|
|
365
|
-
if (key === null) {
|
|
366
|
-
key = undefined;
|
|
367
|
-
}
|
|
368
|
-
if (key !== undefined && !(key instanceof _FDBKeyRange.default)) {
|
|
369
|
-
key = _FDBKeyRange.default.only((0, _valueToKey.default)(key));
|
|
370
|
-
}
|
|
371
|
-
return this.transaction._execRequestAsync({
|
|
372
|
-
operation: () => {
|
|
373
|
-
return this._rawObjectStore.count(key);
|
|
374
|
-
},
|
|
375
|
-
source: this
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
toString() {
|
|
379
|
-
return '[object IDBObjectStore]';
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
var _default = exports.default = FDBObjectStore;
|
|
383
|
-
//# sourceMappingURL=FDBObjectStore.js.map
|