@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
|
@@ -14,7 +14,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
|
|
15
15
|
var nodeFetch__default = /*#__PURE__*/_interopDefaultLegacy(nodeFetch);
|
|
16
16
|
|
|
17
|
-
const version$1 = "3.7.
|
|
17
|
+
const version$1 = "3.7.2-canary.457fc2eeb";
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
@@ -67,7 +67,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
67
67
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
68
68
|
User.MOCK_USER = new User('mock-user');
|
|
69
69
|
|
|
70
|
-
const version = "9.
|
|
70
|
+
const version = "9.13.0-canary.457fc2eeb";
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* @license
|
|
@@ -1468,6 +1468,7 @@ class FetchConnection extends RestConnection {
|
|
|
1468
1468
|
throw new Error('Not supported by FetchConnection');
|
|
1469
1469
|
}
|
|
1470
1470
|
async performRPCRequest(rpcName, url, headers, body) {
|
|
1471
|
+
var _a;
|
|
1471
1472
|
const requestJson = JSON.stringify(body);
|
|
1472
1473
|
let response;
|
|
1473
1474
|
try {
|
|
@@ -1481,7 +1482,12 @@ class FetchConnection extends RestConnection {
|
|
|
1481
1482
|
throw new FirestoreError(mapCodeFromHttpStatus(err.status), 'Request failed with error: ' + err.statusText);
|
|
1482
1483
|
}
|
|
1483
1484
|
if (!response.ok) {
|
|
1484
|
-
|
|
1485
|
+
let errorResponse = await response.json();
|
|
1486
|
+
if (Array.isArray(errorResponse)) {
|
|
1487
|
+
errorResponse = errorResponse[0];
|
|
1488
|
+
}
|
|
1489
|
+
const errorMessage = (_a = errorResponse === null || errorResponse === void 0 ? void 0 : errorResponse.error) === null || _a === void 0 ? void 0 : _a.message;
|
|
1490
|
+
throw new FirestoreError(mapCodeFromHttpStatus(response.status), `Request failed with error: ${errorMessage !== null && errorMessage !== void 0 ? errorMessage : response.statusText}`);
|
|
1485
1491
|
}
|
|
1486
1492
|
return response.json();
|
|
1487
1493
|
}
|
|
@@ -8139,6 +8145,7 @@ class TransactionRunner {
|
|
|
8139
8145
|
const code = error.code;
|
|
8140
8146
|
return (code === 'aborted' ||
|
|
8141
8147
|
code === 'failed-precondition' ||
|
|
8148
|
+
code === 'already-exists' ||
|
|
8142
8149
|
!isPermanentError(code));
|
|
8143
8150
|
}
|
|
8144
8151
|
return false;
|