@firebase/database 1.0.20-canary.2d720995d → 1.0.20-canary.f11b55294

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.
@@ -1285,9 +1285,9 @@ class AppCheckTokenProvider {
1285
1285
  if (app._isFirebaseServerApp(app$1) && app$1.settings.appCheckToken) {
1286
1286
  this.serverAppAppCheckToken = app$1.settings.appCheckToken;
1287
1287
  }
1288
- this.appCheck = appCheckProvider?.getImmediate({ optional: true });
1288
+ this.appCheck = appCheckProvider === null || appCheckProvider === void 0 ? void 0 : appCheckProvider.getImmediate({ optional: true });
1289
1289
  if (!this.appCheck) {
1290
- appCheckProvider?.get().then(appCheck => (this.appCheck = appCheck));
1290
+ appCheckProvider === null || appCheckProvider === void 0 ? void 0 : appCheckProvider.get().then(appCheck => (this.appCheck = appCheck));
1291
1291
  }
1292
1292
  }
1293
1293
  getToken(forceRefresh) {
@@ -1316,9 +1316,8 @@ class AppCheckTokenProvider {
1316
1316
  return this.appCheck.getToken(forceRefresh);
1317
1317
  }
1318
1318
  addTokenChangeListener(listener) {
1319
- this.appCheckProvider
1320
- ?.get()
1321
- .then(appCheck => appCheck.addTokenListener(listener));
1319
+ var _a;
1320
+ (_a = this.appCheckProvider) === null || _a === void 0 ? void 0 : _a.get().then(appCheck => appCheck.addTokenListener(listener));
1322
1321
  }
1323
1322
  notifyForInvalidToken() {
1324
1323
  warn(`Provided AppCheck credentials for the app named "${this.appName}" ` +
@@ -2486,9 +2485,7 @@ class Connection {
2486
2485
  if (MESSAGE_DATA in controlData) {
2487
2486
  const payload = controlData[MESSAGE_DATA];
2488
2487
  if (cmd === SERVER_HELLO) {
2489
- const handshakePayload = {
2490
- ...payload
2491
- };
2488
+ const handshakePayload = Object.assign({}, payload);
2492
2489
  if (this.repoInfo_.isUsingEmulator) {
2493
2490
  // Upon connecting, the emulator will pass the hostname that it's aware of, but we prefer the user's set hostname via `connectDatabaseEmulator` over what the emulator passes.
2494
2491
  handshakePayload.h = this.repoInfo_.host;
@@ -5304,9 +5301,9 @@ class IndexMap {
5304
5301
  newIndex = fallbackObject;
5305
5302
  }
5306
5303
  const indexName = indexDefinition.toString();
5307
- const newIndexSet = { ...this.indexSet_ };
5304
+ const newIndexSet = Object.assign({}, this.indexSet_);
5308
5305
  newIndexSet[indexName] = indexDefinition;
5309
- const newIndexes = { ...this.indexes_ };
5306
+ const newIndexes = Object.assign({}, this.indexes_);
5310
5307
  newIndexes[indexName] = newIndex;
5311
5308
  return new IndexMap(newIndexes, newIndexSet);
5312
5309
  }
@@ -7110,7 +7107,7 @@ class StatsListener {
7110
7107
  }
7111
7108
  get() {
7112
7109
  const newStats = this.collection_.get();
7113
- const delta = { ...newStats };
7110
+ const delta = Object.assign({}, newStats);
7114
7111
  if (this.last_) {
7115
7112
  each(this.last_, (stat, value) => {
7116
7113
  delta[stat] = delta[stat] - value;
@@ -13861,12 +13858,13 @@ class TransactionResult {
13861
13858
  function runTransaction(ref,
13862
13859
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13863
13860
  transactionUpdate, options) {
13861
+ var _a;
13864
13862
  ref = util.getModularInstance(ref);
13865
13863
  validateWritablePath('Reference.transaction', ref._path);
13866
13864
  if (ref.key === '.length' || ref.key === '.keys') {
13867
13865
  throw ('Reference.transaction failed: ' + ref.key + ' is a read-only object.');
13868
13866
  }
13869
- const applyLocally = options?.applyLocally ?? true;
13867
+ const applyLocally = (_a = options === null || options === void 0 ? void 0 : options.applyLocally) !== null && _a !== void 0 ? _a : true;
13870
13868
  const deferred = new util.Deferred();
13871
13869
  const promiseComplete = (error, committed, node) => {
13872
13870
  let dataSnapshot = null;