@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.
@@ -4,7 +4,7 @@ import { Logger, LogLevel } from '@firebase/logger';
4
4
  import { FirebaseError, getDefaultEmulatorHostnameAndPort, isCloudWorkstation, testConnectionAlive, deepEqual, createMockUserToken, getModularInstance } from '@firebase/util';
5
5
  import { Integer } from '@firebase/webchannel-wrapper/bloom-blob';
6
6
 
7
- const T = "4.7.11-firebase-studio-sdk-integration.1adc0ae1f";
7
+ const T = "4.7.11-firebase-studio-sdk-integration.226be0bb1";
8
8
 
9
9
  /**
10
10
  * @license
@@ -65,7 +65,7 @@ User.MOCK_USER = new User("mock-user");
65
65
  * See the License for the specific language governing permissions and
66
66
  * limitations under the License.
67
67
  */
68
- let A = "11.6.1-firebase-studio-sdk-integration.1adc0ae1f";
68
+ let A = "11.6.1-firebase-studio-sdk-integration.226be0bb1";
69
69
 
70
70
  /**
71
71
  * @license
@@ -219,7 +219,7 @@ e) {
219
219
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
220
220
  * See the License for the specific language governing permissions and
221
221
  * limitations under the License.
222
- */ const R = "ok", I = "cancelled", V = "unknown", p = "invalid-argument", y = "deadline-exceeded", g = "not-found", w = "already-exists", F = "permission-denied", v = "unauthenticated", D = "resource-exhausted", b = "failed-precondition", C = "aborted", S = "out-of-range", N = "unimplemented", O = "internal", q = "unavailable", B = "data-loss";
222
+ */ const R = "ok", I = "cancelled", V = "unknown", p = "invalid-argument", y = "deadline-exceeded", g = "not-found", w = "already-exists", F = "permission-denied", v = "unauthenticated", b = "resource-exhausted", D = "failed-precondition", C = "aborted", S = "out-of-range", N = "unimplemented", O = "internal", q = "unavailable", B = "data-loss";
223
223
 
