diff --git a/packages/firestore/exp/dependencies.json b/packages/firestore/exp/dependencies.json index 2d686f1a4c8..b7ebfee40c1 100644 --- a/packages/firestore/exp/dependencies.json +++ b/packages/firestore/exp/dependencies.json @@ -40,7 +40,7 @@ ], "variables": [] }, - "sizeInBytes": 18458 + "sizeInBytes": 18556 }, "CollectionReference": { "dependencies": { @@ -89,7 +89,7 @@ ], "variables": [] }, - "sizeInBytes": 22689 + "sizeInBytes": 22787 }, "DocumentReference": { "dependencies": { @@ -138,7 +138,7 @@ ], "variables": [] }, - "sizeInBytes": 22687 + "sizeInBytes": 22785 }, "DocumentSnapshot": { "dependencies": { @@ -229,7 +229,7 @@ ], "variables": [] }, - "sizeInBytes": 41751 + "sizeInBytes": 41849 }, "FieldPath": { "dependencies": { @@ -279,7 +279,7 @@ ], "variables": [] }, - "sizeInBytes": 23081 + "sizeInBytes": 23179 }, "FieldValue": { "dependencies": { @@ -318,7 +318,7 @@ ], "variables": [] }, - "sizeInBytes": 16711 + "sizeInBytes": 16809 }, "FirebaseFirestore": { "dependencies": { @@ -355,7 +355,7 @@ ], "variables": [] }, - "sizeInBytes": 16620 + "sizeInBytes": 16718 }, "GeoPoint": { "dependencies": { @@ -401,7 +401,7 @@ ], "variables": [] }, - "sizeInBytes": 19529 + "sizeInBytes": 19627 }, "Query": { "dependencies": { @@ -439,7 +439,7 @@ ], "variables": [] }, - "sizeInBytes": 16813 + "sizeInBytes": 16911 }, "QueryConstraint": { "dependencies": { @@ -477,7 +477,7 @@ ], "variables": [] }, - "sizeInBytes": 16626 + "sizeInBytes": 16724 }, "QueryDocumentSnapshot": { "dependencies": { @@ -568,7 +568,7 @@ ], "variables": [] }, - "sizeInBytes": 41761 + "sizeInBytes": 41859 }, "QuerySnapshot": { "dependencies": { @@ -663,7 +663,7 @@ ], "variables": [] }, - "sizeInBytes": 44392 + "sizeInBytes": 44490 }, "SnapshotMetadata": { "dependencies": { @@ -701,7 +701,7 @@ ], "variables": [] }, - "sizeInBytes": 16835 + "sizeInBytes": 16933 }, "Timestamp": { "dependencies": { @@ -739,7 +739,7 @@ ], "variables": [] }, - "sizeInBytes": 18221 + "sizeInBytes": 18319 }, "Transaction": { "dependencies": { @@ -887,7 +887,7 @@ ], "variables": [] }, - "sizeInBytes": 65291 + "sizeInBytes": 65389 }, "WriteBatch": { "dependencies": { @@ -1023,7 +1023,7 @@ ], "variables": [] }, - "sizeInBytes": 57879 + "sizeInBytes": 57977 }, "addDoc": { "dependencies": { @@ -1031,6 +1031,7 @@ "acknowledgeBatch", "addDoc", "addMutationCallback", + "addNetworkStatusChangedHandler", "addToWritePipeline", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", @@ -1055,7 +1056,6 @@ "arrayEquals", "asCollectionQueryAtPath", "asNumber", - "assertPresent", "binaryStringFromUint8Array", "blobEquals", "boundEquals", @@ -1075,7 +1075,6 @@ "canonifyTimestamp", "canonifyValue", "cast", - "cleanUpWatchStreamState", "coercedFieldValuesArray", "compareArrays", "compareBlobs", @@ -1097,20 +1096,17 @@ "documentEntryMap", "documentKeySet", "documentMap", - "documentTargetMap", "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueWrite", "ensureWriteCallbacks", + "ensureWriteStream", "errorMessage", "eventManagerOnOnlineStateChange", - "eventManagerOnWatchChange", - "eventManagerOnWatchError", "executeWithRecovery", + "executeWrite", "extractFieldMask", - "extractLocalPathFromResourceName", "extractMutationBaseValue", "extractTransformMutationBaseValue", "fail", @@ -1122,15 +1118,9 @@ "forEach", "formatJSON", "formatPlural", - "fromBytes", "fromDotSeparatedString", - "fromName", - "fromResourceName", - "fromRpcStatus", "fromTimestamp", "fromVersion", - "fromWatchChange", - "fromWatchTargetChangeState", "fromWriteResult", "fromWriteResults", "fullyQualifiedPrefixPath", @@ -1146,8 +1136,6 @@ "getOnlineComponentProvider", "getPostMutationVersion", "getSyncEngine", - "handleCredentialChange", - "handleTargetError", "handleUserChange", "handleWriteError", "hardAssert", @@ -1158,23 +1146,19 @@ "isArray", "isCollectionGroupQuery", "isDocumentQuery", - "isDocumentTarget", "isDouble", "isEmpty", "isIndexedDbTransactionError", "isInteger", "isMapValue", - "isNanValue", "isNegativeZero", "isNullOrUndefined", - "isNullValue", "isNumber", "isPermanentError", "isPermanentWriteError", "isPlainObject", "isSafeInteger", "isServerTimestamp", - "isValidResourceName", "isWrite", "loadProtos", "localTransformResults", @@ -1192,7 +1176,6 @@ "newDatastore", "newEventManager", "newLocalStore", - "newPersistentWatchStream", "newPersistentWriteStream", "newQueryComparator", "newQueryForPath", @@ -1212,9 +1195,6 @@ "objectEquals", "objectSize", "onMutationResult", - "onWatchStreamChange", - "onWatchStreamClose", - "onWatchStreamOpen", "onWriteHandshakeComplete", "onWriteStreamClose", "onWriteStreamOpen", @@ -1240,67 +1220,46 @@ "queryOrderBy", "queryToTarget", "raiseSnapshotsInSyncEvent", - "raiseWatchSnapshot", "randomBytes", "registerFirestore", "rejectBatch", "rejectFailedWrite", "rejectOutstandingPendingWritesCallbacks", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreShutdown", "removeComponents", "removeComponents$1", "requireDocument", "restartNetwork", - "sendUnwatchRequest", - "sendWatchRequest", "serverTimestamp", "serverTransformResults", "setOfflineComponentProvider", "setOnlineComponentProvider", - "shouldStartWatchStream", "shouldStartWriteStream", - "snapshotChangesMap", "sortsBeforeDocument", - "startWatchStream", "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "syncEngineWrite", "targetEquals", "targetIdSet", "timestampEquals", "toBytes", - "toCursor", - "toDirection", "toDocumentMask", - "toDocumentsTarget", "toDouble", - "toFieldPathReference", "toFieldTransform", - "toFilter", - "toInt32Proto", "toInteger", - "toLabel", - "toListenRequestLabels", "toMutation", "toMutationDocument", "toName", "toNumber", - "toOperatorName", - "toOrder", "toPrecondition", - "toPropertyOrder", - "toQueryPath", - "toQueryTarget", "toResourceName", - "toTarget", "toTimestamp", - "toUnaryOrFieldFilter", "toVersion", "transformObject", "transformOperationEquals", @@ -1319,8 +1278,6 @@ "valueCompare", "valueDescription", "valueEquals", - "verifyNotTerminated", - "versionFromListenResponse", "wrapInUserErrorIfRecoverable" ], "classes": [ @@ -1346,10 +1303,7 @@ "DocumentKey", "DocumentKeyReference", "DocumentReference", - "DocumentWatchChange", "EventManagerImpl", - "ExistenceFilter", - "ExistenceFilterChange", "ExponentialBackoff", "FieldMask", "FieldPath", @@ -1399,7 +1353,6 @@ "PatchMutation", "PersistencePromise", "PersistenceTransaction", - "PersistentListenStream", "PersistentStream", "PersistentWriteStream", "Precondition", @@ -1407,7 +1360,6 @@ "QueryImpl", "ReferenceSet", "RemoteDocumentChangeBuffer", - "RemoteEvent", "RemoteStoreImpl", "ResourcePath", "SerializableFieldValue", @@ -1420,24 +1372,19 @@ "SortedSetIterator", "StreamBridge", "SyncEngineImpl", - "TargetChange", - "TargetData", "TargetIdGenerator", "TargetImpl", - "TargetState", "Timestamp", "TransformMutation", "TransformOperation", "UnknownDocument", "User", "UserDataReader", - "VerifyMutation", - "WatchChangeAggregator", - "WatchTargetChange" + "VerifyMutation" ], "variables": [] }, - "sizeInBytes": 193026 + "sizeInBytes": 168317 }, "arrayRemove": { "dependencies": { @@ -1524,7 +1471,7 @@ ], "variables": [] }, - "sizeInBytes": 35216 + "sizeInBytes": 35314 }, "arrayUnion": { "dependencies": { @@ -1611,7 +1558,7 @@ ], "variables": [] }, - "sizeInBytes": 35208 + "sizeInBytes": 35306 }, "clearIndexedDbPersistence": { "dependencies": { @@ -1660,7 +1607,7 @@ ], "variables": [] }, - "sizeInBytes": 30088 + "sizeInBytes": 30180 }, "collection": { "dependencies": { @@ -1710,7 +1657,7 @@ ], "variables": [] }, - "sizeInBytes": 23422 + "sizeInBytes": 23520 }, "collectionGroup": { "dependencies": { @@ -1755,13 +1702,14 @@ ], "variables": [] }, - "sizeInBytes": 20669 + "sizeInBytes": 20767 }, "deleteDoc": { "dependencies": { "functions": [ "acknowledgeBatch", "addMutationCallback", + "addNetworkStatusChangedHandler", "addToWritePipeline", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", @@ -1785,7 +1733,6 @@ "arrayEquals", "asCollectionQueryAtPath", "asNumber", - "assertPresent", "binaryStringFromUint8Array", "blobEquals", "boundEquals", @@ -1805,7 +1752,6 @@ "canonifyTimestamp", "canonifyValue", "cast", - "cleanUpWatchStreamState", "coercedFieldValuesArray", "compareArrays", "compareBlobs", @@ -1826,19 +1772,16 @@ "documentEntryMap", "documentKeySet", "documentMap", - "documentTargetMap", "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueWrite", "ensureWriteCallbacks", + "ensureWriteStream", "eventManagerOnOnlineStateChange", - "eventManagerOnWatchChange", - "eventManagerOnWatchError", "executeWithRecovery", + "executeWrite", "extractFieldMask", - "extractLocalPathFromResourceName", "extractMutationBaseValue", "extractTransformMutationBaseValue", "fail", @@ -1847,14 +1790,8 @@ "filterEquals", "forEach", "formatJSON", - "fromBytes", - "fromName", - "fromResourceName", - "fromRpcStatus", "fromTimestamp", "fromVersion", - "fromWatchChange", - "fromWatchTargetChangeState", "fromWriteResult", "fromWriteResults", "fullyQualifiedPrefixPath", @@ -1870,8 +1807,6 @@ "getOnlineComponentProvider", "getPostMutationVersion", "getSyncEngine", - "handleCredentialChange", - "handleTargetError", "handleUserChange", "handleWriteError", "hardAssert", @@ -1881,21 +1816,17 @@ "isArray", "isCollectionGroupQuery", "isDocumentQuery", - "isDocumentTarget", "isDouble", "isEmpty", "isIndexedDbTransactionError", "isInteger", "isMapValue", - "isNanValue", "isNegativeZero", "isNullOrUndefined", - "isNullValue", "isNumber", "isPermanentError", "isPermanentWriteError", "isServerTimestamp", - "isValidResourceName", "loadProtos", "localTransformResults", "localWrite", @@ -1911,7 +1842,6 @@ "newDatastore", "newEventManager", "newLocalStore", - "newPersistentWatchStream", "newPersistentWriteStream", "newQueryComparator", "newQueryForPath", @@ -1930,9 +1860,6 @@ "objectEquals", "objectSize", "onMutationResult", - "onWatchStreamChange", - "onWatchStreamClose", - "onWatchStreamOpen", "onWriteHandshakeComplete", "onWriteStreamClose", "onWriteStreamOpen", @@ -1951,66 +1878,44 @@ "queryOrderBy", "queryToTarget", "raiseSnapshotsInSyncEvent", - "raiseWatchSnapshot", "randomBytes", "registerFirestore", "rejectBatch", "rejectFailedWrite", "rejectOutstandingPendingWritesCallbacks", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreShutdown", "removeComponents", "removeComponents$1", "requireDocument", "restartNetwork", - "sendUnwatchRequest", - "sendWatchRequest", "serverTimestamp", "serverTransformResults", "setOfflineComponentProvider", "setOnlineComponentProvider", - "shouldStartWatchStream", "shouldStartWriteStream", - "snapshotChangesMap", "sortsBeforeDocument", - "startWatchStream", "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "syncEngineWrite", "targetEquals", "targetIdSet", "timestampEquals", - "toBytes", - "toCursor", - "toDirection", "toDocumentMask", - "toDocumentsTarget", "toDouble", - "toFieldPathReference", "toFieldTransform", - "toFilter", - "toInt32Proto", "toInteger", - "toLabel", - "toListenRequestLabels", "toMutation", "toMutationDocument", "toName", - "toOperatorName", - "toOrder", "toPrecondition", - "toPropertyOrder", - "toQueryPath", - "toQueryTarget", "toResourceName", - "toTarget", "toTimestamp", - "toUnaryOrFieldFilter", "toVersion", "transformObject", "transformOperationEquals", @@ -2022,8 +1927,6 @@ "validateNonEmptyArgument", "valueCompare", "valueEquals", - "verifyNotTerminated", - "versionFromListenResponse", "wrapInUserErrorIfRecoverable" ], "classes": [ @@ -2047,10 +1950,7 @@ "DocumentKey", "DocumentKeyReference", "DocumentReference", - "DocumentWatchChange", "EventManagerImpl", - "ExistenceFilter", - "ExistenceFilterChange", "ExponentialBackoff", "FieldMask", "FieldPath", @@ -2096,7 +1996,6 @@ "PatchMutation", "PersistencePromise", "PersistenceTransaction", - "PersistentListenStream", "PersistentStream", "PersistentWriteStream", "Precondition", @@ -2104,7 +2003,6 @@ "QueryImpl", "ReferenceSet", "RemoteDocumentChangeBuffer", - "RemoteEvent", "RemoteStoreImpl", "ResourcePath", "ServerTimestampTransform", @@ -2116,23 +2014,18 @@ "SortedSetIterator", "StreamBridge", "SyncEngineImpl", - "TargetChange", - "TargetData", "TargetIdGenerator", "TargetImpl", - "TargetState", "Timestamp", "TransformMutation", "TransformOperation", "UnknownDocument", "User", - "VerifyMutation", - "WatchChangeAggregator", - "WatchTargetChange" + "VerifyMutation" ], "variables": [] }, - "sizeInBytes": 176821 + "sizeInBytes": 151990 }, "deleteField": { "dependencies": { @@ -2174,12 +2067,11 @@ ], "variables": [] }, - "sizeInBytes": 17677 + "sizeInBytes": 17775 }, "disableNetwork": { "dependencies": { "functions": [ - "addToWritePipeline", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", "applyDeleteMutationToLocalView", @@ -2200,11 +2092,9 @@ "arrayEquals", "asCollectionQueryAtPath", "asNumber", - "assertPresent", "binaryStringFromUint8Array", "blobEquals", "boundEquals", - "canAddToWritePipeline", "canUseNetwork", "canonicalId", "canonifyArray", @@ -2220,7 +2110,6 @@ "canonifyTimestamp", "canonifyValue", "cast", - "cleanUpWatchStreamState", "coercedFieldValuesArray", "compareArrays", "compareBlobs", @@ -2237,43 +2126,21 @@ "decodeBase64", "disableNetwork", "disableNetworkInternal", - "disableNetworkUntilRecovery", "documentEntryMap", "documentKeySet", "documentMap", - "documentTargetMap", - "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueNetworkEnabled", "eventManagerOnOnlineStateChange", - "eventManagerOnWatchChange", - "eventManagerOnWatchError", - "executeWithRecovery", - "extractLocalPathFromResourceName", "fail", "fieldTransformEquals", - "fillWritePipeline", "filterEquals", "forEach", "formatJSON", - "fromBytes", - "fromName", - "fromResourceName", - "fromRpcStatus", - "fromTimestamp", - "fromVersion", - "fromWatchChange", - "fromWatchTargetChangeState", - "fromWriteResult", - "fromWriteResults", - "fullyQualifiedPrefixPath", "geoPointEquals", - "getEncodedDatabaseId", "getFirstOrderByField", "getInequalityFilterField", - "getLastRemoteSnapshotVersion", "getLocalWriteTime", "getLogLevel", "getMessageOrStack", @@ -2282,31 +2149,22 @@ "getPersistence", "getPostMutationVersion", "getRemoteStore", - "handleCredentialChange", - "handleTargetError", "handleUserChange", - "handleWriteError", "hardAssert", "hasLimitToFirst", "hasLimitToLast", "isArray", "isCollectionGroupQuery", "isDocumentQuery", - "isDocumentTarget", "isDouble", "isEmpty", "isIndexedDbTransactionError", "isInteger", "isMapValue", - "isNanValue", "isNegativeZero", "isNullOrUndefined", - "isNullValue", "isNumber", - "isPermanentError", - "isPermanentWriteError", "isServerTimestamp", - "isValidResourceName", "loadProtos", "localTransformResults", "logDebug", @@ -2321,14 +2179,11 @@ "newDatastore", "newEventManager", "newLocalStore", - "newPersistentWatchStream", - "newPersistentWriteStream", "newQueryComparator", "newRemoteStore", "newSerializer", "newSyncEngine", "newTarget", - "nextMutationBatch", "nodePromise", "normalizeByteString", "normalizeNumber", @@ -2338,13 +2193,6 @@ "numberEquals", "objectEquals", "objectSize", - "onMutationResult", - "onWatchStreamChange", - "onWatchStreamClose", - "onWatchStreamOpen", - "onWriteHandshakeComplete", - "onWriteStreamClose", - "onWriteStreamOpen", "orderByEquals", "patchDocument", "patchObject", @@ -2359,73 +2207,38 @@ "queryOrderBy", "queryToTarget", "raiseSnapshotsInSyncEvent", - "raiseWatchSnapshot", "randomBytes", "registerFirestore", "rejectOutstandingPendingWritesCallbacks", "remoteStoreApplyPrimaryState", "remoteStoreDisableNetwork", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreShutdown", "removeComponents", "removeComponents$1", "requireDocument", "restartNetwork", - "sendUnwatchRequest", - "sendWatchRequest", "serverTimestamp", "serverTransformResults", "setOfflineComponentProvider", "setOnlineComponentProvider", - "shouldStartWatchStream", - "shouldStartWriteStream", - "snapshotChangesMap", "sortsBeforeDocument", - "startWatchStream", - "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "targetEquals", "targetIdSet", "timestampEquals", - "toBytes", - "toCursor", - "toDirection", - "toDocumentMask", - "toDocumentsTarget", "toDouble", - "toFieldPathReference", - "toFieldTransform", - "toFilter", - "toInt32Proto", "toInteger", - "toLabel", - "toListenRequestLabels", - "toMutation", - "toMutationDocument", - "toName", - "toOperatorName", - "toOrder", - "toPrecondition", - "toPropertyOrder", - "toQueryPath", - "toQueryTarget", - "toResourceName", - "toTarget", - "toTimestamp", - "toUnaryOrFieldFilter", - "toVersion", "transformObject", "transformOperationEquals", "typeOrder", "uint8ArrayFromBinaryString", "valueCompare", "valueEquals", - "verifyNotTerminated", - "versionFromListenResponse", "wrapInUserErrorIfRecoverable" ], "classes": [ @@ -2442,14 +2255,10 @@ "DatastoreImpl", "Deferred", "DelayedOperation", - "DeleteMutation", "DocReference", "Document", "DocumentKey", - "DocumentWatchChange", "EventManagerImpl", - "ExistenceFilter", - "ExistenceFilterChange", "ExponentialBackoff", "FieldPath", "FirebaseCredentialsProvider", @@ -2479,8 +2288,6 @@ "MemoryTransaction", "Mutation", "MutationBatch", - "MutationBatchResult", - "MutationResult", "NoDocument", "NoopConnectivityMonitor", "NumericIncrementTransformOperation", @@ -2494,14 +2301,10 @@ "PatchMutation", "PersistencePromise", "PersistenceTransaction", - "PersistentListenStream", - "PersistentStream", - "PersistentWriteStream", "Precondition", "QueryImpl", "ReferenceSet", "RemoteDocumentChangeBuffer", - "RemoteEvent", "RemoteStoreImpl", "ResourcePath", "ServerTimestampTransform", @@ -2513,23 +2316,17 @@ "SortedSetIterator", "StreamBridge", "SyncEngineImpl", - "TargetChange", - "TargetData", "TargetIdGenerator", "TargetImpl", - "TargetState", "Timestamp", "TransformMutation", "TransformOperation", "UnknownDocument", - "User", - "VerifyMutation", - "WatchChangeAggregator", - "WatchTargetChange" + "User" ], "variables": [] }, - "sizeInBytes": 166954 + "sizeInBytes": 127070 }, "doc": { "dependencies": { @@ -2579,7 +2376,7 @@ ], "variables": [] }, - "sizeInBytes": 23477 + "sizeInBytes": 23575 }, "documentId": { "dependencies": { @@ -2630,11 +2427,14 @@ ], "variables": [] }, - "sizeInBytes": 23131 + "sizeInBytes": 23229 }, "enableIndexedDbPersistence": { "dependencies": { "functions": [ + "acknowledgeBatch", + "addNetworkStatusChangedHandler", + "addToWritePipeline", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", "applyDeleteMutationToLocalView", @@ -2642,14 +2442,17 @@ "applyMutationToLocalView", "applyMutationToRemoteDocument", "applyNumericIncrementTransformOperationToLocalView", + "applyOnlineStateChange", "applyPatchMutationToLocalView", "applyPatchMutationToRemoteDocument", "applySetMutationToLocalView", "applySetMutationToRemoteDocument", + "applySuccessfulWrite", "applyTransformMutationToLocalView", "applyTransformMutationToRemoteDocument", "applyTransformOperationToLocalView", "applyTransformOperationToRemoteDocument", + "applyWriteToRemoteDocuments", "argToString", "arrayEquals", "arrayValueContains", @@ -2660,6 +2463,8 @@ "blobEquals", "boundEquals", "bufferEntryComparator", + "canAddToWritePipeline", + "canUseNetwork", "canonicalId", "canonifyArray", "canonifyBound", @@ -2668,6 +2473,7 @@ "canonifyGeoPoint", "canonifyMap", "canonifyOrderBy", + "canonifyQuery", "canonifyReference", "canonifyTarget", "canonifyTimestamp", @@ -2689,6 +2495,7 @@ "computeTransformOperationBaseValue", "createClientMetadataStore", "createDocumentGlobalStore", + "createMetadata", "createMutationQueue", "createPrimaryClientStore", "createQueryCache", @@ -2699,23 +2506,33 @@ "debugCast", "decodeBase64", "decodeResourcePath", + "disableNetworkInternal", + "disableNetworkUntilRecovery", "documentEntryMap", "documentGlobalStore", "documentKeySet", "documentMap", "documentMutationsStore", "documentTargetStore", + "documentVersionMap", "dropQueryCache", "dropRemoteDocumentChangesStore", + "emitNewSnapsAndNotifyLocalStore", "enableIndexedDbPersistence", + "enableNetworkInternal", "encodeBase64", "encodeResourcePath", "encodeSegment", "encodeSeparator", + "ensureWriteCallbacks", + "ensureWriteStream", + "eventManagerOnOnlineStateChange", + "executeWithRecovery", "extractDocumentKeysFromArrayValue", "extractLocalPathFromResourceName", "fail", "fieldTransformEquals", + "fillWritePipeline", "filterEquals", "forEach", "formatJSON", @@ -2746,18 +2563,24 @@ "fromTimestamp", "fromUnaryFilter", "fromVersion", + "fromWriteResult", + "fromWriteResults", "fullyQualifiedPrefixPath", "geoPointEquals", "getDocument", + "getEncodedDatabaseId", "getFirstOrderByField", "getInequalityFilterField", + "getLastRemoteSnapshotVersion", "getLocalWriteTime", "getLogLevel", "getMessageOrStack", + "getOfflineComponentProvider", "getPostMutationVersion", "getWindow", "globalTargetStore", "handleUserChange", + "handleWriteError", "hardAssert", "hasLimitToFirst", "hasLimitToLast", @@ -2780,11 +2603,16 @@ "isNullOrUndefined", "isNullValue", "isNumber", + "isPermanentError", + "isPermanentWriteError", "isServerTimestamp", "isValidResourceName", + "loadProtos", "localTransformResults", "logDebug", "logError", + "logWarn", + "mapCodeFromRpcCode", "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", @@ -2792,25 +2620,41 @@ "mutationQueuesContainKey", "mutationQueuesStore", "mutationsStore", + "newConnection", + "newConnectivityMonitor", + "newDatastore", + "newEventManager", "newLocalStore", + "newPersistentWriteStream", "newQuery", "newQueryComparator", "newQueryForPath", + "newRemoteStore", "newSerializer", + "newSyncEngine", "newTarget", + "nextMutationBatch", + "nodePromise", "normalizeByteString", "normalizeNumber", "normalizeTimestamp", + "notifyLocalViewChanges", "nullableMaybeDocumentMap", "numberEquals", "objectEquals", "objectSize", + "onMutationResult", + "onWriteHandshakeComplete", + "onWriteStreamClose", + "onWriteStreamOpen", "orderByEquals", "patchDocument", "patchObject", "preconditionIsValidForDocument", "primaryClientStore", "primitiveComparator", + "processUserCallback", + "queryEquals", "queryMatches", "queryMatchesBounds", "queryMatchesFilters", @@ -2818,24 +2662,36 @@ "queryMatchesPathAndCollectionGroup", "queryOrderBy", "queryToTarget", + "raiseSnapshotsInSyncEvent", "randomBytes", "registerFirestore", + "rejectBatch", + "rejectFailedWrite", + "rejectOutstandingPendingWritesCallbacks", "remoteDocumentsStore", + "remoteStoreApplyPrimaryState", + "remoteStoreHandleCredentialChange", + "remoteStoreShutdown", "removeComponents", "removeComponents$1", "removeMutationBatch", "requireDocument", + "restartNetwork", "sentinelKey", "sentinelKey$1", "sentinelRow", "serverTimestamp", "serverTransformResults", "setOfflineComponentProvider", + "setOnlineComponentProvider", + "shouldStartWriteStream", "sortsBeforeDocument", + "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "synchronizeLastDocumentChangeReadTime", "targetEquals", "targetIdSet", @@ -2872,6 +2728,7 @@ "toVersion", "transformObject", "transformOperationEquals", + "triggerPendingWritesCallbacks", "typeOrder", "uint8ArrayFromBinaryString", "upgradeMutationBatchSchemaAndMigrateData", @@ -2895,6 +2752,8 @@ "ByteString", "DatabaseId", "DatabaseInfo", + "Datastore", + "DatastoreImpl", "DbClientMetadata", "DbCollectionParent", "DbDocumentMutation", @@ -2915,6 +2774,7 @@ "DocReference", "Document", "DocumentKey", + "EventManagerImpl", "ExponentialBackoff", "FieldFilter", "FieldMask", @@ -2925,6 +2785,7 @@ "Firestore", "Firestore$1", "FirestoreError", + "GrpcConnection", "InFilter", "IndexFreeQueryEngine", "IndexedDbIndexManager", @@ -2948,6 +2809,7 @@ "LocalDocumentsView", "LocalSerializer", "LocalStoreImpl", + "LocalViewChanges", "LruGarbageCollector", "LruParams", "LruScheduler", @@ -2964,21 +2826,29 @@ "MemoryTransaction", "Mutation", "MutationBatch", + "MutationBatchResult", + "MutationResult", "NoDocument", + "NoopConnectivityMonitor", "NotInFilter", "NumericIncrementTransformOperation", "OAuthToken", "ObjectMap", "ObjectValue", "ObjectValueBuilder", + "OnlineComponentProvider", + "OnlineStateTracker", "OrderBy", "PatchMutation", "PersistencePromise", "PersistenceTransaction", + "PersistentStream", + "PersistentWriteStream", "Precondition", "QueryImpl", "ReferenceSet", "RemoteDocumentChangeBuffer", + "RemoteStoreImpl", "ResourcePath", "RollingSequenceNumberBuffer", "SchemaConverter", @@ -2992,6 +2862,8 @@ "SortedMapIterator", "SortedSet", "SortedSetIterator", + "StreamBridge", + "SyncEngineImpl", "TargetData", "TargetIdGenerator", "TargetImpl", @@ -3004,12 +2876,13 @@ ], "variables": [] }, - "sizeInBytes": 200561 + "sizeInBytes": 237428 }, "enableMultiTabIndexedDbPersistence": { "dependencies": { "functions": [ "acknowledgeBatch", + "addNetworkStatusChangedHandler", "addToWritePipeline", "allocateTarget", "applyActiveTargetsChange", @@ -3117,7 +2990,9 @@ "encodeSegment", "encodeSeparator", "ensureWatchCallbacks", + "ensureWatchStream", "ensureWriteCallbacks", + "ensureWriteStream", "eventManagerOnOnlineStateChange", "eventManagerOnWatchChange", "eventManagerOnWatchError", @@ -3185,7 +3060,6 @@ "getRemoteKeysForTarget", "getWindow", "globalTargetStore", - "handleCredentialChange", "handleTargetError", "handleUserChange", "handleWriteError", @@ -3289,7 +3163,6 @@ "releaseTarget", "remoteDocumentsStore", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreListen", "remoteStoreShutdown", @@ -3323,6 +3196,7 @@ "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "synchronizeLastDocumentChangeReadTime", "synchronizeQueryViewsAndRaiseSnapshots", "synchronizeViewAndComputeSnapshot", @@ -3375,7 +3249,6 @@ "valueCompare", "valueEquals", "verifyNotInitialized", - "verifyNotTerminated", "versionFromListenResponse", "wrapInUserErrorIfRecoverable", "wrapRequest", @@ -3541,12 +3414,11 @@ ], "variables": [] }, - "sizeInBytes": 304449 + "sizeInBytes": 305188 }, "enableNetwork": { "dependencies": { "functions": [ - "addToWritePipeline", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", "applyDeleteMutationToLocalView", @@ -3567,11 +3439,9 @@ "arrayEquals", "asCollectionQueryAtPath", "asNumber", - "assertPresent", "binaryStringFromUint8Array", "blobEquals", "boundEquals", - "canAddToWritePipeline", "canUseNetwork", "canonicalId", "canonifyArray", @@ -3587,7 +3457,6 @@ "canonifyTimestamp", "canonifyValue", "cast", - "cleanUpWatchStreamState", "coercedFieldValuesArray", "compareArrays", "compareBlobs", @@ -3603,44 +3472,22 @@ "debugCast", "decodeBase64", "disableNetworkInternal", - "disableNetworkUntilRecovery", "documentEntryMap", "documentKeySet", "documentMap", - "documentTargetMap", - "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetwork", "enableNetworkInternal", "encodeBase64", - "enqueueNetworkEnabled", "eventManagerOnOnlineStateChange", - "eventManagerOnWatchChange", - "eventManagerOnWatchError", - "executeWithRecovery", - "extractLocalPathFromResourceName", "fail", "fieldTransformEquals", - "fillWritePipeline", "filterEquals", "forEach", "formatJSON", - "fromBytes", - "fromName", - "fromResourceName", - "fromRpcStatus", - "fromTimestamp", - "fromVersion", - "fromWatchChange", - "fromWatchTargetChangeState", - "fromWriteResult", - "fromWriteResults", - "fullyQualifiedPrefixPath", "geoPointEquals", - "getEncodedDatabaseId", "getFirstOrderByField", "getInequalityFilterField", - "getLastRemoteSnapshotVersion", "getLocalWriteTime", "getLogLevel", "getMessageOrStack", @@ -3649,31 +3496,22 @@ "getPersistence", "getPostMutationVersion", "getRemoteStore", - "handleCredentialChange", - "handleTargetError", "handleUserChange", - "handleWriteError", "hardAssert", "hasLimitToFirst", "hasLimitToLast", "isArray", "isCollectionGroupQuery", "isDocumentQuery", - "isDocumentTarget", "isDouble", "isEmpty", "isIndexedDbTransactionError", "isInteger", "isMapValue", - "isNanValue", "isNegativeZero", "isNullOrUndefined", - "isNullValue", "isNumber", - "isPermanentError", - "isPermanentWriteError", "isServerTimestamp", - "isValidResourceName", "loadProtos", "localTransformResults", "logDebug", @@ -3688,30 +3526,20 @@ "newDatastore", "newEventManager", "newLocalStore", - "newPersistentWatchStream", - "newPersistentWriteStream", "newQueryComparator", "newRemoteStore", "newSerializer", "newSyncEngine", "newTarget", - "nextMutationBatch", "nodePromise", "normalizeByteString", "normalizeNumber", "normalizeTimestamp", - "notifyLocalViewChanges", - "nullableMaybeDocumentMap", - "numberEquals", - "objectEquals", - "objectSize", - "onMutationResult", - "onWatchStreamChange", - "onWatchStreamClose", - "onWatchStreamOpen", - "onWriteHandshakeComplete", - "onWriteStreamClose", - "onWriteStreamOpen", + "notifyLocalViewChanges", + "nullableMaybeDocumentMap", + "numberEquals", + "objectEquals", + "objectSize", "orderByEquals", "patchDocument", "patchObject", @@ -3726,12 +3554,10 @@ "queryOrderBy", "queryToTarget", "raiseSnapshotsInSyncEvent", - "raiseWatchSnapshot", "randomBytes", "registerFirestore", "rejectOutstandingPendingWritesCallbacks", "remoteStoreApplyPrimaryState", - "remoteStoreDisableNetwork", "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreShutdown", @@ -3739,60 +3565,27 @@ "removeComponents$1", "requireDocument", "restartNetwork", - "sendUnwatchRequest", - "sendWatchRequest", "serverTimestamp", "serverTransformResults", "setOfflineComponentProvider", "setOnlineComponentProvider", - "shouldStartWatchStream", - "shouldStartWriteStream", - "snapshotChangesMap", "sortsBeforeDocument", - "startWatchStream", - "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "targetEquals", "targetIdSet", "timestampEquals", - "toBytes", - "toCursor", - "toDirection", - "toDocumentMask", - "toDocumentsTarget", "toDouble", - "toFieldPathReference", - "toFieldTransform", - "toFilter", - "toInt32Proto", "toInteger", - "toLabel", - "toListenRequestLabels", - "toMutation", - "toMutationDocument", - "toName", - "toOperatorName", - "toOrder", - "toPrecondition", - "toPropertyOrder", - "toQueryPath", - "toQueryTarget", - "toResourceName", - "toTarget", - "toTimestamp", - "toUnaryOrFieldFilter", - "toVersion", "transformObject", "transformOperationEquals", "typeOrder", "uint8ArrayFromBinaryString", "valueCompare", "valueEquals", - "verifyNotTerminated", - "versionFromListenResponse", "wrapInUserErrorIfRecoverable" ], "classes": [ @@ -3809,14 +3602,10 @@ "DatastoreImpl", "Deferred", "DelayedOperation", - "DeleteMutation", "DocReference", "Document", "DocumentKey", - "DocumentWatchChange", "EventManagerImpl", - "ExistenceFilter", - "ExistenceFilterChange", "ExponentialBackoff", "FieldPath", "FirebaseCredentialsProvider", @@ -3846,8 +3635,6 @@ "MemoryTransaction", "Mutation", "MutationBatch", - "MutationBatchResult", - "MutationResult", "NoDocument", "NoopConnectivityMonitor", "NumericIncrementTransformOperation", @@ -3861,14 +3648,10 @@ "PatchMutation", "PersistencePromise", "PersistenceTransaction", - "PersistentListenStream", - "PersistentStream", - "PersistentWriteStream", "Precondition", "QueryImpl", "ReferenceSet", "RemoteDocumentChangeBuffer", - "RemoteEvent", "RemoteStoreImpl", "ResourcePath", "ServerTimestampTransform", @@ -3880,23 +3663,17 @@ "SortedSetIterator", "StreamBridge", "SyncEngineImpl", - "TargetChange", - "TargetData", "TargetIdGenerator", "TargetImpl", - "TargetState", "Timestamp", "TransformMutation", "TransformOperation", "UnknownDocument", - "User", - "VerifyMutation", - "WatchChangeAggregator", - "WatchTargetChange" + "User" ], "variables": [] }, - "sizeInBytes": 166951 + "sizeInBytes": 127012 }, "endAt": { "dependencies": { @@ -4024,7 +3801,7 @@ ], "variables": [] }, - "sizeInBytes": 53931 + "sizeInBytes": 54029 }, "endBefore": { "dependencies": { @@ -4152,12 +3929,12 @@ ], "variables": [] }, - "sizeInBytes": 53942 + "sizeInBytes": 54040 }, "getDoc": { "dependencies": { "functions": [ - "addToWritePipeline", + "addNetworkStatusChangedHandler", "allocateTarget", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", @@ -4186,7 +3963,6 @@ "binaryStringFromUint8Array", "blobEquals", "boundEquals", - "canAddToWritePipeline", "canUseNetwork", "canonicalId", "canonifyArray", @@ -4226,13 +4002,11 @@ "documentKeySet", "documentMap", "documentTargetMap", - "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueListen", - "enqueueReadDocumentViaSnapshotListener", "ensureWatchCallbacks", + "ensureWatchStream", "errorMessage", "eventManagerListen", "eventManagerOnOnlineStateChange", @@ -4240,13 +4014,11 @@ "eventManagerOnWatchError", "eventManagerUnlisten", "executeQuery", - "executeWithRecovery", "extractLocalPathFromResourceName", "fail", "fieldPathFromArgument$1", "fieldPathFromDotSeparatedString", "fieldTransformEquals", - "fillWritePipeline", "filterEquals", "forEach", "formatJSON", @@ -4260,8 +4032,6 @@ "fromVersion", "fromWatchChange", "fromWatchTargetChangeState", - "fromWriteResult", - "fromWriteResults", "fullyQualifiedPrefixPath", "geoPointEquals", "getDoc", @@ -4279,10 +4049,8 @@ "getPostMutationVersion", "getPreviousValue", "getRemoteKeysForTarget", - "handleCredentialChange", "handleTargetError", "handleUserChange", - "handleWriteError", "hardAssert", "hasLimitToFirst", "hasLimitToLast", @@ -4303,8 +4071,6 @@ "isNullOrUndefined", "isNullValue", "isNumber", - "isPermanentError", - "isPermanentWriteError", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -4323,14 +4089,12 @@ "newEventManager", "newLocalStore", "newPersistentWatchStream", - "newPersistentWriteStream", "newQueryComparator", "newQueryForPath", "newRemoteStore", "newSerializer", "newSyncEngine", "newTarget", - "nextMutationBatch", "nodePromise", "normalizeByteString", "normalizeNumber", @@ -4340,13 +4104,9 @@ "numberEquals", "objectEquals", "objectSize", - "onMutationResult", "onWatchStreamChange", "onWatchStreamClose", "onWatchStreamOpen", - "onWriteHandshakeComplete", - "onWriteStreamClose", - "onWriteStreamOpen", "orderByEquals", "ordinal", "patchDocument", @@ -4365,12 +4125,12 @@ "raiseSnapshotsInSyncEvent", "raiseWatchSnapshot", "randomBytes", + "readDocumentViaSnapshotListener", "registerFirestore", "rejectListen", "rejectOutstandingPendingWritesCallbacks", "releaseTarget", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreListen", "remoteStoreShutdown", @@ -4389,15 +4149,14 @@ "setOnlineComponentProvider", "shouldPersistTargetData", "shouldStartWatchStream", - "shouldStartWriteStream", "snapshotChangesMap", "sortsBeforeDocument", "startWatchStream", - "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "syncEngineListen", "syncEngineUnlisten", "targetEquals", @@ -4406,30 +4165,22 @@ "toBytes", "toCursor", "toDirection", - "toDocumentMask", "toDocumentsTarget", "toDouble", "toFieldPathReference", - "toFieldTransform", "toFilter", "toInt32Proto", "toInteger", "toLabel", "toListenRequestLabels", - "toMutation", - "toMutationDocument", - "toName", "toOperatorName", "toOrder", - "toPrecondition", "toPropertyOrder", "toQueryPath", "toQueryTarget", "toResourceName", "toTarget", - "toTimestamp", "toUnaryOrFieldFilter", - "toVersion", "trackLimboChange", "transformObject", "transformOperationEquals", @@ -4447,7 +4198,6 @@ "valueCompare", "valueDescription", "valueEquals", - "verifyNotTerminated", "versionFromListenResponse", "wrapInUserErrorIfRecoverable" ], @@ -4470,7 +4220,6 @@ "DatastoreImpl", "Deferred", "DelayedOperation", - "DeleteMutation", "DocReference", "Document", "DocumentChangeSet", @@ -4517,8 +4266,6 @@ "MemoryTransaction", "Mutation", "MutationBatch", - "MutationBatchResult", - "MutationResult", "NoDocument", "NoopConnectivityMonitor", "NumericIncrementTransformOperation", @@ -4534,7 +4281,6 @@ "PersistenceTransaction", "PersistentListenStream", "PersistentStream", - "PersistentWriteStream", "Precondition", "Query", "QueryDocumentSnapshot", @@ -4570,7 +4316,6 @@ "UnknownDocument", "User", "UserDataWriter", - "VerifyMutation", "View", "ViewSnapshot", "WatchChangeAggregator", @@ -4578,7 +4323,7 @@ ], "variables": [] }, - "sizeInBytes": 212907 + "sizeInBytes": 202965 }, "getDocFromCache": { "dependencies": { @@ -4636,7 +4381,6 @@ "documentKeySet", "documentMap", "encodeBase64", - "enqueueReadDocumentFromCache", "errorMessage", "fail", "fieldPathFromArgument$1", @@ -4708,6 +4452,7 @@ "queryOrderBy", "queryToTarget", "randomBytes", + "readDocumentFromCache", "readLocalDocument", "registerFirestore", "removeComponents", @@ -4741,7 +4486,6 @@ "valueCompare", "valueDescription", "valueEquals", - "verifyNotTerminated", "wrapInUserErrorIfRecoverable" ], "classes": [ @@ -4832,12 +4576,12 @@ ], "variables": [] }, - "sizeInBytes": 121615 + "sizeInBytes": 121579 }, "getDocFromServer": { "dependencies": { "functions": [ - "addToWritePipeline", + "addNetworkStatusChangedHandler", "allocateTarget", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", @@ -4866,7 +4610,6 @@ "binaryStringFromUint8Array", "blobEquals", "boundEquals", - "canAddToWritePipeline", "canUseNetwork", "canonicalId", "canonifyArray", @@ -4906,13 +4649,11 @@ "documentKeySet", "documentMap", "documentTargetMap", - "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueListen", - "enqueueReadDocumentViaSnapshotListener", "ensureWatchCallbacks", + "ensureWatchStream", "errorMessage", "eventManagerListen", "eventManagerOnOnlineStateChange", @@ -4920,13 +4661,11 @@ "eventManagerOnWatchError", "eventManagerUnlisten", "executeQuery", - "executeWithRecovery", "extractLocalPathFromResourceName", "fail", "fieldPathFromArgument$1", "fieldPathFromDotSeparatedString", "fieldTransformEquals", - "fillWritePipeline", "filterEquals", "forEach", "formatJSON", @@ -4940,8 +4679,6 @@ "fromVersion", "fromWatchChange", "fromWatchTargetChangeState", - "fromWriteResult", - "fromWriteResults", "fullyQualifiedPrefixPath", "geoPointEquals", "getDocFromServer", @@ -4959,10 +4696,8 @@ "getPostMutationVersion", "getPreviousValue", "getRemoteKeysForTarget", - "handleCredentialChange", "handleTargetError", "handleUserChange", - "handleWriteError", "hardAssert", "hasLimitToFirst", "hasLimitToLast", @@ -4983,8 +4718,6 @@ "isNullOrUndefined", "isNullValue", "isNumber", - "isPermanentError", - "isPermanentWriteError", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -5003,14 +4736,12 @@ "newEventManager", "newLocalStore", "newPersistentWatchStream", - "newPersistentWriteStream", "newQueryComparator", "newQueryForPath", "newRemoteStore", "newSerializer", "newSyncEngine", "newTarget", - "nextMutationBatch", "nodePromise", "normalizeByteString", "normalizeNumber", @@ -5020,13 +4751,9 @@ "numberEquals", "objectEquals", "objectSize", - "onMutationResult", "onWatchStreamChange", "onWatchStreamClose", "onWatchStreamOpen", - "onWriteHandshakeComplete", - "onWriteStreamClose", - "onWriteStreamOpen", "orderByEquals", "ordinal", "patchDocument", @@ -5045,12 +4772,12 @@ "raiseSnapshotsInSyncEvent", "raiseWatchSnapshot", "randomBytes", + "readDocumentViaSnapshotListener", "registerFirestore", "rejectListen", "rejectOutstandingPendingWritesCallbacks", "releaseTarget", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreListen", "remoteStoreShutdown", @@ -5069,15 +4796,14 @@ "setOnlineComponentProvider", "shouldPersistTargetData", "shouldStartWatchStream", - "shouldStartWriteStream", "snapshotChangesMap", "sortsBeforeDocument", "startWatchStream", - "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "syncEngineListen", "syncEngineUnlisten", "targetEquals", @@ -5086,30 +4812,22 @@ "toBytes", "toCursor", "toDirection", - "toDocumentMask", "toDocumentsTarget", "toDouble", "toFieldPathReference", - "toFieldTransform", "toFilter", "toInt32Proto", "toInteger", "toLabel", "toListenRequestLabels", - "toMutation", - "toMutationDocument", - "toName", "toOperatorName", "toOrder", - "toPrecondition", "toPropertyOrder", "toQueryPath", "toQueryTarget", "toResourceName", "toTarget", - "toTimestamp", "toUnaryOrFieldFilter", - "toVersion", "trackLimboChange", "transformObject", "transformOperationEquals", @@ -5127,7 +4845,6 @@ "valueCompare", "valueDescription", "valueEquals", - "verifyNotTerminated", "versionFromListenResponse", "wrapInUserErrorIfRecoverable" ], @@ -5150,7 +4867,6 @@ "DatastoreImpl", "Deferred", "DelayedOperation", - "DeleteMutation", "DocReference", "Document", "DocumentChangeSet", @@ -5197,8 +4913,6 @@ "MemoryTransaction", "Mutation", "MutationBatch", - "MutationBatchResult", - "MutationResult", "NoDocument", "NoopConnectivityMonitor", "NumericIncrementTransformOperation", @@ -5214,7 +4928,6 @@ "PersistenceTransaction", "PersistentListenStream", "PersistentStream", - "PersistentWriteStream", "Precondition", "Query", "QueryDocumentSnapshot", @@ -5250,7 +4963,6 @@ "UnknownDocument", "User", "UserDataWriter", - "VerifyMutation", "View", "ViewSnapshot", "WatchChangeAggregator", @@ -5258,12 +4970,12 @@ ], "variables": [] }, - "sizeInBytes": 212963 + "sizeInBytes": 202984 }, "getDocs": { "dependencies": { "functions": [ - "addToWritePipeline", + "addNetworkStatusChangedHandler", "allocateTarget", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", @@ -5292,7 +5004,6 @@ "binaryStringFromUint8Array", "blobEquals", "boundEquals", - "canAddToWritePipeline", "canUseNetwork", "canonicalId", "canonifyArray", @@ -5332,13 +5043,11 @@ "documentKeySet", "documentMap", "documentTargetMap", - "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueExecuteQueryViaSnapshotListener", - "enqueueListen", "ensureWatchCallbacks", + "ensureWatchStream", "errorMessage", "eventManagerListen", "eventManagerOnOnlineStateChange", @@ -5346,13 +5055,12 @@ "eventManagerOnWatchError", "eventManagerUnlisten", "executeQuery", - "executeWithRecovery", + "executeQueryViaSnapshotListener", "extractLocalPathFromResourceName", "fail", "fieldPathFromArgument$1", "fieldPathFromDotSeparatedString", "fieldTransformEquals", - "fillWritePipeline", "filterEquals", "forEach", "formatJSON", @@ -5366,8 +5074,6 @@ "fromVersion", "fromWatchChange", "fromWatchTargetChangeState", - "fromWriteResult", - "fromWriteResults", "fullyQualifiedPrefixPath", "geoPointEquals", "getDocs", @@ -5385,10 +5091,8 @@ "getPostMutationVersion", "getPreviousValue", "getRemoteKeysForTarget", - "handleCredentialChange", "handleTargetError", "handleUserChange", - "handleWriteError", "hardAssert", "hasLimitToFirst", "hasLimitToLast", @@ -5409,8 +5113,6 @@ "isNullOrUndefined", "isNullValue", "isNumber", - "isPermanentError", - "isPermanentWriteError", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -5429,14 +5131,12 @@ "newEventManager", "newLocalStore", "newPersistentWatchStream", - "newPersistentWriteStream", "newQueryComparator", "newQueryForPath", "newRemoteStore", "newSerializer", "newSyncEngine", "newTarget", - "nextMutationBatch", "nodePromise", "normalizeByteString", "normalizeNumber", @@ -5446,13 +5146,9 @@ "numberEquals", "objectEquals", "objectSize", - "onMutationResult", "onWatchStreamChange", "onWatchStreamClose", "onWatchStreamOpen", - "onWriteHandshakeComplete", - "onWriteStreamClose", - "onWriteStreamOpen", "orderByEquals", "ordinal", "patchDocument", @@ -5476,7 +5172,6 @@ "rejectOutstandingPendingWritesCallbacks", "releaseTarget", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreListen", "remoteStoreShutdown", @@ -5496,15 +5191,14 @@ "setOnlineComponentProvider", "shouldPersistTargetData", "shouldStartWatchStream", - "shouldStartWriteStream", "snapshotChangesMap", "sortsBeforeDocument", "startWatchStream", - "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "syncEngineListen", "syncEngineUnlisten", "targetEquals", @@ -5513,30 +5207,22 @@ "toBytes", "toCursor", "toDirection", - "toDocumentMask", "toDocumentsTarget", "toDouble", "toFieldPathReference", - "toFieldTransform", "toFilter", "toInt32Proto", "toInteger", "toLabel", "toListenRequestLabels", - "toMutation", - "toMutationDocument", - "toName", "toOperatorName", "toOrder", - "toPrecondition", "toPropertyOrder", "toQueryPath", "toQueryTarget", "toResourceName", "toTarget", - "toTimestamp", "toUnaryOrFieldFilter", - "toVersion", "trackLimboChange", "transformObject", "transformOperationEquals", @@ -5555,7 +5241,6 @@ "valueCompare", "valueDescription", "valueEquals", - "verifyNotTerminated", "versionFromListenResponse", "wrapInUserErrorIfRecoverable" ], @@ -5578,7 +5263,6 @@ "DatastoreImpl", "Deferred", "DelayedOperation", - "DeleteMutation", "DocReference", "Document", "DocumentChangeSet", @@ -5625,8 +5309,6 @@ "MemoryTransaction", "Mutation", "MutationBatch", - "MutationBatchResult", - "MutationResult", "NoDocument", "NoopConnectivityMonitor", "NumericIncrementTransformOperation", @@ -5642,7 +5324,6 @@ "PersistenceTransaction", "PersistentListenStream", "PersistentStream", - "PersistentWriteStream", "Precondition", "Query", "QueryDocumentSnapshot", @@ -5679,7 +5360,6 @@ "UnknownDocument", "User", "UserDataWriter", - "VerifyMutation", "View", "ViewSnapshot", "WatchChangeAggregator", @@ -5687,7 +5367,7 @@ ], "variables": [] }, - "sizeInBytes": 215249 + "sizeInBytes": 205291 }, "getDocsFromCache": { "dependencies": { @@ -5747,9 +5427,9 @@ "documentKeySet", "documentMap", "encodeBase64", - "enqueueExecuteQueryFromCache", "errorMessage", "executeQuery", + "executeQueryFromCache", "fail", "fieldPathFromArgument$1", "fieldPathFromDotSeparatedString", @@ -5855,7 +5535,6 @@ "valueCompare", "valueDescription", "valueEquals", - "verifyNotTerminated", "wrapInUserErrorIfRecoverable" ], "classes": [ @@ -5953,12 +5632,12 @@ ], "variables": [] }, - "sizeInBytes": 134570 + "sizeInBytes": 134538 }, "getDocsFromServer": { "dependencies": { "functions": [ - "addToWritePipeline", + "addNetworkStatusChangedHandler", "allocateTarget", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", @@ -5987,7 +5666,6 @@ "binaryStringFromUint8Array", "blobEquals", "boundEquals", - "canAddToWritePipeline", "canUseNetwork", "canonicalId", "canonifyArray", @@ -6027,13 +5705,11 @@ "documentKeySet", "documentMap", "documentTargetMap", - "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueExecuteQueryViaSnapshotListener", - "enqueueListen", "ensureWatchCallbacks", + "ensureWatchStream", "errorMessage", "eventManagerListen", "eventManagerOnOnlineStateChange", @@ -6041,13 +5717,12 @@ "eventManagerOnWatchError", "eventManagerUnlisten", "executeQuery", - "executeWithRecovery", + "executeQueryViaSnapshotListener", "extractLocalPathFromResourceName", "fail", "fieldPathFromArgument$1", "fieldPathFromDotSeparatedString", "fieldTransformEquals", - "fillWritePipeline", "filterEquals", "forEach", "formatJSON", @@ -6061,8 +5736,6 @@ "fromVersion", "fromWatchChange", "fromWatchTargetChangeState", - "fromWriteResult", - "fromWriteResults", "fullyQualifiedPrefixPath", "geoPointEquals", "getDocsFromServer", @@ -6080,10 +5753,8 @@ "getPostMutationVersion", "getPreviousValue", "getRemoteKeysForTarget", - "handleCredentialChange", "handleTargetError", "handleUserChange", - "handleWriteError", "hardAssert", "hasLimitToFirst", "hasLimitToLast", @@ -6104,8 +5775,6 @@ "isNullOrUndefined", "isNullValue", "isNumber", - "isPermanentError", - "isPermanentWriteError", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -6124,14 +5793,12 @@ "newEventManager", "newLocalStore", "newPersistentWatchStream", - "newPersistentWriteStream", "newQueryComparator", "newQueryForPath", "newRemoteStore", "newSerializer", "newSyncEngine", "newTarget", - "nextMutationBatch", "nodePromise", "normalizeByteString", "normalizeNumber", @@ -6141,13 +5808,9 @@ "numberEquals", "objectEquals", "objectSize", - "onMutationResult", "onWatchStreamChange", "onWatchStreamClose", "onWatchStreamOpen", - "onWriteHandshakeComplete", - "onWriteStreamClose", - "onWriteStreamOpen", "orderByEquals", "ordinal", "patchDocument", @@ -6171,7 +5834,6 @@ "rejectOutstandingPendingWritesCallbacks", "releaseTarget", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreListen", "remoteStoreShutdown", @@ -6191,15 +5853,14 @@ "setOnlineComponentProvider", "shouldPersistTargetData", "shouldStartWatchStream", - "shouldStartWriteStream", "snapshotChangesMap", "sortsBeforeDocument", "startWatchStream", - "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "syncEngineListen", "syncEngineUnlisten", "targetEquals", @@ -6208,30 +5869,22 @@ "toBytes", "toCursor", "toDirection", - "toDocumentMask", "toDocumentsTarget", "toDouble", "toFieldPathReference", - "toFieldTransform", "toFilter", "toInt32Proto", "toInteger", "toLabel", "toListenRequestLabels", - "toMutation", - "toMutationDocument", - "toName", "toOperatorName", "toOrder", - "toPrecondition", "toPropertyOrder", "toQueryPath", "toQueryTarget", "toResourceName", "toTarget", - "toTimestamp", "toUnaryOrFieldFilter", - "toVersion", "trackLimboChange", "transformObject", "transformOperationEquals", @@ -6249,7 +5902,6 @@ "valueCompare", "valueDescription", "valueEquals", - "verifyNotTerminated", "versionFromListenResponse", "wrapInUserErrorIfRecoverable" ], @@ -6272,7 +5924,6 @@ "DatastoreImpl", "Deferred", "DelayedOperation", - "DeleteMutation", "DocReference", "Document", "DocumentChangeSet", @@ -6319,8 +5970,6 @@ "MemoryTransaction", "Mutation", "MutationBatch", - "MutationBatchResult", - "MutationResult", "NoDocument", "NoopConnectivityMonitor", "NumericIncrementTransformOperation", @@ -6336,7 +5985,6 @@ "PersistenceTransaction", "PersistentListenStream", "PersistentStream", - "PersistentWriteStream", "Precondition", "Query", "QueryDocumentSnapshot", @@ -6373,7 +6021,6 @@ "UnknownDocument", "User", "UserDataWriter", - "VerifyMutation", "View", "ViewSnapshot", "WatchChangeAggregator", @@ -6381,7 +6028,7 @@ ], "variables": [] }, - "sizeInBytes": 214988 + "sizeInBytes": 205011 }, "getFirestore": { "dependencies": { @@ -6419,7 +6066,7 @@ ], "variables": [] }, - "sizeInBytes": 16696 + "sizeInBytes": 16794 }, "increment": { "dependencies": { @@ -6469,7 +6116,7 @@ ], "variables": [] }, - "sizeInBytes": 18542 + "sizeInBytes": 18640 }, "initializeFirestore": { "dependencies": { @@ -6508,7 +6155,7 @@ ], "variables": [] }, - "sizeInBytes": 18000 + "sizeInBytes": 18098 }, "limit": { "dependencies": { @@ -6553,7 +6200,7 @@ ], "variables": [] }, - "sizeInBytes": 18172 + "sizeInBytes": 18270 }, "limitToLast": { "dependencies": { @@ -6598,12 +6245,12 @@ ], "variables": [] }, - "sizeInBytes": 18196 + "sizeInBytes": 18294 }, "onSnapshot": { "dependencies": { "functions": [ - "addToWritePipeline", + "addNetworkStatusChangedHandler", "allocateTarget", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", @@ -6632,7 +6279,6 @@ "binaryStringFromUint8Array", "blobEquals", "boundEquals", - "canAddToWritePipeline", "canUseNetwork", "canonicalId", "canonifyArray", @@ -6673,12 +6319,11 @@ "documentKeySet", "documentMap", "documentTargetMap", - "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueListen", "ensureWatchCallbacks", + "ensureWatchStream", "errorMessage", "eventManagerListen", "eventManagerOnOnlineStateChange", @@ -6686,13 +6331,11 @@ "eventManagerOnWatchError", "eventManagerUnlisten", "executeQuery", - "executeWithRecovery", "extractLocalPathFromResourceName", "fail", "fieldPathFromArgument$1", "fieldPathFromDotSeparatedString", "fieldTransformEquals", - "fillWritePipeline", "filterEquals", "forEach", "formatJSON", @@ -6706,8 +6349,6 @@ "fromVersion", "fromWatchChange", "fromWatchTargetChangeState", - "fromWriteResult", - "fromWriteResults", "fullyQualifiedPrefixPath", "geoPointEquals", "getEncodedDatabaseId", @@ -6724,10 +6365,8 @@ "getPostMutationVersion", "getPreviousValue", "getRemoteKeysForTarget", - "handleCredentialChange", "handleTargetError", "handleUserChange", - "handleWriteError", "hardAssert", "hasLimitToFirst", "hasLimitToLast", @@ -6750,8 +6389,6 @@ "isNullValue", "isNumber", "isPartialObserver", - "isPermanentError", - "isPermanentWriteError", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -6770,14 +6407,12 @@ "newEventManager", "newLocalStore", "newPersistentWatchStream", - "newPersistentWriteStream", "newQueryComparator", "newQueryForPath", "newRemoteStore", "newSerializer", "newSyncEngine", "newTarget", - "nextMutationBatch", "nodePromise", "normalizeByteString", "normalizeNumber", @@ -6787,14 +6422,10 @@ "numberEquals", "objectEquals", "objectSize", - "onMutationResult", "onSnapshot", "onWatchStreamChange", "onWatchStreamClose", "onWatchStreamOpen", - "onWriteHandshakeComplete", - "onWriteStreamClose", - "onWriteStreamOpen", "orderByEquals", "ordinal", "patchDocument", @@ -6818,7 +6449,6 @@ "rejectOutstandingPendingWritesCallbacks", "releaseTarget", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreListen", "remoteStoreShutdown", @@ -6838,15 +6468,14 @@ "setOnlineComponentProvider", "shouldPersistTargetData", "shouldStartWatchStream", - "shouldStartWriteStream", "snapshotChangesMap", "sortsBeforeDocument", "startWatchStream", - "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "syncEngineListen", "syncEngineUnlisten", "targetEquals", @@ -6855,30 +6484,22 @@ "toBytes", "toCursor", "toDirection", - "toDocumentMask", "toDocumentsTarget", "toDouble", "toFieldPathReference", - "toFieldTransform", "toFilter", "toInt32Proto", "toInteger", "toLabel", "toListenRequestLabels", - "toMutation", - "toMutationDocument", - "toName", "toOperatorName", "toOrder", - "toPrecondition", "toPropertyOrder", "toQueryPath", "toQueryTarget", "toResourceName", "toTarget", - "toTimestamp", "toUnaryOrFieldFilter", - "toVersion", "trackLimboChange", "transformObject", "transformOperationEquals", @@ -6897,7 +6518,6 @@ "valueCompare", "valueDescription", "valueEquals", - "verifyNotTerminated", "versionFromListenResponse", "wrapInUserErrorIfRecoverable" ], @@ -6920,7 +6540,6 @@ "DatastoreImpl", "Deferred", "DelayedOperation", - "DeleteMutation", "DocReference", "Document", "DocumentChangeSet", @@ -6967,8 +6586,6 @@ "MemoryTransaction", "Mutation", "MutationBatch", - "MutationBatchResult", - "MutationResult", "NoDocument", "NoopConnectivityMonitor", "NumericIncrementTransformOperation", @@ -6984,7 +6601,6 @@ "PersistenceTransaction", "PersistentListenStream", "PersistentStream", - "PersistentWriteStream", "Precondition", "Query", "QueryDocumentSnapshot", @@ -7021,7 +6637,6 @@ "UnknownDocument", "User", "UserDataWriter", - "VerifyMutation", "View", "ViewSnapshot", "WatchChangeAggregator", @@ -7029,13 +6644,13 @@ ], "variables": [] }, - "sizeInBytes": 216332 + "sizeInBytes": 206315 }, "onSnapshotsInSync": { "dependencies": { "functions": [ + "addNetworkStatusChangedHandler", "addSnapshotsInSyncListener", - "addToWritePipeline", "allocateTarget", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", @@ -7064,7 +6679,6 @@ "binaryStringFromUint8Array", "blobEquals", "boundEquals", - "canAddToWritePipeline", "canUseNetwork", "canonicalId", "canonifyArray", @@ -7102,21 +6716,18 @@ "documentKeySet", "documentMap", "documentTargetMap", - "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueSnapshotsInSyncListen", "ensureWatchCallbacks", + "ensureWatchStream", "eventManagerOnOnlineStateChange", "eventManagerOnWatchChange", "eventManagerOnWatchError", "executeQuery", - "executeWithRecovery", "extractLocalPathFromResourceName", "fail", "fieldTransformEquals", - "fillWritePipeline", "filterEquals", "forEach", "formatJSON", @@ -7128,8 +6739,6 @@ "fromVersion", "fromWatchChange", "fromWatchTargetChangeState", - "fromWriteResult", - "fromWriteResults", "fullyQualifiedPrefixPath", "geoPointEquals", "getEncodedDatabaseId", @@ -7145,10 +6754,8 @@ "getOnlineComponentProvider", "getPostMutationVersion", "getRemoteKeysForTarget", - "handleCredentialChange", "handleTargetError", "handleUserChange", - "handleWriteError", "hardAssert", "hasLimitToFirst", "hasLimitToLast", @@ -7170,8 +6777,6 @@ "isNullValue", "isNumber", "isPartialObserver", - "isPermanentError", - "isPermanentWriteError", "isServerTimestamp", "isValidResourceName", "loadProtos", @@ -7189,14 +6794,12 @@ "newEventManager", "newLocalStore", "newPersistentWatchStream", - "newPersistentWriteStream", "newQueryComparator", "newQueryForPath", "newRemoteStore", "newSerializer", "newSyncEngine", "newTarget", - "nextMutationBatch", "nodePromise", "normalizeByteString", "normalizeNumber", @@ -7206,14 +6809,10 @@ "numberEquals", "objectEquals", "objectSize", - "onMutationResult", "onSnapshotsInSync", "onWatchStreamChange", "onWatchStreamClose", "onWatchStreamOpen", - "onWriteHandshakeComplete", - "onWriteStreamClose", - "onWriteStreamOpen", "orderByEquals", "patchDocument", "patchObject", @@ -7236,7 +6835,6 @@ "rejectOutstandingPendingWritesCallbacks", "releaseTarget", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreListen", "remoteStoreShutdown", @@ -7256,15 +6854,14 @@ "setOnlineComponentProvider", "shouldPersistTargetData", "shouldStartWatchStream", - "shouldStartWriteStream", "snapshotChangesMap", "sortsBeforeDocument", "startWatchStream", - "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "syncEngineListen", "syncEngineUnlisten", "targetEquals", @@ -7273,30 +6870,22 @@ "toBytes", "toCursor", "toDirection", - "toDocumentMask", "toDocumentsTarget", "toDouble", "toFieldPathReference", - "toFieldTransform", "toFilter", "toInt32Proto", "toInteger", "toLabel", "toListenRequestLabels", - "toMutation", - "toMutationDocument", - "toName", "toOperatorName", "toOrder", - "toPrecondition", "toPropertyOrder", "toQueryPath", "toQueryTarget", "toResourceName", "toTarget", - "toTimestamp", "toUnaryOrFieldFilter", - "toVersion", "trackLimboChange", "transformObject", "transformOperationEquals", @@ -7305,7 +6894,6 @@ "updateTrackedLimbos", "valueCompare", "valueEquals", - "verifyNotTerminated", "versionFromListenResponse", "wrapInUserErrorIfRecoverable" ], @@ -7325,7 +6913,6 @@ "DatastoreImpl", "Deferred", "DelayedOperation", - "DeleteMutation", "DocReference", "Document", "DocumentChangeSet", @@ -7365,8 +6952,6 @@ "MemoryTransaction", "Mutation", "MutationBatch", - "MutationBatchResult", - "MutationResult", "NoDocument", "NoopConnectivityMonitor", "NumericIncrementTransformOperation", @@ -7382,7 +6967,6 @@ "PersistenceTransaction", "PersistentListenStream", "PersistentStream", - "PersistentWriteStream", "Precondition", "QueryImpl", "QueryView", @@ -7411,7 +6995,6 @@ "TransformOperation", "UnknownDocument", "User", - "VerifyMutation", "View", "ViewSnapshot", "WatchChangeAggregator", @@ -7419,7 +7002,7 @@ ], "variables": [] }, - "sizeInBytes": 194654 + "sizeInBytes": 184712 }, "orderBy": { "dependencies": { @@ -7488,7 +7071,7 @@ ], "variables": [] }, - "sizeInBytes": 28061 + "sizeInBytes": 28159 }, "query": { "dependencies": { @@ -7528,7 +7111,7 @@ ], "variables": [] }, - "sizeInBytes": 17394 + "sizeInBytes": 17492 }, "queryEqual": { "dependencies": { @@ -7605,7 +7188,7 @@ ], "variables": [] }, - "sizeInBytes": 32632 + "sizeInBytes": 32730 }, "refEqual": { "dependencies": { @@ -7655,7 +7238,7 @@ ], "variables": [] }, - "sizeInBytes": 22972 + "sizeInBytes": 23070 }, "runTransaction": { "dependencies": { @@ -7848,7 +7431,7 @@ ], "variables": [] }, - "sizeInBytes": 84257 + "sizeInBytes": 84452 }, "serverTimestamp": { "dependencies": { @@ -7893,13 +7476,14 @@ ], "variables": [] }, - "sizeInBytes": 17688 + "sizeInBytes": 17786 }, "setDoc": { "dependencies": { "functions": [ "acknowledgeBatch", "addMutationCallback", + "addNetworkStatusChangedHandler", "addToWritePipeline", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", @@ -7924,7 +7508,6 @@ "arrayEquals", "asCollectionQueryAtPath", "asNumber", - "assertPresent", "binaryStringFromUint8Array", "blobEquals", "boundEquals", @@ -7944,7 +7527,6 @@ "canonifyTimestamp", "canonifyValue", "cast", - "cleanUpWatchStreamState", "coercedFieldValuesArray", "compareArrays", "compareBlobs", @@ -7965,20 +7547,17 @@ "documentEntryMap", "documentKeySet", "documentMap", - "documentTargetMap", "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueWrite", "ensureWriteCallbacks", + "ensureWriteStream", "errorMessage", "eventManagerOnOnlineStateChange", - "eventManagerOnWatchChange", - "eventManagerOnWatchError", "executeWithRecovery", + "executeWrite", "extractFieldMask", - "extractLocalPathFromResourceName", "extractMutationBaseValue", "extractTransformMutationBaseValue", "fail", @@ -7990,15 +7569,9 @@ "forEach", "formatJSON", "formatPlural", - "fromBytes", "fromDotSeparatedString", - "fromName", - "fromResourceName", - "fromRpcStatus", "fromTimestamp", "fromVersion", - "fromWatchChange", - "fromWatchTargetChangeState", "fromWriteResult", "fromWriteResults", "fullyQualifiedPrefixPath", @@ -8014,8 +7587,6 @@ "getOnlineComponentProvider", "getPostMutationVersion", "getSyncEngine", - "handleCredentialChange", - "handleTargetError", "handleUserChange", "handleWriteError", "hardAssert", @@ -8026,23 +7597,19 @@ "isArray", "isCollectionGroupQuery", "isDocumentQuery", - "isDocumentTarget", "isDouble", "isEmpty", "isIndexedDbTransactionError", "isInteger", "isMapValue", - "isNanValue", "isNegativeZero", "isNullOrUndefined", - "isNullValue", "isNumber", "isPermanentError", "isPermanentWriteError", "isPlainObject", "isSafeInteger", "isServerTimestamp", - "isValidResourceName", "isWrite", "loadProtos", "localTransformResults", @@ -8060,7 +7627,6 @@ "newDatastore", "newEventManager", "newLocalStore", - "newPersistentWatchStream", "newPersistentWriteStream", "newQueryComparator", "newQueryForPath", @@ -8080,9 +7646,6 @@ "objectEquals", "objectSize", "onMutationResult", - "onWatchStreamChange", - "onWatchStreamClose", - "onWatchStreamOpen", "onWriteHandshakeComplete", "onWriteStreamClose", "onWriteStreamOpen", @@ -8108,68 +7671,47 @@ "queryOrderBy", "queryToTarget", "raiseSnapshotsInSyncEvent", - "raiseWatchSnapshot", "randomBytes", "registerFirestore", "rejectBatch", "rejectFailedWrite", "rejectOutstandingPendingWritesCallbacks", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreShutdown", "removeComponents", "removeComponents$1", "requireDocument", "restartNetwork", - "sendUnwatchRequest", - "sendWatchRequest", "serverTimestamp", "serverTransformResults", "setDoc", "setOfflineComponentProvider", "setOnlineComponentProvider", - "shouldStartWatchStream", "shouldStartWriteStream", - "snapshotChangesMap", "sortsBeforeDocument", - "startWatchStream", "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "syncEngineWrite", "targetEquals", "targetIdSet", "timestampEquals", "toBytes", - "toCursor", - "toDirection", "toDocumentMask", - "toDocumentsTarget", "toDouble", - "toFieldPathReference", "toFieldTransform", - "toFilter", - "toInt32Proto", "toInteger", - "toLabel", - "toListenRequestLabels", "toMutation", "toMutationDocument", "toName", "toNumber", - "toOperatorName", - "toOrder", "toPrecondition", - "toPropertyOrder", - "toQueryPath", - "toQueryTarget", "toResourceName", - "toTarget", "toTimestamp", - "toUnaryOrFieldFilter", "toVersion", "transformObject", "transformOperationEquals", @@ -8188,8 +7730,6 @@ "valueCompare", "valueDescription", "valueEquals", - "verifyNotTerminated", - "versionFromListenResponse", "wrapInUserErrorIfRecoverable" ], "classes": [ @@ -8215,10 +7755,7 @@ "DocumentKey", "DocumentKeyReference", "DocumentReference", - "DocumentWatchChange", "EventManagerImpl", - "ExistenceFilter", - "ExistenceFilterChange", "ExponentialBackoff", "FieldMask", "FieldPath", @@ -8268,7 +7805,6 @@ "PatchMutation", "PersistencePromise", "PersistenceTransaction", - "PersistentListenStream", "PersistentStream", "PersistentWriteStream", "Precondition", @@ -8276,7 +7812,6 @@ "QueryImpl", "ReferenceSet", "RemoteDocumentChangeBuffer", - "RemoteEvent", "RemoteStoreImpl", "ResourcePath", "SerializableFieldValue", @@ -8289,24 +7824,19 @@ "SortedSetIterator", "StreamBridge", "SyncEngineImpl", - "TargetChange", - "TargetData", "TargetIdGenerator", "TargetImpl", - "TargetState", "Timestamp", "TransformMutation", "TransformOperation", "UnknownDocument", "User", "UserDataReader", - "VerifyMutation", - "WatchChangeAggregator", - "WatchTargetChange" + "VerifyMutation" ], "variables": [] }, - "sizeInBytes": 192163 + "sizeInBytes": 167454 }, "setLogLevel": { "dependencies": { @@ -8344,7 +7874,7 @@ ], "variables": [] }, - "sizeInBytes": 16662 + "sizeInBytes": 16760 }, "snapshotEqual": { "dependencies": { @@ -8463,7 +7993,7 @@ ], "variables": [] }, - "sizeInBytes": 51696 + "sizeInBytes": 51794 }, "startAfter": { "dependencies": { @@ -8591,7 +8121,7 @@ ], "variables": [] }, - "sizeInBytes": 53952 + "sizeInBytes": 54050 }, "startAt": { "dependencies": { @@ -8719,7 +8249,7 @@ ], "variables": [] }, - "sizeInBytes": 53942 + "sizeInBytes": 54040 }, "terminate": { "dependencies": { @@ -8758,13 +8288,14 @@ ], "variables": [] }, - "sizeInBytes": 17193 + "sizeInBytes": 17291 }, "updateDoc": { "dependencies": { "functions": [ "acknowledgeBatch", "addMutationCallback", + "addNetworkStatusChangedHandler", "addToWritePipeline", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", @@ -8788,7 +8319,6 @@ "arrayEquals", "asCollectionQueryAtPath", "asNumber", - "assertPresent", "binaryStringFromUint8Array", "blobEquals", "boundEquals", @@ -8808,7 +8338,6 @@ "canonifyTimestamp", "canonifyValue", "cast", - "cleanUpWatchStreamState", "coercedFieldValuesArray", "compareArrays", "compareBlobs", @@ -8829,20 +8358,17 @@ "documentEntryMap", "documentKeySet", "documentMap", - "documentTargetMap", "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueWrite", "ensureWriteCallbacks", + "ensureWriteStream", "errorMessage", "eventManagerOnOnlineStateChange", - "eventManagerOnWatchChange", - "eventManagerOnWatchError", "executeWithRecovery", + "executeWrite", "extractFieldMask", - "extractLocalPathFromResourceName", "extractMutationBaseValue", "extractTransformMutationBaseValue", "fail", @@ -8855,15 +8381,9 @@ "forEach", "formatJSON", "formatPlural", - "fromBytes", "fromDotSeparatedString", - "fromName", - "fromResourceName", - "fromRpcStatus", "fromTimestamp", "fromVersion", - "fromWatchChange", - "fromWatchTargetChangeState", "fromWriteResult", "fromWriteResults", "fullyQualifiedPrefixPath", @@ -8879,8 +8399,6 @@ "getOnlineComponentProvider", "getPostMutationVersion", "getSyncEngine", - "handleCredentialChange", - "handleTargetError", "handleUserChange", "handleWriteError", "hardAssert", @@ -8891,23 +8409,19 @@ "isArray", "isCollectionGroupQuery", "isDocumentQuery", - "isDocumentTarget", "isDouble", "isEmpty", "isIndexedDbTransactionError", "isInteger", "isMapValue", - "isNanValue", "isNegativeZero", "isNullOrUndefined", - "isNullValue", "isNumber", "isPermanentError", "isPermanentWriteError", "isPlainObject", "isSafeInteger", "isServerTimestamp", - "isValidResourceName", "isWrite", "loadProtos", "localTransformResults", @@ -8925,7 +8439,6 @@ "newDatastore", "newEventManager", "newLocalStore", - "newPersistentWatchStream", "newPersistentWriteStream", "newQueryComparator", "newQueryForPath", @@ -8945,9 +8458,6 @@ "objectEquals", "objectSize", "onMutationResult", - "onWatchStreamChange", - "onWatchStreamClose", - "onWatchStreamOpen", "onWriteHandshakeComplete", "onWriteStreamClose", "onWriteStreamOpen", @@ -8974,67 +8484,46 @@ "queryOrderBy", "queryToTarget", "raiseSnapshotsInSyncEvent", - "raiseWatchSnapshot", "randomBytes", "registerFirestore", "rejectBatch", "rejectFailedWrite", "rejectOutstandingPendingWritesCallbacks", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreShutdown", "removeComponents", "removeComponents$1", "requireDocument", "restartNetwork", - "sendUnwatchRequest", - "sendWatchRequest", "serverTimestamp", "serverTransformResults", "setOfflineComponentProvider", "setOnlineComponentProvider", - "shouldStartWatchStream", "shouldStartWriteStream", - "snapshotChangesMap", "sortsBeforeDocument", - "startWatchStream", "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "syncEngineWrite", "targetEquals", "targetIdSet", "timestampEquals", "toBytes", - "toCursor", - "toDirection", "toDocumentMask", - "toDocumentsTarget", "toDouble", - "toFieldPathReference", "toFieldTransform", - "toFilter", - "toInt32Proto", "toInteger", - "toLabel", - "toListenRequestLabels", "toMutation", "toMutationDocument", "toName", "toNumber", - "toOperatorName", - "toOrder", "toPrecondition", - "toPropertyOrder", - "toQueryPath", - "toQueryTarget", "toResourceName", - "toTarget", "toTimestamp", - "toUnaryOrFieldFilter", "toVersion", "transformObject", "transformOperationEquals", @@ -9054,8 +8543,6 @@ "valueCompare", "valueDescription", "valueEquals", - "verifyNotTerminated", - "versionFromListenResponse", "wrapInUserErrorIfRecoverable" ], "classes": [ @@ -9082,10 +8569,7 @@ "DocumentKey", "DocumentKeyReference", "DocumentReference", - "DocumentWatchChange", "EventManagerImpl", - "ExistenceFilter", - "ExistenceFilterChange", "ExponentialBackoff", "FieldMask", "FieldPath", @@ -9136,7 +8620,6 @@ "PatchMutation", "PersistencePromise", "PersistenceTransaction", - "PersistentListenStream", "PersistentStream", "PersistentWriteStream", "Precondition", @@ -9144,7 +8627,6 @@ "QueryImpl", "ReferenceSet", "RemoteDocumentChangeBuffer", - "RemoteEvent", "RemoteStoreImpl", "ResourcePath", "SerializableFieldValue", @@ -9157,29 +8639,23 @@ "SortedSetIterator", "StreamBridge", "SyncEngineImpl", - "TargetChange", - "TargetData", "TargetIdGenerator", "TargetImpl", - "TargetState", "Timestamp", "TransformMutation", "TransformOperation", "UnknownDocument", "User", "UserDataReader", - "VerifyMutation", - "WatchChangeAggregator", - "WatchTargetChange" + "VerifyMutation" ], "variables": [] }, - "sizeInBytes": 193662 + "sizeInBytes": 168953 }, "waitForPendingWrites": { "dependencies": { "functions": [ - "addToWritePipeline", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", "applyDeleteMutationToLocalView", @@ -9200,11 +8676,9 @@ "arrayEquals", "asCollectionQueryAtPath", "asNumber", - "assertPresent", "binaryStringFromUint8Array", "blobEquals", "boundEquals", - "canAddToWritePipeline", "canUseNetwork", "canonicalId", "canonifyArray", @@ -9220,7 +8694,6 @@ "canonifyTimestamp", "canonifyValue", "cast", - "cleanUpWatchStreamState", "coercedFieldValuesArray", "compareArrays", "compareBlobs", @@ -9236,44 +8709,22 @@ "debugCast", "decodeBase64", "disableNetworkInternal", - "disableNetworkUntilRecovery", "documentEntryMap", "documentKeySet", "documentMap", - "documentTargetMap", - "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueWaitForPendingWrites", "eventManagerOnOnlineStateChange", - "eventManagerOnWatchChange", - "eventManagerOnWatchError", - "executeWithRecovery", - "extractLocalPathFromResourceName", "fail", "fieldTransformEquals", - "fillWritePipeline", "filterEquals", "forEach", "formatJSON", - "fromBytes", - "fromName", - "fromResourceName", - "fromRpcStatus", - "fromTimestamp", - "fromVersion", - "fromWatchChange", - "fromWatchTargetChangeState", - "fromWriteResult", - "fromWriteResults", - "fullyQualifiedPrefixPath", "geoPointEquals", - "getEncodedDatabaseId", "getFirstOrderByField", "getHighestUnacknowledgedBatchId", "getInequalityFilterField", - "getLastRemoteSnapshotVersion", "getLocalWriteTime", "getLogLevel", "getMessageOrStack", @@ -9281,31 +8732,22 @@ "getOnlineComponentProvider", "getPostMutationVersion", "getSyncEngine", - "handleCredentialChange", - "handleTargetError", "handleUserChange", - "handleWriteError", "hardAssert", "hasLimitToFirst", "hasLimitToLast", "isArray", "isCollectionGroupQuery", "isDocumentQuery", - "isDocumentTarget", "isDouble", "isEmpty", "isIndexedDbTransactionError", "isInteger", "isMapValue", - "isNanValue", "isNegativeZero", "isNullOrUndefined", - "isNullValue", "isNumber", - "isPermanentError", - "isPermanentWriteError", "isServerTimestamp", - "isValidResourceName", "loadProtos", "localTransformResults", "logDebug", @@ -9320,14 +8762,11 @@ "newDatastore", "newEventManager", "newLocalStore", - "newPersistentWatchStream", - "newPersistentWriteStream", "newQueryComparator", "newRemoteStore", "newSerializer", "newSyncEngine", "newTarget", - "nextMutationBatch", "nodePromise", "normalizeByteString", "normalizeNumber", @@ -9337,13 +8776,6 @@ "numberEquals", "objectEquals", "objectSize", - "onMutationResult", - "onWatchStreamChange", - "onWatchStreamClose", - "onWatchStreamOpen", - "onWriteHandshakeComplete", - "onWriteStreamClose", - "onWriteStreamOpen", "orderByEquals", "patchDocument", "patchObject", @@ -9358,73 +8790,38 @@ "queryOrderBy", "queryToTarget", "raiseSnapshotsInSyncEvent", - "raiseWatchSnapshot", "randomBytes", "registerFirestore", "registerPendingWritesCallback", "rejectOutstandingPendingWritesCallbacks", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreShutdown", "removeComponents", "removeComponents$1", "requireDocument", "restartNetwork", - "sendUnwatchRequest", - "sendWatchRequest", "serverTimestamp", "serverTransformResults", "setOfflineComponentProvider", "setOnlineComponentProvider", - "shouldStartWatchStream", - "shouldStartWriteStream", - "snapshotChangesMap", "sortsBeforeDocument", - "startWatchStream", - "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "targetEquals", "targetIdSet", "timestampEquals", - "toBytes", - "toCursor", - "toDirection", - "toDocumentMask", - "toDocumentsTarget", "toDouble", - "toFieldPathReference", - "toFieldTransform", - "toFilter", - "toInt32Proto", "toInteger", - "toLabel", - "toListenRequestLabels", - "toMutation", - "toMutationDocument", - "toName", - "toOperatorName", - "toOrder", - "toPrecondition", - "toPropertyOrder", - "toQueryPath", - "toQueryTarget", - "toResourceName", - "toTarget", - "toTimestamp", - "toUnaryOrFieldFilter", - "toVersion", "transformObject", "transformOperationEquals", "typeOrder", "uint8ArrayFromBinaryString", "valueCompare", "valueEquals", - "verifyNotTerminated", - "versionFromListenResponse", "waitForPendingWrites", "wrapInUserErrorIfRecoverable" ], @@ -9442,14 +8839,10 @@ "DatastoreImpl", "Deferred", "DelayedOperation", - "DeleteMutation", "DocReference", "Document", "DocumentKey", - "DocumentWatchChange", "EventManagerImpl", - "ExistenceFilter", - "ExistenceFilterChange", "ExponentialBackoff", "FieldPath", "FirebaseCredentialsProvider", @@ -9479,8 +8872,6 @@ "MemoryTransaction", "Mutation", "MutationBatch", - "MutationBatchResult", - "MutationResult", "NoDocument", "NoopConnectivityMonitor", "NumericIncrementTransformOperation", @@ -9494,14 +8885,10 @@ "PatchMutation", "PersistencePromise", "PersistenceTransaction", - "PersistentListenStream", - "PersistentStream", - "PersistentWriteStream", "Precondition", "QueryImpl", "ReferenceSet", "RemoteDocumentChangeBuffer", - "RemoteEvent", "RemoteStoreImpl", "ResourcePath", "ServerTimestampTransform", @@ -9513,23 +8900,17 @@ "SortedSetIterator", "StreamBridge", "SyncEngineImpl", - "TargetChange", - "TargetData", "TargetIdGenerator", "TargetImpl", - "TargetState", "Timestamp", "TransformMutation", "TransformOperation", "UnknownDocument", - "User", - "VerifyMutation", - "WatchChangeAggregator", - "WatchTargetChange" + "User" ], "variables": [] }, - "sizeInBytes": 167534 + "sizeInBytes": 127742 }, "where": { "dependencies": { @@ -9677,13 +9058,14 @@ ], "variables": [] }, - "sizeInBytes": 58429 + "sizeInBytes": 58527 }, "writeBatch": { "dependencies": { "functions": [ "acknowledgeBatch", "addMutationCallback", + "addNetworkStatusChangedHandler", "addToWritePipeline", "applyArrayRemoveTransformOperation", "applyArrayUnionTransformOperation", @@ -9708,7 +9090,6 @@ "arrayEquals", "asCollectionQueryAtPath", "asNumber", - "assertPresent", "binaryStringFromUint8Array", "blobEquals", "boundEquals", @@ -9728,7 +9109,6 @@ "canonifyTimestamp", "canonifyValue", "cast", - "cleanUpWatchStreamState", "coercedFieldValuesArray", "compareArrays", "compareBlobs", @@ -9749,20 +9129,17 @@ "documentEntryMap", "documentKeySet", "documentMap", - "documentTargetMap", "documentVersionMap", "emitNewSnapsAndNotifyLocalStore", "enableNetworkInternal", "encodeBase64", - "enqueueWrite", "ensureWriteCallbacks", + "ensureWriteStream", "errorMessage", "eventManagerOnOnlineStateChange", - "eventManagerOnWatchChange", - "eventManagerOnWatchError", "executeWithRecovery", + "executeWrite", "extractFieldMask", - "extractLocalPathFromResourceName", "extractMutationBaseValue", "extractTransformMutationBaseValue", "fail", @@ -9775,15 +9152,9 @@ "forEach", "formatJSON", "formatPlural", - "fromBytes", "fromDotSeparatedString", - "fromName", - "fromResourceName", - "fromRpcStatus", "fromTimestamp", "fromVersion", - "fromWatchChange", - "fromWatchTargetChangeState", "fromWriteResult", "fromWriteResults", "fullyQualifiedPrefixPath", @@ -9799,8 +9170,6 @@ "getOnlineComponentProvider", "getPostMutationVersion", "getSyncEngine", - "handleCredentialChange", - "handleTargetError", "handleUserChange", "handleWriteError", "hardAssert", @@ -9811,23 +9180,19 @@ "isArray", "isCollectionGroupQuery", "isDocumentQuery", - "isDocumentTarget", "isDouble", "isEmpty", "isIndexedDbTransactionError", "isInteger", "isMapValue", - "isNanValue", "isNegativeZero", "isNullOrUndefined", - "isNullValue", "isNumber", "isPermanentError", "isPermanentWriteError", "isPlainObject", "isSafeInteger", "isServerTimestamp", - "isValidResourceName", "isWrite", "loadProtos", "localTransformResults", @@ -9845,7 +9210,6 @@ "newDatastore", "newEventManager", "newLocalStore", - "newPersistentWatchStream", "newPersistentWriteStream", "newQueryComparator", "newQueryForPath", @@ -9865,9 +9229,6 @@ "objectEquals", "objectSize", "onMutationResult", - "onWatchStreamChange", - "onWatchStreamClose", - "onWatchStreamOpen", "onWriteHandshakeComplete", "onWriteStreamClose", "onWriteStreamOpen", @@ -9895,67 +9256,46 @@ "queryOrderBy", "queryToTarget", "raiseSnapshotsInSyncEvent", - "raiseWatchSnapshot", "randomBytes", "registerFirestore", "rejectBatch", "rejectFailedWrite", "rejectOutstandingPendingWritesCallbacks", "remoteStoreApplyPrimaryState", - "remoteStoreEnableNetwork", "remoteStoreHandleCredentialChange", "remoteStoreShutdown", "removeComponents", "removeComponents$1", "requireDocument", "restartNetwork", - "sendUnwatchRequest", - "sendWatchRequest", "serverTimestamp", "serverTransformResults", "setOfflineComponentProvider", "setOnlineComponentProvider", - "shouldStartWatchStream", "shouldStartWriteStream", - "snapshotChangesMap", "sortsBeforeDocument", - "startWatchStream", "startWriteStream", "stringifyFilter", "stringifyOrderBy", "stringifyQuery", "stringifyTarget", + "syncEngineHandleCredentialChange", "syncEngineWrite", "targetEquals", "targetIdSet", "timestampEquals", "toBytes", - "toCursor", - "toDirection", "toDocumentMask", - "toDocumentsTarget", "toDouble", - "toFieldPathReference", "toFieldTransform", - "toFilter", - "toInt32Proto", "toInteger", - "toLabel", - "toListenRequestLabels", "toMutation", "toMutationDocument", "toName", "toNumber", - "toOperatorName", - "toOrder", "toPrecondition", - "toPropertyOrder", - "toQueryPath", - "toQueryTarget", "toResourceName", - "toTarget", "toTimestamp", - "toUnaryOrFieldFilter", "toVersion", "transformObject", "transformOperationEquals", @@ -9975,8 +9315,6 @@ "valueCompare", "valueDescription", "valueEquals", - "verifyNotTerminated", - "versionFromListenResponse", "wrapInUserErrorIfRecoverable", "writeBatch" ], @@ -10004,10 +9342,7 @@ "DocumentKey", "DocumentKeyReference", "DocumentReference", - "DocumentWatchChange", "EventManagerImpl", - "ExistenceFilter", - "ExistenceFilterChange", "ExponentialBackoff", "FieldMask", "FieldPath", @@ -10059,7 +9394,6 @@ "PatchMutation", "PersistencePromise", "PersistenceTransaction", - "PersistentListenStream", "PersistentStream", "PersistentWriteStream", "Precondition", @@ -10067,7 +9401,6 @@ "QueryImpl", "ReferenceSet", "RemoteDocumentChangeBuffer", - "RemoteEvent", "RemoteStoreImpl", "ResourcePath", "SerializableFieldValue", @@ -10080,11 +9413,8 @@ "SortedSetIterator", "StreamBridge", "SyncEngineImpl", - "TargetChange", - "TargetData", "TargetIdGenerator", "TargetImpl", - "TargetState", "Timestamp", "TransformMutation", "TransformOperation", @@ -10092,12 +9422,10 @@ "User", "UserDataReader", "VerifyMutation", - "WatchChangeAggregator", - "WatchTargetChange", "WriteBatch" ], "variables": [] }, - "sizeInBytes": 197329 + "sizeInBytes": 172600 } } \ No newline at end of file diff --git a/packages/firestore/exp/src/api/database.ts b/packages/firestore/exp/src/api/database.ts index ecbc25a289d..385799e5dc4 100644 --- a/packages/firestore/exp/src/api/database.ts +++ b/packages/firestore/exp/src/api/database.ts @@ -51,7 +51,6 @@ import { setOfflineComponentProvider, setOnlineComponentProvider } from './components'; - import { DEFAULT_HOST, DEFAULT_SSL } from '../../../lite/src/api/components'; import { DatabaseInfo } from '../../../src/core/database_info'; import { AutoId } from '../../../src/util/misc'; @@ -209,9 +208,14 @@ export function enableIndexedDbPersistence( // `getOnlineComponentProvider()` const settings = firestoreImpl._getSettings(); - return firestoreImpl._queue.enqueue(() => + const onlineComponentProvider = new OnlineComponentProvider(); + const offlineComponentProvider = new IndexedDbOfflineComponentProvider( + onlineComponentProvider + ); + + return firestoreImpl._queue.enqueue(async () => { // TODO(firestoreexp): Add forceOwningTab - setOfflineComponentProvider( + await setOfflineComponentProvider( firestoreImpl, { durable: true, @@ -220,9 +224,10 @@ export function enableIndexedDbPersistence( settings.cacheSizeBytes || LruParams.DEFAULT_CACHE_SIZE_BYTES, forceOwningTab: false }, - new IndexedDbOfflineComponentProvider() - ) - ); + offlineComponentProvider + ); + await setOnlineComponentProvider(firestoreImpl, onlineComponentProvider); + }); } export function enableMultiTabIndexedDbPersistence( diff --git a/packages/firestore/lite/src/api/database.ts b/packages/firestore/lite/src/api/database.ts index 5075b95f3e1..532075bc020 100644 --- a/packages/firestore/lite/src/api/database.ts +++ b/packages/firestore/lite/src/api/database.ts @@ -113,12 +113,6 @@ export class Firestore removeComponents(this); return Promise.resolve(); } - - // TODO(firestoreexp): `deleteApp()` should call the delete method above, - // but it still calls INTERNAL.delete(). - INTERNAL = { - delete: () => this._delete() - }; } export function initializeFirestore( diff --git a/packages/firestore/src/core/component_provider.ts b/packages/firestore/src/core/component_provider.ts index aa05d5c4680..6ee568da187 100644 --- a/packages/firestore/src/core/component_provider.ts +++ b/packages/firestore/src/core/component_provider.ts @@ -33,23 +33,19 @@ import { applyPrimaryState, applyTargetState, getActiveClients, - handleCredentialChange, + syncEngineHandleCredentialChange, newSyncEngine, - SyncEngine + SyncEngine, + ensureWriteCallbacks } from './sync_engine'; import { + fillWritePipeline, newRemoteStore, RemoteStore, remoteStoreApplyPrimaryState, remoteStoreShutdown } from '../remote/remote_store'; -import { - EventManager, - newEventManager, - eventManagerOnOnlineStateChange, - eventManagerOnWatchChange, - eventManagerOnWatchError -} from './event_manager'; +import { EventManager, newEventManager } from './event_manager'; import { AsyncQueue } from '../util/async_queue'; import { DatabaseId, DatabaseInfo } from './database_info'; import { Datastore, newDatastore } from '../remote/datastore'; @@ -185,9 +181,21 @@ export class IndexedDbOfflineComponentProvider extends MemoryOfflineComponentPro localStore!: LocalStore; gcScheduler!: GarbageCollectionScheduler | null; + constructor( + protected readonly onlineComponentProvider: OnlineComponentProvider + ) { + super(); + } + async initialize(cfg: ComponentConfiguration): Promise { await super.initialize(cfg); await synchronizeLastDocumentChangeReadTime(this.localStore); + + await this.onlineComponentProvider.initialize(this, cfg); + + // Enqueue writes from a previous session + await ensureWriteCallbacks(this.onlineComponentProvider.syncEngine); + await fillWritePipeline(this.onlineComponentProvider.remoteStore); } createGarbageCollectionScheduler( @@ -246,16 +254,9 @@ export class IndexedDbOfflineComponentProvider extends MemoryOfflineComponentPro * `synchronizeTabs` will be enabled. */ export class MultiTabOfflineComponentProvider extends IndexedDbOfflineComponentProvider { - constructor( - private readonly onlineComponentProvider: OnlineComponentProvider - ) { - super(); - } - async initialize(cfg: ComponentConfiguration): Promise { await super.initialize(cfg); - await this.onlineComponentProvider.initialize(this, cfg); const syncEngine = this.onlineComponentProvider.syncEngine; if (this.sharedClientState instanceof WebStorageSharedClientState) { @@ -342,17 +343,8 @@ export class OnlineComponentProvider { this.sharedClientState = offlineComponentProvider.sharedClientState; this.datastore = this.createDatastore(cfg); this.remoteStore = this.createRemoteStore(cfg); - this.syncEngine = this.createSyncEngine(cfg); this.eventManager = this.createEventManager(cfg); - - this.syncEngine.subscribe({ - onWatchChange: eventManagerOnWatchChange.bind(null, this.eventManager), - onWatchError: eventManagerOnWatchError.bind(null, this.eventManager), - onOnlineStateChange: eventManagerOnOnlineStateChange.bind( - null, - this.eventManager - ) - }); + this.syncEngine = this.createSyncEngine(cfg); this.sharedClientState.onlineStateHandler = onlineState => applyOnlineStateChange( @@ -361,7 +353,7 @@ export class OnlineComponentProvider { OnlineStateSource.SharedClientState ); - this.remoteStore.remoteSyncer.handleCredentialChange = handleCredentialChange.bind( + this.remoteStore.remoteSyncer.handleCredentialChange = syncEngineHandleCredentialChange.bind( null, this.syncEngine ); @@ -401,6 +393,7 @@ export class OnlineComponentProvider { return newSyncEngine( this.localStore, this.remoteStore, + this.eventManager, this.sharedClientState, cfg.initialUser, cfg.maxConcurrentLimboResolutions, diff --git a/packages/firestore/src/core/sync_engine.ts b/packages/firestore/src/core/sync_engine.ts index 3fa2b211cec..c0c6a27526f 100644 --- a/packages/firestore/src/core/sync_engine.ts +++ b/packages/firestore/src/core/sync_engine.ts @@ -96,6 +96,12 @@ import { } from './view'; import { ViewSnapshot } from './view_snapshot'; import { wrapInUserErrorIfRecoverable } from '../util/async_queue'; +import { + EventManager, + eventManagerOnOnlineStateChange, + eventManagerOnWatchChange, + eventManagerOnWatchError +} from './event_manager'; const LOG_TAG = 'SyncEngine'; @@ -148,18 +154,15 @@ type ApplyDocChangesHandler = ( ) => Promise; /** - * Interface implemented by EventManager to handle notifications from + * Callbacks implemented by EventManager to handle notifications from * SyncEngine. */ -export interface SyncEngineListener { +interface SyncEngineListener { /** Handles new view snapshots. */ - onWatchChange(snapshots: ViewSnapshot[]): void; + onWatchChange?(snapshots: ViewSnapshot[]): void; /** Handles the failure of a query. */ - onWatchError(query: Query, error: FirestoreError): void; - - /** Handles a change in online state. */ - onOnlineStateChange(onlineState: OnlineState): void; + onWatchError?(query: Query, error: FirestoreError): void; } /** @@ -175,12 +178,13 @@ export interface SyncEngineListener { * * The SyncEngine’s methods should only ever be called by methods running in the * global async queue. + * + * PORTING NOTE: On Web, SyncEngine does not have an explicit subscribe() + * function. Instead, it directly depends on EventManager's tree-shakeable API + * (via `ensureWatchStream()`). */ export interface SyncEngine { isPrimaryClient: boolean; - - /** Subscribes to SyncEngine notifications. Has to be called exactly once. */ - subscribe(syncEngineListener: SyncEngineListener): void; } /** @@ -197,7 +201,7 @@ export interface SyncEngine { * functions, such that they are tree-shakeable. */ class SyncEngineImpl implements SyncEngine { - syncEngineListener: SyncEngineListener | null = null; + syncEngineListener: SyncEngineListener = {}; /** * A callback that updates the QueryView based on the provided change. @@ -249,6 +253,7 @@ class SyncEngineImpl implements SyncEngine { constructor( readonly localStore: LocalStore, readonly remoteStore: RemoteStore, + readonly eventManager: EventManager, // PORTING NOTE: Manages state synchronization in multi-tab environments. readonly sharedClientState: SharedClientState, public currentUser: User, @@ -258,31 +263,12 @@ class SyncEngineImpl implements SyncEngine { get isPrimaryClient(): boolean { return this._isPrimaryClient === true; } - - subscribe(syncEngineListener: SyncEngineListener): void { - debugAssert( - syncEngineListener !== null, - 'SyncEngine listener cannot be null' - ); - debugAssert( - this.syncEngineListener === null, - 'SyncEngine already has a subscriber.' - ); - - this.syncEngineListener = syncEngineListener; - } - - assertSubscribed(fnName: string): void { - debugAssert( - this.syncEngineListener !== null, - 'Trying to call ' + fnName + ' before calling subscribe().' - ); - } } export function newSyncEngine( localStore: LocalStore, remoteStore: RemoteStore, + eventManager: EventManager, // PORTING NOTE: Manages state synchronization in multi-tab environments. sharedClientState: SharedClientState, currentUser: User, @@ -292,6 +278,7 @@ export function newSyncEngine( const syncEngine = new SyncEngineImpl( localStore, remoteStore, + eventManager, sharedClientState, currentUser, maxConcurrentLimboResolutions @@ -312,7 +299,6 @@ export async function syncEngineListen( query: Query ): Promise { const syncEngineImpl = ensureWatchCallbacks(syncEngine); - syncEngineImpl.assertSubscribed('listen()'); let targetId; let viewSnapshot; @@ -409,8 +395,6 @@ export async function syncEngineUnlisten( query: Query ): Promise { const syncEngineImpl = debugCast(syncEngine, SyncEngineImpl); - syncEngineImpl.assertSubscribed('unlisten()'); - const queryView = syncEngineImpl.queryViewsByQuery.get(query)!; debugAssert( !!queryView, @@ -477,7 +461,6 @@ export async function syncEngineWrite( userCallback: Deferred ): Promise { const syncEngineImpl = ensureWriteCallbacks(syncEngine); - syncEngineImpl.assertSubscribed('write()'); try { const result = await localWrite(syncEngineImpl.localStore, batch); @@ -503,7 +486,7 @@ export async function applyRemoteEvent( remoteEvent: RemoteEvent ): Promise { const syncEngineImpl = debugCast(syncEngine, SyncEngineImpl); - syncEngineImpl.assertSubscribed('applyRemoteEvent()'); + try { const changes = await applyRemoteEventToLocalCache( syncEngineImpl.localStore, @@ -568,7 +551,6 @@ export function applyOnlineStateChange( (!syncEngineImpl.isPrimaryClient && source === OnlineStateSource.SharedClientState) ) { - syncEngineImpl.assertSubscribed('applyOnlineStateChange()'); const newViewSnapshots = [] as ViewSnapshot[]; syncEngineImpl.queryViewsByQuery.forEach((query, queryView) => { const viewChange = queryView.view.applyOnlineStateChange(onlineState); @@ -580,8 +562,17 @@ export function applyOnlineStateChange( newViewSnapshots.push(viewChange.snapshot); } }); - syncEngineImpl.syncEngineListener!.onOnlineStateChange(onlineState); - syncEngineImpl.syncEngineListener!.onWatchChange(newViewSnapshots); + + eventManagerOnOnlineStateChange(syncEngineImpl.eventManager, onlineState); + + if (newViewSnapshots.length) { + debugAssert( + !!syncEngineImpl.syncEngineListener.onWatchChange, + 'Active views but EventManager callbacks are not assigned' + ); + syncEngineImpl.syncEngineListener.onWatchChange(newViewSnapshots); + } + syncEngineImpl.onlineState = onlineState; if (syncEngineImpl.isPrimaryClient) { syncEngineImpl.sharedClientState.setOnlineState(onlineState); @@ -606,7 +597,6 @@ export async function rejectListen( err: FirestoreError ): Promise { const syncEngineImpl = debugCast(syncEngine, SyncEngineImpl); - syncEngineImpl.assertSubscribed('rejectListens()'); // PORTING NOTE: Multi-tab only. syncEngineImpl.sharedClientState.updateQueryState(targetId, 'rejected', err); @@ -667,8 +657,6 @@ export async function applySuccessfulWrite( mutationBatchResult: MutationBatchResult ): Promise { const syncEngineImpl = debugCast(syncEngine, SyncEngineImpl); - syncEngineImpl.assertSubscribed('applySuccessfulWrite()'); - const batchId = mutationBatchResult.batch.batchId; try { @@ -700,7 +688,6 @@ export async function rejectFailedWrite( error: FirestoreError ): Promise { const syncEngineImpl = debugCast(syncEngine, SyncEngineImpl); - syncEngineImpl.assertSubscribed('rejectFailedWrite()'); try { const changes = await rejectBatch(syncEngineImpl.localStore, batchId); @@ -861,7 +848,7 @@ function removeAndCleanupTarget( for (const query of syncEngineImpl.queriesByTarget.get(targetId)!) { syncEngineImpl.queryViewsByQuery.delete(query); if (error) { - syncEngineImpl.syncEngineListener!.onWatchError(query, error); + syncEngineImpl.syncEngineListener.onWatchError!(query, error); } } @@ -1005,6 +992,11 @@ export async function emitNewSnapsAndNotifyLocalStore( const docChangesInAllViews: LocalViewChanges[] = []; const queriesProcessed: Array> = []; + if (syncEngineImpl.queryViewsByQuery.isEmpty()) { + // Return early since `onWatchChange()` might not have been assigned yet. + return; + } + syncEngineImpl.queryViewsByQuery.forEach((_, queryView) => { debugAssert( !!syncEngineImpl.applyDocChanges, @@ -1033,7 +1025,7 @@ export async function emitNewSnapsAndNotifyLocalStore( }); await Promise.all(queriesProcessed); - syncEngineImpl.syncEngineListener!.onWatchChange(newSnaps); + syncEngineImpl.syncEngineListener.onWatchChange!(newSnaps); await notifyLocalViewChanges(syncEngineImpl.localStore, docChangesInAllViews); } @@ -1072,7 +1064,7 @@ async function applyDocChanges( return viewChange.snapshot; } -export async function handleCredentialChange( +export async function syncEngineHandleCredentialChange( syncEngine: SyncEngine, user: User ): Promise { @@ -1167,7 +1159,6 @@ export async function applyBatchState( error?: FirestoreError ): Promise { const syncEngineImpl = debugCast(syncEngine, SyncEngineImpl); - syncEngineImpl.assertSubscribed('applyBatchState()'); const documents = await lookupMutationDocuments( syncEngineImpl.localStore, batchId @@ -1346,7 +1337,7 @@ async function synchronizeQueryViewsAndRaiseSnapshots( activeQueries.push(targetData!); } - syncEngineImpl.syncEngineListener!.onWatchChange(newViewSnapshots); + syncEngineImpl.syncEngineListener.onWatchChange!(newViewSnapshots); return activeQueries; } @@ -1493,10 +1484,18 @@ function ensureWatchCallbacks(syncEngine: SyncEngine): SyncEngineImpl { null, syncEngineImpl ); + syncEngineImpl.syncEngineListener.onWatchChange = eventManagerOnWatchChange.bind( + null, + syncEngineImpl.eventManager + ); + syncEngineImpl.syncEngineListener.onWatchError = eventManagerOnWatchError.bind( + null, + syncEngineImpl.eventManager + ); return syncEngineImpl; } -function ensureWriteCallbacks(syncEngine: SyncEngine): SyncEngineImpl { +export function ensureWriteCallbacks(syncEngine: SyncEngine): SyncEngineImpl { const syncEngineImpl = debugCast(syncEngine, SyncEngineImpl); syncEngineImpl.remoteStore.remoteSyncer.applySuccessfulWrite = applySuccessfulWrite.bind( null, diff --git a/packages/firestore/src/local/simple_db.ts b/packages/firestore/src/local/simple_db.ts index 9420f2a8f0f..2118b877593 100644 --- a/packages/firestore/src/local/simple_db.ts +++ b/packages/firestore/src/local/simple_db.ts @@ -325,8 +325,9 @@ export class SimpleDb { attemptNumber < TRANSACTION_RETRY_COUNT; logDebug( LOG_TAG, - 'Transaction failed with error: %s. Retrying: %s.', + 'Transaction failed with error:', error.message, + 'Retrying:', retryable ); diff --git a/packages/firestore/src/remote/remote_store.ts b/packages/firestore/src/remote/remote_store.ts index 96e56995567..9ce2f408f92 100644 --- a/packages/firestore/src/remote/remote_store.ts +++ b/packages/firestore/src/remote/remote_store.ts @@ -104,15 +104,11 @@ export interface RemoteStore { * immediately after construction. */ remoteSyncer: RemoteSyncer; - - /** - * Starts up the remote store, creating streams, restoring state from - * LocalStore, etc. - */ - start(): Promise; } class RemoteStoreImpl implements RemoteStore { + remoteSyncer: RemoteSyncer = {}; + /** * A list of up to MAX_PENDING_WRITES writes that we have fetched from the * LocalStore via fillWritePipeline() and have or will send to the write @@ -144,9 +140,9 @@ class RemoteStoreImpl implements RemoteStore { listenTargets = new Map(); connectivityMonitor: ConnectivityMonitor; - watchStream: PersistentListenStream; - writeStream: PersistentWriteStream; - watchChangeAggregator: WatchChangeAggregator | null = null; + watchStream?: PersistentListenStream; + writeStream?: PersistentWriteStream; + watchChangeAggregator?: WatchChangeAggregator; /** * A set of reasons for why the RemoteStore may be offline. If empty, the @@ -154,6 +150,15 @@ class RemoteStoreImpl implements RemoteStore { */ offlineCauses = new Set(); + /** + * Event handlers that get called when the network is disabled or enabled. + * + * PORTING NOTE: These functions are used on the Web client to create the + * underlying streams (to support tree-shakeable streams). On Android and iOS, + * the streams are created during construction of RemoteStore. + */ + onNetworkStatusChange: Array<(enabled: boolean) => Promise> = []; + onlineStateTracker: OnlineStateTracker; constructor( @@ -187,26 +192,6 @@ class RemoteStoreImpl implements RemoteStore { asyncQueue, onlineStateHandler ); - - // Create streams (but note they're not started yet). - this.watchStream = newPersistentWatchStream(this.datastore, asyncQueue, { - onOpen: onWatchStreamOpen.bind(null, this), - onClose: onWatchStreamClose.bind(null, this), - onWatchChange: onWatchStreamChange.bind(null, this) - }); - - this.writeStream = newPersistentWriteStream(this.datastore, asyncQueue, { - onOpen: onWriteStreamOpen.bind(null, this), - onClose: onWriteStreamClose.bind(null, this), - onHandshakeComplete: onWriteHandshakeComplete.bind(null, this), - onMutationResult: onMutationResult.bind(null, this) - }); - } - - remoteSyncer: RemoteSyncer = {}; - - start(): Promise { - return remoteStoreEnableNetwork(this); } } @@ -239,14 +224,9 @@ async function enableNetworkInternal( remoteStoreImpl: RemoteStoreImpl ): Promise { if (canUseNetwork(remoteStoreImpl)) { - if (shouldStartWatchStream(remoteStoreImpl)) { - startWatchStream(remoteStoreImpl); - } else { - remoteStoreImpl.onlineStateTracker.set(OnlineState.Unknown); + for (const networkStatusHandler of remoteStoreImpl.onNetworkStatusChange) { + await networkStatusHandler(/* enabled= */ true); } - - // This will start the write stream if necessary. - await fillWritePipeline(remoteStoreImpl); } } @@ -268,18 +248,9 @@ export async function remoteStoreDisableNetwork( async function disableNetworkInternal( remoteStoreImpl: RemoteStoreImpl ): Promise { - await remoteStoreImpl.writeStream.stop(); - await remoteStoreImpl.watchStream.stop(); - - if (remoteStoreImpl.writePipeline.length > 0) { - logDebug( - LOG_TAG, - `Stopping write stream with ${remoteStoreImpl.writePipeline.length} pending writes` - ); - remoteStoreImpl.writePipeline = []; + for (const networkStatusHandler of remoteStoreImpl.onNetworkStatusChange) { + await networkStatusHandler(/* enabled= */ false); } - - cleanUpWatchStreamState(remoteStoreImpl); } export async function remoteStoreShutdown( @@ -316,7 +287,7 @@ export function remoteStoreListen( if (shouldStartWatchStream(remoteStoreImpl)) { // The listen will be sent in onWatchStreamOpen startWatchStream(remoteStoreImpl); - } else if (remoteStoreImpl.watchStream.isOpen()) { + } else if (ensureWatchStream(remoteStoreImpl).isOpen()) { sendWatchRequest(remoteStoreImpl, targetData); } } @@ -330,6 +301,7 @@ export function remoteStoreUnlisten( targetId: TargetId ): void { const remoteStoreImpl = debugCast(remoteStore, RemoteStoreImpl); + const watchStream = ensureWatchStream(remoteStoreImpl); debugAssert( remoteStoreImpl.listenTargets.has(targetId), @@ -337,13 +309,13 @@ export function remoteStoreUnlisten( ); remoteStoreImpl.listenTargets.delete(targetId); - if (remoteStoreImpl.watchStream.isOpen()) { + if (watchStream.isOpen()) { sendUnwatchRequest(remoteStoreImpl, targetId); } if (remoteStoreImpl.listenTargets.size === 0) { - if (remoteStoreImpl.watchStream.isOpen()) { - remoteStoreImpl.watchStream.markIdle(); + if (watchStream.isOpen()) { + watchStream.markIdle(); } else if (canUseNetwork(remoteStoreImpl)) { // Revert to OnlineState.Unknown if the watch stream is not open and we // have no listeners, since without any listens to send we cannot @@ -364,7 +336,7 @@ function sendWatchRequest( remoteStoreImpl.watchChangeAggregator!.recordPendingTargetRequest( targetData.targetId ); - remoteStoreImpl.watchStream.watch(targetData); + ensureWatchStream(remoteStoreImpl).watch(targetData); } /** @@ -377,7 +349,7 @@ function sendUnwatchRequest( targetId: TargetId ): void { remoteStoreImpl.watchChangeAggregator!.recordPendingTargetRequest(targetId); - remoteStoreImpl.watchStream.unwatch(targetId); + ensureWatchStream(remoteStoreImpl).unwatch(targetId); } function startWatchStream(remoteStoreImpl: RemoteStoreImpl): void { @@ -396,7 +368,7 @@ function startWatchStream(remoteStoreImpl: RemoteStoreImpl): void { getTargetDataForTarget: targetId => remoteStoreImpl.listenTargets.get(targetId) || null }); - remoteStoreImpl.watchStream.start(); + ensureWatchStream(remoteStoreImpl).start(); remoteStoreImpl.onlineStateTracker.handleWatchStreamStart(); } @@ -407,7 +379,7 @@ function startWatchStream(remoteStoreImpl: RemoteStoreImpl): void { function shouldStartWatchStream(remoteStoreImpl: RemoteStoreImpl): boolean { return ( canUseNetwork(remoteStoreImpl) && - !remoteStoreImpl.watchStream.isStarted() && + !ensureWatchStream(remoteStoreImpl).isStarted() && remoteStoreImpl.listenTargets.size > 0 ); } @@ -418,7 +390,7 @@ export function canUseNetwork(remoteStore: RemoteStore): boolean { } function cleanUpWatchStreamState(remoteStoreImpl: RemoteStoreImpl): void { - remoteStoreImpl.watchChangeAggregator = null; + remoteStoreImpl.watchChangeAggregator = undefined; } async function onWatchStreamOpen( @@ -679,6 +651,7 @@ export async function fillWritePipeline( remoteStore: RemoteStore ): Promise { const remoteStoreImpl = debugCast(remoteStore, RemoteStoreImpl); + const writeStream = ensureWriteStream(remoteStoreImpl); let lastBatchIdRetrieved = remoteStoreImpl.writePipeline.length > 0 @@ -695,7 +668,7 @@ export async function fillWritePipeline( if (batch === null) { if (remoteStoreImpl.writePipeline.length === 0) { - remoteStoreImpl.writeStream.markIdle(); + writeStream.markIdle(); } break; } else { @@ -743,18 +716,16 @@ function addToWritePipeline( ); remoteStoreImpl.writePipeline.push(batch); - if ( - remoteStoreImpl.writeStream.isOpen() && - remoteStoreImpl.writeStream.handshakeComplete - ) { - remoteStoreImpl.writeStream.writeMutations(batch.mutations); + const writeStream = ensureWriteStream(remoteStoreImpl); + if (writeStream.isOpen() && writeStream.handshakeComplete) { + writeStream.writeMutations(batch.mutations); } } function shouldStartWriteStream(remoteStoreImpl: RemoteStoreImpl): boolean { return ( canUseNetwork(remoteStoreImpl) && - !remoteStoreImpl.writeStream.isStarted() && + !ensureWriteStream(remoteStoreImpl).isStarted() && remoteStoreImpl.writePipeline.length > 0 ); } @@ -764,21 +735,22 @@ function startWriteStream(remoteStoreImpl: RemoteStoreImpl): void { shouldStartWriteStream(remoteStoreImpl), 'startWriteStream() called when shouldStartWriteStream() is false.' ); - remoteStoreImpl.writeStream.start(); + ensureWriteStream(remoteStoreImpl).start(); } async function onWriteStreamOpen( remoteStoreImpl: RemoteStoreImpl ): Promise { - remoteStoreImpl.writeStream.writeHandshake(); + ensureWriteStream(remoteStoreImpl).writeHandshake(); } async function onWriteHandshakeComplete( remoteStoreImpl: RemoteStoreImpl ): Promise { + const writeStream = ensureWriteStream(remoteStoreImpl); // Send the write pipeline now that the stream is established. for (const batch of remoteStoreImpl.writePipeline) { - remoteStoreImpl.writeStream.writeMutations(batch.mutations); + writeStream.writeMutations(batch.mutations); } } @@ -824,7 +796,7 @@ async function onWriteStreamClose( // If the write stream closed after the write handshake completes, a write // operation failed and we fail the pending operation. - if (error && remoteStoreImpl.writeStream.handshakeComplete) { + if (error && ensureWriteStream(remoteStoreImpl).handshakeComplete) { // This error affects the actual write. await handleWriteError(remoteStoreImpl, error!); } @@ -850,7 +822,7 @@ async function handleWriteError( // In this case it's also unlikely that the server itself is melting // down -- this was just a bad request so inhibit backoff on the next // restart. - remoteStoreImpl.writeStream.inhibitBackoff(); + ensureWriteStream(remoteStoreImpl).inhibitBackoff(); debugAssert( !!remoteStoreImpl.remoteSyncer.rejectFailedWrite, @@ -872,8 +844,6 @@ async function restartNetwork(remoteStore: RemoteStore): Promise { const remoteStoreImpl = debugCast(remoteStore, RemoteStoreImpl); remoteStoreImpl.offlineCauses.add(OfflineCause.ConnectivityChange); await disableNetworkInternal(remoteStoreImpl); - remoteStoreImpl.writeStream.inhibitBackoff(); - remoteStoreImpl.watchStream.inhibitBackoff(); remoteStoreImpl.onlineStateTracker.set(OnlineState.Unknown); remoteStoreImpl.offlineCauses.delete(OfflineCause.ConnectivityChange); await enableNetworkInternal(remoteStoreImpl); @@ -924,3 +894,99 @@ export async function remoteStoreApplyPrimaryState( remoteStoreImpl.onlineStateTracker.set(OnlineState.Unknown); } } + +/** + * If not yet initialized, registers the WatchStream and its network state + * callback with `remoteStoreImpl`. Returns the existing stream if one is + * already available. + * + * PORTING NOTE: On iOS and Android, the WatchStream gets registered on startup. + * This is not done on Web to allow it to be tree-shaken. + */ +function ensureWatchStream( + remoteStoreImpl: RemoteStoreImpl +): PersistentListenStream { + if (!remoteStoreImpl.watchStream) { + // Create stream (but note that it is not started yet). + remoteStoreImpl.watchStream = newPersistentWatchStream( + remoteStoreImpl.datastore, + remoteStoreImpl.asyncQueue, + { + onOpen: onWatchStreamOpen.bind(null, remoteStoreImpl), + onClose: onWatchStreamClose.bind(null, remoteStoreImpl), + onWatchChange: onWatchStreamChange.bind(null, remoteStoreImpl) + } + ); + + remoteStoreImpl.onNetworkStatusChange.push(async enabled => { + if (enabled) { + remoteStoreImpl.watchStream!.inhibitBackoff(); + if (shouldStartWatchStream(remoteStoreImpl)) { + startWatchStream(remoteStoreImpl); + } else { + remoteStoreImpl.onlineStateTracker.set(OnlineState.Unknown); + } + } else { + await remoteStoreImpl.watchStream!.stop(); + cleanUpWatchStreamState(remoteStoreImpl); + } + }); + } + + return remoteStoreImpl.watchStream; +} + +/** + * If not yet initialized, registers the WriteStream and its network state + * callback with `remoteStoreImpl`. Returns the existing stream if one is + * already available. + * + * PORTING NOTE: On iOS and Android, the WriteStream gets registered on startup. + * This is not done on Web to allow it to be tree-shaken. + */ +function ensureWriteStream( + remoteStoreImpl: RemoteStoreImpl +): PersistentWriteStream { + if (!remoteStoreImpl.writeStream) { + debugAssert( + remoteStoreImpl.writePipeline.length === 0, + 'Should not issue writes before WriteStream is enabled' + ); + + // Create stream (but note that it is not started yet). + remoteStoreImpl.writeStream = newPersistentWriteStream( + remoteStoreImpl.datastore, + remoteStoreImpl.asyncQueue, + { + onOpen: onWriteStreamOpen.bind(null, remoteStoreImpl), + onClose: onWriteStreamClose.bind(null, remoteStoreImpl), + onHandshakeComplete: onWriteHandshakeComplete.bind( + null, + remoteStoreImpl + ), + onMutationResult: onMutationResult.bind(null, remoteStoreImpl) + } + ); + + remoteStoreImpl.onNetworkStatusChange.push(async enabled => { + if (enabled) { + remoteStoreImpl.writeStream!.inhibitBackoff(); + + // This will start the write stream if necessary. + await fillWritePipeline(remoteStoreImpl); + } else { + await remoteStoreImpl.writeStream!.stop(); + + if (remoteStoreImpl.writePipeline.length > 0) { + logDebug( + LOG_TAG, + `Stopping write stream with ${remoteStoreImpl.writePipeline.length} pending writes` + ); + remoteStoreImpl.writePipeline = []; + } + } + }); + } + + return remoteStoreImpl.writeStream; +} diff --git a/packages/firestore/test/integration/api/database.test.ts b/packages/firestore/test/integration/api/database.test.ts index 4c1f7993777..aa549b6fe64 100644 --- a/packages/firestore/test/integration/api/database.test.ts +++ b/packages/firestore/test/integration/api/database.test.ts @@ -1068,6 +1068,37 @@ apiDescribe('Database', (persistence: boolean) => { }); }); + // eslint-disable-next-line no-restricted-properties + (persistence ? it : it.skip)('offline writes are sent after restart', () => { + return withTestDoc(persistence, async docRef => { + const firestore = docRef.firestore; + + const app = firestore.app; + const name = app.name; + const options = app.options; + + await firestore.disableNetwork(); + + // We are merely adding to the cache. + // eslint-disable-next-line @typescript-eslint/no-floating-promises + docRef.set({ foo: 'bar' }); + + await app.delete(); + + const firestore2 = newTestFirestore( + options.projectId, + name, + DEFAULT_SETTINGS + ); + await firestore2.enablePersistence(); + await firestore2.waitForPendingWrites(); + const doc = await firestore2.doc(docRef.path).get(); + + expect(doc.exists).to.be.true; + expect(doc.metadata.hasPendingWrites).to.be.false; + }); + }); + it('rejects subsequent method calls after terminate() is called', async () => { return withTestDb(persistence, db => { return db.INTERNAL.delete().then(() => {