@firebase/firestore 4.4.0-canary.537d39982 → 4.4.0-canary.6ea51fbfa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/firestore/src/core/firestore_client.d.ts +1 -1
  2. package/dist/firestore/src/global_index.d.ts +1 -1
  3. package/dist/firestore/src/local/indexeddb_index_manager.d.ts +1 -2
  4. package/dist/firestore/src/local/local_serializer.d.ts +1 -2
  5. package/dist/index.cjs.js +20 -20
  6. package/dist/index.cjs.js.map +1 -1
  7. package/dist/index.esm2017.js +20 -20
  8. package/dist/index.esm2017.js.map +1 -1
  9. package/dist/index.esm5.js +41 -52
  10. package/dist/index.esm5.js.map +1 -1
  11. package/dist/index.node.cjs.js +16 -19
  12. package/dist/index.node.cjs.js.map +1 -1
  13. package/dist/index.node.mjs +16 -19
  14. package/dist/index.node.mjs.map +1 -1
  15. package/dist/index.rn.js +20 -20
  16. package/dist/index.rn.js.map +1 -1
  17. package/dist/internal.d.ts +1 -1
  18. package/dist/lite/firestore/src/core/firestore_client.d.ts +1 -1
  19. package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +1 -2
  20. package/dist/lite/firestore/src/local/local_serializer.d.ts +1 -2
  21. package/dist/lite/index.browser.esm2017.js +2 -2
  22. package/dist/lite/index.browser.esm5.js +2 -2
  23. package/dist/lite/index.cjs.js +2 -2
  24. package/dist/lite/index.node.cjs.js +2 -2
  25. package/dist/lite/index.node.mjs +2 -2
  26. package/dist/lite/index.rn.esm2017.js +2 -2
  27. package/dist/lite/packages/firestore/src/core/firestore_client.d.ts +1 -1
  28. package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +1 -2
  29. package/dist/lite/packages/firestore/src/local/local_serializer.d.ts +1 -2
  30. package/dist/packages/firestore/dist/index.esm2017.d.ts +0 -1
  31. package/dist/packages/firestore/src/core/firestore_client.d.ts +1 -1
  32. package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +1 -2
  33. package/dist/packages/firestore/src/local/local_serializer.d.ts +1 -2
  34. package/dist/private.d.ts +1 -1
  35. package/package.json +9 -9
@@ -34,7 +34,7 @@ var grpc__namespace = /*#__PURE__*/_interopNamespace(grpc);
34
34
  var protoLoader__namespace = /*#__PURE__*/_interopNamespace(protoLoader);
35
35
 
36
36
  const name = "@firebase/firestore";
37
- const version$1 = "4.4.0-canary.537d39982";
37
+ const version$1 = "4.4.0-canary.6ea51fbfa";
38
38
 
39
39
  /**
40
40
  * @license
@@ -87,7 +87,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
87
87
  User.FIRST_PARTY = new User('first-party-uid');
88
88
  User.MOCK_USER = new User('mock-user');
89
89
 
90
- const version = "10.7.1-canary.537d39982";
90
+ const version = "10.7.1-canary.6ea51fbfa";
91
91
 
92
92
  /**
93
93
  * @license
@@ -2637,7 +2637,7 @@ function checkForAndReportiOSError(error) {
2637
2637
  return error;
2638
2638
  }
2639
2639
 
2640
- const LOG_TAG$h = 'IndexBackiller';
2640
+ const LOG_TAG$h = 'IndexBackfiller';
2641
2641
  /** How long we wait to try running index backfill after SDK initialization. */
2642
2642
  const INITIAL_BACKFILL_DELAY_MS = 15 * 1000;
2643
2643
  /** Minimum amount of time between backfill checks, after the first one. */
@@ -10173,10 +10173,10 @@ function fromDbIndexConfiguration(index, state) {
10173
10173
  const decodedSegments = index.fields.map(([fieldPath, kind]) => new IndexSegment(FieldPath$1.fromServerFormat(fieldPath), kind));
10174
10174
  return new FieldIndex(index.indexId, index.collectionGroup, decodedSegments, decodedState);
10175
10175
  }
