@firebase/database 1.1.3-eap-crashlytics.06423a1af → 1.1.3-eap-crashlytics.659b578fb
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 +17 -28
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +19 -30
- package/dist/index.esm.js.map +1 -1
- package/dist/index.node.cjs.js +23 -33
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.standalone.js +16 -32
- package/dist/index.standalone.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +24 -30
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/package.json +12 -12
package/dist/index.node.cjs.js
CHANGED
|
@@ -8,10 +8,6 @@ var logger$1 = require('@firebase/logger');
|
|
|
8
8
|
var app = require('@firebase/app');
|
|
9
9
|
var component = require('@firebase/component');
|
|
10
10
|
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
-
|
|
13
|
-
var Websocket__default = /*#__PURE__*/_interopDefaultLegacy(Websocket);
|
|
14
|
-
|
|
15
11
|
/**
|
|
16
12
|
* @license
|
|
17
13
|
* Copyright 2017 Google LLC
|
|
@@ -1260,7 +1256,7 @@ WebSocketConnection.responsesRequiredToBeHealthy = 2;
|
|
|
1260
1256
|
WebSocketConnection.healthyTimeout = 30000;
|
|
1261
1257
|
|
|
1262
1258
|
const name = "@firebase/database";
|
|
1263
|
-
const version = "1.1.3-eap-crashlytics.
|
|
1259
|
+
const version = "1.1.3-eap-crashlytics.659b578fb";
|
|
1264
1260
|
|
|
1265
1261
|
/**
|
|
1266
1262
|
* @license
|
|
@@ -10365,15 +10361,12 @@ function treeForEachChild(tree, action) {
|
|
|
10365
10361
|
* parent.
|
|
10366
10362
|
*/
|
|
10367
10363
|
function treeForEachDescendant(tree, action, includeSelf, childrenFirst) {
|
|
10368
|
-
if (includeSelf &&
|
|
10364
|
+
if (includeSelf && true) {
|
|
10369
10365
|
action(tree);
|
|
10370
10366
|
}
|
|
10371
10367
|
treeForEachChild(tree, child => {
|
|
10372
|
-
treeForEachDescendant(child, action, true
|
|
10368
|
+
treeForEachDescendant(child, action, true);
|
|
10373
10369
|
});
|
|
10374
|
-
if (includeSelf && childrenFirst) {
|
|
10375
|
-
action(tree);
|
|
10376
|
-
}
|
|
10377
10370
|
}
|
|
10378
10371
|
/**
|
|
10379
10372
|
* Calls action on each ancestor node.
|
|
@@ -10384,7 +10377,7 @@ function treeForEachDescendant(tree, action, includeSelf, childrenFirst) {
|
|
|
10384
10377
|
* @returns true if the action callback returned true.
|
|
10385
10378
|
*/
|
|
10386
10379
|
function treeForEachAncestor(tree, action, includeSelf) {
|
|
10387
|
-
let node =
|
|
10380
|
+
let node = tree.parent;
|
|
10388
10381
|
while (node !== null) {
|
|
10389
10382
|
if (action(node)) {
|
|
10390
10383
|
return true;
|
|
@@ -10603,9 +10596,6 @@ const validateFirebaseMergePaths = function (errorPrefix, mergePaths) {
|
|
|
10603
10596
|
* must be an object - e.g. for firebase.update()).
|
|
10604
10597
|
*/
|
|
10605
10598
|
const validateFirebaseMergeDataArg = function (fnName, data, path, optional) {
|
|
10606
|
-
if (optional && data === undefined) {
|
|
10607
|
-
return;
|
|
10608
|
-
}
|
|
10609
10599
|
const errorPrefix = util.errorPrefix(fnName, 'values');
|
|
10610
10600
|
if (!(data && typeof data === 'object') || Array.isArray(data)) {
|
|
10611
10601
|
throw new Error(errorPrefix + ' must be an object containing the children to replace.');
|
|
@@ -10628,9 +10618,6 @@ const validateFirebaseMergeDataArg = function (fnName, data, path, optional) {
|
|
|
10628
10618
|
validateFirebaseMergePaths(errorPrefix, mergePaths);
|
|
10629
10619
|
};
|
|
10630
10620
|
const validatePriority = function (fnName, priority, optional) {
|
|
10631
|
-
if (optional && priority === undefined) {
|
|
10632
|
-
return;
|
|
10633
|
-
}
|
|
10634
10621
|
if (isInvalidJSONNumber(priority)) {
|
|
10635
10622
|
throw new Error(util.errorPrefix(fnName, 'priority') +
|
|
10636
10623
|
'is ' +
|
|
@@ -10646,7 +10633,7 @@ const validatePriority = function (fnName, priority, optional) {
|
|
|
10646
10633
|
}
|
|
10647
10634
|
};
|
|
10648
10635
|
const validateKey = function (fnName, argumentName, key, optional) {
|
|
10649
|
-
if (
|
|
10636
|
+
if (key === undefined) {
|
|
10650
10637
|
return;
|
|
10651
10638
|
}
|
|
10652
10639
|
if (!isValidKey(key)) {
|
|
@@ -12178,7 +12165,7 @@ class OnDisconnect {
|
|
|
12178
12165
|
setWithPriority(value, priority) {
|
|
12179
12166
|
validateWritablePath('OnDisconnect.setWithPriority', this._path);
|
|
12180
12167
|
validateFirebaseDataArg('OnDisconnect.setWithPriority', value, this._path, false);
|
|
12181
|
-
validatePriority('OnDisconnect.setWithPriority', priority
|
|
12168
|
+
validatePriority('OnDisconnect.setWithPriority', priority);
|
|
12182
12169
|
const deferred = new util.Deferred();
|
|
12183
12170
|
repoOnDisconnectSetWithPriority(this._repo, this._path, value, priority, deferred.wrapCallback(() => { }));
|
|
12184
12171
|
return deferred.promise;
|
|
@@ -12201,7 +12188,7 @@ class OnDisconnect {
|
|
|
12201
12188
|
*/
|
|
12202
12189
|
update(values) {
|
|
12203
12190
|
validateWritablePath('OnDisconnect.update', this._path);
|
|
12204
|
-
validateFirebaseMergeDataArg('OnDisconnect.update', values, this._path
|
|
12191
|
+
validateFirebaseMergeDataArg('OnDisconnect.update', values, this._path);
|
|
12205
12192
|
const deferred = new util.Deferred();
|
|
12206
12193
|
repoOnDisconnectUpdate(this._repo, this._path, values, deferred.wrapCallback(() => { }));
|
|
12207
12194
|
return deferred.promise;
|
|
@@ -12752,7 +12739,7 @@ function set(ref, value) {
|
|
|
12752
12739
|
function setPriority(ref, priority) {
|
|
12753
12740
|
ref = util.getModularInstance(ref);
|
|
12754
12741
|
validateWritablePath('setPriority', ref._path);
|
|
12755
|
-
validatePriority('setPriority', priority
|
|
12742
|
+
validatePriority('setPriority', priority);
|
|
12756
12743
|
const deferred = new util.Deferred();
|
|
12757
12744
|
repoSetWithPriority(ref._repo, pathChild(ref._path, '.priority'), priority, null, deferred.wrapCallback(() => { }));
|
|
12758
12745
|
return deferred.promise;
|
|
@@ -12775,7 +12762,7 @@ function setPriority(ref, priority) {
|
|
|
12775
12762
|
function setWithPriority(ref, value, priority) {
|
|
12776
12763
|
validateWritablePath('setWithPriority', ref._path);
|
|
12777
12764
|
validateFirebaseDataArg('setWithPriority', value, ref._path, false);
|
|
12778
|
-
validatePriority('setWithPriority', priority
|
|
12765
|
+
validatePriority('setWithPriority', priority);
|
|
12779
12766
|
if (ref.key === '.length' || ref.key === '.keys') {
|
|
12780
12767
|
throw 'setWithPriority failed: ' + ref.key + ' is a read-only object.';
|
|
12781
12768
|
}
|
|
@@ -12819,7 +12806,7 @@ function setWithPriority(ref, value, priority) {
|
|
|
12819
12806
|
* @returns Resolves when update on server is complete.
|
|
12820
12807
|
*/
|
|
12821
12808
|
function update(ref, values) {
|
|
12822
|
-
validateFirebaseMergeDataArg('update', values, ref._path
|
|
12809
|
+
validateFirebaseMergeDataArg('update', values, ref._path);
|
|
12823
12810
|
const deferred = new util.Deferred();
|
|
12824
12811
|
repoUpdate(ref._repo, ref._path, values, deferred.wrapCallback(() => { }));
|
|
12825
12812
|
return deferred.promise;
|
|
@@ -13065,7 +13052,7 @@ class QueryEndAtConstraint extends QueryConstraint {
|
|
|
13065
13052
|
* value, or priority.
|
|
13066
13053
|
*/
|
|
13067
13054
|
function endAt(value, key) {
|
|
13068
|
-
validateKey('endAt', 'key', key
|
|
13055
|
+
validateKey('endAt', 'key', key);
|
|
13069
13056
|
return new QueryEndAtConstraint(value, key);
|
|
13070
13057
|
}
|
|
13071
13058
|
class QueryEndBeforeConstraint extends QueryConstraint {
|
|
@@ -13107,7 +13094,7 @@ class QueryEndBeforeConstraint extends QueryConstraint {
|
|
|
13107
13094
|
* child, value, or priority.
|
|
13108
13095
|
*/
|
|
13109
13096
|
function endBefore(value, key) {
|
|
13110
|
-
validateKey('endBefore', 'key', key
|
|
13097
|
+
validateKey('endBefore', 'key', key);
|
|
13111
13098
|
return new QueryEndBeforeConstraint(value, key);
|
|
13112
13099
|
}
|
|
13113
13100
|
class QueryStartAtConstraint extends QueryConstraint {
|
|
@@ -13152,7 +13139,7 @@ class QueryStartAtConstraint extends QueryConstraint {
|
|
|
13152
13139
|
* ordering by child, value, or priority.
|
|
13153
13140
|
*/
|
|
13154
13141
|
function startAt(value = null, key) {
|
|
13155
|
-
validateKey('startAt', 'key', key
|
|
13142
|
+
validateKey('startAt', 'key', key);
|
|
13156
13143
|
return new QueryStartAtConstraint(value, key);
|
|
13157
13144
|
}
|
|
13158
13145
|
class QueryStartAfterConstraint extends QueryConstraint {
|
|
@@ -13193,7 +13180,7 @@ class QueryStartAfterConstraint extends QueryConstraint {
|
|
|
13193
13180
|
* ordering by child, value, or priority.
|
|
13194
13181
|
*/
|
|
13195
13182
|
function startAfter(value, key) {
|
|
13196
|
-
validateKey('startAfter', 'key', key
|
|
13183
|
+
validateKey('startAfter', 'key', key);
|
|
13197
13184
|
return new QueryStartAfterConstraint(value, key);
|
|
13198
13185
|
}
|
|
13199
13186
|
class QueryLimitToFirstConstraint extends QueryConstraint {
|
|
@@ -13438,7 +13425,7 @@ class QueryEqualToValueConstraint extends QueryConstraint {
|
|
|
13438
13425
|
* child, value, or priority.
|
|
13439
13426
|
*/
|
|
13440
13427
|
function equalTo(value, key) {
|
|
13441
|
-
validateKey('equalTo', 'key', key
|
|
13428
|
+
validateKey('equalTo', 'key', key);
|
|
13442
13429
|
return new QueryEqualToValueConstraint(value, key);
|
|
13443
13430
|
}
|
|
13444
13431
|
/**
|
|
@@ -13482,6 +13469,7 @@ syncTreeSetReferenceConstructor(ReferenceImpl);
|
|
|
13482
13469
|
* See the License for the specific language governing permissions and
|
|
13483
13470
|
* limitations under the License.
|
|
13484
13471
|
*/
|
|
13472
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
13485
13473
|
/**
|
|
13486
13474
|
* This variable is also defined in the firebase Node.js Admin SDK. Before
|
|
13487
13475
|
* modifying this definition, consult the definition in:
|
|
@@ -13786,6 +13774,7 @@ function enableLogging(logger, persistent) {
|
|
|
13786
13774
|
* See the License for the specific language governing permissions and
|
|
13787
13775
|
* limitations under the License.
|
|
13788
13776
|
*/
|
|
13777
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
13789
13778
|
function registerDatabase(variant) {
|
|
13790
13779
|
setSDKVersion(app.SDK_VERSION);
|
|
13791
13780
|
app._registerComponent(new component.Component('database', (container, { instanceIdentifier: url }) => {
|
|
@@ -13954,7 +13943,6 @@ transactionUpdate, options) {
|
|
|
13954
13943
|
* See the License for the specific language governing permissions and
|
|
13955
13944
|
* limitations under the License.
|
|
13956
13945
|
*/
|
|
13957
|
-
PersistentConnection;
|
|
13958
13946
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13959
13947
|
PersistentConnection.prototype.simpleListen = function (pathString, onComplete) {
|
|
13960
13948
|
this.sendRequest('q', { p: pathString }, onComplete);
|
|
@@ -13963,8 +13951,6 @@ PersistentConnection.prototype.simpleListen = function (pathString, onComplete)
|
|
|
13963
13951
|
PersistentConnection.prototype.echo = function (data, onEcho) {
|
|
13964
13952
|
this.sendRequest('echo', { d: data }, onEcho);
|
|
13965
13953
|
};
|
|
13966
|
-
// RealTimeConnection properties that we use in tests.
|
|
13967
|
-
Connection;
|
|
13968
13954
|
/**
|
|
13969
13955
|
* @internal
|
|
13970
13956
|
*/
|
|
@@ -13980,7 +13966,6 @@ const hijackHash = function (newHash) {
|
|
|
13980
13966
|
PersistentConnection.prototype.put = oldPut;
|
|
13981
13967
|
};
|
|
13982
13968
|
};
|
|
13983
|
-
RepoInfo;
|
|
13984
13969
|
/**
|
|
13985
13970
|
* Forces the RepoManager to create Repos that use ReadonlyRestClient instead of PersistentConnection.
|
|
13986
13971
|
* @internal
|
|
@@ -14048,7 +14033,12 @@ function _initStandalone({ app, url, version, customAuthImpl, customAppCheckImpl
|
|
|
14048
14033
|
* See the License for the specific language governing permissions and
|
|
14049
14034
|
* limitations under the License.
|
|
14050
14035
|
*/
|
|
14051
|
-
|
|
14036
|
+
// Use default import to import a cjs library, so we can provide a esm entrypoint for Nodejs.
|
|
14037
|
+
// We can't use named import here because otherwise you will get the following error:
|
|
14038
|
+
// "SyntaxError: Named export 'Client' not found. The requested module 'faye-websocket' is a CommonJS module".
|
|
14039
|
+
// We can change back to using named imports once the lib provides an esm build, however they are not planning to.
|
|
14040
|
+
// see https://github.com/faye/faye-websocket-node/issues/82
|
|
14041
|
+
setWebSocketImpl(Websocket.Client);
|
|
14052
14042
|
registerDatabase('node');
|
|
14053
14043
|
|
|
14054
14044
|
exports.DataSnapshot = DataSnapshot;
|