@rotorsoft/act 1.23.3 → 1.23.4

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.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  sleep,
21
21
  store,
22
22
  validate
23
- } from "./chunk-5YIRFU4Y.js";
23
+ } from "./chunk-ZG7IC6N6.js";
24
24
  import {
25
25
  ActorSchema,
26
26
  CausationEventSchema,
@@ -600,7 +600,7 @@ var InMemoryStream = class {
600
600
  * @param error Blocked error message.
601
601
  */
602
602
  block(lease, error) {
603
- if (this._leased_by === lease.by) {
603
+ if (this._leased_by === lease.by && !this._blocked) {
604
604
  this._blocked = true;
605
605
  this._error = error;
606
606
  this._deferred_at = void 0;
@@ -759,7 +759,7 @@ var InMemoryStore = class {
759
759
  }
760
760
  } else {
761
761
  let i = this._first_index_after(query?.after ?? -1);
762
- if (query?.with_snaps && query.stream_exact && query.stream !== void 0 && query.after === void 0) {
762
+ if (query?.with_snaps && query.stream_exact && query.stream !== void 0 && query.after === void 0 && query.created_before === void 0 && query.created_after === void 0) {
763
763
  for (let j = this._events.length - 1; j >= 0; j--) {
764
764
  const e = this._events[j];
765
765
  if (e.stream === query.stream && e.name === SNAP_EVENT) {