10176
- function toDbIndexState(indexId, user, sequenceNumber, offset) {
10176
+ function toDbIndexState(indexId, uid, sequenceNumber, offset) {
10177
10177
  return {
10178
10178
  indexId,
10179
- uid: user.uid || '',
10179
+ uid,
10180
10180
  sequenceNumber,
10181
10181
  readTime: toDbTimestamp(offset.readTime),
10182
10182
  documentKey: encodeResourcePath(offset.documentKey.path),
@@ -11577,7 +11577,6 @@ const EMPTY_VALUE = new Uint8Array(0);
11577
11577
  */
11578
11578
  class IndexedDbIndexManager {
11579
11579
  constructor(user, databaseId) {
11580
- this.user = user;
11581
11580
  this.databaseId = databaseId;
11582
11581
  /**
11583
11582
  * An in-memory copy of the index entries we've already written since the SDK
@@ -11649,7 +11648,7 @@ class IndexedDbIndexManager {
11649
11648
  if (index.indexState) {
11650
11649
  const states = indexStateStore(transaction);
11651
11650
  return result.next(indexId => {
11652
- states.put(toDbIndexState(indexId, this.user, index.indexState.sequenceNumber, index.indexState.offset));
11651
+ states.put(toDbIndexState(indexId, this.uid, index.indexState.sequenceNumber, index.indexState.offset));
11653
11652
  });
11654
11653
  }
11655
11654
  else {
@@ -11960,7 +11959,7 @@ class IndexedDbIndexManager {
11960
11959
  const states = indexStateStore(transaction);
11961
11960
  return this.getNextSequenceNumber(transaction).next(nextSequenceNumber => indexes
11962
11961
  .loadAll(DbIndexConfigurationCollectionGroupIndex, IDBKeyRange.bound(collectionGroup, collectionGroup))
11963
- .next(configs => PersistencePromise.forEach(configs, (config) => states.put(toDbIndexState(config.indexId, this.user, nextSequenceNumber, offset)))));
11962
+ .next(configs => PersistencePromise.forEach(configs, (config) => states.put(toDbIndexState(config.indexId, this.uid, nextSequenceNumber, offset)))));
11964
11963
  }
11965
11964
  updateIndexEntries(transaction, documents) {
11966
11965
  // Porting Note: `getFieldIndexes()` on Web does not cache index lookups as
@@ -25771,10 +25770,10 @@ class MemoryOfflineComponentProvider {
25771
25770
  return new MemorySharedClientState();
25772
25771
  }
25773
25772
  async terminate() {
25774
- if (this.gcScheduler) {
25775
- this.gcScheduler.stop();
25776
- }
25777
- await this.sharedClientState.shutdown();
25773
+ var _a, _b;
25774
+ (_a = this.gcScheduler) === null || _a === void 0 ? void 0 : _a.stop();
25775
+ (_b = this.indexBackfillerScheduler) === null || _b === void 0 ? void 0 : _b.stop();
25776
+ this.sharedClientState.shutdown();
25778
25777
  await this.persistence.shutdown();
25779
25778
  }
25780
25779
  }
@@ -25944,10 +25943,9 @@ class OnlineComponentProvider {
25944
25943
  return newSyncEngine(this.localStore, this.remoteStore, this.eventManager, this.sharedClientState, cfg.initialUser, cfg.maxConcurrentLimboResolutions, startAsPrimary);
25945
25944
  }
25946
25945
  async terminate() {
25946
+ var _a;
25947
25947
  await remoteStoreShutdown(this.remoteStore);
25948
- if (this.datastore) {
25949
- await this.datastore.terminate();
25950
- }
25948
+ (_a = this.datastore) === null || _a === void 0 ? void 0 : _a.terminate();
25951
25949
  }
25952
25950
  }
25953
25951
 
@@ -26735,7 +26733,7 @@ class FirestoreClient {
26735
26733
  return this.appCheckCredentialListener(newAppCheckToken, this.user);
26736
26734
  });
26737
26735
  }
26738
- async getConfiguration() {
26736
+ get configuration() {
26739
26737
  return {
26740
26738
  asyncQueue: this.asyncQueue,
26741
26739
  databaseInfo: this.databaseInfo,
@@ -26790,7 +26788,7 @@ class FirestoreClient {
26790
26788
  async function setOfflineComponentProvider(client, offlineComponentProvider) {
26791
26789
  client.asyncQueue.verifyOperationInProgress();
26792
26790
  logDebug(LOG_TAG$2, 'Initializing OfflineComponentProvider');
26793
- const configuration = await client.getConfiguration();
26791
+ const configuration = client.configuration;
26794
26792
  await offlineComponentProvider.initialize(configuration);
26795
26793
  let currentUser = configuration.initialUser;
26796
26794
  client.setCredentialChangeListener(async (user) => {
@@ -26808,8 +26806,7 @@ async function setOnlineComponentProvider(client, onlineComponentProvider) {
26808
26806
  client.asyncQueue.verifyOperationInProgress();
26809
26807
  const offlineComponentProvider = await ensureOfflineComponents(client);
26810
26808
  logDebug(LOG_TAG$2, 'Initializing OnlineComponentProvider');
26811
- const configuration = await client.getConfiguration();
26812
- await onlineComponentProvider.initialize(offlineComponentProvider, configuration);
26809
+ await onlineComponentProvider.initialize(offlineComponentProvider, client.configuration);
26813
26810
  // The CredentialChangeListener of the online component provider takes
26814
26811
  // precedence over the offline component provider.
26815
26812
  client.setCredentialChangeListener(user => remoteStoreHandleCredentialChange(onlineComponentProvider.remoteStore, user));