@rotorsoft/act 1.31.16 → 1.31.18
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/act.d.ts.map +1 -1
- package/dist/@types/adapters/in-memory-store.d.ts.map +1 -1
- package/dist/@types/builders/act-builder.d.ts.map +1 -1
- package/dist/@types/internal/autoclose-reaction.d.ts +12 -2
- package/dist/@types/internal/autoclose-reaction.d.ts.map +1 -1
- package/dist/@types/internal/correlate-cycle.d.ts.map +1 -1
- package/dist/@types/scoped.d.ts +37 -2
- package/dist/@types/scoped.d.ts.map +1 -1
- package/dist/@types/types/ports.d.ts +27 -4
- package/dist/@types/types/ports.d.ts.map +1 -1
- package/dist/{chunk-T2AT4N6B.js → chunk-34WL4DPW.js} +10 -8
- package/dist/chunk-34WL4DPW.js.map +1 -0
- package/dist/index.cjs +27 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -8
- package/dist/index.js.map +1 -1
- package/dist/test/index.cjs +5 -7
- package/dist/test/index.cjs.map +1 -1
- package/dist/test/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-T2AT4N6B.js.map +0 -1
package/dist/test/index.cjs
CHANGED
|
@@ -563,10 +563,8 @@ var InMemoryStream = class {
|
|
|
563
563
|
* @returns The granted lease or undefined if blocked.
|
|
564
564
|
*/
|
|
565
565
|
lease(lease, millis) {
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
this._leased_until = new Date(Date.now() + millis);
|
|
569
|
-
}
|
|
566
|
+
this._leased_by = lease.by;
|
|
567
|
+
this._leased_until = new Date(Date.now() + millis);
|
|
570
568
|
this._retry = this._retry + 1;
|
|
571
569
|
return {
|
|
572
570
|
stream: this.stream,
|
|
@@ -956,8 +954,8 @@ var InMemoryStore = class {
|
|
|
956
954
|
} of streams) {
|
|
957
955
|
const existing = this._streams.get(stream);
|
|
958
956
|
if (existing) {
|
|
957
|
+
if (priority >= existing.priority) existing.lane = lane;
|
|
959
958
|
existing.bump_priority(priority);
|
|
960
|
-
existing.lane = lane;
|
|
961
959
|
if (correlated_at2 !== void 0) existing.mark(correlated_at2);
|
|
962
960
|
} else {
|
|
963
961
|
const created = new InMemoryStream(stream, source, priority, lane);
|
|
@@ -1183,6 +1181,7 @@ var InMemoryStore = class {
|
|
|
1183
1181
|
}
|
|
1184
1182
|
if (blocked !== void 0 && s.blocked !== blocked) continue;
|
|
1185
1183
|
if (query?.lane !== void 0 && s.lane !== query.lane) continue;
|
|
1184
|
+
if (count >= limit) break;
|
|
1186
1185
|
callback({
|
|
1187
1186
|
stream: s.stream,
|
|
1188
1187
|
source: s.source,
|
|
@@ -1198,7 +1197,6 @@ var InMemoryStore = class {
|
|
|
1198
1197
|
correlated_at: s.correlated_at
|
|
1199
1198
|
});
|
|
1200
1199
|
count++;
|
|
1201
|
-
if (count >= limit) break;
|
|
1202
1200
|
}
|
|
1203
1201
|
return { maxEventId: this._events.at(-1)?.id ?? -1, count };
|
|
1204
1202
|
}
|
|
@@ -1268,6 +1266,7 @@ var InMemoryStore = class {
|
|
|
1268
1266
|
const ordered = [...acc.keys()].sort();
|
|
1269
1267
|
const out = /* @__PURE__ */ new Map();
|
|
1270
1268
|
for (const stream of ordered) {
|
|
1269
|
+
if (limit !== void 0 && out.size >= limit) break;
|
|
1271
1270
|
if (after !== void 0 && stream <= after) continue;
|
|
1272
1271
|
const a = acc.get(stream);
|
|
1273
1272
|
const stats = { head: a.head };
|
|
@@ -1275,7 +1274,6 @@ var InMemoryStore = class {
|
|
|
1275
1274
|
if (want_count) stats.count = a.count;
|
|
1276
1275
|
if (want_names) stats.names = a.names;
|
|
1277
1276
|
out.set(stream, stats);
|
|
1278
|
-
if (limit !== void 0 && out.size >= limit) break;
|
|
1279
1277
|
}
|
|
1280
1278
|
return out;
|
|
1281
1279
|
}
|