@firebase/database 0.13.2-canary.69e2ee064 → 0.13.2-canary.6a8be1337

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.
@@ -1039,7 +1039,7 @@ var WebSocketConnection = /** @class */ (function () {
1039
1039
  if (util.isNodeSdk()) {
1040
1040
  var device = this.nodeAdmin ? 'AdminNode' : 'Node';
1041
1041
  // UA Format: Firebase/<wire_protocol>/<sdk_version>/<platform>/<device>
1042
- var options_1 = {
1042
+ options = {
1043
1043
  headers: {
1044
1044
  'User-Agent': "Firebase/" + PROTOCOL_VERSION + "/" + SDK_VERSION + "/" + process.platform + "/" + device,
1045
1045
  'X-Firebase-GMPID': this.applicationId || ''
@@ -1051,10 +1051,10 @@ var WebSocketConnection = /** @class */ (function () {
1051
1051
  // Note that this header is just used to bypass appcheck, and the token should still be sent
1052
1052
  // through the websocket connection once it is established.
1053
1053
  if (this.authToken) {
1054
- options_1.headers['Authorization'] = "Bearer " + this.authToken;
1054
+ options.headers['Authorization'] = "Bearer " + this.authToken;
1055
1055
  }
1056
1056
  if (this.appCheckToken) {
1057
- options_1.headers['X-Firebase-AppCheck'] = this.appCheckToken;
1057
+ options.headers['X-Firebase-AppCheck'] = this.appCheckToken;
1058
1058
  }
1059
1059
  // Plumb appropriate http_proxy environment variable into faye-websocket if it exists.
1060
1060
  var env = process['env'];
@@ -1062,7 +1062,7 @@ var WebSocketConnection = /** @class */ (function () {
1062
1062
  ? env['HTTPS_PROXY'] || env['https_proxy']
1063
1063
  : env['HTTP_PROXY'] || env['http_proxy'];
1064
1064
  if (proxy) {
1065
- options_1['proxy'] = { origin: proxy };
1065
+ options['proxy'] = { origin: proxy };
1066
1066
  }
1067
1067
  }
1068
1068
  this.mySock = new WebSocketImpl(this.connURL, [], options);
@@ -1289,7 +1289,7 @@ var WebSocketConnection = /** @class */ (function () {
1289
1289
  }());
1290
1290
 
1291
1291
  var name = "@firebase/database";
1292
- var version = "0.13.2-canary.69e2ee064";
1292
+ var version = "0.13.2-canary.6a8be1337";
1293
1293
 
1294
1294
  /**
1295
1295
  * @license
@@ -3308,7 +3308,6 @@ var VisibilityMonitor = /** @class */ (function (_super) {
3308
3308
  */
3309
3309
  var RECONNECT_MIN_DELAY = 1000;
3310
3310
  var RECONNECT_MAX_DELAY_DEFAULT = 60 * 5 * 1000; // 5 minutes in milliseconds (Case: 1858)
3311
- var GET_CONNECT_TIMEOUT = 3 * 1000;
3312
3311
  var RECONNECT_MAX_DELAY_FOR_ADMINS = 30 * 1000; // 30 seconds for admin clients (likely to be a backend server)
3313
3312
  var RECONNECT_DELAY_MULTIPLIER = 1.3;
3314
3313
  var RECONNECT_DELAY_RESET_TIMEOUT = 30000; // Reset delay back to MIN_DELAY after being connected for 30sec.
@@ -3387,7 +3386,6 @@ var PersistentConnection = /** @class */ (function (_super) {
3387
3386
  }
3388
3387
  };
3389
3388
  PersistentConnection.prototype.get = function (query) {
3390
- var _this = this;
3391
3389
  this.initConnection_();
3392
3390
  var deferred = new util.Deferred();
3393
3391
  var request = {
@@ -3410,21 +3408,6 @@ var PersistentConnection = /** @class */ (function (_super) {
3410
3408
  this.outstandingGets_.push(outstandingGet);
3411
3409
  this.outstandingGetCount_++;
3412
3410
  var index = this.outstandingGets_.length - 1;
3413
- if (!this.connected_) {
3414
- setTimeout(function () {
3415
- var get = _this.outstandingGets_[index];
3416
- if (get === undefined || outstandingGet !== get) {
3417
- return;
3418
- }
3419
- delete _this.outstandingGets_[index];
3420
- _this.outstandingGetCount_--;
3421
- if (_this.outstandingGetCount_ === 0) {
3422
- _this.outstandingGets_ = [];
3423
- }
3424
- _this.log_('get ' + index + ' timed out on connection');
3425
- deferred.reject(new Error('Client is offline.'));
3426
- }, GET_CONNECT_TIMEOUT);
3427
- }
3428
3411
  if (this.connected_) {
3429
3412
  this.sendGet_(index);
3430
3413
  }