@firebase/firestore 4.7.11-firebase-studio-sdk-integration.1adc0ae1f → 4.7.11-firebase-studio-sdk-integration.226be0bb1
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/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +2 -2
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +3 -3
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +3 -3
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +2 -2
- package/dist/index.rn.js.map +1 -1
- package/dist/lite/index.browser.esm2017.js +25 -25
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.cjs.js +25 -25
- package/dist/lite/index.cjs.js.map +1 -1
- package/dist/lite/index.node.cjs.js +3 -3
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +3 -3
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +20 -20
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/package.json +9 -9
|
@@ -8,7 +8,7 @@ import { FirebaseError as _, isCloudWorkstation as c, base64 as l, DecodeBase64S
|
|
|
8
8
|
|
|
9
9
|
import { Integer as A } from "@firebase/webchannel-wrapper/bloom-blob";
|
|
10
10
|
|
|
11
|
-
const P = "4.7.11-firebase-studio-sdk-integration.
|
|
11
|
+
const P = "4.7.11-firebase-studio-sdk-integration.226be0bb1";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
@@ -69,7 +69,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
69
69
|
* See the License for the specific language governing permissions and
|
|
70
70
|
* limitations under the License.
|
|
71
71
|
*/
|
|
72
|
-
let R = "11.6.1-firebase-studio-sdk-integration.
|
|
72
|
+
let R = "11.6.1-firebase-studio-sdk-integration.226be0bb1";
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* @license
|
|
@@ -223,7 +223,7 @@ e) {
|
|
|
223
223
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
224
224
|
* See the License for the specific language governing permissions and
|
|
225
225
|
* limitations under the License.
|
|
226
|
-
*/ const V = "ok", p = "cancelled", y = "unknown", g = "invalid-argument", w = "deadline-exceeded", F = "not-found", v = "already-exists",
|
|
226
|
+
*/ const V = "ok", p = "cancelled", y = "unknown", g = "invalid-argument", w = "deadline-exceeded", F = "not-found", v = "already-exists", b = "permission-denied", D = "unauthenticated", C = "resource-exhausted", S = "failed-precondition", N = "aborted", O = "out-of-range", q = "unimplemented", B = "internal", $ = "unavailable", Q = "data-loss";
|
|
227
227
|
|
|
228
228
|
/** An error returned by a Firestore operation. */ class FirestoreError extends _ {
|
|
229
229
|
/** @hideconstructor */
|
|
@@ -1241,11 +1241,11 @@ function __PRIVATE_mapCodeFromHttpStatus(t) {
|
|
|
1241
1241
|
// return Code.OUT_OF_RANGE;
|
|
1242
1242
|
case 401:
|
|
1243
1243
|
// Unauthorized
|
|
1244
|
-
return
|
|
1244
|
+
return D;
|
|
1245
1245
|
|
|
1246
1246
|
case 403:
|
|
1247
1247
|
// Forbidden
|
|
1248
|
-
return
|
|
1248
|
+
return b;
|
|
1249
1249
|
|
|
1250
1250
|
case 404:
|
|
1251
1251
|
// Not Found
|
|
@@ -4101,13 +4101,13 @@ class __PRIVATE_ExponentialBackoff {
|
|
|
4101
4101
|
}
|
|
4102
4102
|
/** Invokes the provided RPC with auth and AppCheck tokens. */ V(t, e, r, n) {
|
|
4103
4103
|
return this.rt(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([i, s]) => this.connection.V(t, __PRIVATE_toResourcePath(e, r), n, i, s))).catch((t => {
|
|
4104
|
-
throw "FirebaseError" === t.name ? (t.code ===
|
|
4104
|
+
throw "FirebaseError" === t.name ? (t.code === D && (this.authCredentials.invalidateToken(),
|
|
4105
4105
|
this.appCheckCredentials.invalidateToken()), t) : new FirestoreError(y, t.toString());
|
|
4106
4106
|
}));
|
|
4107
4107
|
}
|
|
4108
4108
|
/** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */ D(t, e, r, n, i) {
|
|
4109
4109
|
return this.rt(), Promise.all([ this.authCredentials.getToken(), this.appCheckCredentials.getToken() ]).then((([s, o]) => this.connection.D(t, __PRIVATE_toResourcePath(e, r), n, s, o, i))).catch((t => {
|
|
4110
|
-
throw "FirebaseError" === t.name ? (t.code ===
|
|
4110
|
+
throw "FirebaseError" === t.name ? (t.code === D && (this.authCredentials.invalidateToken(),
|
|
4111
4111
|
this.appCheckCredentials.invalidateToken()), t) : new FirestoreError(y, t.toString());
|
|
4112
4112
|
}));
|
|
4113
4113
|
}
|
|
@@ -7057,13 +7057,13 @@ class __PRIVATE_TransactionRunner {
|
|
|
7057
7057
|
case $:
|
|
7058
7058
|
// Unauthenticated means something went wrong with our token and we need
|
|
7059
7059
|
// to retry with new credentials which will happen automatically.
|
|
7060
|
-
case
|
|
7060
|
+
case D:
|
|
7061
7061
|
return !1;
|
|
7062
7062
|
|
|
7063
7063
|
case g:
|
|
7064
7064
|
case F:
|
|
7065
7065
|
case v:
|
|
7066
|
-
case
|
|
7066
|
+
case b:
|
|
7067
7067
|
case S:
|
|
7068
7068
|
// Aborted might be retried in some scenarios, but that is dependent on
|
|
7069
7069
|
// the context and should handled individually by the calling code.
|
|
@@ -7214,10 +7214,10 @@ class __PRIVATE_AsyncQueueImpl {
|
|
|
7214
7214
|
constructor(t = Promise.resolve()) {
|
|
7215
7215
|
// A list of retryable operations. Retryable operations are run in order and
|
|
7216
7216
|
// retried with backoff.
|
|
7217
|
-
this.
|
|
7217
|
+
this.bt = [],
|
|
7218
7218
|
// Is this AsyncQueue being shut down? Once it is set to true, it will not
|
|
7219
7219
|
// be changed again.
|
|
7220
|
-
this.
|
|
7220
|
+
this.Dt = !1,
|
|
7221
7221
|
// Operations scheduled to be queued in the future. Operations are
|
|
7222
7222
|
// automatically removed after they are run or canceled.
|
|
7223
7223
|
this.Ct = [],
|
|
@@ -7244,7 +7244,7 @@ class __PRIVATE_AsyncQueueImpl {
|
|
|
7244
7244
|
e && "function" == typeof e.addEventListener && e.addEventListener("visibilitychange", this.Bt);
|
|
7245
7245
|
}
|
|
7246
7246
|
get isShuttingDown() {
|
|
7247
|
-
return this.
|
|
7247
|
+
return this.Dt;
|
|
7248
7248
|
}
|
|
7249
7249
|
/**
|
|
7250
7250
|
* Adds a new operation to the queue without waiting for it to complete (i.e.
|
|
@@ -7259,33 +7259,33 @@ class __PRIVATE_AsyncQueueImpl {
|
|
|
7259
7259
|
this.kt(t);
|
|
7260
7260
|
}
|
|
7261
7261
|
enterRestrictedMode(t) {
|
|
7262
|
-
if (!this.
|
|
7263
|
-
this.
|
|
7262
|
+
if (!this.Dt) {
|
|
7263
|
+
this.Dt = !0, this.Ot = t || !1;
|
|
7264
7264
|
const e = getDocument();
|
|
7265
7265
|
e && "function" == typeof e.removeEventListener && e.removeEventListener("visibilitychange", this.Bt);
|
|
7266
7266
|
}
|
|
7267
7267
|
}
|
|
7268
7268
|
enqueue(t) {
|
|
7269
|
-
if (this.Qt(), this.
|
|
7269
|
+
if (this.Qt(), this.Dt)
|
|
7270
7270
|
// Return a Promise which never resolves.
|
|
7271
7271
|
return new Promise((() => {}));
|
|
7272
7272
|
// Create a deferred Promise that we can return to the callee. This
|
|
7273
7273
|
// allows us to return a "hanging Promise" only to the callee and still
|
|
7274
7274
|
// advance the queue even when the operation is not run.
|
|
7275
7275
|
const e = new __PRIVATE_Deferred;
|
|
7276
|
-
return this.kt((() => this.
|
|
7276
|
+
return this.kt((() => this.Dt && this.Ot ? Promise.resolve() : (t().then(e.resolve, e.reject),
|
|
7277
7277
|
e.promise))).then((() => e.promise));
|
|
7278
7278
|
}
|
|
7279
7279
|
enqueueRetryable(t) {
|
|
7280
|
-
this.enqueueAndForget((() => (this.
|
|
7280
|
+
this.enqueueAndForget((() => (this.bt.push(t), this.Lt())));
|
|
7281
7281
|
}
|
|
7282
7282
|
/**
|
|
7283
7283
|
* Runs the next operation from the retryable queue. If the operation fails,
|
|
7284
7284
|
* reschedules with backoff.
|
|
7285
7285
|
*/ async Lt() {
|
|
7286
|
-
if (0 !== this.
|
|
7286
|
+
if (0 !== this.bt.length) {
|
|
7287
7287
|
try {
|
|
7288
|
-
await this.
|
|
7288
|
+
await this.bt[0](), this.bt.shift(), this.Vt.reset();
|
|
7289
7289
|
} catch (t) {
|
|
7290
7290
|
if (!
|
|
7291
7291
|
/**
|
|
@@ -7313,7 +7313,7 @@ class __PRIVATE_AsyncQueueImpl {
|
|
|
7313
7313
|
// Failure will be handled by AsyncQueue
|
|
7314
7314
|
__PRIVATE_logDebug(dt, "Operation failed with retryable error: " + t);
|
|
7315
7315
|
}
|
|
7316
|
-
this.
|
|
7316
|
+
this.bt.length > 0 &&
|
|
7317
7317
|
// If there are additional operations, we re-schedule `retryNextOp()`.
|
|
7318
7318
|
// This is necessary to run retryable operations that failed during
|
|
7319
7319
|
// their initial attempt since we don't know whether they are already
|