@firebase/database-compat 1.0.8 → 1.0.9
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 +1 -1
- package/dist/index.js +226 -279
- package/dist/index.js.map +1 -1
- package/dist/index.standalone.js +3262 -3803
- package/dist/index.standalone.js.map +1 -1
- package/dist/node-esm/index.js +1 -1
- package/package.json +10 -9
- package/dist/index.esm5.js +0 -914
- package/dist/index.esm5.js.map +0 -1
package/dist/index.esm5.js
DELETED
@@ -1,914 +0,0 @@
|
|
1
|
-
import firebase from '@firebase/app-compat';
|
2
|
-
import { ComponentContainer, Provider, Component } from '@firebase/component';
|
3
|
-
import { _validatePathString, onChildMoved, onChildChanged, onChildRemoved, onChildAdded, onValue, off, get, query, limitToFirst, limitToLast, orderByChild, orderByKey, orderByPriority, orderByValue, startAt, startAfter, endAt, endBefore, equalTo, _ReferenceImpl, _QueryImpl, _QueryParams, child, set, _validateWritablePath, update, setWithPriority, remove, runTransaction, setPriority, push, OnDisconnect as OnDisconnect$1, connectDatabaseEmulator, refFromURL, ref, goOffline, goOnline, serverTimestamp, increment, forceWebSockets, forceLongPolling, _setSDKVersion, _repoManagerDatabaseFromApp, enableLogging } from '@firebase/database';
|
4
|
-
import { errorPrefix, validateArgCount, validateCallback, validateContextObject, Deferred } from '@firebase/util';
|
5
|
-
import { __extends } from 'tslib';
|
6
|
-
import { Logger } from '@firebase/logger';
|
7
|
-
|
8
|
-
var name = "@firebase/database-compat";
|
9
|
-
var version = "1.0.8";
|
10
|
-
|
11
|
-
/**
|
12
|
-
* @license
|
13
|
-
* Copyright 2021 Google LLC
|
14
|
-
*
|
15
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
16
|
-
* you may not use this file except in compliance with the License.
|
17
|
-
* You may obtain a copy of the License at
|
18
|
-
*
|
19
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
20
|
-
*
|
21
|
-
* Unless required by applicable law or agreed to in writing, software
|
22
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
23
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
24
|
-
* See the License for the specific language governing permissions and
|
25
|
-
* limitations under the License.
|
26
|
-
*/
|
27
|
-
var logClient = new Logger('@firebase/database-compat');
|
28
|
-
var warn = function (msg) {
|
29
|
-
var message = 'FIREBASE WARNING: ' + msg;
|
30
|
-
logClient.warn(message);
|
31
|
-
};
|
32
|
-
|
33
|
-
/**
|
34
|
-
* @license
|
35
|
-
* Copyright 2021 Google LLC
|
36
|
-
*
|
37
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
38
|
-
* you may not use this file except in compliance with the License.
|
39
|
-
* You may obtain a copy of the License at
|
40
|
-
*
|
41
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
42
|
-
*
|
43
|
-
* Unless required by applicable law or agreed to in writing, software
|
44
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
45
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
46
|
-
* See the License for the specific language governing permissions and
|
47
|
-
* limitations under the License.
|
48
|
-
*/
|
49
|
-
var validateBoolean = function (fnName, argumentName, bool, optional) {
|
50
|
-
if (optional && bool === undefined) {
|
51
|
-
return;
|
52
|
-
}
|
53
|
-
if (typeof bool !== 'boolean') {
|
54
|
-
throw new Error(errorPrefix(fnName, argumentName) + 'must be a boolean.');
|
55
|
-
}
|
56
|
-
};
|
57
|
-
var validateEventType = function (fnName, eventType, optional) {
|
58
|
-
if (optional && eventType === undefined) {
|
59
|
-
return;
|
60
|
-
}
|
61
|
-
switch (eventType) {
|
62
|
-
case 'value':
|
63
|
-
case 'child_added':
|
64
|
-
case 'child_removed':
|
65
|
-
case 'child_changed':
|
66
|
-
case 'child_moved':
|
67
|
-
break;
|
68
|
-
default:
|
69
|
-
throw new Error(errorPrefix(fnName, 'eventType') +
|
70
|
-
'must be a valid event type = "value", "child_added", "child_removed", ' +
|
71
|
-
'"child_changed", or "child_moved".');
|
72
|
-
}
|
73
|
-
};
|
74
|
-
|
75
|
-
/**
|
76
|
-
* @license
|
77
|
-
* Copyright 2017 Google LLC
|
78
|
-
*
|
79
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
80
|
-
* you may not use this file except in compliance with the License.
|
81
|
-
* You may obtain a copy of the License at
|
82
|
-
*
|
83
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
84
|
-
*
|
85
|
-
* Unless required by applicable law or agreed to in writing, software
|
86
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
87
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
88
|
-
* See the License for the specific language governing permissions and
|
89
|
-
* limitations under the License.
|
90
|
-
*/
|
91
|
-
var OnDisconnect = /** @class */ (function () {
|
92
|
-
function OnDisconnect(_delegate) {
|
93
|
-
this._delegate = _delegate;
|
94
|
-
}
|
95
|
-
OnDisconnect.prototype.cancel = function (onComplete) {
|
96
|
-
validateArgCount('OnDisconnect.cancel', 0, 1, arguments.length);
|
97
|
-
validateCallback('OnDisconnect.cancel', 'onComplete', onComplete, true);
|
98
|
-
var result = this._delegate.cancel();
|
99
|
-
if (onComplete) {
|
100
|
-
result.then(function () { return onComplete(null); }, function (error) { return onComplete(error); });
|
101
|
-
}
|
102
|
-
return result;
|
103
|
-
};
|
104
|
-
OnDisconnect.prototype.remove = function (onComplete) {
|
105
|
-
validateArgCount('OnDisconnect.remove', 0, 1, arguments.length);
|
106
|
-
validateCallback('OnDisconnect.remove', 'onComplete', onComplete, true);
|
107
|
-
var result = this._delegate.remove();
|
108
|
-
if (onComplete) {
|
109
|
-
result.then(function () { return onComplete(null); }, function (error) { return onComplete(error); });
|
110
|
-
}
|
111
|
-
return result;
|
112
|
-
};
|
113
|
-
OnDisconnect.prototype.set = function (value, onComplete) {
|
114
|
-
validateArgCount('OnDisconnect.set', 1, 2, arguments.length);
|
115
|
-
validateCallback('OnDisconnect.set', 'onComplete', onComplete, true);
|
116
|
-
var result = this._delegate.set(value);
|
117
|
-
if (onComplete) {
|
118
|
-
result.then(function () { return onComplete(null); }, function (error) { return onComplete(error); });
|
119
|
-
}
|
120
|
-
return result;
|
121
|
-
};
|
122
|
-
OnDisconnect.prototype.setWithPriority = function (value, priority, onComplete) {
|
123
|
-
validateArgCount('OnDisconnect.setWithPriority', 2, 3, arguments.length);
|
124
|
-
validateCallback('OnDisconnect.setWithPriority', 'onComplete', onComplete, true);
|
125
|
-
var result = this._delegate.setWithPriority(value, priority);
|
126
|
-
if (onComplete) {
|
127
|
-
result.then(function () { return onComplete(null); }, function (error) { return onComplete(error); });
|
128
|
-
}
|
129
|
-
return result;
|
130
|
-
};
|
131
|
-
OnDisconnect.prototype.update = function (objectToMerge, onComplete) {
|
132
|
-
validateArgCount('OnDisconnect.update', 1, 2, arguments.length);
|
133
|
-
if (Array.isArray(objectToMerge)) {
|
134
|
-
var newObjectToMerge = {};
|
135
|
-
for (var i = 0; i < objectToMerge.length; ++i) {
|
136
|
-
newObjectToMerge['' + i] = objectToMerge[i];
|
137
|
-
}
|
138
|
-
objectToMerge = newObjectToMerge;
|
139
|
-
warn('Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the ' +
|
140
|
-
'existing data, or an Object with integer keys if you really do want to only update some of the children.');
|
141
|
-
}
|
142
|
-
validateCallback('OnDisconnect.update', 'onComplete', onComplete, true);
|
143
|
-
var result = this._delegate.update(objectToMerge);
|
144
|
-
if (onComplete) {
|
145
|
-
result.then(function () { return onComplete(null); }, function (error) { return onComplete(error); });
|
146
|
-
}
|
147
|
-
return result;
|
148
|
-
};
|
149
|
-
return OnDisconnect;
|
150
|
-
}());
|
151
|
-
|
152
|
-
/**
|
153
|
-
* @license
|
154
|
-
* Copyright 2017 Google LLC
|
155
|
-
*
|
156
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
157
|
-
* you may not use this file except in compliance with the License.
|
158
|
-
* You may obtain a copy of the License at
|
159
|
-
*
|
160
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
161
|
-
*
|
162
|
-
* Unless required by applicable law or agreed to in writing, software
|
163
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
164
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
165
|
-
* See the License for the specific language governing permissions and
|
166
|
-
* limitations under the License.
|
167
|
-
*/
|
168
|
-
var TransactionResult = /** @class */ (function () {
|
169
|
-
/**
|
170
|
-
* A type for the resolve value of Firebase.transaction.
|
171
|
-
*/
|
172
|
-
function TransactionResult(committed, snapshot) {
|
173
|
-
this.committed = committed;
|
174
|
-
this.snapshot = snapshot;
|
175
|
-
}
|
176
|
-
// Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary
|
177
|
-
// for end-users
|
178
|
-
TransactionResult.prototype.toJSON = function () {
|
179
|
-
validateArgCount('TransactionResult.toJSON', 0, 1, arguments.length);
|
180
|
-
return { committed: this.committed, snapshot: this.snapshot.toJSON() };
|
181
|
-
};
|
182
|
-
return TransactionResult;
|
183
|
-
}());
|
184
|
-
|
185
|
-
/**
|
186
|
-
* @license
|
187
|
-
* Copyright 2017 Google LLC
|
188
|
-
*
|
189
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
190
|
-
* you may not use this file except in compliance with the License.
|
191
|
-
* You may obtain a copy of the License at
|
192
|
-
*
|
193
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
194
|
-
*
|
195
|
-
* Unless required by applicable law or agreed to in writing, software
|
196
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
197
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
198
|
-
* See the License for the specific language governing permissions and
|
199
|
-
* limitations under the License.
|
200
|
-
*/
|
201
|
-
/**
|
202
|
-
* Class representing a firebase data snapshot. It wraps a SnapshotNode and
|
203
|
-
* surfaces the public methods (val, forEach, etc.) we want to expose.
|
204
|
-
*/
|
205
|
-
var DataSnapshot = /** @class */ (function () {
|
206
|
-
function DataSnapshot(_database, _delegate) {
|
207
|
-
this._database = _database;
|
208
|
-
this._delegate = _delegate;
|
209
|
-
}
|
210
|
-
/**
|
211
|
-
* Retrieves the snapshot contents as JSON. Returns null if the snapshot is
|
212
|
-
* empty.
|
213
|
-
*
|
214
|
-
* @returns JSON representation of the DataSnapshot contents, or null if empty.
|
215
|
-
*/
|
216
|
-
DataSnapshot.prototype.val = function () {
|
217
|
-
validateArgCount('DataSnapshot.val', 0, 0, arguments.length);
|
218
|
-
return this._delegate.val();
|
219
|
-
};
|
220
|
-
/**
|
221
|
-
* Returns the snapshot contents as JSON, including priorities of node. Suitable for exporting
|
222
|
-
* the entire node contents.
|
223
|
-
* @returns JSON representation of the DataSnapshot contents, or null if empty.
|
224
|
-
*/
|
225
|
-
DataSnapshot.prototype.exportVal = function () {
|
226
|
-
validateArgCount('DataSnapshot.exportVal', 0, 0, arguments.length);
|
227
|
-
return this._delegate.exportVal();
|
228
|
-
};
|
229
|
-
// Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary
|
230
|
-
// for end-users
|
231
|
-
DataSnapshot.prototype.toJSON = function () {
|
232
|
-
// Optional spacer argument is unnecessary because we're depending on recursion rather than stringifying the content
|
233
|
-
validateArgCount('DataSnapshot.toJSON', 0, 1, arguments.length);
|
234
|
-
return this._delegate.toJSON();
|
235
|
-
};
|
236
|
-
/**
|
237
|
-
* Returns whether the snapshot contains a non-null value.
|
238
|
-
*
|
239
|
-
* @returns Whether the snapshot contains a non-null value, or is empty.
|
240
|
-
*/
|
241
|
-
DataSnapshot.prototype.exists = function () {
|
242
|
-
validateArgCount('DataSnapshot.exists', 0, 0, arguments.length);
|
243
|
-
return this._delegate.exists();
|
244
|
-
};
|
245
|
-
/**
|
246
|
-
* Returns a DataSnapshot of the specified child node's contents.
|
247
|
-
*
|
248
|
-
* @param path - Path to a child.
|
249
|
-
* @returns DataSnapshot for child node.
|
250
|
-
*/
|
251
|
-
DataSnapshot.prototype.child = function (path) {
|
252
|
-
validateArgCount('DataSnapshot.child', 0, 1, arguments.length);
|
253
|
-
// Ensure the childPath is a string (can be a number)
|
254
|
-
path = String(path);
|
255
|
-
_validatePathString('DataSnapshot.child', 'path', path, false);
|
256
|
-
return new DataSnapshot(this._database, this._delegate.child(path));
|
257
|
-
};
|
258
|
-
/**
|
259
|
-
* Returns whether the snapshot contains a child at the specified path.
|
260
|
-
*
|
261
|
-
* @param path - Path to a child.
|
262
|
-
* @returns Whether the child exists.
|
263
|
-
*/
|
264
|
-
DataSnapshot.prototype.hasChild = function (path) {
|
265
|
-
validateArgCount('DataSnapshot.hasChild', 1, 1, arguments.length);
|
266
|
-
_validatePathString('DataSnapshot.hasChild', 'path', path, false);
|
267
|
-
return this._delegate.hasChild(path);
|
268
|
-
};
|
269
|
-
/**
|
270
|
-
* Returns the priority of the object, or null if no priority was set.
|
271
|
-
*
|
272
|
-
* @returns The priority.
|
273
|
-
*/
|
274
|
-
DataSnapshot.prototype.getPriority = function () {
|
275
|
-
validateArgCount('DataSnapshot.getPriority', 0, 0, arguments.length);
|
276
|
-
return this._delegate.priority;
|
277
|
-
};
|
278
|
-
/**
|
279
|
-
* Iterates through child nodes and calls the specified action for each one.
|
280
|
-
*
|
281
|
-
* @param action - Callback function to be called
|
282
|
-
* for each child.
|
283
|
-
* @returns True if forEach was canceled by action returning true for
|
284
|
-
* one of the child nodes.
|
285
|
-
*/
|
286
|
-
DataSnapshot.prototype.forEach = function (action) {
|
287
|
-
var _this = this;
|
288
|
-
validateArgCount('DataSnapshot.forEach', 1, 1, arguments.length);
|
289
|
-
validateCallback('DataSnapshot.forEach', 'action', action, false);
|
290
|
-
return this._delegate.forEach(function (expDataSnapshot) {
|
291
|
-
return action(new DataSnapshot(_this._database, expDataSnapshot));
|
292
|
-
});
|
293
|
-
};
|
294
|
-
/**
|
295
|
-
* Returns whether this DataSnapshot has children.
|
296
|
-
* @returns True if the DataSnapshot contains 1 or more child nodes.
|
297
|
-
*/
|
298
|
-
DataSnapshot.prototype.hasChildren = function () {
|
299
|
-
validateArgCount('DataSnapshot.hasChildren', 0, 0, arguments.length);
|
300
|
-
return this._delegate.hasChildren();
|
301
|
-
};
|
302
|
-
Object.defineProperty(DataSnapshot.prototype, "key", {
|
303
|
-
get: function () {
|
304
|
-
return this._delegate.key;
|
305
|
-
},
|
306
|
-
enumerable: false,
|
307
|
-
configurable: true
|
308
|
-
});
|
309
|
-
/**
|
310
|
-
* Returns the number of children for this DataSnapshot.
|
311
|
-
* @returns The number of children that this DataSnapshot contains.
|
312
|
-
*/
|
313
|
-
DataSnapshot.prototype.numChildren = function () {
|
314
|
-
validateArgCount('DataSnapshot.numChildren', 0, 0, arguments.length);
|
315
|
-
return this._delegate.size;
|
316
|
-
};
|
317
|
-
/**
|
318
|
-
* @returns The Firebase reference for the location this snapshot's data came
|
319
|
-
* from.
|
320
|
-
*/
|
321
|
-
DataSnapshot.prototype.getRef = function () {
|
322
|
-
validateArgCount('DataSnapshot.ref', 0, 0, arguments.length);
|
323
|
-
return new Reference(this._database, this._delegate.ref);
|
324
|
-
};
|
325
|
-
Object.defineProperty(DataSnapshot.prototype, "ref", {
|
326
|
-
get: function () {
|
327
|
-
return this.getRef();
|
328
|
-
},
|
329
|
-
enumerable: false,
|
330
|
-
configurable: true
|
331
|
-
});
|
332
|
-
return DataSnapshot;
|
333
|
-
}());
|
334
|
-
/**
|
335
|
-
* A Query represents a filter to be applied to a firebase location. This object purely represents the
|
336
|
-
* query expression (and exposes our public API to build the query). The actual query logic is in ViewBase.js.
|
337
|
-
*
|
338
|
-
* Since every Firebase reference is a query, Firebase inherits from this object.
|
339
|
-
*/
|
340
|
-
var Query = /** @class */ (function () {
|
341
|
-
function Query(database, _delegate) {
|
342
|
-
this.database = database;
|
343
|
-
this._delegate = _delegate;
|
344
|
-
}
|
345
|
-
Query.prototype.on = function (eventType, callback, cancelCallbackOrContext, context) {
|
346
|
-
var _this = this;
|
347
|
-
var _a;
|
348
|
-
validateArgCount('Query.on', 2, 4, arguments.length);
|
349
|
-
validateCallback('Query.on', 'callback', callback, false);
|
350
|
-
var ret = Query.getCancelAndContextArgs_('Query.on', cancelCallbackOrContext, context);
|
351
|
-
var valueCallback = function (expSnapshot, previousChildName) {
|
352
|
-
callback.call(ret.context, new DataSnapshot(_this.database, expSnapshot), previousChildName);
|
353
|
-
};
|
354
|
-
valueCallback.userCallback = callback;
|
355
|
-
valueCallback.context = ret.context;
|
356
|
-
var cancelCallback = (_a = ret.cancel) === null || _a === void 0 ? void 0 : _a.bind(ret.context);
|
357
|
-
switch (eventType) {
|
358
|
-
case 'value':
|
359
|
-
onValue(this._delegate, valueCallback, cancelCallback);
|
360
|
-
return callback;
|
361
|
-
case 'child_added':
|
362
|
-
onChildAdded(this._delegate, valueCallback, cancelCallback);
|
363
|
-
return callback;
|
364
|
-
case 'child_removed':
|
365
|
-
onChildRemoved(this._delegate, valueCallback, cancelCallback);
|
366
|
-
return callback;
|
367
|
-
case 'child_changed':
|
368
|
-
onChildChanged(this._delegate, valueCallback, cancelCallback);
|
369
|
-
return callback;
|
370
|
-
case 'child_moved':
|
371
|
-
onChildMoved(this._delegate, valueCallback, cancelCallback);
|
372
|
-
return callback;
|
373
|
-
default:
|
374
|
-
throw new Error(errorPrefix('Query.on', 'eventType') +
|
375
|
-
'must be a valid event type = "value", "child_added", "child_removed", ' +
|
376
|
-
'"child_changed", or "child_moved".');
|
377
|
-
}
|
378
|
-
};
|
379
|
-
Query.prototype.off = function (eventType, callback, context) {
|
380
|
-
validateArgCount('Query.off', 0, 3, arguments.length);
|
381
|
-
validateEventType('Query.off', eventType, true);
|
382
|
-
validateCallback('Query.off', 'callback', callback, true);
|
383
|
-
validateContextObject('Query.off', 'context', context, true);
|
384
|
-
if (callback) {
|
385
|
-
var valueCallback = function () { };
|
386
|
-
valueCallback.userCallback = callback;
|
387
|
-
valueCallback.context = context;
|
388
|
-
off(this._delegate, eventType, valueCallback);
|
389
|
-
}
|
390
|
-
else {
|
391
|
-
off(this._delegate, eventType);
|
392
|
-
}
|
393
|
-
};
|
394
|
-
/**
|
395
|
-
* Get the server-value for this query, or return a cached value if not connected.
|
396
|
-
*/
|
397
|
-
Query.prototype.get = function () {
|
398
|
-
var _this = this;
|
399
|
-
return get(this._delegate).then(function (expSnapshot) {
|
400
|
-
return new DataSnapshot(_this.database, expSnapshot);
|
401
|
-
});
|
402
|
-
};
|
403
|
-
/**
|
404
|
-
* Attaches a listener, waits for the first event, and then removes the listener
|
405
|
-
*/
|
406
|
-
Query.prototype.once = function (eventType, callback, failureCallbackOrContext, context) {
|
407
|
-
var _this = this;
|
408
|
-
validateArgCount('Query.once', 1, 4, arguments.length);
|
409
|
-
validateCallback('Query.once', 'callback', callback, true);
|
410
|
-
var ret = Query.getCancelAndContextArgs_('Query.once', failureCallbackOrContext, context);
|
411
|
-
var deferred = new Deferred();
|
412
|
-
var valueCallback = function (expSnapshot, previousChildName) {
|
413
|
-
var result = new DataSnapshot(_this.database, expSnapshot);
|
414
|
-
if (callback) {
|
415
|
-
callback.call(ret.context, result, previousChildName);
|
416
|
-
}
|
417
|
-
deferred.resolve(result);
|
418
|
-
};
|
419
|
-
valueCallback.userCallback = callback;
|
420
|
-
valueCallback.context = ret.context;
|
421
|
-
var cancelCallback = function (error) {
|
422
|
-
if (ret.cancel) {
|
423
|
-
ret.cancel.call(ret.context, error);
|
424
|
-
}
|
425
|
-
deferred.reject(error);
|
426
|
-
};
|
427
|
-
switch (eventType) {
|
428
|
-
case 'value':
|
429
|
-
onValue(this._delegate, valueCallback, cancelCallback, {
|
430
|
-
onlyOnce: true
|
431
|
-
});
|
432
|
-
break;
|
433
|
-
case 'child_added':
|
434
|
-
onChildAdded(this._delegate, valueCallback, cancelCallback, {
|
435
|
-
onlyOnce: true
|
436
|
-
});
|
437
|
-
break;
|
438
|
-
case 'child_removed':
|
439
|
-
onChildRemoved(this._delegate, valueCallback, cancelCallback, {
|
440
|
-
onlyOnce: true
|
441
|
-
});
|
442
|
-
break;
|
443
|
-
case 'child_changed':
|
444
|
-
onChildChanged(this._delegate, valueCallback, cancelCallback, {
|
445
|
-
onlyOnce: true
|
446
|
-
});
|
447
|
-
break;
|
448
|
-
case 'child_moved':
|
449
|
-
onChildMoved(this._delegate, valueCallback, cancelCallback, {
|
450
|
-
onlyOnce: true
|
451
|
-
});
|
452
|
-
break;
|
453
|
-
default:
|
454
|
-
throw new Error(errorPrefix('Query.once', 'eventType') +
|
455
|
-
'must be a valid event type = "value", "child_added", "child_removed", ' +
|
456
|
-
'"child_changed", or "child_moved".');
|
457
|
-
}
|
458
|
-
return deferred.promise;
|
459
|
-
};
|
460
|
-
/**
|
461
|
-
* Set a limit and anchor it to the start of the window.
|
462
|
-
*/
|
463
|
-
Query.prototype.limitToFirst = function (limit) {
|
464
|
-
validateArgCount('Query.limitToFirst', 1, 1, arguments.length);
|
465
|
-
return new Query(this.database, query(this._delegate, limitToFirst(limit)));
|
466
|
-
};
|
467
|
-
/**
|
468
|
-
* Set a limit and anchor it to the end of the window.
|
469
|
-
*/
|
470
|
-
Query.prototype.limitToLast = function (limit) {
|
471
|
-
validateArgCount('Query.limitToLast', 1, 1, arguments.length);
|
472
|
-
return new Query(this.database, query(this._delegate, limitToLast(limit)));
|
473
|
-
};
|
474
|
-
/**
|
475
|
-
* Given a child path, return a new query ordered by the specified grandchild path.
|
476
|
-
*/
|
477
|
-
Query.prototype.orderByChild = function (path) {
|
478
|
-
validateArgCount('Query.orderByChild', 1, 1, arguments.length);
|
479
|
-
return new Query(this.database, query(this._delegate, orderByChild(path)));
|
480
|
-
};
|
481
|
-
/**
|
482
|
-
* Return a new query ordered by the KeyIndex
|
483
|
-
*/
|
484
|
-
Query.prototype.orderByKey = function () {
|
485
|
-
validateArgCount('Query.orderByKey', 0, 0, arguments.length);
|
486
|
-
return new Query(this.database, query(this._delegate, orderByKey()));
|
487
|
-
};
|
488
|
-
/**
|
489
|
-
* Return a new query ordered by the PriorityIndex
|
490
|
-
*/
|
491
|
-
Query.prototype.orderByPriority = function () {
|
492
|
-
validateArgCount('Query.orderByPriority', 0, 0, arguments.length);
|
493
|
-
return new Query(this.database, query(this._delegate, orderByPriority()));
|
494
|
-
};
|
495
|
-
/**
|
496
|
-
* Return a new query ordered by the ValueIndex
|
497
|
-
*/
|
498
|
-
Query.prototype.orderByValue = function () {
|
499
|
-
validateArgCount('Query.orderByValue', 0, 0, arguments.length);
|
500
|
-
return new Query(this.database, query(this._delegate, orderByValue()));
|
501
|
-
};
|
502
|
-
Query.prototype.startAt = function (value, name) {
|
503
|
-
if (value === void 0) { value = null; }
|
504
|
-
validateArgCount('Query.startAt', 0, 2, arguments.length);
|
505
|
-
return new Query(this.database, query(this._delegate, startAt(value, name)));
|
506
|
-
};
|
507
|
-
Query.prototype.startAfter = function (value, name) {
|
508
|
-
if (value === void 0) { value = null; }
|
509
|
-
validateArgCount('Query.startAfter', 0, 2, arguments.length);
|
510
|
-
return new Query(this.database, query(this._delegate, startAfter(value, name)));
|
511
|
-
};
|
512
|
-
Query.prototype.endAt = function (value, name) {
|
513
|
-
if (value === void 0) { value = null; }
|
514
|
-
validateArgCount('Query.endAt', 0, 2, arguments.length);
|
515
|
-
return new Query(this.database, query(this._delegate, endAt(value, name)));
|
516
|
-
};
|
517
|
-
Query.prototype.endBefore = function (value, name) {
|
518
|
-
if (value === void 0) { value = null; }
|
519
|
-
validateArgCount('Query.endBefore', 0, 2, arguments.length);
|
520
|
-
return new Query(this.database, query(this._delegate, endBefore(value, name)));
|
521
|
-
};
|
522
|
-
/**
|
523
|
-
* Load the selection of children with exactly the specified value, and, optionally,
|
524
|
-
* the specified name.
|
525
|
-
*/
|
526
|
-
Query.prototype.equalTo = function (value, name) {
|
527
|
-
validateArgCount('Query.equalTo', 1, 2, arguments.length);
|
528
|
-
return new Query(this.database, query(this._delegate, equalTo(value, name)));
|
529
|
-
};
|
530
|
-
/**
|
531
|
-
* @returns URL for this location.
|
532
|
-
*/
|
533
|
-
Query.prototype.toString = function () {
|
534
|
-
validateArgCount('Query.toString', 0, 0, arguments.length);
|
535
|
-
return this._delegate.toString();
|
536
|
-
};
|
537
|
-
// Do not create public documentation. This is intended to make JSON serialization work but is otherwise unnecessary
|
538
|
-
// for end-users.
|
539
|
-
Query.prototype.toJSON = function () {
|
540
|
-
// An optional spacer argument is unnecessary for a string.
|
541
|
-
validateArgCount('Query.toJSON', 0, 1, arguments.length);
|
542
|
-
return this._delegate.toJSON();
|
543
|
-
};
|
544
|
-
/**
|
545
|
-
* Return true if this query and the provided query are equivalent; otherwise, return false.
|
546
|
-
*/
|
547
|
-
Query.prototype.isEqual = function (other) {
|
548
|
-
validateArgCount('Query.isEqual', 1, 1, arguments.length);
|
549
|
-
if (!(other instanceof Query)) {
|
550
|
-
var error = 'Query.isEqual failed: First argument must be an instance of firebase.database.Query.';
|
551
|
-
throw new Error(error);
|
552
|
-
}
|
553
|
-
return this._delegate.isEqual(other._delegate);
|
554
|
-
};
|
555
|
-
/**
|
556
|
-
* Helper used by .on and .once to extract the context and or cancel arguments.
|
557
|
-
* @param fnName - The function name (on or once)
|
558
|
-
*
|
559
|
-
*/
|
560
|
-
Query.getCancelAndContextArgs_ = function (fnName, cancelOrContext, context) {
|
561
|
-
var ret = { cancel: undefined, context: undefined };
|
562
|
-
if (cancelOrContext && context) {
|
563
|
-
ret.cancel = cancelOrContext;
|
564
|
-
validateCallback(fnName, 'cancel', ret.cancel, true);
|
565
|
-
ret.context = context;
|
566
|
-
validateContextObject(fnName, 'context', ret.context, true);
|
567
|
-
}
|
568
|
-
else if (cancelOrContext) {
|
569
|
-
// we have either a cancel callback or a context.
|
570
|
-
if (typeof cancelOrContext === 'object' && cancelOrContext !== null) {
|
571
|
-
// it's a context!
|
572
|
-
ret.context = cancelOrContext;
|
573
|
-
}
|
574
|
-
else if (typeof cancelOrContext === 'function') {
|
575
|
-
ret.cancel = cancelOrContext;
|
576
|
-
}
|
577
|
-
else {
|
578
|
-
throw new Error(errorPrefix(fnName, 'cancelOrContext') +
|
579
|
-
' must either be a cancel callback or a context object.');
|
580
|
-
}
|
581
|
-
}
|
582
|
-
return ret;
|
583
|
-
};
|
584
|
-
Object.defineProperty(Query.prototype, "ref", {
|
585
|
-
get: function () {
|
586
|
-
return new Reference(this.database, new _ReferenceImpl(this._delegate._repo, this._delegate._path));
|
587
|
-
},
|
588
|
-
enumerable: false,
|
589
|
-
configurable: true
|
590
|
-
});
|
591
|
-
return Query;
|
592
|
-
}());
|
593
|
-
var Reference = /** @class */ (function (_super) {
|
594
|
-
__extends(Reference, _super);
|
595
|
-
/**
|
596
|
-
* Call options:
|
597
|
-
* new Reference(Repo, Path) or
|
598
|
-
* new Reference(url: string, string|RepoManager)
|
599
|
-
*
|
600
|
-
* Externally - this is the firebase.database.Reference type.
|
601
|
-
*/
|
602
|
-
function Reference(database, _delegate) {
|
603
|
-
var _this = _super.call(this, database, new _QueryImpl(_delegate._repo, _delegate._path, new _QueryParams(), false)) || this;
|
604
|
-
_this.database = database;
|
605
|
-
_this._delegate = _delegate;
|
606
|
-
return _this;
|
607
|
-
}
|
608
|
-
/** @returns {?string} */
|
609
|
-
Reference.prototype.getKey = function () {
|
610
|
-
validateArgCount('Reference.key', 0, 0, arguments.length);
|
611
|
-
return this._delegate.key;
|
612
|
-
};
|
613
|
-
Reference.prototype.child = function (pathString) {
|
614
|
-
validateArgCount('Reference.child', 1, 1, arguments.length);
|
615
|
-
if (typeof pathString === 'number') {
|
616
|
-
pathString = String(pathString);
|
617
|
-
}
|
618
|
-
return new Reference(this.database, child(this._delegate, pathString));
|
619
|
-
};
|
620
|
-
/** @returns {?Reference} */
|
621
|
-
Reference.prototype.getParent = function () {
|
622
|
-
validateArgCount('Reference.parent', 0, 0, arguments.length);
|
623
|
-
var parent = this._delegate.parent;
|
624
|
-
return parent ? new Reference(this.database, parent) : null;
|
625
|
-
};
|
626
|
-
/** @returns {!Reference} */
|
627
|
-
Reference.prototype.getRoot = function () {
|
628
|
-
validateArgCount('Reference.root', 0, 0, arguments.length);
|
629
|
-
return new Reference(this.database, this._delegate.root);
|
630
|
-
};
|
631
|
-
Reference.prototype.set = function (newVal, onComplete) {
|
632
|
-
validateArgCount('Reference.set', 1, 2, arguments.length);
|
633
|
-
validateCallback('Reference.set', 'onComplete', onComplete, true);
|
634
|
-
var result = set(this._delegate, newVal);
|
635
|
-
if (onComplete) {
|
636
|
-
result.then(function () { return onComplete(null); }, function (error) { return onComplete(error); });
|
637
|
-
}
|
638
|
-
return result;
|
639
|
-
};
|
640
|
-
Reference.prototype.update = function (values, onComplete) {
|
641
|
-
validateArgCount('Reference.update', 1, 2, arguments.length);
|
642
|
-
if (Array.isArray(values)) {
|
643
|
-
var newObjectToMerge = {};
|
644
|
-
for (var i = 0; i < values.length; ++i) {
|
645
|
-
newObjectToMerge['' + i] = values[i];
|
646
|
-
}
|
647
|
-
values = newObjectToMerge;
|
648
|
-
warn('Passing an Array to Firebase.update() is deprecated. ' +
|
649
|
-
'Use set() if you want to overwrite the existing data, or ' +
|
650
|
-
'an Object with integer keys if you really do want to ' +
|
651
|
-
'only update some of the children.');
|
652
|
-
}
|
653
|
-
_validateWritablePath('Reference.update', this._delegate._path);
|
654
|
-
validateCallback('Reference.update', 'onComplete', onComplete, true);
|
655
|
-
var result = update(this._delegate, values);
|
656
|
-
if (onComplete) {
|
657
|
-
result.then(function () { return onComplete(null); }, function (error) { return onComplete(error); });
|
658
|
-
}
|
659
|
-
return result;
|
660
|
-
};
|
661
|
-
Reference.prototype.setWithPriority = function (newVal, newPriority, onComplete) {
|
662
|
-
validateArgCount('Reference.setWithPriority', 2, 3, arguments.length);
|
663
|
-
validateCallback('Reference.setWithPriority', 'onComplete', onComplete, true);
|
664
|
-
var result = setWithPriority(this._delegate, newVal, newPriority);
|
665
|
-
if (onComplete) {
|
666
|
-
result.then(function () { return onComplete(null); }, function (error) { return onComplete(error); });
|
667
|
-
}
|
668
|
-
return result;
|
669
|
-
};
|
670
|
-
Reference.prototype.remove = function (onComplete) {
|
671
|
-
validateArgCount('Reference.remove', 0, 1, arguments.length);
|
672
|
-
validateCallback('Reference.remove', 'onComplete', onComplete, true);
|
673
|
-
var result = remove(this._delegate);
|
674
|
-
if (onComplete) {
|
675
|
-
result.then(function () { return onComplete(null); }, function (error) { return onComplete(error); });
|
676
|
-
}
|
677
|
-
return result;
|
678
|
-
};
|
679
|
-
Reference.prototype.transaction = function (transactionUpdate, onComplete, applyLocally) {
|
680
|
-
var _this = this;
|
681
|
-
validateArgCount('Reference.transaction', 1, 3, arguments.length);
|
682
|
-
validateCallback('Reference.transaction', 'transactionUpdate', transactionUpdate, false);
|
683
|
-
validateCallback('Reference.transaction', 'onComplete', onComplete, true);
|
684
|
-
validateBoolean('Reference.transaction', 'applyLocally', applyLocally, true);
|
685
|
-
var result = runTransaction(this._delegate, transactionUpdate, {
|
686
|
-
applyLocally: applyLocally
|
687
|
-
}).then(function (transactionResult) {
|
688
|
-
return new TransactionResult(transactionResult.committed, new DataSnapshot(_this.database, transactionResult.snapshot));
|
689
|
-
});
|
690
|
-
if (onComplete) {
|
691
|
-
result.then(function (transactionResult) {
|
692
|
-
return onComplete(null, transactionResult.committed, transactionResult.snapshot);
|
693
|
-
}, function (error) { return onComplete(error, false, null); });
|
694
|
-
}
|
695
|
-
return result;
|
696
|
-
};
|
697
|
-
Reference.prototype.setPriority = function (priority, onComplete) {
|
698
|
-
validateArgCount('Reference.setPriority', 1, 2, arguments.length);
|
699
|
-
validateCallback('Reference.setPriority', 'onComplete', onComplete, true);
|
700
|
-
var result = setPriority(this._delegate, priority);
|
701
|
-
if (onComplete) {
|
702
|
-
result.then(function () { return onComplete(null); }, function (error) { return onComplete(error); });
|
703
|
-
}
|
704
|
-
return result;
|
705
|
-
};
|
706
|
-
Reference.prototype.push = function (value, onComplete) {
|
707
|
-
var _this = this;
|
708
|
-
validateArgCount('Reference.push', 0, 2, arguments.length);
|
709
|
-
validateCallback('Reference.push', 'onComplete', onComplete, true);
|
710
|
-
var expPromise = push(this._delegate, value);
|
711
|
-
var promise = expPromise.then(function (expRef) { return new Reference(_this.database, expRef); });
|
712
|
-
if (onComplete) {
|
713
|
-
promise.then(function () { return onComplete(null); }, function (error) { return onComplete(error); });
|
714
|
-
}
|
715
|
-
var result = new Reference(this.database, expPromise);
|
716
|
-
result.then = promise.then.bind(promise);
|
717
|
-
result.catch = promise.catch.bind(promise, undefined);
|
718
|
-
return result;
|
719
|
-
};
|
720
|
-
Reference.prototype.onDisconnect = function () {
|
721
|
-
_validateWritablePath('Reference.onDisconnect', this._delegate._path);
|
722
|
-
return new OnDisconnect(new OnDisconnect$1(this._delegate._repo, this._delegate._path));
|
723
|
-
};
|
724
|
-
Object.defineProperty(Reference.prototype, "key", {
|
725
|
-
get: function () {
|
726
|
-
return this.getKey();
|
727
|
-
},
|
728
|
-
enumerable: false,
|
729
|
-
configurable: true
|
730
|
-
});
|
731
|
-
Object.defineProperty(Reference.prototype, "parent", {
|
732
|
-
get: function () {
|
733
|
-
return this.getParent();
|
734
|
-
},
|
735
|
-
enumerable: false,
|
736
|
-
configurable: true
|
737
|
-
});
|
738
|
-
Object.defineProperty(Reference.prototype, "root", {
|
739
|
-
get: function () {
|
740
|
-
return this.getRoot();
|
741
|
-
},
|
742
|
-
enumerable: false,
|
743
|
-
configurable: true
|
744
|
-
});
|
745
|
-
return Reference;
|
746
|
-
}(Query));
|
747
|
-
|
748
|
-
/**
|
749
|
-
* @license
|
750
|
-
* Copyright 2017 Google LLC
|
751
|
-
*
|
752
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
753
|
-
* you may not use this file except in compliance with the License.
|
754
|
-
* You may obtain a copy of the License at
|
755
|
-
*
|
756
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
757
|
-
*
|
758
|
-
* Unless required by applicable law or agreed to in writing, software
|
759
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
760
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
761
|
-
* See the License for the specific language governing permissions and
|
762
|
-
* limitations under the License.
|
763
|
-
*/
|
764
|
-
/**
|
765
|
-
* Class representing a firebase database.
|
766
|
-
*/
|
767
|
-
var Database = /** @class */ (function () {
|
768
|
-
/**
|
769
|
-
* The constructor should not be called by users of our public API.
|
770
|
-
*/
|
771
|
-
function Database(_delegate, app) {
|
772
|
-
var _this = this;
|
773
|
-
this._delegate = _delegate;
|
774
|
-
this.app = app;
|
775
|
-
this.INTERNAL = {
|
776
|
-
delete: function () { return _this._delegate._delete(); },
|
777
|
-
forceWebSockets: forceWebSockets,
|
778
|
-
forceLongPolling: forceLongPolling
|
779
|
-
};
|
780
|
-
}
|
781
|
-
/**
|
782
|
-
* Modify this instance to communicate with the Realtime Database emulator.
|
783
|
-
*
|
784
|
-
* <p>Note: This method must be called before performing any other operation.
|
785
|
-
*
|
786
|
-
* @param host - the emulator host (ex: localhost)
|
787
|
-
* @param port - the emulator port (ex: 8080)
|
788
|
-
* @param options.mockUserToken - the mock auth token to use for unit testing Security Rules
|
789
|
-
*/
|
790
|
-
Database.prototype.useEmulator = function (host, port, options) {
|
791
|
-
if (options === void 0) { options = {}; }
|
792
|
-
connectDatabaseEmulator(this._delegate, host, port, options);
|
793
|
-
};
|
794
|
-
Database.prototype.ref = function (path) {
|
795
|
-
validateArgCount('database.ref', 0, 1, arguments.length);
|
796
|
-
if (path instanceof Reference) {
|
797
|
-
var childRef = refFromURL(this._delegate, path.toString());
|
798
|
-
return new Reference(this, childRef);
|
799
|
-
}
|
800
|
-
else {
|
801
|
-
var childRef = ref(this._delegate, path);
|
802
|
-
return new Reference(this, childRef);
|
803
|
-
}
|
804
|
-
};
|
805
|
-
/**
|
806
|
-
* Returns a reference to the root or the path specified in url.
|
807
|
-
* We throw a exception if the url is not in the same domain as the
|
808
|
-
* current repo.
|
809
|
-
* @returns Firebase reference.
|
810
|
-
*/
|
811
|
-
Database.prototype.refFromURL = function (url) {
|
812
|
-
var apiName = 'database.refFromURL';
|
813
|
-
validateArgCount(apiName, 1, 1, arguments.length);
|
814
|
-
var childRef = refFromURL(this._delegate, url);
|
815
|
-
return new Reference(this, childRef);
|
816
|
-
};
|
817
|
-
// Make individual repo go offline.
|
818
|
-
Database.prototype.goOffline = function () {
|
819
|
-
validateArgCount('database.goOffline', 0, 0, arguments.length);
|
820
|
-
return goOffline(this._delegate);
|
821
|
-
};
|
822
|
-
Database.prototype.goOnline = function () {
|
823
|
-
validateArgCount('database.goOnline', 0, 0, arguments.length);
|
824
|
-
return goOnline(this._delegate);
|
825
|
-
};
|
826
|
-
Database.ServerValue = {
|
827
|
-
TIMESTAMP: serverTimestamp(),
|
828
|
-
increment: function (delta) { return increment(delta); }
|
829
|
-
};
|
830
|
-
return Database;
|
831
|
-
}());
|
832
|
-
|
833
|
-
/**
|
834
|
-
* Used by console to create a database based on the app,
|
835
|
-
* passed database URL and a custom auth implementation.
|
836
|
-
*
|
837
|
-
* @param app - A valid FirebaseApp-like object
|
838
|
-
* @param url - A valid Firebase databaseURL
|
839
|
-
* @param version - custom version e.g. firebase-admin version
|
840
|
-
* @param customAuthImpl - custom auth implementation
|
841
|
-
*/
|
842
|
-
function initStandalone(_a) {
|
843
|
-
var app = _a.app, url = _a.url, version = _a.version, customAuthImpl = _a.customAuthImpl, customAppCheckImpl = _a.customAppCheckImpl, namespace = _a.namespace, _b = _a.nodeAdmin, nodeAdmin = _b === void 0 ? false : _b;
|
844
|
-
_setSDKVersion(version);
|
845
|
-
var container = new ComponentContainer('database-standalone');
|
846
|
-
/**
|
847
|
-
* ComponentContainer('database-standalone') is just a placeholder that doesn't perform
|
848
|
-
* any actual function.
|
849
|
-
*/
|
850
|
-
var authProvider = new Provider('auth-internal', container);
|
851
|
-
authProvider.setComponent(new Component('auth-internal', function () { return customAuthImpl; }, "PRIVATE" /* ComponentType.PRIVATE */));
|
852
|
-
var appCheckProvider = undefined;
|
853
|
-
if (customAppCheckImpl) {
|
854
|
-
appCheckProvider = new Provider('app-check-internal', container);
|
855
|
-
appCheckProvider.setComponent(new Component('app-check-internal', function () { return customAppCheckImpl; }, "PRIVATE" /* ComponentType.PRIVATE */));
|
856
|
-
}
|
857
|
-
return {
|
858
|
-
instance: new Database(_repoManagerDatabaseFromApp(app, authProvider, appCheckProvider, url, nodeAdmin), app),
|
859
|
-
namespace: namespace
|
860
|
-
};
|
861
|
-
}
|
862
|
-
|
863
|
-
var INTERNAL = /*#__PURE__*/Object.freeze({
|
864
|
-
__proto__: null,
|
865
|
-
initStandalone: initStandalone
|
866
|
-
});
|
867
|
-
|
868
|
-
/**
|
869
|
-
* @license
|
870
|
-
* Copyright 2021 Google LLC
|
871
|
-
*
|
872
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
873
|
-
* you may not use this file except in compliance with the License.
|
874
|
-
* You may obtain a copy of the License at
|
875
|
-
*
|
876
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
877
|
-
*
|
878
|
-
* Unless required by applicable law or agreed to in writing, software
|
879
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
880
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
881
|
-
* See the License for the specific language governing permissions and
|
882
|
-
* limitations under the License.
|
883
|
-
*/
|
884
|
-
var ServerValue = Database.ServerValue;
|
885
|
-
function registerDatabase(instance) {
|
886
|
-
// Register the Database Service with the 'firebase' namespace.
|
887
|
-
instance.INTERNAL.registerComponent(new Component('database-compat', function (container, _a) {
|
888
|
-
var url = _a.instanceIdentifier;
|
889
|
-
/* Dependencies */
|
890
|
-
// getImmediate for FirebaseApp will always succeed
|
891
|
-
var app = container.getProvider('app-compat').getImmediate();
|
892
|
-
var databaseExp = container
|
893
|
-
.getProvider('database')
|
894
|
-
.getImmediate({ identifier: url });
|
895
|
-
return new Database(databaseExp, app);
|
896
|
-
}, "PUBLIC" /* ComponentType.PUBLIC */)
|
897
|
-
.setServiceProps(
|
898
|
-
// firebase.database namespace properties
|
899
|
-
{
|
900
|
-
Reference: Reference,
|
901
|
-
Query: Query,
|
902
|
-
Database: Database,
|
903
|
-
DataSnapshot: DataSnapshot,
|
904
|
-
enableLogging: enableLogging,
|
905
|
-
INTERNAL: INTERNAL,
|
906
|
-
ServerValue: ServerValue
|
907
|
-
})
|
908
|
-
.setMultipleInstances(true));
|
909
|
-
instance.registerVersion(name, version);
|
910
|
-
}
|
911
|
-
registerDatabase(firebase);
|
912
|
-
|
913
|
-
export { registerDatabase };
|
914
|
-
//# sourceMappingURL=index.esm5.js.map
|