@rotorsoft/act 1.23.21 → 1.23.23
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/.tsbuildinfo +1 -1
- package/dist/@types/adapters/in-memory-store.d.ts.map +1 -1
- package/dist/@types/internal/autoclose-reaction.d.ts.map +1 -1
- package/dist/{chunk-T722JHPU.js → chunk-4JK4QJIT.js} +4 -4
- package/dist/{chunk-T722JHPU.js.map → chunk-4JK4QJIT.js.map} +1 -1
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/test/index.cjs +3 -3
- package/dist/test/index.cjs.map +1 -1
- package/dist/test/index.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1122,7 +1122,7 @@ var InMemoryStore = class {
|
|
|
1122
1122
|
await sleep();
|
|
1123
1123
|
let count = 0;
|
|
1124
1124
|
if (Array.isArray(input)) {
|
|
1125
|
-
for (const name of input) {
|
|
1125
|
+
for (const name of new Set(input)) {
|
|
1126
1126
|
const s = this._streams.get(name);
|
|
1127
1127
|
if (s) {
|
|
1128
1128
|
s.defer(deferred_at);
|
|
@@ -1176,7 +1176,7 @@ var InMemoryStore = class {
|
|
|
1176
1176
|
await sleep();
|
|
1177
1177
|
let count = 0;
|
|
1178
1178
|
if (Array.isArray(input)) {
|
|
1179
|
-
for (const name of input) {
|
|
1179
|
+
for (const name of new Set(input)) {
|
|
1180
1180
|
const s = this._streams.get(name);
|
|
1181
1181
|
if (s) {
|
|
1182
1182
|
s.reset();
|
|
@@ -1381,7 +1381,7 @@ var InMemoryStore = class {
|
|
|
1381
1381
|
a.names[n] = (a.names[n] ?? 0) + 1;
|
|
1382
1382
|
}
|
|
1383
1383
|
}
|
|
1384
|
-
const ordered = [...acc.keys()].sort(
|
|
1384
|
+
const ordered = [...acc.keys()].sort();
|
|
1385
1385
|
const out = /* @__PURE__ */ new Map();
|
|
1386
1386
|
for (const stream of ordered) {
|
|
1387
1387
|
if (after !== void 0 && stream <= after) continue;
|
|
@@ -2269,7 +2269,7 @@ function synthesize_autoclose_reactions(registry, states, config2) {
|
|
|
2269
2269
|
const stats = await store2().query_stats([aggregate], {
|
|
2270
2270
|
count: true,
|
|
2271
2271
|
tail: keep_days !== void 0 ? true : void 0,
|
|
2272
|
-
exclude:
|
|
2272
|
+
exclude: [TOMBSTONE_EVENT, SNAP_EVENT]
|
|
2273
2273
|
});
|
|
2274
2274
|
const entry = stats.get(aggregate);
|
|
2275
2275
|
if (!entry) return;
|
|
@@ -2921,12 +2921,13 @@ async function scan_stream_heads(streams) {
|
|
|
2921
2921
|
const stats = await store2().query_stats(streams, {
|
|
2922
2922
|
exclude: [SNAP_EVENT]
|
|
2923
2923
|
});
|
|
2924
|
+
const true_heads = await store2().query_stats(streams, {});
|
|
2924
2925
|
const out = /* @__PURE__ */ new Map();
|
|
2925
2926
|
for (const [stream, { head }] of stats) {
|
|
2926
2927
|
if (head.name === TOMBSTONE_EVENT) continue;
|
|
2927
2928
|
out.set(stream, {
|
|
2928
2929
|
max_id: head.id,
|
|
2929
|
-
version: head.version,
|
|
2930
|
+
version: true_heads.get(stream).head.version,
|
|
2930
2931
|
last_event_name: head.name
|
|
2931
2932
|
});
|
|
2932
2933
|
}
|