@rotorsoft/act 1.32.0 → 1.32.2

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.cjs CHANGED
@@ -1487,20 +1487,16 @@ var InMemoryStore = class {
1487
1487
  if (drop.size) this._events = this._events.filter((e) => !drop.has(e.id));
1488
1488
  }
1489
1489
  const full = targets.filter((t) => t.before === void 0);
1490
- const deleted_counts = /* @__PURE__ */ new Map();
1491
- const stream_set = new Set(full.map((t) => t.stream));
1492
- for (const e of this._events) {
1493
- if (stream_set.has(e.stream)) {
1494
- deleted_counts.set(e.stream, (deleted_counts.get(e.stream) ?? 0) + 1);
1495
- }
1496
- }
1497
- this._events = this._events.filter((e) => !stream_set.has(e.stream));
1498
- for (const stream of stream_set) {
1490
+ for (const { stream, snapshot, meta } of full) {
1491
+ let deleted = 0;
1492
+ this._events = this._events.filter((e) => {
1493
+ if (e.stream !== stream) return true;
1494
+ deleted++;
1495
+ return false;
1496
+ });
1499
1497
  this._stream_versions.delete(stream);
1500
1498
  this._max_event_id_by_stream.delete(stream);
1501
1499
  this._pii.delete(stream);
1502
- }
1503
- for (const { stream, snapshot, meta } of full) {
1504
1500
  const event = {
1505
1501
  id: this._next_id++,
1506
1502
  stream,
@@ -1515,10 +1511,7 @@ var InMemoryStore = class {
1515
1511
  if (event.name !== SNAP_EVENT) {
1516
1512
  this._max_event_id_by_stream.set(stream, event.id);
1517
1513
  }
1518
- result.set(stream, {
1519
- deleted: deleted_counts.get(stream) ?? 0,
1520
- committed: event
1521
- });
1514
+ result.set(stream, { deleted, committed: event });
1522
1515
  }
1523
1516
  let max = -1;
1524
1517
  for (const id of this._max_event_id_by_stream.values())
@@ -7292,7 +7285,7 @@ function slice() {
7292
7285
  return builder;
7293
7286
  },
7294
7287
  withLane: (config2) => {
7295
- register_lane(config2, lanes);
7288
+ register_lane(resolveLaneConfig(config2), lanes);
7296
7289
  return builder;
7297
7290
  },
7298
7291
  on: (event) => reaction_on(event, events, builder),