@firebase/database-compat 2.1.4 → 2.1.5-eap-crashlytics.e21972d2a
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.esm.js +8 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/dist/index.standalone.js +146 -116
- package/dist/index.standalone.js.map +1 -1
- package/dist/node-esm/index.js +8 -6
- package/dist/node-esm/index.js.map +1 -1
- package/package.json +23 -11
package/dist/index.standalone.js
CHANGED
|
@@ -14,20 +14,6 @@ var require$$2$3 = require('@firebase/util');
|
|
|
14
14
|
var require$$1$3 = require('@firebase/logger');
|
|
15
15
|
var require$$0$2 = require('@firebase/component');
|
|
16
16
|
|
|
17
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
|
-
|
|
19
|
-
var require$$2__default = /*#__PURE__*/_interopDefaultLegacy(require$$2);
|
|
20
|
-
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
21
|
-
var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
|
|
22
|
-
var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$1);
|
|
23
|
-
var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
|
|
24
|
-
var require$$2__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$2$1);
|
|
25
|
-
var require$$1__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$1$2);
|
|
26
|
-
var require$$2__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$2$2);
|
|
27
|
-
var require$$2__default$3 = /*#__PURE__*/_interopDefaultLegacy(require$$2$3);
|
|
28
|
-
var require$$1__default$3 = /*#__PURE__*/_interopDefaultLegacy(require$$1$3);
|
|
29
|
-
var require$$0__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$0$2);
|
|
30
|
-
|
|
31
17
|
function getAugmentedNamespace(n) {
|
|
32
18
|
if (n.__esModule) return n;
|
|
33
19
|
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
@@ -51,7 +37,7 @@ var safeBuffer = {exports: {}};
|
|
|
51
37
|
|
|
52
38
|
(function (module, exports) {
|
|
53
39
|
/* eslint-disable node/no-deprecated-api */
|
|
54
|
-
var buffer = require$$
|
|
40
|
+
var buffer = require$$0;
|
|
55
41
|
var Buffer = buffer.Buffer;
|
|
56
42
|
|
|
57
43
|
// alternative to using Object.keys for old browsers
|
|
@@ -161,8 +147,8 @@ driver having these two methods.
|
|
|
161
147
|
**/
|
|
162
148
|
|
|
163
149
|
|
|
164
|
-
var Stream$3 = require$$
|
|
165
|
-
util$c = require$$
|
|
150
|
+
var Stream$3 = require$$0$1.Stream,
|
|
151
|
+
util$c = require$$2;
|
|
166
152
|
|
|
167
153
|
|
|
168
154
|
var IO = function(driver) {
|
|
@@ -366,8 +352,8 @@ StreamReader.prototype.eachByte = function(callback, context) {
|
|
|
366
352
|
var stream_reader = StreamReader;
|
|
367
353
|
|
|
368
354
|
var Buffer$8 = safeBuffer.exports.Buffer,
|
|
369
|
-
Emitter = require$$
|
|
370
|
-
util$b = require$$
|
|
355
|
+
Emitter = require$$1.EventEmitter,
|
|
356
|
+
util$b = require$$2,
|
|
371
357
|
streams = streams$1,
|
|
372
358
|
Headers$2 = headers,
|
|
373
359
|
Reader = stream_reader;
|
|
@@ -1748,8 +1734,8 @@ for (var key$8 in instance$8)
|
|
|
1748
1734
|
var message = Message$1;
|
|
1749
1735
|
|
|
1750
1736
|
var Buffer$5 = safeBuffer.exports.Buffer,
|
|
1751
|
-
crypto$2 = require$$
|
|
1752
|
-
util$a = require$$
|
|
1737
|
+
crypto$2 = require$$1$1,
|
|
1738
|
+
util$a = require$$2,
|
|
1753
1739
|
Extensions = websocket_extensions,
|
|
1754
1740
|
Base$6 = base,
|
|
1755
1741
|
Frame = frame,
|
|
@@ -2199,7 +2185,12 @@ var instance$7 = {
|
|
|
2199
2185
|
if (error) return this._fail('extension_error', error.message);
|
|
2200
2186
|
|
|
2201
2187
|
var payload = message.data;
|
|
2202
|
-
|
|
2188
|
+
|
|
2189
|
+
if (payload.length > this._maxLength)
|
|
2190
|
+
return this._fail('too_large', 'WebSocket frame length too large');
|
|
2191
|
+
|
|
2192
|
+
if (message.opcode === this.OPCODES.text)
|
|
2193
|
+
payload = this._encode(payload);
|
|
2203
2194
|
|
|
2204
2195
|
if (payload === null)
|
|
2205
2196
|
return this._fail('encoding_error', 'Could not decode a text frame as UTF-8');
|
|
@@ -2230,9 +2221,9 @@ for (var key$7 in instance$7)
|
|
|
2230
2221
|
var hybi = Hybi$2;
|
|
2231
2222
|
|
|
2232
2223
|
var Buffer$4 = safeBuffer.exports.Buffer,
|
|
2233
|
-
Stream$2 = require$$
|
|
2234
|
-
url$2 = require$$
|
|
2235
|
-
util$9 = require$$
|
|
2224
|
+
Stream$2 = require$$0$1.Stream,
|
|
2225
|
+
url$2 = require$$2$1,
|
|
2226
|
+
util$9 = require$$2,
|
|
2236
2227
|
Base$5 = base,
|
|
2237
2228
|
Headers$1 = headers,
|
|
2238
2229
|
HttpParser$2 = http_parser;
|
|
@@ -2328,9 +2319,9 @@ for (var key$6 in instance$6)
|
|
|
2328
2319
|
var proxy = Proxy$2;
|
|
2329
2320
|
|
|
2330
2321
|
var Buffer$3 = safeBuffer.exports.Buffer,
|
|
2331
|
-
crypto$1 = require$$
|
|
2332
|
-
url$1 = require$$
|
|
2333
|
-
util$8 = require$$
|
|
2322
|
+
crypto$1 = require$$1$1,
|
|
2323
|
+
url$1 = require$$2$1,
|
|
2324
|
+
util$8 = require$$2,
|
|
2334
2325
|
HttpParser$1 = http_parser,
|
|
2335
2326
|
Base$4 = base,
|
|
2336
2327
|
Hybi$1 = hybi,
|
|
@@ -2470,7 +2461,7 @@ var client$1 = Client$2;
|
|
|
2470
2461
|
|
|
2471
2462
|
var Buffer$2 = safeBuffer.exports.Buffer,
|
|
2472
2463
|
Base$3 = base,
|
|
2473
|
-
util$7 = require$$
|
|
2464
|
+
util$7 = require$$2;
|
|
2474
2465
|
|
|
2475
2466
|
var Draft75$2 = function(request, url, options) {
|
|
2476
2467
|
Base$3.apply(this, arguments);
|
|
@@ -2512,6 +2503,7 @@ var instance$4 = {
|
|
|
2512
2503
|
|
|
2513
2504
|
case 1:
|
|
2514
2505
|
this._length = (octet & 0x7F) + 128 * this._length;
|
|
2506
|
+
if (this._length > this._maxLength) return this.close();
|
|
2515
2507
|
|
|
2516
2508
|
if (this._closing && this._length === 0) {
|
|
2517
2509
|
return this.close();
|
|
@@ -2593,8 +2585,8 @@ var draft75 = Draft75$2;
|
|
|
2593
2585
|
var Buffer$1 = safeBuffer.exports.Buffer,
|
|
2594
2586
|
Base$2 = base,
|
|
2595
2587
|
Draft75$1 = draft75,
|
|
2596
|
-
crypto = require$$
|
|
2597
|
-
util$6 = require$$
|
|
2588
|
+
crypto = require$$1$1,
|
|
2589
|
+
util$6 = require$$2;
|
|
2598
2590
|
|
|
2599
2591
|
|
|
2600
2592
|
var numberFromKey = function(key) {
|
|
@@ -2706,7 +2698,7 @@ for (var key$3 in instance$3)
|
|
|
2706
2698
|
|
|
2707
2699
|
var draft76 = Draft76$1;
|
|
2708
2700
|
|
|
2709
|
-
var util$5 = require$$
|
|
2701
|
+
var util$5 = require$$2,
|
|
2710
2702
|
HttpParser = http_parser,
|
|
2711
2703
|
Base$1 = base,
|
|
2712
2704
|
Draft75 = draft75,
|
|
@@ -2909,8 +2901,8 @@ var EventTarget$2 = {
|
|
|
2909
2901
|
|
|
2910
2902
|
var event_target = EventTarget$2;
|
|
2911
2903
|
|
|
2912
|
-
var Stream$1 = require$$
|
|
2913
|
-
util$4 = require$$
|
|
2904
|
+
var Stream$1 = require$$0$1.Stream,
|
|
2905
|
+
util$4 = require$$2,
|
|
2914
2906
|
driver$3 = driver$4,
|
|
2915
2907
|
EventTarget$1 = event_target,
|
|
2916
2908
|
Event$1 = event;
|
|
@@ -3107,10 +3099,10 @@ for (var key$1 in EventTarget$1) API$3.prototype[key$1] = EventTarget$1[key$1];
|
|
|
3107
3099
|
|
|
3108
3100
|
var api = API$3;
|
|
3109
3101
|
|
|
3110
|
-
var util$3 = require$$
|
|
3111
|
-
net = require$$
|
|
3112
|
-
tls = require$$
|
|
3113
|
-
url = require$$
|
|
3102
|
+
var util$3 = require$$2,
|
|
3103
|
+
net = require$$1$2,
|
|
3104
|
+
tls = require$$2$2,
|
|
3105
|
+
url = require$$2$1,
|
|
3114
3106
|
driver$2 = driver$4,
|
|
3115
3107
|
API$2 = api;
|
|
3116
3108
|
|
|
@@ -3195,8 +3187,8 @@ Client.prototype._configureProxy = function(proxy, originTLS) {
|
|
|
3195
3187
|
|
|
3196
3188
|
var client = Client;
|
|
3197
3189
|
|
|
3198
|
-
var Stream = require$$
|
|
3199
|
-
util$2 = require$$
|
|
3190
|
+
var Stream = require$$0$1.Stream,
|
|
3191
|
+
util$2 = require$$2,
|
|
3200
3192
|
driver$1 = driver$4,
|
|
3201
3193
|
Headers = headers,
|
|
3202
3194
|
API$1 = api,
|
|
@@ -3327,7 +3319,7 @@ for (var key in EventTarget) EventSource.prototype[key] = EventTarget[key];
|
|
|
3327
3319
|
|
|
3328
3320
|
var eventsource = EventSource;
|
|
3329
3321
|
|
|
3330
|
-
var util$1 = require$$
|
|
3322
|
+
var util$1 = require$$2,
|
|
3331
3323
|
driver = driver$4,
|
|
3332
3324
|
API = api;
|
|
3333
3325
|
|
|
@@ -3658,9 +3650,9 @@ var require$$3 = /*@__PURE__*/getAugmentedNamespace(build);
|
|
|
3658
3650
|
|
|
3659
3651
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3660
3652
|
|
|
3661
|
-
var component = require$$
|
|
3662
|
-
var logger$1 = require$$
|
|
3663
|
-
var util = require$$
|
|
3653
|
+
var component = require$$0$2;
|
|
3654
|
+
var logger$1 = require$$1$3;
|
|
3655
|
+
var util = require$$2$3;
|
|
3664
3656
|
var idb = require$$3;
|
|
3665
3657
|
|
|
3666
3658
|
/**
|
|
@@ -3716,8 +3708,8 @@ function isVersionServiceProvider(provider) {
|
|
|
3716
3708
|
return component?.type === "VERSION" /* ComponentType.VERSION */;
|
|
3717
3709
|
}
|
|
3718
3710
|
|
|
3719
|
-
const name$
|
|
3720
|
-
const version$1 = "0.
|
|
3711
|
+
const name$r = "@firebase/app";
|
|
3712
|
+
const version$1 = "0.16.0-eap-crashlytics.e21972d2a";
|
|
3721
3713
|
|
|
3722
3714
|
/**
|
|
3723
3715
|
* @license
|
|
@@ -3737,19 +3729,21 @@ const version$1 = "0.14.12";
|
|
|
3737
3729
|
*/
|
|
3738
3730
|
const logger = new logger$1.Logger('@firebase/app');
|
|
3739
3731
|
|
|
3740
|
-
const name$
|
|
3732
|
+
const name$q = "@firebase/app-compat";
|
|
3733
|
+
|
|
3734
|
+
const name$p = "@firebase/analytics-compat";
|
|
3741
3735
|
|
|
3742
|
-
const name$o = "@firebase/analytics
|
|
3736
|
+
const name$o = "@firebase/analytics";
|
|
3743
3737
|
|
|
3744
|
-
const name$n = "@firebase/
|
|
3738
|
+
const name$n = "@firebase/app-check-compat";
|
|
3745
3739
|
|
|
3746
|
-
const name$m = "@firebase/app-check
|
|
3740
|
+
const name$m = "@firebase/app-check";
|
|
3747
3741
|
|
|
3748
|
-
const name$l = "@firebase/
|
|
3742
|
+
const name$l = "@firebase/auth";
|
|
3749
3743
|
|
|
3750
|
-
const name$k = "@firebase/auth";
|
|
3744
|
+
const name$k = "@firebase/auth-compat";
|
|
3751
3745
|
|
|
3752
|
-
const name$j = "@firebase/
|
|
3746
|
+
const name$j = "@firebase/crashlytics";
|
|
3753
3747
|
|
|
3754
3748
|
const name$i = "@firebase/database";
|
|
3755
3749
|
|
|
@@ -3788,7 +3782,7 @@ const name$2 = "@firebase/ai";
|
|
|
3788
3782
|
const name$1 = "@firebase/firestore-compat";
|
|
3789
3783
|
|
|
3790
3784
|
const name = "firebase";
|
|
3791
|
-
const version = "12.
|
|
3785
|
+
const version = "12.17.0-eap-crashlytics.e21972d2a";
|
|
3792
3786
|
|
|
3793
3787
|
/**
|
|
3794
3788
|
* @license
|
|
@@ -3813,14 +3807,15 @@ const version = "12.13.0";
|
|
|
3813
3807
|
*/
|
|
3814
3808
|
const DEFAULT_ENTRY_NAME = '[DEFAULT]';
|
|
3815
3809
|
const PLATFORM_LOG_STRING = {
|
|
3816
|
-
[name$
|
|
3817
|
-
[name$
|
|
3818
|
-
[name$
|
|
3819
|
-
[name$
|
|
3820
|
-
[name$
|
|
3821
|
-
[name$
|
|
3822
|
-
[name$
|
|
3823
|
-
[name$
|
|
3810
|
+
[name$r]: 'fire-core',
|
|
3811
|
+
[name$q]: 'fire-core-compat',
|
|
3812
|
+
[name$o]: 'fire-analytics',
|
|
3813
|
+
[name$p]: 'fire-analytics-compat',
|
|
3814
|
+
[name$m]: 'fire-app-check',
|
|
3815
|
+
[name$n]: 'fire-app-check-compat',
|
|
3816
|
+
[name$l]: 'fire-auth',
|
|
3817
|
+
[name$k]: 'fire-auth-compat',
|
|
3818
|
+
[name$j]: 'fire-cls',
|
|
3824
3819
|
[name$i]: 'fire-rtdb',
|
|
3825
3820
|
[name$h]: 'fire-data-connect',
|
|
3826
3821
|
[name$g]: 'fire-rtdb-compat',
|
|
@@ -4017,7 +4012,8 @@ const ERRORS = {
|
|
|
4017
4012
|
["no-app" /* AppError.NO_APP */]: "No Firebase App '{$appName}' has been created - " +
|
|
4018
4013
|
'call initializeApp() first',
|
|
4019
4014
|
["bad-app-name" /* AppError.BAD_APP_NAME */]: "Illegal App name: '{$appName}'",
|
|
4020
|
-
["duplicate-app" /* AppError.DUPLICATE_APP */]: "Firebase App named '{$appName}' already exists with different
|
|
4015
|
+
["duplicate-app" /* AppError.DUPLICATE_APP */]: "Firebase App named '{$appName}' already exists with different {$mismatchedParam}." +
|
|
4016
|
+
" Existing: '{$oldValue}'. New: '{$newValue}'.",
|
|
4021
4017
|
["app-deleted" /* AppError.APP_DELETED */]: "Firebase App named '{$appName}' already deleted",
|
|
4022
4018
|
["server-app-deleted" /* AppError.SERVER_APP_DELETED */]: 'Firebase Server App has been deleted',
|
|
4023
4019
|
["no-options" /* AppError.NO_OPTIONS */]: 'Need to provide options, when not being deployed to hosting via source.',
|
|
@@ -4181,7 +4177,7 @@ class FirebaseServerAppImpl extends FirebaseAppImpl {
|
|
|
4181
4177
|
// will never trigger.
|
|
4182
4178
|
this._serverConfig.releaseOnDeref = undefined;
|
|
4183
4179
|
serverConfig.releaseOnDeref = undefined;
|
|
4184
|
-
registerVersion(name$
|
|
4180
|
+
registerVersion(name$r, version$1, 'serverapp');
|
|
4185
4181
|
}
|
|
4186
4182
|
toJSON() {
|
|
4187
4183
|
return undefined;
|
|
@@ -4274,12 +4270,24 @@ function initializeApp(_options, rawConfig = {}) {
|
|
|
4274
4270
|
const existingApp = _apps.get(name);
|
|
4275
4271
|
if (existingApp) {
|
|
4276
4272
|
// return the existing app if options and config deep equal the ones in the existing app.
|
|
4277
|
-
if (util.deepEqual(options, existingApp.options)
|
|
4278
|
-
|
|
4279
|
-
|
|
4273
|
+
if (!util.deepEqual(options, existingApp.options)) {
|
|
4274
|
+
throw ERROR_FACTORY.create("duplicate-app" /* AppError.DUPLICATE_APP */, {
|
|
4275
|
+
appName: name,
|
|
4276
|
+
mismatchedParam: 'options',
|
|
4277
|
+
oldValue: JSON.stringify(existingApp.options),
|
|
4278
|
+
newValue: JSON.stringify(options)
|
|
4279
|
+
});
|
|
4280
|
+
}
|
|
4281
|
+
else if (!util.deepEqual(config, existingApp.config)) {
|
|
4282
|
+
throw ERROR_FACTORY.create("duplicate-app" /* AppError.DUPLICATE_APP */, {
|
|
4283
|
+
appName: name,
|
|
4284
|
+
mismatchedParam: 'config',
|
|
4285
|
+
oldValue: JSON.stringify(existingApp.config),
|
|
4286
|
+
newValue: JSON.stringify(config)
|
|
4287
|
+
});
|
|
4280
4288
|
}
|
|
4281
4289
|
else {
|
|
4282
|
-
|
|
4290
|
+
return existingApp;
|
|
4283
4291
|
}
|
|
4284
4292
|
}
|
|
4285
4293
|
const container = new component.ComponentContainer(name);
|
|
@@ -4877,9 +4885,9 @@ function registerCoreComponents(variant) {
|
|
|
4877
4885
|
_registerComponent(new component.Component('platform-logger', container => new PlatformLoggerServiceImpl(container), "PRIVATE" /* ComponentType.PRIVATE */));
|
|
4878
4886
|
_registerComponent(new component.Component('heartbeat', container => new HeartbeatServiceImpl(container), "PRIVATE" /* ComponentType.PRIVATE */));
|
|
4879
4887
|
// Register `app` package.
|
|
4880
|
-
registerVersion(name$
|
|
4888
|
+
registerVersion(name$r, version$1, variant);
|
|
4881
4889
|
// BUILD_TARGET will be replaced by values like esm, cjs, etc during the compilation
|
|
4882
|
-
registerVersion(name$
|
|
4890
|
+
registerVersion(name$r, version$1, 'cjs2020');
|
|
4883
4891
|
// Register platform SDK identifier (no version).
|
|
4884
4892
|
registerVersion('fire-js', '');
|
|
4885
4893
|
}
|
|
@@ -4890,9 +4898,25 @@ function registerCoreComponents(variant) {
|
|
|
4890
4898
|
* @remarks This package coordinates the communication between the different Firebase components
|
|
4891
4899
|
* @packageDocumentation
|
|
4892
4900
|
*/
|
|
4901
|
+
/**
|
|
4902
|
+
* @license
|
|
4903
|
+
* Copyright 2019 Google LLC
|
|
4904
|
+
*
|
|
4905
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4906
|
+
* you may not use this file except in compliance with the License.
|
|
4907
|
+
* You may obtain a copy of the License at
|
|
4908
|
+
*
|
|
4909
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4910
|
+
*
|
|
4911
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4912
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4913
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4914
|
+
* See the License for the specific language governing permissions and
|
|
4915
|
+
* limitations under the License.
|
|
4916
|
+
*/
|
|
4893
4917
|
registerCoreComponents('node');
|
|
4894
4918
|
|
|
4895
|
-
Object.defineProperty(exports,
|
|
4919
|
+
Object.defineProperty(exports, "FirebaseError", {
|
|
4896
4920
|
enumerable: true,
|
|
4897
4921
|
get: function () { return util.FirebaseError; }
|
|
4898
4922
|
});
|
|
@@ -4924,14 +4948,10 @@ exports.setLogLevel = setLogLevel;
|
|
|
4924
4948
|
Object.defineProperty(index_standalone, '__esModule', { value: true });
|
|
4925
4949
|
|
|
4926
4950
|
var Websocket = websocket;
|
|
4927
|
-
var util = require$$
|
|
4928
|
-
var logger$1 = require$$
|
|
4951
|
+
var util = require$$2$3;
|
|
4952
|
+
var logger$1 = require$$1$3;
|
|
4929
4953
|
var app = index_cjs;
|
|
4930
|
-
var component = require$$
|
|
4931
|
-
|
|
4932
|
-
function _interopDefaultLegacy$1 (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
4933
|
-
|
|
4934
|
-
var Websocket__default = /*#__PURE__*/_interopDefaultLegacy$1(Websocket);
|
|
4954
|
+
var component = require$$0$2;
|
|
4935
4955
|
|
|
4936
4956
|
/**
|
|
4937
4957
|
* @license
|
|
@@ -15283,15 +15303,12 @@ function treeForEachChild(tree, action) {
|
|
|
15283
15303
|
* parent.
|
|
15284
15304
|
*/
|
|
15285
15305
|
function treeForEachDescendant(tree, action, includeSelf, childrenFirst) {
|
|
15286
|
-
if (includeSelf &&
|
|
15306
|
+
if (includeSelf && true) {
|
|
15287
15307
|
action(tree);
|
|
15288
15308
|
}
|
|
15289
15309
|
treeForEachChild(tree, child => {
|
|
15290
|
-
treeForEachDescendant(child, action, true
|
|
15310
|
+
treeForEachDescendant(child, action, true);
|
|
15291
15311
|
});
|
|
15292
|
-
if (includeSelf && childrenFirst) {
|
|
15293
|
-
action(tree);
|
|
15294
|
-
}
|
|
15295
15312
|
}
|
|
15296
15313
|
/**
|
|
15297
15314
|
* Calls action on each ancestor node.
|
|
@@ -15302,7 +15319,7 @@ function treeForEachDescendant(tree, action, includeSelf, childrenFirst) {
|
|
|
15302
15319
|
* @returns true if the action callback returned true.
|
|
15303
15320
|
*/
|
|
15304
15321
|
function treeForEachAncestor(tree, action, includeSelf) {
|
|
15305
|
-
let node =
|
|
15322
|
+
let node = tree.parent;
|
|
15306
15323
|
while (node !== null) {
|
|
15307
15324
|
if (action(node)) {
|
|
15308
15325
|
return true;
|
|
@@ -15521,9 +15538,6 @@ const validateFirebaseMergePaths = function (errorPrefix, mergePaths) {
|
|
|
15521
15538
|
* must be an object - e.g. for firebase.update()).
|
|
15522
15539
|
*/
|
|
15523
15540
|
const validateFirebaseMergeDataArg = function (fnName, data, path, optional) {
|
|
15524
|
-
if (optional && data === undefined) {
|
|
15525
|
-
return;
|
|
15526
|
-
}
|
|
15527
15541
|
const errorPrefix = util.errorPrefix(fnName, 'values');
|
|
15528
15542
|
if (!(data && typeof data === 'object') || Array.isArray(data)) {
|
|
15529
15543
|
throw new Error(errorPrefix + ' must be an object containing the children to replace.');
|
|
@@ -15546,9 +15560,6 @@ const validateFirebaseMergeDataArg = function (fnName, data, path, optional) {
|
|
|
15546
15560
|
validateFirebaseMergePaths(errorPrefix, mergePaths);
|
|
15547
15561
|
};
|
|
15548
15562
|
const validatePriority = function (fnName, priority, optional) {
|
|
15549
|
-
if (optional && priority === undefined) {
|
|
15550
|
-
return;
|
|
15551
|
-
}
|
|
15552
15563
|
if (isInvalidJSONNumber(priority)) {
|
|
15553
15564
|
throw new Error(util.errorPrefix(fnName, 'priority') +
|
|
15554
15565
|
'is ' +
|
|
@@ -15564,7 +15575,7 @@ const validatePriority = function (fnName, priority, optional) {
|
|
|
15564
15575
|
}
|
|
15565
15576
|
};
|
|
15566
15577
|
const validateKey = function (fnName, argumentName, key, optional) {
|
|
15567
|
-
if (
|
|
15578
|
+
if (key === undefined) {
|
|
15568
15579
|
return;
|
|
15569
15580
|
}
|
|
15570
15581
|
if (!isValidKey(key)) {
|
|
@@ -17024,7 +17035,7 @@ class CallbackContext {
|
|
|
17024
17035
|
* operation to occur each time a disconnect occurs, you'll need to re-establish
|
|
17025
17036
|
* the `onDisconnect` operations each time you reconnect.
|
|
17026
17037
|
*/
|
|
17027
|
-
|
|
17038
|
+
let OnDisconnect$1 = class OnDisconnect {
|
|
17028
17039
|
/** @hideconstructor */
|
|
17029
17040
|
constructor(_repo, _path) {
|
|
17030
17041
|
this._repo = _repo;
|
|
@@ -17096,7 +17107,7 @@ class OnDisconnect$1 {
|
|
|
17096
17107
|
setWithPriority(value, priority) {
|
|
17097
17108
|
validateWritablePath('OnDisconnect.setWithPriority', this._path);
|
|
17098
17109
|
validateFirebaseDataArg('OnDisconnect.setWithPriority', value, this._path, false);
|
|
17099
|
-
validatePriority('OnDisconnect.setWithPriority', priority
|
|
17110
|
+
validatePriority('OnDisconnect.setWithPriority', priority);
|
|
17100
17111
|
const deferred = new util.Deferred();
|
|
17101
17112
|
repoOnDisconnectSetWithPriority(this._repo, this._path, value, priority, deferred.wrapCallback(() => { }));
|
|
17102
17113
|
return deferred.promise;
|
|
@@ -17119,12 +17130,12 @@ class OnDisconnect$1 {
|
|
|
17119
17130
|
*/
|
|
17120
17131
|
update(values) {
|
|
17121
17132
|
validateWritablePath('OnDisconnect.update', this._path);
|
|
17122
|
-
validateFirebaseMergeDataArg('OnDisconnect.update', values, this._path
|
|
17133
|
+
validateFirebaseMergeDataArg('OnDisconnect.update', values, this._path);
|
|
17123
17134
|
const deferred = new util.Deferred();
|
|
17124
17135
|
repoOnDisconnectUpdate(this._repo, this._path, values, deferred.wrapCallback(() => { }));
|
|
17125
17136
|
return deferred.promise;
|
|
17126
17137
|
}
|
|
17127
|
-
}
|
|
17138
|
+
};
|
|
17128
17139
|
|
|
17129
17140
|
/**
|
|
17130
17141
|
* @license
|
|
@@ -17304,7 +17315,7 @@ class ReferenceImpl extends QueryImpl {
|
|
|
17304
17315
|
* a Database location. It cannot be modified and will never change (to modify
|
|
17305
17316
|
* data, you always call the `set()` method on a `Reference` directly).
|
|
17306
17317
|
*/
|
|
17307
|
-
|
|
17318
|
+
let DataSnapshot$1 = class DataSnapshot {
|
|
17308
17319
|
/**
|
|
17309
17320
|
* @param _node - A SnapshotNode to wrap.
|
|
17310
17321
|
* @param ref - The location this snapshot came from.
|
|
@@ -17363,7 +17374,7 @@ class DataSnapshot$1 {
|
|
|
17363
17374
|
child(path) {
|
|
17364
17375
|
const childPath = new Path(path);
|
|
17365
17376
|
const childRef = child(this.ref, path);
|
|
17366
|
-
return new DataSnapshot
|
|
17377
|
+
return new DataSnapshot(this._node.getChild(childPath), childRef, PRIORITY_INDEX);
|
|
17367
17378
|
}
|
|
17368
17379
|
/**
|
|
17369
17380
|
* Returns true if this `DataSnapshot` contains any data. It is slightly more
|
|
@@ -17410,7 +17421,7 @@ class DataSnapshot$1 {
|
|
|
17410
17421
|
const childrenNode = this._node;
|
|
17411
17422
|
// Sanitize the return value to a boolean. ChildrenNode.forEachChild has a weird return type...
|
|
17412
17423
|
return !!childrenNode.forEachChild(this._index, (key, node) => {
|
|
17413
|
-
return action(new DataSnapshot
|
|
17424
|
+
return action(new DataSnapshot(node, child(this.ref, key), PRIORITY_INDEX));
|
|
17414
17425
|
});
|
|
17415
17426
|
}
|
|
17416
17427
|
/**
|
|
@@ -17465,7 +17476,7 @@ class DataSnapshot$1 {
|
|
|
17465
17476
|
val() {
|
|
17466
17477
|
return this._node.val();
|
|
17467
17478
|
}
|
|
17468
|
-
}
|
|
17479
|
+
};
|
|
17469
17480
|
/**
|
|
17470
17481
|
*
|
|
17471
17482
|
* Returns a `Reference` representing the location in the Database
|
|
@@ -17670,7 +17681,7 @@ function set(ref, value) {
|
|
|
17670
17681
|
function setPriority(ref, priority) {
|
|
17671
17682
|
ref = util.getModularInstance(ref);
|
|
17672
17683
|
validateWritablePath('setPriority', ref._path);
|
|
17673
|
-
validatePriority('setPriority', priority
|
|
17684
|
+
validatePriority('setPriority', priority);
|
|
17674
17685
|
const deferred = new util.Deferred();
|
|
17675
17686
|
repoSetWithPriority(ref._repo, pathChild(ref._path, '.priority'), priority, null, deferred.wrapCallback(() => { }));
|
|
17676
17687
|
return deferred.promise;
|
|
@@ -17693,7 +17704,7 @@ function setPriority(ref, priority) {
|
|
|
17693
17704
|
function setWithPriority(ref, value, priority) {
|
|
17694
17705
|
validateWritablePath('setWithPriority', ref._path);
|
|
17695
17706
|
validateFirebaseDataArg('setWithPriority', value, ref._path, false);
|
|
17696
|
-
validatePriority('setWithPriority', priority
|
|
17707
|
+
validatePriority('setWithPriority', priority);
|
|
17697
17708
|
if (ref.key === '.length' || ref.key === '.keys') {
|
|
17698
17709
|
throw 'setWithPriority failed: ' + ref.key + ' is a read-only object.';
|
|
17699
17710
|
}
|
|
@@ -17737,7 +17748,7 @@ function setWithPriority(ref, value, priority) {
|
|
|
17737
17748
|
* @returns Resolves when update on server is complete.
|
|
17738
17749
|
*/
|
|
17739
17750
|
function update(ref, values) {
|
|
17740
|
-
validateFirebaseMergeDataArg('update', values, ref._path
|
|
17751
|
+
validateFirebaseMergeDataArg('update', values, ref._path);
|
|
17741
17752
|
const deferred = new util.Deferred();
|
|
17742
17753
|
repoUpdate(ref._repo, ref._path, values, deferred.wrapCallback(() => { }));
|
|
17743
17754
|
return deferred.promise;
|
|
@@ -17983,7 +17994,7 @@ class QueryEndAtConstraint extends QueryConstraint {
|
|
|
17983
17994
|
* value, or priority.
|
|
17984
17995
|
*/
|
|
17985
17996
|
function endAt(value, key) {
|
|
17986
|
-
validateKey('endAt', 'key', key
|
|
17997
|
+
validateKey('endAt', 'key', key);
|
|
17987
17998
|
return new QueryEndAtConstraint(value, key);
|
|
17988
17999
|
}
|
|
17989
18000
|
class QueryEndBeforeConstraint extends QueryConstraint {
|
|
@@ -18025,7 +18036,7 @@ class QueryEndBeforeConstraint extends QueryConstraint {
|
|
|
18025
18036
|
* child, value, or priority.
|
|
18026
18037
|
*/
|
|
18027
18038
|
function endBefore(value, key) {
|
|
18028
|
-
validateKey('endBefore', 'key', key
|
|
18039
|
+
validateKey('endBefore', 'key', key);
|
|
18029
18040
|
return new QueryEndBeforeConstraint(value, key);
|
|
18030
18041
|
}
|
|
18031
18042
|
class QueryStartAtConstraint extends QueryConstraint {
|
|
@@ -18070,7 +18081,7 @@ class QueryStartAtConstraint extends QueryConstraint {
|
|
|
18070
18081
|
* ordering by child, value, or priority.
|
|
18071
18082
|
*/
|
|
18072
18083
|
function startAt(value = null, key) {
|
|
18073
|
-
validateKey('startAt', 'key', key
|
|
18084
|
+
validateKey('startAt', 'key', key);
|
|
18074
18085
|
return new QueryStartAtConstraint(value, key);
|
|
18075
18086
|
}
|
|
18076
18087
|
class QueryStartAfterConstraint extends QueryConstraint {
|
|
@@ -18111,7 +18122,7 @@ class QueryStartAfterConstraint extends QueryConstraint {
|
|
|
18111
18122
|
* ordering by child, value, or priority.
|
|
18112
18123
|
*/
|
|
18113
18124
|
function startAfter(value, key) {
|
|
18114
|
-
validateKey('startAfter', 'key', key
|
|
18125
|
+
validateKey('startAfter', 'key', key);
|
|
18115
18126
|
return new QueryStartAfterConstraint(value, key);
|
|
18116
18127
|
}
|
|
18117
18128
|
class QueryLimitToFirstConstraint extends QueryConstraint {
|
|
@@ -18356,7 +18367,7 @@ class QueryEqualToValueConstraint extends QueryConstraint {
|
|
|
18356
18367
|
* child, value, or priority.
|
|
18357
18368
|
*/
|
|
18358
18369
|
function equalTo(value, key) {
|
|
18359
|
-
validateKey('equalTo', 'key', key
|
|
18370
|
+
validateKey('equalTo', 'key', key);
|
|
18360
18371
|
return new QueryEqualToValueConstraint(value, key);
|
|
18361
18372
|
}
|
|
18362
18373
|
/**
|
|
@@ -18400,6 +18411,7 @@ syncTreeSetReferenceConstructor(ReferenceImpl);
|
|
|
18400
18411
|
* See the License for the specific language governing permissions and
|
|
18401
18412
|
* limitations under the License.
|
|
18402
18413
|
*/
|
|
18414
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
18403
18415
|
/**
|
|
18404
18416
|
* This variable is also defined in the firebase Node.js Admin SDK. Before
|
|
18405
18417
|
* modifying this definition, consult the definition in:
|
|
@@ -18515,7 +18527,7 @@ function repoManagerForceRestClient(forceRestClient) {
|
|
|
18515
18527
|
/**
|
|
18516
18528
|
* Class representing a Firebase Realtime Database.
|
|
18517
18529
|
*/
|
|
18518
|
-
|
|
18530
|
+
let Database$1 = class Database {
|
|
18519
18531
|
/** @hideconstructor */
|
|
18520
18532
|
constructor(_repoInternal,
|
|
18521
18533
|
/** The {@link @firebase/app#FirebaseApp} associated with this Realtime Database instance. */
|
|
@@ -18553,7 +18565,7 @@ class Database$1 {
|
|
|
18553
18565
|
fatal('Cannot call ' + apiName + ' on a deleted database.');
|
|
18554
18566
|
}
|
|
18555
18567
|
}
|
|
18556
|
-
}
|
|
18568
|
+
};
|
|
18557
18569
|
function checkTransportInit() {
|
|
18558
18570
|
if (TransportManager.IS_TRANSPORT_INITIALIZED) {
|
|
18559
18571
|
warn$1('Transport has already been initialized. Please call this function before calling ref or setting up a listener');
|
|
@@ -18726,7 +18738,7 @@ function increment(delta) {
|
|
|
18726
18738
|
/**
|
|
18727
18739
|
* A type for the resolve value of {@link runTransaction}.
|
|
18728
18740
|
*/
|
|
18729
|
-
|
|
18741
|
+
let TransactionResult$1 = class TransactionResult {
|
|
18730
18742
|
/** @hideconstructor */
|
|
18731
18743
|
constructor(
|
|
18732
18744
|
/** Whether the transaction was successfully committed. */
|
|
@@ -18740,7 +18752,7 @@ class TransactionResult$1 {
|
|
|
18740
18752
|
toJSON() {
|
|
18741
18753
|
return { committed: this.committed, snapshot: this.snapshot.toJSON() };
|
|
18742
18754
|
}
|
|
18743
|
-
}
|
|
18755
|
+
};
|
|
18744
18756
|
/**
|
|
18745
18757
|
* Atomically modifies the data at this location.
|
|
18746
18758
|
*
|
|
@@ -18803,6 +18815,23 @@ transactionUpdate, options) {
|
|
|
18803
18815
|
repoStartTransaction(ref._repo, ref._path, transactionUpdate, promiseComplete, unwatcher, applyLocally);
|
|
18804
18816
|
return deferred.promise;
|
|
18805
18817
|
}
|
|
18818
|
+
|
|
18819
|
+
/**
|
|
18820
|
+
* @license
|
|
18821
|
+
* Copyright 2017 Google LLC
|
|
18822
|
+
*
|
|
18823
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18824
|
+
* you may not use this file except in compliance with the License.
|
|
18825
|
+
* You may obtain a copy of the License at
|
|
18826
|
+
*
|
|
18827
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
18828
|
+
*
|
|
18829
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18830
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18831
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18832
|
+
* See the License for the specific language governing permissions and
|
|
18833
|
+
* limitations under the License.
|
|
18834
|
+
*/
|
|
18806
18835
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18807
18836
|
PersistentConnection.prototype.simpleListen = function (pathString, onComplete) {
|
|
18808
18837
|
this.sendRequest('q', { p: pathString }, onComplete);
|
|
@@ -18893,7 +18922,7 @@ function _initStandalone({ app, url, version, customAuthImpl, customAppCheckImpl
|
|
|
18893
18922
|
* See the License for the specific language governing permissions and
|
|
18894
18923
|
* limitations under the License.
|
|
18895
18924
|
*/
|
|
18896
|
-
setWebSocketImpl(
|
|
18925
|
+
setWebSocketImpl(Websocket.Client);
|
|
18897
18926
|
|
|
18898
18927
|
index_standalone.DataSnapshot = DataSnapshot$1;
|
|
18899
18928
|
index_standalone.Database = Database$1;
|
|
@@ -18988,7 +19017,7 @@ const warn = function (msg) {
|
|
|
18988
19017
|
* limitations under the License.
|
|
18989
19018
|
*/
|
|
18990
19019
|
const validateBoolean = function (fnName, argumentName, bool, optional) {
|
|
18991
|
-
if (
|
|
19020
|
+
if (bool === undefined) {
|
|
18992
19021
|
return;
|
|
18993
19022
|
}
|
|
18994
19023
|
if (typeof bool !== 'boolean') {
|
|
@@ -18996,7 +19025,7 @@ const validateBoolean = function (fnName, argumentName, bool, optional) {
|
|
|
18996
19025
|
}
|
|
18997
19026
|
};
|
|
18998
19027
|
const validateEventType = function (fnName, eventType, optional) {
|
|
18999
|
-
if (
|
|
19028
|
+
if (eventType === undefined) {
|
|
19000
19029
|
return;
|
|
19001
19030
|
}
|
|
19002
19031
|
switch (eventType) {
|
|
@@ -19303,7 +19332,7 @@ class Query {
|
|
|
19303
19332
|
}
|
|
19304
19333
|
off(eventType, callback, context) {
|
|
19305
19334
|
require$$2$3.validateArgCount('Query.off', 0, 3, arguments.length);
|
|
19306
|
-
validateEventType('Query.off', eventType
|
|
19335
|
+
validateEventType('Query.off', eventType);
|
|
19307
19336
|
require$$2$3.validateCallback('Query.off', 'callback', callback, true);
|
|
19308
19337
|
require$$2$3.validateContextObject('Query.off', 'context', context, true);
|
|
19309
19338
|
if (callback) {
|
|
@@ -19592,7 +19621,7 @@ class Reference extends Query {
|
|
|
19592
19621
|
require$$2$3.validateArgCount('Reference.transaction', 1, 3, arguments.length);
|
|
19593
19622
|
require$$2$3.validateCallback('Reference.transaction', 'transactionUpdate', transactionUpdate, false);
|
|
19594
19623
|
require$$2$3.validateCallback('Reference.transaction', 'onComplete', onComplete, true);
|
|
19595
|
-
validateBoolean('Reference.transaction', 'applyLocally', applyLocally
|
|
19624
|
+
validateBoolean('Reference.transaction', 'applyLocally', applyLocally);
|
|
19596
19625
|
const result = runTransaction_1(this._delegate, transactionUpdate, {
|
|
19597
19626
|
applyLocally
|
|
19598
19627
|
}).then(transactionResult => new TransactionResult(transactionResult.committed, new DataSnapshot(this.database, transactionResult.snapshot)));
|
|
@@ -19654,6 +19683,7 @@ class Reference extends Query {
|
|
|
19654
19683
|
* See the License for the specific language governing permissions and
|
|
19655
19684
|
* limitations under the License.
|
|
19656
19685
|
*/
|
|
19686
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
19657
19687
|
/**
|
|
19658
19688
|
* Class representing a firebase database.
|
|
19659
19689
|
*/
|