@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.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import * as grpc from '@grpc/grpc-js';
|
|
|
8
8
|
import * as protoLoader from '@grpc/proto-loader';
|
|
9
9
|
|
|
10
10
|
const name = "@firebase/firestore";
|
|
11
|
-
const version$1 = "3.8.3-canary.
|
|
11
|
+
const version$1 = "3.8.3-canary.d5d78cbcf";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
@@ -61,7 +61,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
61
61
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
62
62
|
User.MOCK_USER = new User('mock-user');
|
|
63
63
|
|
|
64
|
-
const version = "9.17.1-canary.
|
|
64
|
+
const version = "9.17.1-canary.d5d78cbcf";
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* @license
|
|
@@ -5403,6 +5403,42 @@ function boundEquals(left, right) {
|
|
|
5403
5403
|
return true;
|
|
5404
5404
|
}
|
|
5405
5405
|
|
|
5406
|
+
/**
|
|
5407
|
+
* @license
|
|
5408
|
+
* Copyright 2022 Google LLC
|
|
5409
|
+
*
|
|
5410
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5411
|
+
* you may not use this file except in compliance with the License.
|
|
5412
|
+
* You may obtain a copy of the License at
|
|
5413
|
+
*
|
|
5414
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5415
|
+
*
|
|
5416
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5417
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5418
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5419
|
+
* See the License for the specific language governing permissions and
|
|
5420
|
+
* limitations under the License.
|
|
5421
|
+
*/
|
|
5422
|
+
/**
|
|
5423
|
+
* An ordering on a field, in some Direction. Direction defaults to ASCENDING.
|
|
5424
|
+
*/
|
|
5425
|
+
class OrderBy {
|
|
5426
|
+
constructor(field, dir = "asc" /* Direction.ASCENDING */) {
|
|
5427
|
+
this.field = field;
|
|
5428
|
+
this.dir = dir;
|
|
5429
|
+
}
|
|
5430
|
+
}
|
|
5431
|
+
function canonifyOrderBy(orderBy) {
|
|
5432
|
+
// TODO(b/29183165): Make this collision robust.
|
|
5433
|
+
return orderBy.field.canonicalString() + orderBy.dir;
|
|
5434
|
+
}
|
|
5435
|
+
function stringifyOrderBy(orderBy) {
|
|
5436
|
+
return `${orderBy.field.canonicalString()} (${orderBy.dir})`;
|
|
5437
|
+
}
|
|
5438
|
+
function orderByEquals(left, right) {
|
|
5439
|
+
return left.dir === right.dir && left.field.isEqual(right.field);
|
|
5440
|
+
}
|
|
5441
|
+
|
|
5406
5442
|
/**
|
|
5407
5443
|
* @license
|
|
5408
5444
|
* Copyright 2022 Google LLC
|
|
@@ -5758,42 +5794,6 @@ class ArrayContainsAnyFilter extends FieldFilter {
|
|
|
5758
5794
|
}
|
|
5759
5795
|
}
|
|
5760
5796
|
|
|
5761
|
-
/**
|
|
5762
|
-
* @license
|
|
5763
|
-
* Copyright 2022 Google LLC
|
|
5764
|
-
*
|
|
5765
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5766
|
-
* you may not use this file except in compliance with the License.
|
|
5767
|
-
* You may obtain a copy of the License at
|
|
5768
|
-
*
|
|
5769
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5770
|
-
*
|
|
5771
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
5772
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5773
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5774
|
-
* See the License for the specific language governing permissions and
|
|
5775
|
-
* limitations under the License.
|
|
5776
|
-
*/
|
|
5777
|
-
/**
|
|
5778
|
-
* An ordering on a field, in some Direction. Direction defaults to ASCENDING.
|
|
5779
|
-
*/
|
|
5780
|
-
class OrderBy {
|
|
5781
|
-
constructor(field, dir = "asc" /* Direction.ASCENDING */) {
|
|
5782
|
-
this.field = field;
|
|
5783
|
-
this.dir = dir;
|
|
5784
|
-
}
|
|
5785
|
-
}
|
|
5786
|
-
function canonifyOrderBy(orderBy) {
|
|
5787
|
-
// TODO(b/29183165): Make this collision robust.
|
|
5788
|
-
return orderBy.field.canonicalString() + orderBy.dir;
|
|
5789
|
-
}
|
|
5790
|
-
function stringifyOrderBy(orderBy) {
|
|
5791
|
-
return `${orderBy.field.canonicalString()} (${orderBy.dir})`;
|
|
5792
|
-
}
|
|
5793
|
-
function orderByEquals(left, right) {
|
|
5794
|
-
return left.dir === right.dir && left.field.isEqual(right.field);
|
|
5795
|
-
}
|
|
5796
|
-
|
|
5797
5797
|
/**
|
|
5798
5798
|
* @license
|
|
5799
5799
|
* Copyright 2019 Google LLC
|
|
@@ -25076,7 +25076,7 @@ function toByteStreamReaderHelper(source, bytesPerRead = DEFAULT_BYTES_PER_READ)
|
|
|
25076
25076
|
},
|
|
25077
25077
|
async cancel() { },
|
|
25078
25078
|
releaseLock() { },
|
|
25079
|
-
closed: Promise.
|
|
25079
|
+
closed: Promise.resolve()
|
|
25080
25080
|
};
|
|
25081
25081
|
return reader;
|
|
25082
25082
|
}
|
|
@@ -29220,45 +29220,26 @@ function validateDisjunctiveFilterElements(value, operator) {
|
|
|
29220
29220
|
throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid Query. A non-empty array is required for ' +
|
|
29221
29221
|
`'${operator.toString()}' filters.`);
|
|
29222
29222
|
}
|
|
29223
|
-
if (value.length > 10) {
|
|
29224
|
-
throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid Query. '${operator.toString()}' filters support a ` +
|
|
29225
|
-
'maximum of 10 elements in the value array.');
|
|
29226
|
-
}
|
|
29227
29223
|
}
|
|
29228
29224
|
/**
|
|
29229
29225
|
* Given an operator, returns the set of operators that cannot be used with it.
|
|
29230
29226
|
*
|
|
29231
|
-
*
|
|
29232
|
-
*
|
|
29233
|
-
* 2. Only one disjunctive operator is allowed.
|
|
29234
|
-
* 3. `NOT_EQUAL` cannot be used with another `NOT_EQUAL` operator.
|
|
29235
|
-
* 4. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.
|
|
29227
|
+
* This is not a comprehensive check, and this function should be removed in the
|
|
29228
|
+
* long term. Validations should occur in the Firestore backend.
|
|
29236
29229
|
*
|
|
29237
|
-
*
|
|
29238
|
-
*
|
|
29230
|
+
* Operators in a query must adhere to the following set of rules:
|
|
29231
|
+
* 1. Only one inequality per query.
|
|
29232
|
+
* 2. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.
|
|
29239
29233
|
*/
|
|
29240
29234
|
function conflictingOps(op) {
|
|
29241
29235
|
switch (op) {
|
|
29242
29236
|
case "!=" /* Operator.NOT_EQUAL */:
|
|
29243
29237
|
return ["!=" /* Operator.NOT_EQUAL */, "not-in" /* Operator.NOT_IN */];
|
|
29244
|
-
case "array-contains" /* Operator.ARRAY_CONTAINS */:
|
|
29245
|
-
return [
|
|
29246
|
-
"array-contains" /* Operator.ARRAY_CONTAINS */,
|
|
29247
|
-
"array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */,
|
|
29248
|
-
"not-in" /* Operator.NOT_IN */
|
|
29249
|
-
];
|
|
29250
|
-
case "in" /* Operator.IN */:
|
|
29251
|
-
return ["array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */, "in" /* Operator.IN */, "not-in" /* Operator.NOT_IN */];
|
|
29252
29238
|
case "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */:
|
|
29253
|
-
|
|
29254
|
-
|
|
29255
|
-
"array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */,
|
|
29256
|
-
"in" /* Operator.IN */,
|
|
29257
|
-
"not-in" /* Operator.NOT_IN */
|
|
29258
|
-
];
|
|
29239
|
+
case "in" /* Operator.IN */:
|
|
29240
|
+
return ["not-in" /* Operator.NOT_IN */];
|
|
29259
29241
|
case "not-in" /* Operator.NOT_IN */:
|
|
29260
29242
|
return [
|
|
29261
|
-
"array-contains" /* Operator.ARRAY_CONTAINS */,
|
|
29262
29243
|
"array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */,
|
|
29263
29244
|
"in" /* Operator.IN */,
|
|
29264
29245
|
"not-in" /* Operator.NOT_IN */,
|