@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.
- package/dist/index.cjs.js +13 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/{index.esm.js → index.esm2017.js} +14 -16
- package/dist/index.esm2017.js.map +1 -0
- package/dist/index.node.cjs.js +13 -15
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.standalone.js +10 -12
- package/dist/index.standalone.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +13 -15
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/package.json +11 -11
- package/dist/index.esm.js.map +0 -1
package/dist/index.node.cjs.js
CHANGED
|
@@ -1260,7 +1260,7 @@ WebSocketConnection.responsesRequiredToBeHealthy = 2;
|
|
|
1260
1260
|
WebSocketConnection.healthyTimeout = 30000;
|
|
1261
1261
|
|
|
1262
1262
|
const name = "@firebase/database";
|
|
1263
|
-
const version = "1.0.20-canary.
|
|
1263
|
+
const version = "1.0.20-canary.f11b55294";
|
|
1264
1264
|
|
|
1265
1265
|
/**
|
|
1266
1266
|
* @license
|
|
@@ -1288,9 +1288,9 @@ class AppCheckTokenProvider {
|
|
|
1288
1288
|
if (app._isFirebaseServerApp(app$1) && app$1.settings.appCheckToken) {
|
|
1289
1289
|
this.serverAppAppCheckToken = app$1.settings.appCheckToken;
|
|
1290
1290
|
}
|
|
1291
|
-
this.appCheck = appCheckProvider
|
|
1291
|
+
this.appCheck = appCheckProvider === null || appCheckProvider === void 0 ? void 0 : appCheckProvider.getImmediate({ optional: true });
|
|
1292
1292
|
if (!this.appCheck) {
|
|
1293
|
-
appCheckProvider
|
|
1293
|
+
appCheckProvider === null || appCheckProvider === void 0 ? void 0 : appCheckProvider.get().then(appCheck => (this.appCheck = appCheck));
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
1296
|
getToken(forceRefresh) {
|
|
@@ -1319,9 +1319,8 @@ class AppCheckTokenProvider {
|
|
|
1319
1319
|
return this.appCheck.getToken(forceRefresh);
|
|
1320
1320
|
}
|
|
1321
1321
|
addTokenChangeListener(listener) {
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
.then(appCheck => appCheck.addTokenListener(listener));
|
|
1322
|
+
var _a;
|
|
1323
|
+
(_a = this.appCheckProvider) === null || _a === void 0 ? void 0 : _a.get().then(appCheck => appCheck.addTokenListener(listener));
|
|
1325
1324
|
}
|
|
1326
1325
|
notifyForInvalidToken() {
|
|
1327
1326
|
warn(`Provided AppCheck credentials for the app named "${this.appName}" ` +
|
|
@@ -2489,9 +2488,7 @@ class Connection {
|
|
|
2489
2488
|
if (MESSAGE_DATA in controlData) {
|
|
2490
2489
|
const payload = controlData[MESSAGE_DATA];
|
|
2491
2490
|
if (cmd === SERVER_HELLO) {
|
|
2492
|
-
const handshakePayload = {
|
|
2493
|
-
...payload
|
|
2494
|
-
};
|
|
2491
|
+
const handshakePayload = Object.assign({}, payload);
|
|
2495
2492
|
if (this.repoInfo_.isUsingEmulator) {
|
|
2496
2493
|
// 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.
|
|
2497
2494
|
handshakePayload.h = this.repoInfo_.host;
|
|
@@ -5307,9 +5304,9 @@ class IndexMap {
|
|
|
5307
5304
|
newIndex = fallbackObject;
|
|
5308
5305
|
}
|
|
5309
5306
|
const indexName = indexDefinition.toString();
|
|
5310
|
-
const newIndexSet = {
|
|
5307
|
+
const newIndexSet = Object.assign({}, this.indexSet_);
|
|
5311
5308
|
newIndexSet[indexName] = indexDefinition;
|
|
5312
|
-
const newIndexes = {
|
|
5309
|
+
const newIndexes = Object.assign({}, this.indexes_);
|
|
5313
5310
|
newIndexes[indexName] = newIndex;
|
|
5314
5311
|
return new IndexMap(newIndexes, newIndexSet);
|
|
5315
5312
|
}
|
|
@@ -7113,7 +7110,7 @@ class StatsListener {
|
|
|
7113
7110
|
}
|
|
7114
7111
|
get() {
|
|
7115
7112
|
const newStats = this.collection_.get();
|
|
7116
|
-
const delta = {
|
|
7113
|
+
const delta = Object.assign({}, newStats);
|
|
7117
7114
|
if (this.last_) {
|
|
7118
7115
|
each(this.last_, (stat, value) => {
|
|
7119
7116
|
delta[stat] = delta[stat] - value;
|
|
@@ -13796,8 +13793,8 @@ function registerDatabase(variant) {
|
|
|
13796
13793
|
return repoManagerDatabaseFromApp(app, authProvider, appCheckProvider, url);
|
|
13797
13794
|
}, "PUBLIC" /* ComponentType.PUBLIC */).setMultipleInstances(true));
|
|
13798
13795
|
app.registerVersion(name, version, variant);
|
|
13799
|
-
// BUILD_TARGET will be replaced by values like
|
|
13800
|
-
app.registerVersion(name, version, '
|
|
13796
|
+
// BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
|
|
13797
|
+
app.registerVersion(name, version, 'cjs2017');
|
|
13801
13798
|
}
|
|
13802
13799
|
|
|
13803
13800
|
/**
|
|
@@ -13916,12 +13913,13 @@ class TransactionResult {
|
|
|
13916
13913
|
function runTransaction(ref,
|
|
13917
13914
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13918
13915
|
transactionUpdate, options) {
|
|
13916
|
+
var _a;
|
|
13919
13917
|
ref = util.getModularInstance(ref);
|
|
13920
13918
|
validateWritablePath('Reference.transaction', ref._path);
|
|
13921
13919
|
if (ref.key === '.length' || ref.key === '.keys') {
|
|
13922
13920
|
throw ('Reference.transaction failed: ' + ref.key + ' is a read-only object.');
|
|
13923
13921
|
}
|
|
13924
|
-
const applyLocally = options
|
|
13922
|
+
const applyLocally = (_a = options === null || options === void 0 ? void 0 : options.applyLocally) !== null && _a !== void 0 ? _a : true;
|
|
13925
13923
|
const deferred = new util.Deferred();
|
|
13926
13924
|
const promiseComplete = (error, committed, node) => {
|
|
13927
13925
|
let dataSnapshot = null;
|