@rotorsoft/act 1.15.0 → 1.16.0

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
@@ -19,7 +19,7 @@ import {
19
19
  sleep,
20
20
  store,
21
21
  validate
22
- } from "./chunk-DBQT3ALY.js";
22
+ } from "./chunk-46OCUAVF.js";
23
23
  import {
24
24
  ActorSchema,
25
25
  CausationEventSchema,
@@ -4552,6 +4552,15 @@ var InMemoryStore = class {
4552
4552
  }
4553
4553
  } else {
4554
4554
  let i2 = (query?.after ?? -1) + 1;
4555
+ if (query?.with_snaps && query.stream_exact && query.stream !== void 0 && query.after === void 0) {
4556
+ for (let j = this._events.length - 1; j >= 0; j--) {
4557
+ const e = this._events[j];
4558
+ if (e.stream === query.stream && e.name === SNAP_EVENT) {
4559
+ i2 = j;
4560
+ break;
4561
+ }
4562
+ }
4563
+ }
4555
4564
  while (i2 < this._events.length) {
4556
4565
  const e = this._events[i2++];
4557
4566
  if (query && !this.in_query(query, e)) continue;