@firebase/firestore 4.4.0-canary.093e022b9 → 4.4.0-canary.096542aa2

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.
@@ -32,7 +32,6 @@ import { PersistenceTransaction } from './persistence_transaction';
32
32
  * data as it supports multi-tab access.
33
33
  */
34
34
  export declare class IndexedDbIndexManager implements IndexManager {
35
- private user;
36
35
  private readonly databaseId;
37
36
  /**
38
37
  * An in-memory copy of the index entries we've already written since the SDK
@@ -42,7 +41,7 @@ export declare class IndexedDbIndexManager implements IndexManager {
42
41
  * used to satisfy reads.
43
42
  */
44
43
  private collectionParentsCache;
45
- private uid;
44
+ private readonly uid;
46
45
  /**
47
46
  * Maps from a target to its equivalent list of sub-targets. Each sub-target
48
47
  * contains only one term from the target's disjunctive normal form (DNF).
@@ -14,7 +14,6 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { User } from '../auth/user';
18
17
  import { BundleMetadata, NamedQuery } from '../core/bundle';
19
18
  import { Query } from '../core/query';
20
19
  import { SnapshotVersion } from '../core/snapshot_version';
@@ -78,4 +77,4 @@ export declare function toDbDocumentOverlay(localSerializer: LocalSerializer, us
78
77
  export declare function toDbDocumentOverlayKey(userId: string, docKey: DocumentKey): DbDocumentOverlayKey;
79
78
  export declare function toDbIndexConfiguration(index: FieldIndex): DbIndexConfiguration;
80
79
  export declare function fromDbIndexConfiguration(index: DbIndexConfiguration, state: DbIndexState | null): FieldIndex;
81
- export declare function toDbIndexState(indexId: number, user: User, sequenceNumber: number, offset: IndexOffset): DbIndexState;
80
+ export declare function toDbIndexState(indexId: number, uid: string, sequenceNumber: number, offset: IndexOffset): DbIndexState;
package/dist/index.cjs.js CHANGED
@@ -70,7 +70,7 @@ User.MOCK_USER = new User("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- let S = "10.7.1-canary.093e022b9";
73
+ let S = "10.7.1-canary.096542aa2";
74
74
 
75
75
  /**
76
76
  * @license
@@ -7377,7 +7377,7 @@ function __PRIVATE_toDbDocumentOverlayKey(e, t) {
7377
7377
  function __PRIVATE_toDbIndexState(e, t, n, r) {
7378
7378
  return {
7379
7379
  indexId: e,
7380
- uid: t.uid || "",
7380
+ uid: t,
7381
7381
  sequenceNumber: n,
7382
7382
  readTime: __PRIVATE_toDbTimestamp(r.readTime),
7383
7383
  documentKey: __PRIVATE_encodeResourcePath(r.documentKey.path),
@@ -8382,7 +8382,7 @@ function __PRIVATE_applyDistributionFieldAndCompositeFilters(e, t) {
8382
8382
  */
8383
8383
  class __PRIVATE_IndexedDbIndexManager {
8384
8384
  constructor(e, t) {
8385
- this.user = e, this.databaseId = t,
8385
+ this.databaseId = t,
8386
8386
  /**
8387
8387
  * An in-memory copy of the index entries we've already written since the SDK
8388
8388
  * launched. Used to avoid re-writing the same entry repeatedly.
@@ -8452,7 +8452,7 @@ class __PRIVATE_IndexedDbIndexManager {
8452
8452
  if (t.indexState) {
8453
8453
  const n = __PRIVATE_indexStateStore(e);
8454
8454
  return i.next((e => {
8455
- n.put(__PRIVATE_toDbIndexState(e, this.user, t.indexState.sequenceNumber, t.indexState.offset));
8455
+ n.put(__PRIVATE_toDbIndexState(e, this.uid, t.indexState.sequenceNumber, t.indexState.offset));
8456
8456
  }));
8457
8457
  }
8458
8458
  return i.next();
@@ -8734,7 +8734,7 @@ class __PRIVATE_IndexedDbIndexManager {
8734
8734
  }
8735
8735
  updateCollectionGroup(e, t, n) {
8736
8736
  const r = __PRIVATE_indexConfigurationStore(e), i = __PRIVATE_indexStateStore(e);
8737
- return this.gn(e).next((e => r.W("collectionGroupIndex", IDBKeyRange.bound(t, t)).next((t => PersistencePromise.forEach(t, (t => i.put(__PRIVATE_toDbIndexState(t.indexId, this.user, e, n))))))));
8737
+ return this.gn(e).next((e => r.W("collectionGroupIndex", IDBKeyRange.bound(t, t)).next((t => PersistencePromise.forEach(t, (t => i.put(__PRIVATE_toDbIndexState(t.indexId, this.uid, e, n))))))));
8738
8738
  }
8739
8739
  updateIndexEntries(e, t) {
8740
8740
  // Porting Note: `getFieldIndexes()` on Web does not cache index lookups as
@@ -16748,8 +16748,9 @@ class MemoryOfflineComponentProvider {
16748
16748
  return new __PRIVATE_MemorySharedClientState;
16749
16749
  }
16750
16750
  async terminate() {
16751
- this.gcScheduler && this.gcScheduler.stop(), await this.sharedClientState.shutdown(),
16752
- await this.persistence.shutdown();
16751
+ var e, t;
16752
+ null === (e = this.gcScheduler) || void 0 === e || e.stop(), null === (t = this.indexBackfillerScheduler) || void 0 === t || t.stop(),
16753
+ this.sharedClientState.shutdown(), await this.persistence.shutdown();
16753
16754
  }
16754
16755
  }
16755
16756
 
@@ -16883,6 +16884,7 @@ class __PRIVATE_LruGcMemoryOfflineComponentProvider extends MemoryOfflineCompone
16883
16884
  }(this.localStore, this.remoteStore, this.eventManager, this.sharedClientState, e.initialUser, e.maxConcurrentLimboResolutions, t);
16884
16885
  }
16885
16886
  async terminate() {
16887
+ var e;
16886
16888
  await async function __PRIVATE_remoteStoreShutdown(e) {
16887
16889
  const t = __PRIVATE_debugCast(e);
16888
16890
  __PRIVATE_logDebug("RemoteStore", "RemoteStore shutting down."), t.v_.add(5 /* OfflineCause.Shutdown */),
@@ -16890,7 +16892,7 @@ class __PRIVATE_LruGcMemoryOfflineComponentProvider extends MemoryOfflineCompone
16890
16892
  // Set the OnlineState to Unknown (rather than Offline) to avoid potentially
16891
16893
  // triggering spurious listener events with cached data, etc.
16892
16894
  t.x_.set("Unknown" /* OnlineState.Unknown */);
16893
- }(this.remoteStore), this.datastore && await this.datastore.terminate();
16895
+ }(this.remoteStore), null === (e = this.datastore) || void 0 === e || e.terminate();
16894
16896
  }
16895
16897
  }
16896
16898
 
@@ -21817,9 +21819,9 @@ let Se = null;
21817
21819
  return r = Object.assign({
21818
21820
  useFetchStreams: t
21819
21821
  }, r), s._setSettings(r), s;
21820
- }), "PUBLIC").setMultipleInstances(!0)), app.registerVersion(w, "4.4.0-canary.093e022b9", e),
21822
+ }), "PUBLIC").setMultipleInstances(!0)), app.registerVersion(w, "4.4.0-canary.096542aa2", e),
21821
21823
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
21822
- app.registerVersion(w, "4.4.0-canary.093e022b9", "cjs2017");
21824
+ app.registerVersion(w, "4.4.0-canary.096542aa2", "cjs2017");
21823
21825
  }();
21824
21826
 
21825
21827
  exports.AbstractUserDataWriter = AbstractUserDataWriter;