@firebase/firestore 3.8.3-canary.c8a6e08b0 → 3.8.3-canary.d5d78cbcf
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/firestore/src/core/query.d.ts +0 -1
- package/dist/index.cjs.js +12 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +12 -20
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +117 -125
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +46 -65
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +46 -65
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +12 -20
- package/dist/index.rn.js.map +1 -1
- package/dist/lite/firestore/src/core/query.d.ts +0 -1
- package/dist/lite/index.browser.esm2017.js +1301 -1309
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +16 -24
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.cjs.js +1301 -1309
- package/dist/lite/index.cjs.js.map +1 -1
- package/dist/lite/index.node.cjs.js +9 -28
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +9 -28
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +1309 -1317
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +130 -130
- package/dist/lite/packages/firestore/src/core/query.d.ts +0 -1
- package/dist/packages/firestore/src/core/query.d.ts +0 -1
- package/package.json +9 -9
package/dist/index.node.cjs.js
CHANGED
|
@@ -33,7 +33,7 @@ var grpc__namespace = /*#__PURE__*/_interopNamespace(grpc);
|
|
|
33
33
|
var protoLoader__namespace = /*#__PURE__*/_interopNamespace(protoLoader);
|
|
34
34
|
|
|
35
35
|
const name = "@firebase/firestore";
|
|
36
|
-
const version$1 = "3.8.3-canary.
|
|
36
|
+
const version$1 = "3.8.3-canary.d5d78cbcf";
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @license
|
|
@@ -86,7 +86,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
86
86
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
87
87
|
User.MOCK_USER = new User('mock-user');
|
|
88
88
|
|
|
89
|
-
const version = "9.17.1-canary.
|
|
89
|
+
const version = "9.17.1-canary.d5d78cbcf";
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* @license
|
|
@@ -5428,6 +5428,42 @@ function boundEquals(left, right) {
|
|
|
5428
5428
|
return true;
|
|
5429
5429
|
}
|
|
5430
5430
|
|
|
5431
|
+
/**
|
|
5432
|
+
* @license
|
|
5433
|
+
* Copyright 2022 Google LLC
|
|
5434
|
+
*
|
|
5435
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5436
|
+
* you may not use this file except in compliance with the License.
|
|
5437
|
+
* You may obtain a copy of the License at
|
|
5438
|
+
*
|
|
5439
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5440
|
+
*
|
|
5441
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5442
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5443
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5444
|
+
* See the License for the specific language governing permissions and
|
|
5445
|
+
* limitations under the License.
|
|
5446
|
+
*/
|
|
5447
|
+
/**
|
|
5448
|
+
* An ordering on a field, in some Direction. Direction defaults to ASCENDING.
|
|
5449
|
+
*/
|
|
5450
|
+
class OrderBy {
|
|
5451
|
+
constructor(field, dir = "asc" /* Direction.ASCENDING */) {
|
|
5452
|
+
this.field = field;
|
|
5453
|
+
this.dir = dir;
|
|
5454
|
+
}
|
|
5455
|
+
}
|
|
5456
|
+
function canonifyOrderBy(orderBy) {
|
|
5457
|
+
// TODO(b/29183165): Make this collision robust.
|
|
5458
|
+
return orderBy.field.canonicalString() + orderBy.dir;
|
|
5459
|
+
}
|
|
5460
|
+
function stringifyOrderBy(orderBy) {
|
|
5461
|
+
return `${orderBy.field.canonicalString()} (${orderBy.dir})`;
|
|
5462
|
+
}
|
|
5463
|
+
function orderByEquals(left, right) {
|
|
5464
|
+
return left.dir === right.dir && left.field.isEqual(right.field);
|
|
5465
|
+
}
|
|
5466
|
+
|
|
5431
5467
|
/**
|
|
5432
5468
|
* @license
|
|
5433
5469
|
* Copyright 2022 Google LLC
|
|
@@ -5783,42 +5819,6 @@ class ArrayContainsAnyFilter extends FieldFilter {
|
|
|
5783
5819
|
}
|
|
5784
5820
|
}
|
|
5785
5821
|
|
|
5786
|
-
/**
|
|
5787
|
-
* @license
|
|
5788
|
-
* Copyright 2022 Google LLC
|
|
5789
|
-
*
|
|
5790
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5791
|
-
* you may not use this file except in compliance with the License.
|
|
5792
|
-
* You may obtain a copy of the License at
|
|
5793
|
-
*
|
|
5794
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5795
|
-
*
|
|
5796
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
5797
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5798
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5799
|
-
* See the License for the specific language governing permissions and
|
|
5800
|
-
* limitations under the License.
|
|
5801
|
-
*/
|
|
5802
|
-
/**
|
|
5803
|
-
* An ordering on a field, in some Direction. Direction defaults to ASCENDING.
|
|
5804
|
-
*/
|
|
5805
|
-
class OrderBy {
|
|
5806
|
-
constructor(field, dir = "asc" /* Direction.ASCENDING */) {
|
|
5807
|
-
this.field = field;
|
|
5808
|
-
this.dir = dir;
|
|
5809
|
-
}
|
|
5810
|
-
}
|
|
5811
|
-
function canonifyOrderBy(orderBy) {
|
|
5812
|
-
// TODO(b/29183165): Make this collision robust.
|
|
5813
|
-
return orderBy.field.canonicalString() + orderBy.dir;
|
|
5814
|
-
}
|
|
5815
|
-
function stringifyOrderBy(orderBy) {
|
|
5816
|
-
return `${orderBy.field.canonicalString()} (${orderBy.dir})`;
|
|
5817
|
-
}
|
|
5818
|
-
function orderByEquals(left, right) {
|
|
5819
|
-
return left.dir === right.dir && left.field.isEqual(right.field);
|
|
5820
|
-
}
|
|
5821
|
-
|
|
5822
5822
|
/**
|
|
5823
5823
|
* @license
|
|
5824
5824
|
* Copyright 2019 Google LLC
|
|
@@ -25101,7 +25101,7 @@ function toByteStreamReaderHelper(source, bytesPerRead = DEFAULT_BYTES_PER_READ)
|
|
|
25101
25101
|
},
|
|
25102
25102
|
async cancel() { },
|
|
25103
25103
|
releaseLock() { },
|
|
25104
|
-
closed: Promise.
|
|
25104
|
+
closed: Promise.resolve()
|
|
25105
25105
|
};
|
|
25106
25106
|
return reader;
|
|
25107
25107
|
}
|
|
@@ -29245,45 +29245,26 @@ function validateDisjunctiveFilterElements(value, operator) {
|
|
|
29245
29245
|
throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid Query. A non-empty array is required for ' +
|
|
29246
29246
|
`'${operator.toString()}' filters.`);
|
|
29247
29247
|
}
|
|
29248
|
-
if (value.length > 10) {
|
|
29249
|
-
throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid Query. '${operator.toString()}' filters support a ` +
|
|
29250
|
-
'maximum of 10 elements in the value array.');
|
|
29251
|
-
}
|
|
29252
29248
|
}
|
|
29253
29249
|
/**
|
|
29254
29250
|
* Given an operator, returns the set of operators that cannot be used with it.
|
|
29255
29251
|
*
|
|
29256
|
-
*
|
|
29257
|
-
*
|
|
29258
|
-
* 2. Only one disjunctive operator is allowed.
|
|
29259
|
-
* 3. `NOT_EQUAL` cannot be used with another `NOT_EQUAL` operator.
|
|
29260
|
-
* 4. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.
|
|
29252
|
+
* This is not a comprehensive check, and this function should be removed in the
|
|
29253
|
+
* long term. Validations should occur in the Firestore backend.
|
|
29261
29254
|
*
|
|
29262
|
-
*
|
|
29263
|
-
*
|
|
29255
|
+
* Operators in a query must adhere to the following set of rules:
|
|
29256
|
+
* 1. Only one inequality per query.
|
|
29257
|
+
* 2. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.
|
|
29264
29258
|
*/
|
|
29265
29259
|
function conflictingOps(op) {
|
|
29266
29260
|
switch (op) {
|
|
29267
29261
|
case "!=" /* Operator.NOT_EQUAL */:
|
|
29268
29262
|
return ["!=" /* Operator.NOT_EQUAL */, "not-in" /* Operator.NOT_IN */];
|
|
29269
|
-
case "array-contains" /* Operator.ARRAY_CONTAINS */:
|
|
29270
|
-
return [
|
|
29271
|
-
"array-contains" /* Operator.ARRAY_CONTAINS */,
|
|
29272
|
-
"array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */,
|
|
29273
|
-
"not-in" /* Operator.NOT_IN */
|
|
29274
|
-
];
|
|
29275
|
-
case "in" /* Operator.IN */:
|
|
29276
|
-
return ["array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */, "in" /* Operator.IN */, "not-in" /* Operator.NOT_IN */];
|
|
29277
29263
|
case "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */:
|
|
29278
|
-
|
|
29279
|
-
|
|
29280
|
-
"array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */,
|
|
29281
|
-
"in" /* Operator.IN */,
|
|
29282
|
-
"not-in" /* Operator.NOT_IN */
|
|
29283
|
-
];
|
|
29264
|
+
case "in" /* Operator.IN */:
|
|
29265
|
+
return ["not-in" /* Operator.NOT_IN */];
|
|
29284
29266
|
case "not-in" /* Operator.NOT_IN */:
|
|
29285
29267
|
return [
|
|
29286
|
-
"array-contains" /* Operator.ARRAY_CONTAINS */,
|
|
29287
29268
|
"array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */,
|
|
29288
29269
|
"in" /* Operator.IN */,
|
|
29289
29270
|
"not-in" /* Operator.NOT_IN */,
|