@rotorsoft/act 1.18.2 → 1.18.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.
@@ -4405,15 +4405,21 @@ var InMemoryStream = class {
4405
4405
  };
4406
4406
  }
4407
4407
  /**
4408
- * Acknowledge completion of processing for this stream.
4408
+ * Finalize this stream's lease: ack (advance the watermark) or, when the
4409
+ * lease carries a `due` marker, defer (persist the schedule, hold the
4410
+ * watermark) — see {@link Store.ack}.
4409
4411
  * @param lease - The lease request.
4410
4412
  */
4411
4413
  ack(lease) {
4412
4414
  if (this._leased_by === lease.by) {
4413
4415
  this._leased_by = void 0;
4414
4416
  this._leased_until = void 0;
4415
- this._at = lease.at;
4416
4417
  this._retry = -1;
4418
+ if (lease.due !== void 0) {
4419
+ this._deferred_at = lease.due;
4420
+ return void 0;
4421
+ }
4422
+ this._at = lease.at;
4417
4423
  this._deferred_at = void 0;
4418
4424
  return {
4419
4425
  stream: this.stream,