@firebase/firestore 3.7.1 → 3.7.2-canary.457fc2eeb
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/CHANGELOG.md +12 -0
- package/dist/index.esm2017.js +249 -243
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +637 -633
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +38 -36
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +5 -3
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +249 -243
- package/dist/index.rn.js.map +1 -1
- package/dist/lite/index.browser.esm2017.js +186 -180
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +350 -344
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +10 -3
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +10 -3
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +192 -186
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +26 -26
- package/dist/packages/firestore/dist/index.esm2017.d.ts +1 -1
- package/package.json +11 -11
- package/dist/firestore/test/integration/api_internal/aggregation.test.d.ts +0 -17
- package/dist/lite/firestore/test/integration/api_internal/aggregation.test.d.ts +0 -17
- package/dist/lite/packages/firestore/test/integration/api_internal/aggregation.test.d.ts +0 -17
- package/dist/packages/firestore/test/integration/api_internal/aggregation.test.d.ts +0 -17
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.7.
|
|
9
|
+
const version$1 = "3.7.2-canary.457fc2eeb";
|
|
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.
|
|
62
|
+
const version = "9.13.0-canary.457fc2eeb";
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @license
|
|
@@ -1460,6 +1460,7 @@ class FetchConnection extends RestConnection {
|
|
|
1460
1460
|
throw new Error('Not supported by FetchConnection');
|
|
1461
1461
|
}
|
|
1462
1462
|
async performRPCRequest(rpcName, url, headers, body) {
|
|
1463
|
+
var _a;
|
|
1463
1464
|
const requestJson = JSON.stringify(body);
|
|
1464
1465
|
let response;
|
|
1465
1466
|
try {
|
|
@@ -1473,7 +1474,12 @@ class FetchConnection extends RestConnection {
|
|
|
1473
1474
|
throw new FirestoreError(mapCodeFromHttpStatus(err.status), 'Request failed with error: ' + err.statusText);
|
|
1474
1475
|
}
|
|
1475
1476
|
if (!response.ok) {
|
|
1476
|
-
|
|
1477
|
+
let errorResponse = await response.json();
|
|
1478
|
+
if (Array.isArray(errorResponse)) {
|
|
1479
|
+
errorResponse = errorResponse[0];
|
|
1480
|
+
}
|
|
1481
|
+
const errorMessage = (_a = errorResponse === null || errorResponse === void 0 ? void 0 : errorResponse.error) === null || _a === void 0 ? void 0 : _a.message;
|
|
1482
|
+
throw new FirestoreError(mapCodeFromHttpStatus(response.status), `Request failed with error: ${errorMessage !== null && errorMessage !== void 0 ? errorMessage : response.statusText}`);
|
|
1477
1483
|
}
|
|
1478
1484
|
return response.json();
|
|
1479
1485
|
}
|
|
@@ -8131,6 +8137,7 @@ class TransactionRunner {
|
|
|
8131
8137
|
const code = error.code;
|
|
8132
8138
|
return (code === 'aborted' ||
|
|
8133
8139
|
code === 'failed-precondition' ||
|
|
8140
|
+
code === 'already-exists' ||
|
|
8134
8141
|
!isPermanentError(code));
|
|
8135
8142
|
}
|
|
8136
8143
|
return false;
|