ahmed-rivet-convex 2.2.2 → 2.2.3

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.
@@ -720,7 +720,9 @@ var ConnectionLoop = class {
720
720
  this.#lc = lc;
721
721
  this.#delegate = delegate;
722
722
  this.#visibilityWatcher = visibilityWatcher;
723
- void this.run();
723
+ this.run().catch((e) => {
724
+ console.error("ConnectionLoop run() died \u2014 sync loop is dead", e);
725
+ });
724
726
  }
725
727
  close() {
726
728
  this.#closed = true;
@@ -756,7 +758,7 @@ var ConnectionLoop = class {
756
758
  let lastSendTime;
757
759
  let counter = 0;
758
760
  const delegate = this.#delegate;
759
- const { debug } = this.#lc;
761
+ const debug = (...args) => this.#lc.debug?.(...args);
760
762
  let delay = 0;
761
763
  debug?.("Starting connection loop");
762
764
  const sleepMaybeSkip = (ms) => Promise.race([this.#skipSleepsResolver.promise, sleep(ms)]);
@@ -15006,7 +15008,7 @@ function makeMessage(message, context, logLevel) {
15006
15008
  }
15007
15009
 
15008
15010
  // ../zero-client/src/client/version.ts
15009
- var version2 = "2.2.2";
15011
+ var version2 = "2.2.3";
15010
15012
 
15011
15013
  // ../zero-client/src/client/log-options.ts
15012
15014
  var LevelFilterLogSink = class {
@@ -17107,7 +17109,13 @@ var Zero = class _Zero {
17107
17109
  */
17108
17110
  async pokeDirect(poke) {
17109
17111
  await this.#rep.poke(poke);
17110
- await this.#rep.persist();
17112
+ this.#pokePersistChain = this.#pokePersistChain.then(() => this.#rep.persist()).catch(() => {
17113
+ });
17114
+ }
17115
+ #pokePersistChain = Promise.resolve();
17116
+ /** Resolves when every persist queued by pokeDirect so far has landed. */
17117
+ persistPending() {
17118
+ return this.#pokePersistChain;
17111
17119
  }
17112
17120
  /** Refresh this instance from the latest persisted shared-IDB head. */
17113
17121
  async refresh() {
@@ -18087,4 +18095,4 @@ export {
18087
18095
  pako/dist/pako.esm.mjs:
18088
18096
  (*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) *)
18089
18097
  */
18090
- //# sourceMappingURL=chunk-ESPGEVYR.js.map
18098
+ //# sourceMappingURL=chunk-UHDLB4MJ.js.map