@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.
- package/dist/index.esm2017.js +2 -18
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +5 -22
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +5 -22
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.standalone.js +4 -21
- package/dist/index.standalone.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +2 -18
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/package.json +7 -8
package/dist/index.esm5.js
CHANGED
|
@@ -5,7 +5,7 @@ import { __spreadArray, __read, __values, __extends, __awaiter, __generator, __a
|
|
|
5
5
|
import { Logger, LogLevel } from '@firebase/logger';
|
|
6
6
|
|
|
7
7
|
var name = "@firebase/database";
|
|
8
|
-
var version = "0.13.2-canary.
|
|
8
|
+
var version = "0.13.2-canary.6a8be1337";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
|
@@ -1923,7 +1923,7 @@ var WebSocketConnection = /** @class */ (function () {
|
|
|
1923
1923
|
if (isNodeSdk()) {
|
|
1924
1924
|
var device = this.nodeAdmin ? 'AdminNode' : 'Node';
|
|
1925
1925
|
// UA Format: Firebase/<wire_protocol>/<sdk_version>/<platform>/<device>
|
|
1926
|
-
|
|
1926
|
+
options = {
|
|
1927
1927
|
headers: {
|
|
1928
1928
|
'User-Agent': "Firebase/" + PROTOCOL_VERSION + "/" + SDK_VERSION + "/" + process.platform + "/" + device,
|
|
1929
1929
|
'X-Firebase-GMPID': this.applicationId || ''
|
|
@@ -1935,10 +1935,10 @@ var WebSocketConnection = /** @class */ (function () {
|
|
|
1935
1935
|
// Note that this header is just used to bypass appcheck, and the token should still be sent
|
|
1936
1936
|
// through the websocket connection once it is established.
|
|
1937
1937
|
if (this.authToken) {
|
|
1938
|
-
|
|
1938
|
+
options.headers['Authorization'] = "Bearer " + this.authToken;
|
|
1939
1939
|
}
|
|
1940
1940
|
if (this.appCheckToken) {
|
|
1941
|
-
|
|
1941
|
+
options.headers['X-Firebase-AppCheck'] = this.appCheckToken;
|
|
1942
1942
|
}
|
|
1943
1943
|
// Plumb appropriate http_proxy environment variable into faye-websocket if it exists.
|
|
1944
1944
|
var env = process['env'];
|
|
@@ -1946,7 +1946,7 @@ var WebSocketConnection = /** @class */ (function () {
|
|
|
1946
1946
|
? env['HTTPS_PROXY'] || env['https_proxy']
|
|
1947
1947
|
: env['HTTP_PROXY'] || env['http_proxy'];
|
|
1948
1948
|
if (proxy) {
|
|
1949
|
-
|
|
1949
|
+
options['proxy'] = { origin: proxy };
|
|
1950
1950
|
}
|
|
1951
1951
|
}
|
|
1952
1952
|
this.mySock = new WebSocketImpl(this.connURL, [], options);
|
|
@@ -3296,7 +3296,6 @@ var VisibilityMonitor = /** @class */ (function (_super) {
|
|
|
3296
3296
|
*/
|
|
3297
3297
|
var RECONNECT_MIN_DELAY = 1000;
|
|
3298
3298
|
var RECONNECT_MAX_DELAY_DEFAULT = 60 * 5 * 1000; // 5 minutes in milliseconds (Case: 1858)
|
|
3299
|
-
var GET_CONNECT_TIMEOUT = 3 * 1000;
|
|
3300
3299
|
var RECONNECT_MAX_DELAY_FOR_ADMINS = 30 * 1000; // 30 seconds for admin clients (likely to be a backend server)
|
|
3301
3300
|
var RECONNECT_DELAY_MULTIPLIER = 1.3;
|
|
3302
3301
|
var RECONNECT_DELAY_RESET_TIMEOUT = 30000; // Reset delay back to MIN_DELAY after being connected for 30sec.
|
|
@@ -3375,7 +3374,6 @@ var PersistentConnection = /** @class */ (function (_super) {
|
|
|
3375
3374
|
}
|
|
3376
3375
|
};
|
|
3377
3376
|
PersistentConnection.prototype.get = function (query) {
|
|
3378
|
-
var _this = this;
|
|
3379
3377
|
this.initConnection_();
|
|
3380
3378
|
var deferred = new Deferred();
|
|
3381
3379
|
var request = {
|
|
@@ -3398,21 +3396,6 @@ var PersistentConnection = /** @class */ (function (_super) {
|
|
|
3398
3396
|
this.outstandingGets_.push(outstandingGet);
|
|
3399
3397
|
this.outstandingGetCount_++;
|
|
3400
3398
|
var index = this.outstandingGets_.length - 1;
|
|
3401
|
-
if (!this.connected_) {
|
|
3402
|
-
setTimeout(function () {
|
|
3403
|
-
var get = _this.outstandingGets_[index];
|
|
3404
|
-
if (get === undefined || outstandingGet !== get) {
|
|
3405
|
-
return;
|
|
3406
|
-
}
|
|
3407
|
-
delete _this.outstandingGets_[index];
|
|
3408
|
-
_this.outstandingGetCount_--;
|
|
3409
|
-
if (_this.outstandingGetCount_ === 0) {
|
|
3410
|
-
_this.outstandingGets_ = [];
|
|
3411
|
-
}
|
|
3412
|
-
_this.log_('get ' + index + ' timed out on connection');
|
|
3413
|
-
deferred.reject(new Error('Client is offline.'));
|
|
3414
|
-
}, GET_CONNECT_TIMEOUT);
|
|
3415
|
-
}
|
|
3416
3399
|
if (this.connected_) {
|
|
3417
3400
|
this.sendGet_(index);
|
|
3418
3401
|
}
|