@rotorsoft/act 1.31.25 → 1.31.27

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
@@ -105,12 +105,11 @@ function classify_registry(registry, states) {
105
105
  `Stream "${target}" has conflicting lane assignments ("${recorded_lane}" vs "${lane_name}")`
106
106
  );
107
107
  }
108
- const key = `${target}|${source ?? ""}`;
109
- const existing = statics.get(key);
108
+ const existing = statics.get(target);
110
109
  if (!existing) {
111
- statics.set(key, { stream: target, source, priority, lane });
110
+ statics.set(target, { stream: target, source, priority, lane });
112
111
  } else if (priority > existing.priority) {
113
- statics.set(key, { ...existing, priority });
112
+ statics.set(target, { ...existing, priority });
114
113
  }
115
114
  }
116
115
  }
@@ -2192,7 +2191,7 @@ async function scan(source, opts = {}, callback) {
2192
2191
  (e) => {
2193
2192
  max_id = e.id;
2194
2193
  },
2195
- { backward: true, limit: 1 }
2194
+ { backward: true, limit: 1, with_snaps: true }
2196
2195
  );
2197
2196
  if (probed !== 1) max_id = void 0;
2198
2197
  while (true) {
@@ -2260,7 +2259,7 @@ async function scan(source, opts = {}, callback) {
2260
2259
  id_map.set(event.id, new_id);
2261
2260
  kept++;
2262
2261
  },
2263
- { after: at, limit }
2262
+ { after: at, limit, with_snaps: true }
2264
2263
  );
2265
2264
  if (got !== limit) break;
2266
2265
  at = id;
@@ -4242,7 +4241,14 @@ var Act = class {
4242
4241
  const acked = [];
4243
4242
  const blocked = [];
4244
4243
  for (const r of results) {
4245
- fetched.push(...r.fetched);
4244
+ fetched.push(
4245
+ ...r.fetched.map((f) => ({
4246
+ ...f,
4247
+ events: f.events.map(
4248
+ (e) => this.registry.query_gate(e.name)(e)
4249
+ )
4250
+ }))
4251
+ );
4246
4252
  leased.push(...r.leased);
4247
4253
  acked.push(...r.acked);
4248
4254
  blocked.push(...r.blocked);