@firebase/database 1.0.20-canary.d91169f06 → 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.
@@ -1252,7 +1252,7 @@ WebSocketConnection.responsesRequiredToBeHealthy = 2;
1252
1252
  WebSocketConnection.healthyTimeout = 30000;
1253
1253
 
1254
1254
  const name = "@firebase/database";
1255
- const version = "1.0.20-canary.d91169f06";
1255
+ const version = "1.0.20-canary.f11b55294";
1256
1256
 
1257
1257
  /**
1258
1258
  * @license
@@ -1280,9 +1280,9 @@ class AppCheckTokenProvider {
1280
1280
  if (_isFirebaseServerApp(app) && app.settings.appCheckToken) {
1281
1281
  this.serverAppAppCheckToken = app.settings.appCheckToken;
1282
1282
  }
1283
- this.appCheck = appCheckProvider?.getImmediate({ optional: true });
1283
+ this.appCheck = appCheckProvider === null || appCheckProvider === void 0 ? void 0 : appCheckProvider.getImmediate({ optional: true });
1284
1284
  if (!this.appCheck) {
1285
- appCheckProvider?.get().then(appCheck => (this.appCheck = appCheck));
1285
+ appCheckProvider === null || appCheckProvider === void 0 ? void 0 : appCheckProvider.get().then(appCheck => (this.appCheck = appCheck));
1286
1286
  }
1287
1287
  }
1288
1288
  getToken(forceRefresh) {
@@ -1311,9 +1311,8 @@ class AppCheckTokenProvider {
1311
1311
  return this.appCheck.getToken(forceRefresh);
1312
1312
  }
1313
1313
  addTokenChangeListener(listener) {
1314
- this.appCheckProvider
1315
- ?.get()
1316
- .then(appCheck => appCheck.addTokenListener(listener));
1314
+ var _a;
1315
+ (_a = this.appCheckProvider) === null || _a === void 0 ? void 0 : _a.get().then(appCheck => appCheck.addTokenListener(listener));
1317
1316
  }
1318
1317
  notifyForInvalidToken() {
1319
1318
  warn(`Provided AppCheck credentials for the app named "${this.appName}" ` +
@@ -2481,9 +2480,7 @@ class Connection {
2481
2480
  if (MESSAGE_DATA in controlData) {
2482
2481
  const payload = controlData[MESSAGE_DATA];
2483
2482
  if (cmd === SERVER_HELLO) {
2484
- const handshakePayload = {
2485
- ...payload
2486
- };
2483
+ const handshakePayload = Object.assign({}, payload);
2487
2484
  if (this.repoInfo_.isUsingEmulator) {
2488
2485
  // 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.
2489
2486
  handshakePayload.h = this.repoInfo_.host;
@@ -5299,9 +5296,9 @@ class IndexMap {
5299
5296
  newIndex = fallbackObject;
5300
5297
  }
5301
5298
  const indexName = indexDefinition.toString();
5302
- const newIndexSet = { ...this.indexSet_ };
5299
+ const newIndexSet = Object.assign({}, this.indexSet_);
5303
5300
  newIndexSet[indexName] = indexDefinition;
5304
- const newIndexes = { ...this.indexes_ };
5301
+ const newIndexes = Object.assign({}, this.indexes_);
5305
5302
  newIndexes[indexName] = newIndex;
5306
5303
  return new IndexMap(newIndexes, newIndexSet);
5307
5304
  }
@@ -7105,7 +7102,7 @@ class StatsListener {
7105
7102
  }
7106
7103
  get() {
7107
7104
  const newStats = this.collection_.get();
7108
- const delta = { ...newStats };
7105
+ const delta = Object.assign({}, newStats);
7109
7106
  if (this.last_) {
7110
7107
  each(this.last_, (stat, value) => {
7111
7108
  delta[stat] = delta[stat] - value;
@@ -13788,8 +13785,8 @@ function registerDatabase(variant) {
13788
13785
  return repoManagerDatabaseFromApp(app, authProvider, appCheckProvider, url);
13789
13786
  }, "PUBLIC" /* ComponentType.PUBLIC */).setMultipleInstances(true));
13790
13787
  registerVersion(name, version, variant);
13791
- // BUILD_TARGET will be replaced by values like esm, cjs, etc during the compilation
13792
- registerVersion(name, version, 'esm2020');
13788
+ // BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
13789
+ registerVersion(name, version, 'esm2017');
13793
13790
  }
13794
13791
 
13795
13792
  /**
@@ -13908,12 +13905,13 @@ class TransactionResult {
13908
13905
  function runTransaction(ref,
13909
13906
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13910
13907
  transactionUpdate, options) {
13908
+ var _a;
13911
13909
  ref = getModularInstance(ref);
13912
13910
  validateWritablePath('Reference.transaction', ref._path);
13913
13911
  if (ref.key === '.length' || ref.key === '.keys') {
13914
13912
  throw ('Reference.transaction failed: ' + ref.key + ' is a read-only object.');
13915
13913
  }
13916
- const applyLocally = options?.applyLocally ?? true;
13914
+ const applyLocally = (_a = options === null || options === void 0 ? void 0 : options.applyLocally) !== null && _a !== void 0 ? _a : true;
13917
13915
  const deferred = new Deferred();
13918
13916
  const promiseComplete = (error, committed, node) => {
13919
13917
  let dataSnapshot = null;