@firebase/database-compat 0.2.0-20220505222723 → 0.2.0-canary.094da9eed
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/CHANGELOG.md +6 -7
- package/dist/index.esm2017.js +1 -1
- package/dist/index.esm5.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.standalone.js +11 -16
- package/dist/index.standalone.js.map +1 -1
- package/dist/node-esm/index.js +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @firebase/database-compat
|
|
2
2
|
|
|
3
|
-
## 0.2.0
|
|
3
|
+
## 0.2.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -8,12 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
### Patch Changes
|
|
10
10
|
|
|
11
|
-
- Updated dependencies [[`9c5c9c36d`](https://github.com/firebase/firebase-js-sdk/commit/9c5c9c36da80b98b73cfd60ef2e2965087e9f801), [`9c6808fea`](https://github.com/firebase/firebase-js-sdk/commit/9c6808fea231d1ab6de6f6ab548c67b751a12a78)]:
|
|
12
|
-
- @firebase/
|
|
13
|
-
- @firebase/
|
|
14
|
-
- @firebase/
|
|
15
|
-
- @firebase/
|
|
16
|
-
- @firebase/database-types@0.9.8-20220505222723
|
|
11
|
+
- Updated dependencies [[`874cdbbcc`](https://github.com/firebase/firebase-js-sdk/commit/874cdbbccbc2bf8f4ee18abe220e87dc52e6a8db), [`9c5c9c36d`](https://github.com/firebase/firebase-js-sdk/commit/9c5c9c36da80b98b73cfd60ef2e2965087e9f801), [`9c6808fea`](https://github.com/firebase/firebase-js-sdk/commit/9c6808fea231d1ab6de6f6ab548c67b751a12a78)]:
|
|
12
|
+
- @firebase/database@0.13.0
|
|
13
|
+
- @firebase/util@1.6.0
|
|
14
|
+
- @firebase/component@0.5.14
|
|
15
|
+
- @firebase/database-types@0.9.8
|
|
17
16
|
|
|
18
17
|
## 0.1.8
|
|
19
18
|
|
package/dist/index.esm2017.js
CHANGED
|
@@ -5,7 +5,7 @@ import { errorPrefix, validateArgCount, validateCallback, validateContextObject,
|
|
|
5
5
|
import { Logger } from '@firebase/logger';
|
|
6
6
|
|
|
7
7
|
const name = "@firebase/database-compat";
|
|
8
|
-
const version = "0.2.0-
|
|
8
|
+
const version = "0.2.0-canary.094da9eed";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
package/dist/index.esm5.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
|
|
13
13
|
|
|
14
14
|
var name = "@firebase/database-compat";
|
|
15
|
-
var version = "0.2.0-
|
|
15
|
+
var version = "0.2.0-canary.094da9eed";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @license
|
package/dist/index.standalone.js
CHANGED
|
@@ -4333,7 +4333,7 @@ var WebSocketConnection = /** @class */ (function () {
|
|
|
4333
4333
|
this.bytesReceived = 0;
|
|
4334
4334
|
this.log_ = logWrapper(this.connId);
|
|
4335
4335
|
this.stats_ = statsManagerGetCollection(repoInfo);
|
|
4336
|
-
this.connURL = WebSocketConnection.connectionURL_(repoInfo, transportSessionId, lastSessionId, appCheckToken);
|
|
4336
|
+
this.connURL = WebSocketConnection.connectionURL_(repoInfo, transportSessionId, lastSessionId, appCheckToken, applicationId);
|
|
4337
4337
|
this.nodeAdmin = repoInfo.nodeAdmin;
|
|
4338
4338
|
}
|
|
4339
4339
|
/**
|
|
@@ -4343,7 +4343,7 @@ var WebSocketConnection = /** @class */ (function () {
|
|
|
4343
4343
|
* @param lastSessionId - Optional lastSessionId if there was a previous connection
|
|
4344
4344
|
* @returns connection url
|
|
4345
4345
|
*/
|
|
4346
|
-
WebSocketConnection.connectionURL_ = function (repoInfo, transportSessionId, lastSessionId, appCheckToken) {
|
|
4346
|
+
WebSocketConnection.connectionURL_ = function (repoInfo, transportSessionId, lastSessionId, appCheckToken, applicationId) {
|
|
4347
4347
|
var urlParams = {};
|
|
4348
4348
|
urlParams[VERSION_PARAM] = PROTOCOL_VERSION;
|
|
4349
4349
|
if (!util.isNodeSdk() &&
|
|
@@ -4361,6 +4361,9 @@ var WebSocketConnection = /** @class */ (function () {
|
|
|
4361
4361
|
if (appCheckToken) {
|
|
4362
4362
|
urlParams[APP_CHECK_TOKEN_PARAM] = appCheckToken;
|
|
4363
4363
|
}
|
|
4364
|
+
if (applicationId) {
|
|
4365
|
+
urlParams[APPLICATION_ID_PARAM] = applicationId;
|
|
4366
|
+
}
|
|
4364
4367
|
return repoInfoConnectionURL(repoInfo, WEBSOCKET, urlParams);
|
|
4365
4368
|
};
|
|
4366
4369
|
/**
|
|
@@ -4376,10 +4379,11 @@ var WebSocketConnection = /** @class */ (function () {
|
|
|
4376
4379
|
// Assume failure until proven otherwise.
|
|
4377
4380
|
PersistentStorage.set('previous_websocket_failure', true);
|
|
4378
4381
|
try {
|
|
4382
|
+
var options = void 0;
|
|
4379
4383
|
if (util.isNodeSdk()) {
|
|
4380
4384
|
var device = this.nodeAdmin ? 'AdminNode' : 'Node';
|
|
4381
4385
|
// UA Format: Firebase/<wire_protocol>/<sdk_version>/<platform>/<device>
|
|
4382
|
-
var
|
|
4386
|
+
var options_1 = {
|
|
4383
4387
|
headers: {
|
|
4384
4388
|
'User-Agent': "Firebase/" + PROTOCOL_VERSION + "/" + SDK_VERSION + "/" + process.platform + "/" + device,
|
|
4385
4389
|
'X-Firebase-GMPID': this.applicationId || ''
|
|
@@ -4391,10 +4395,10 @@ var WebSocketConnection = /** @class */ (function () {
|
|
|
4391
4395
|
// Note that this header is just used to bypass appcheck, and the token should still be sent
|
|
4392
4396
|
// through the websocket connection once it is established.
|
|
4393
4397
|
if (this.authToken) {
|
|
4394
|
-
|
|
4398
|
+
options_1.headers['Authorization'] = "Bearer " + this.authToken;
|
|
4395
4399
|
}
|
|
4396
4400
|
if (this.appCheckToken) {
|
|
4397
|
-
|
|
4401
|
+
options_1.headers['X-Firebase-AppCheck'] = this.appCheckToken;
|
|
4398
4402
|
}
|
|
4399
4403
|
// Plumb appropriate http_proxy environment variable into faye-websocket if it exists.
|
|
4400
4404
|
var env = process['env'];
|
|
@@ -4402,19 +4406,10 @@ var WebSocketConnection = /** @class */ (function () {
|
|
|
4402
4406
|
? env['HTTPS_PROXY'] || env['https_proxy']
|
|
4403
4407
|
: env['HTTP_PROXY'] || env['http_proxy'];
|
|
4404
4408
|
if (proxy) {
|
|
4405
|
-
|
|
4409
|
+
options_1['proxy'] = { origin: proxy };
|
|
4406
4410
|
}
|
|
4407
|
-
this.mySock = new WebSocketImpl(this.connURL, [], options);
|
|
4408
|
-
}
|
|
4409
|
-
else {
|
|
4410
|
-
var options = {
|
|
4411
|
-
headers: {
|
|
4412
|
-
'X-Firebase-GMPID': this.applicationId || '',
|
|
4413
|
-
'X-Firebase-AppCheck': this.appCheckToken || ''
|
|
4414
|
-
}
|
|
4415
|
-
};
|
|
4416
|
-
this.mySock = new WebSocketImpl(this.connURL, [], options);
|
|
4417
4411
|
}
|
|
4412
|
+
this.mySock = new WebSocketImpl(this.connURL, [], options);
|
|
4418
4413
|
}
|
|
4419
4414
|
catch (e) {
|
|
4420
4415
|
this.log_('Error instantiating WebSocket.');
|