@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/lite/index.node.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { FirebaseError, getDefaultEmulatorHostnameAndPort, createMockUserToken,
|
|
|
6
6
|
import nodeFetch from 'node-fetch';
|
|
7
7
|
import { randomBytes as randomBytes$1 } from 'crypto';
|
|
8
8
|
|
|
9
|
-
const version$1 = "3.8.3-canary.
|
|
9
|
+
const version$1 = "3.8.3-canary.d5d78cbcf";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @license
|
|
@@ -59,7 +59,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
59
59
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
60
60
|
User.MOCK_USER = new User('mock-user');
|
|
61
61
|
|
|
62
|
-
const version = "9.17.1-canary.
|
|
62
|
+
const version = "9.17.1-canary.d5d78cbcf";
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @license
|
|
@@ -7660,45 +7660,26 @@ function validateDisjunctiveFilterElements(value, operator) {
|
|
|
7660
7660
|
throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid Query. A non-empty array is required for ' +
|
|
7661
7661
|
`'${operator.toString()}' filters.`);
|
|
7662
7662
|
}
|
|
7663
|
-
if (value.length > 10) {
|
|
7664
|
-
throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid Query. '${operator.toString()}' filters support a ` +
|
|
7665
|
-
'maximum of 10 elements in the value array.');
|
|
7666
|
-
}
|
|
7667
7663
|
}
|
|
7668
7664
|
/**
|
|
7669
7665
|
* Given an operator, returns the set of operators that cannot be used with it.
|
|
7670
7666
|
*
|
|
7671
|
-
*
|
|
7672
|
-
*
|
|
7673
|
-
* 2. Only one disjunctive operator is allowed.
|
|
7674
|
-
* 3. `NOT_EQUAL` cannot be used with another `NOT_EQUAL` operator.
|
|
7675
|
-
* 4. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.
|
|
7667
|
+
* This is not a comprehensive check, and this function should be removed in the
|
|
7668
|
+
* long term. Validations should occur in the Firestore backend.
|
|
7676
7669
|
*
|
|
7677
|
-
*
|
|
7678
|
-
*
|
|
7670
|
+
* Operators in a query must adhere to the following set of rules:
|
|
7671
|
+
* 1. Only one inequality per query.
|
|
7672
|
+
* 2. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.
|
|
7679
7673
|
*/
|
|
7680
7674
|
function conflictingOps(op) {
|
|
7681
7675
|
switch (op) {
|
|
7682
7676
|
case "!=" /* Operator.NOT_EQUAL */:
|
|
7683
7677
|
return ["!=" /* Operator.NOT_EQUAL */, "not-in" /* Operator.NOT_IN */];
|
|
7684
|
-
case "array-contains" /* Operator.ARRAY_CONTAINS */:
|
|
7685
|
-
return [
|
|
7686
|
-
"array-contains" /* Operator.ARRAY_CONTAINS */,
|
|
7687
|
-
"array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */,
|
|
7688
|
-
"not-in" /* Operator.NOT_IN */
|
|
7689
|
-
];
|
|
7690
|
-
case "in" /* Operator.IN */:
|
|
7691
|
-
return ["array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */, "in" /* Operator.IN */, "not-in" /* Operator.NOT_IN */];
|
|
7692
7678
|
case "array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */:
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
"array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */,
|
|
7696
|
-
"in" /* Operator.IN */,
|
|
7697
|
-
"not-in" /* Operator.NOT_IN */
|
|
7698
|
-
];
|
|
7679
|
+
case "in" /* Operator.IN */:
|
|
7680
|
+
return ["not-in" /* Operator.NOT_IN */];
|
|
7699
7681
|
case "not-in" /* Operator.NOT_IN */:
|
|
7700
7682
|
return [
|
|
7701
|
-
"array-contains" /* Operator.ARRAY_CONTAINS */,
|
|
7702
7683
|
"array-contains-any" /* Operator.ARRAY_CONTAINS_ANY */,
|
|
7703
7684
|
"in" /* Operator.IN */,
|
|
7704
7685
|
"not-in" /* Operator.NOT_IN */,
|