@rotorsoft/act 1.34.1 → 1.34.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/.tsbuildinfo +1 -1
- package/dist/@types/act.d.ts +3 -2
- package/dist/@types/act.d.ts.map +1 -1
- package/dist/@types/adapters/in-memory-cache.d.ts.map +1 -1
- package/dist/@types/builders/act-builder.d.ts.map +1 -1
- package/dist/@types/builders/merge.d.ts.map +1 -1
- package/dist/@types/builders/projection-builder.d.ts.map +1 -1
- package/dist/@types/builders/slice-builder.d.ts.map +1 -1
- package/dist/@types/ports.d.ts +1 -2
- package/dist/@types/ports.d.ts.map +1 -1
- package/dist/@types/test/sandbox.d.ts.map +1 -1
- package/dist/@types/types/builders.d.ts +61 -138
- package/dist/@types/types/builders.d.ts.map +1 -1
- package/dist/{chunk-BTLM7SW4.cjs → chunk-GBAMBUDN.cjs} +1 -1
- package/dist/chunk-GBAMBUDN.cjs.map +1 -0
- package/dist/{chunk-5F2TQ4PT.js → chunk-IEM2NS6J.js} +1 -1
- package/dist/chunk-IEM2NS6J.js.map +1 -0
- package/dist/index.cjs +102 -101
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -6
- 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/dist/test/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-5F2TQ4PT.js.map +0 -1
- package/dist/chunk-BTLM7SW4.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
sleep,
|
|
41
41
|
store,
|
|
42
42
|
validate
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-IEM2NS6J.js";
|
|
44
44
|
import {
|
|
45
45
|
ActorSchema,
|
|
46
46
|
CausationEventSchema,
|
|
@@ -3561,8 +3561,9 @@ var Act = class {
|
|
|
3561
3561
|
* the event), and marks their work so the next drain can claim it.
|
|
3562
3562
|
*
|
|
3563
3563
|
* @param query - Only `limit` is used: the most events the pass reads
|
|
3564
|
-
* (
|
|
3565
|
-
* which every reaction shares, so
|
|
3564
|
+
* (10 when the query has none; `0` reads everything). The scan always
|
|
3565
|
+
* starts at the correlation checkpoint, which every reaction shares, so
|
|
3566
|
+
* filters and `after` are ignored.
|
|
3566
3567
|
* @returns The number of newly subscribed streams and the last scanned event id
|
|
3567
3568
|
*
|
|
3568
3569
|
* @example Manual correlation
|
|
@@ -3572,8 +3573,8 @@ var Act = class {
|
|
|
3572
3573
|
*
|
|
3573
3574
|
* @see {@link start_correlations} for automatic periodic correlation
|
|
3574
3575
|
*/
|
|
3575
|
-
async correlate(query = {
|
|
3576
|
-
const pass = await this._correlate_pass(query);
|
|
3576
|
+
async correlate(query = {}) {
|
|
3577
|
+
const pass = await this._correlate_pass({ limit: query.limit ?? 10 });
|
|
3577
3578
|
return {
|
|
3578
3579
|
subscribed: pass.kind === "scanned" ? pass.subscribed : 0,
|
|
3579
3580
|
last_id: pass.last_id
|
|
@@ -4230,7 +4231,7 @@ function autoclose_of(existing, state2) {
|
|
|
4230
4231
|
}
|
|
4231
4232
|
function merge_into_existing(state2, existing, states, actions, events) {
|
|
4232
4233
|
for (const name of Object.keys(state2.actions)) {
|
|
4233
|
-
if (existing.
|
|
4234
|
+
if (existing.on[name] === state2.on[name]) continue;
|
|
4234
4235
|
if (actions[name]) throw new Error(`Duplicate action "${name}"`);
|
|
4235
4236
|
}
|
|
4236
4237
|
for (const name of Object.keys(state2.events)) {
|