224
224
  /** An error returned by a Firestore operation. */ class FirestoreError extends FirebaseError {
225
225
  /** @hideconstructor */
@@ -1230,7 +1230,7 @@ function __PRIVATE_mapCodeFromHttpStatus(t) {
1230
1230
 
1231
1231
  case 400:
1232
1232
  // Bad Request
1233
- return b;
1233
+ return D;
1234
1234
 
1235
1235
  // Other possibilities based on the forward mapping
1236
1236
  // return Code.INVALID_ARGUMENT;
@@ -1259,7 +1259,7 @@ function __PRIVATE_mapCodeFromHttpStatus(t) {
1259
1259
 
1260
1260
  case 429:
1261
1261
  // Too Many Requests
1262
- return D;
1262
+ return b;
1263
1263
 
1264
1264
  case 499:
1265
1265
  // Client Closed Request
@@ -1285,7 +1285,7 @@ function __PRIVATE_mapCodeFromHttpStatus(t) {
1285
1285
  return y;
1286
1286
 
1287
1287
  default:
1288
- return t >= 200 && t < 300 ? R : t >= 400 && t < 500 ? b : t >= 500 && t < 600 ? O : V;
1288
+ return t >= 200 && t < 300 ? R : t >= 400 && t < 500 ? D : t >= 500 && t < 600 ? O : V;
1289
1289
  }
1290
1290
  }
1291
1291
 
@@ -4085,7 +4085,7 @@ class __PRIVATE_ExponentialBackoff {
4085
4085
  this.serializer = n, this.et = !1;
4086
4086
  }
4087
4087
  rt() {
4088
- if (this.et) throw new FirestoreError(b, "The client has already been terminated.");
4088
+ if (this.et) throw new FirestoreError(D, "The client has already been terminated.");
4089
4089
  }
4090
4090
  /** Invokes the provided RPC with auth and AppCheck tokens. */ V(t, e, r, n) {
4091
4091
  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 => {
@@ -4224,7 +4224,7 @@ async function __PRIVATE_invokeRunAggregationQueryRpc(t, e, r) {
4224
4224
  * instance is terminated.
4225
4225
  */
4226
4226
  function __PRIVATE_getDatastore(t) {
4227
- if (t._terminated) throw new FirestoreError(b, "The client has already been terminated.");
4227
+ if (t._terminated) throw new FirestoreError(D, "The client has already been terminated.");
4228
4228
  if (!nt.has(t)) {
4229
4229
  __PRIVATE_logDebug(rt, "Initializing Datastore");
4230
4230
  const e = function __PRIVATE_newConnection(t) {
@@ -4377,7 +4377,7 @@ class Firestore {
4377
4377
  * The {@link @firebase/app#FirebaseApp} associated with this `Firestore` service
4378
4378
  * instance.
4379
4379
  */ get app() {
4380
- if (!this._app) throw new FirestoreError(b, "Firestore was not initialized using the Firebase SDK. 'app' is not available");
4380
+ if (!this._app) throw new FirestoreError(D, "Firestore was not initialized using the Firebase SDK. 'app' is not available");
4381
4381
  return this._app;
4382
4382
  }
4383
4383
  get _initialized() {
@@ -4387,7 +4387,7 @@ class Firestore {
4387
4387
  return "notTerminated" !== this._terminateTask;
4388
4388
  }
4389
4389
  _setSettings(t) {
4390
- if (this._settingsFrozen) throw new FirestoreError(b, "Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");
4390
+ if (this._settingsFrozen) throw new FirestoreError(D, "Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");
4391
4391
  this._settings = new FirestoreSettingsImpl(t), this._emulatorOptions = t.emulatorOptions || {},
4392
4392
  void 0 !== t.credentials && (this._authCredentials = function __PRIVATE_makeAuthCredentialsProvider(t) {
4393
4393
  if (!t) return new __PRIVATE_EmptyAuthCredentialsProvider;
@@ -4448,7 +4448,7 @@ class Firestore {
4448
4448
  function initializeFirestore(t, e, r) {
4449
4449
  r || (r = $);
4450
4450
  const n = _getProvider(t, "firestore/lite");
4451
- if (n.isInitialized(r)) throw new FirestoreError(b, "Firestore can only be initialized once per app.");
4451
+ if (n.isInitialized(r)) throw new FirestoreError(D, "Firestore can only be initialized once per app.");
4452
4452
  return n.initialize({
4453
4453
  options: e,
4454
4454
  instanceIdentifier: r
@@ -6794,7 +6794,7 @@ function sum(t) {
6794
6794
  return this._verifyNotCommitted(), this._committed = !0, this._mutations.length > 0 ? this._commitHandler(this._mutations) : Promise.resolve();
6795
6795
  }
6796
6796
  _verifyNotCommitted() {
6797
- if (this._committed) throw new FirestoreError(b, "A write batch can no longer be used after commit() has been called.");
6797
+ if (this._committed) throw new FirestoreError(D, "A write batch can no longer be used after commit() has been called.");
6798
6798
  }
6799
6799
  }
6800
6800
 
@@ -7040,7 +7040,7 @@ class __PRIVATE_TransactionRunner {
7040
7040
  case I:
7041
7041
  case V:
7042
7042
  case y:
7043
- case D:
7043
+ case b:
7044
7044
  case O:
7045
7045
  case q:
7046
7046
  // Unauthenticated means something went wrong with our token and we need
@@ -7052,7 +7052,7 @@ class __PRIVATE_TransactionRunner {
7052
7052
  case g:
7053
7053
  case w:
7054
7054
  case F:
7055
- case b:
7055
+ case D:
7056
7056
  // Aborted might be retried in some scenarios, but that is dependent on
7057
7057
  // the context and should handled individually by the calling code.
7058
7058
  // See https://cloud.google.com/apis/design/errors.
@@ -7202,10 +7202,10 @@ class __PRIVATE_AsyncQueueImpl {
7202
7202
  constructor(t = Promise.resolve()) {
7203
7203
  // A list of retryable operations. Retryable operations are run in order and
7204
7204
  // retried with backoff.
7205
- this.Dt = [],
7205
+ this.bt = [],
7206
7206
  // Is this AsyncQueue being shut down? Once it is set to true, it will not
7207
7207
  // be changed again.
7208
- this.bt = !1,
7208
+ this.Dt = !1,
7209
7209
  // Operations scheduled to be queued in the future. Operations are
7210
7210
  // automatically removed after they are run or canceled.
7211
7211
  this.Ct = [],
@@ -7232,7 +7232,7 @@ class __PRIVATE_AsyncQueueImpl {
7232
7232
  e && "function" == typeof e.addEventListener && e.addEventListener("visibilitychange", this.Bt);
7233
7233
  }
7234
7234
  get isShuttingDown() {
7235
- return this.bt;
7235
+ return this.Dt;
7236
7236
  }
7237
7237
  /**
7238
7238
  * Adds a new operation to the queue without waiting for it to complete (i.e.
@@ -7247,33 +7247,33 @@ class __PRIVATE_AsyncQueueImpl {
7247
7247
  this.Lt(t);
7248
7248
  }
7249
7249
  enterRestrictedMode(t) {
7250
- if (!this.bt) {
7251
- this.bt = !0, this.Ot = t || !1;
7250
+ if (!this.Dt) {
7251
+ this.Dt = !0, this.Ot = t || !1;
7252
7252
  const e = getDocument();
7253
7253
  e && "function" == typeof e.removeEventListener && e.removeEventListener("visibilitychange", this.Bt);
7254
7254
  }
7255
7255
  }
7256
7256
  enqueue(t) {
7257
- if (this.Qt(), this.bt)
7257
+ if (this.Qt(), this.Dt)
7258
7258
  // Return a Promise which never resolves.
7259
7259
  return new Promise((() => {}));
7260
7260
  // Create a deferred Promise that we can return to the callee. This
7261
7261
  // allows us to return a "hanging Promise" only to the callee and still
7262
7262
  // advance the queue even when the operation is not run.
7263
7263
  const e = new __PRIVATE_Deferred;
7264
- return this.Lt((() => this.bt && this.Ot ? Promise.resolve() : (t().then(e.resolve, e.reject),
7264
+ return this.Lt((() => this.Dt && this.Ot ? Promise.resolve() : (t().then(e.resolve, e.reject),
7265
7265
  e.promise))).then((() => e.promise));
7266
7266
  }
7267
7267
  enqueueRetryable(t) {
7268
- this.enqueueAndForget((() => (this.Dt.push(t), this.kt())));
7268
+ this.enqueueAndForget((() => (this.bt.push(t), this.kt())));
7269
7269
  }
7270
7270
  /**
7271
7271
  * Runs the next operation from the retryable queue. If the operation fails,
7272
7272
  * reschedules with backoff.
7273
7273
  */ async kt() {
7274
- if (0 !== this.Dt.length) {
7274
+ if (0 !== this.bt.length) {
7275
7275
  try {
7276
- await this.Dt[0](), this.Dt.shift(), this.Vt.reset();
7276
+ await this.bt[0](), this.bt.shift(), this.Vt.reset();
7277
7277
  } catch (t) {
7278
7278
  if (!
7279
7279
  /**
@@ -7301,7 +7301,7 @@ class __PRIVATE_AsyncQueueImpl {
7301
7301
  // Failure will be handled by AsyncQueue
7302
7302
  __PRIVATE_logDebug(ct, "Operation failed with retryable error: " + t);
7303
7303
  }
7304
- this.Dt.length > 0 &&
7304
+ this.bt.length > 0 &&
7305
7305
  // If there are additional operations, we re-schedule `retryNextOp()`.
7306
7306
  // This is necessary to run retryable operations that failed during
7307
7307
  // their initial attempt since we don't know whether they are already