@rotorsoft/act 1.33.18 → 1.33.19
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 -3
- package/dist/@types/config.d.ts +2 -2
- package/dist/@types/internal/correlate-cycle.d.ts.map +1 -1
- package/dist/@types/internal/settle.d.ts +2 -2
- package/dist/@types/ports.d.ts +1 -1
- package/dist/@types/types/reaction.d.ts +4 -4
- package/dist/@types/utils.d.ts +5 -9
- package/dist/@types/utils.d.ts.map +1 -1
- package/dist/{chunk-3OTABSIB.js → chunk-5Z53Y7SG.js} +2 -2
- package/dist/chunk-5Z53Y7SG.js.map +1 -0
- package/dist/{chunk-N7K4FQEM.cjs → chunk-DVYTKZD5.cjs} +1 -1
- package/dist/{chunk-N7K4FQEM.cjs.map → chunk-DVYTKZD5.cjs.map} +1 -1
- package/dist/{chunk-OYR5RIFE.cjs → chunk-GEUBNZ3B.cjs} +13 -13
- package/dist/chunk-GEUBNZ3B.cjs.map +1 -0
- package/dist/{chunk-SD7SW47Z.js → chunk-HEHGZHHA.js} +1 -1
- package/dist/{chunk-SD7SW47Z.js.map → chunk-HEHGZHHA.js.map} +1 -1
- package/dist/index.cjs +150 -152
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -13
- package/dist/index.js.map +1 -1
- package/dist/test/index.cjs +4 -4
- package/dist/test/index.js +2 -2
- package/dist/types/index.cjs +2 -2
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3OTABSIB.js.map +0 -1
- package/dist/chunk-OYR5RIFE.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-5Z53Y7SG.js";
|
|
44
44
|
import {
|
|
45
45
|
ActorSchema,
|
|
46
46
|
CausationEventSchema,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
pii_fields,
|
|
71
71
|
pii_schemas,
|
|
72
72
|
sensitive
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-HEHGZHHA.js";
|
|
74
74
|
|
|
75
75
|
// src/signals.ts
|
|
76
76
|
process.once("SIGINT", async (arg) => {
|
|
@@ -1177,7 +1177,7 @@ var CorrelateCycle = class {
|
|
|
1177
1177
|
_restoring = false;
|
|
1178
1178
|
_init_promise;
|
|
1179
1179
|
// Bounded by `maxSubscribedStreams`; static records live apart so eviction
|
|
1180
|
-
// never
|
|
1180
|
+
// never lets a resolution re-lane them.
|
|
1181
1181
|
_dynamic_subscriptions;
|
|
1182
1182
|
_static_subscriptions = /* @__PURE__ */ new Map();
|
|
1183
1183
|
_patterns = new LruMap(PATTERN_CACHE_SIZE);
|
|
@@ -1226,7 +1226,6 @@ var CorrelateCycle = class {
|
|
|
1226
1226
|
this._checkpoint = correlated_at >= 0 ? correlated_at : Math.max(-1, watermark - COLD_START_BACK_SCAN);
|
|
1227
1227
|
for (const { stream, priority = 0, lane } of this._static_targets) {
|
|
1228
1228
|
this._static_subscriptions.set(stream, {
|
|
1229
|
-
floor: Number.POSITIVE_INFINITY,
|
|
1230
1229
|
priority,
|
|
1231
1230
|
lane
|
|
1232
1231
|
});
|
|
@@ -1330,9 +1329,10 @@ var CorrelateCycle = class {
|
|
|
1330
1329
|
);
|
|
1331
1330
|
lane = void 0;
|
|
1332
1331
|
}
|
|
1333
|
-
const
|
|
1332
|
+
const fixed = this._static_subscriptions.get(resolved.target);
|
|
1333
|
+
const recorded = fixed ?? this._dynamic_subscriptions.get(resolved.target);
|
|
1334
1334
|
const priority = resolved.priority ?? 0;
|
|
1335
|
-
const upgraded = !recorded || priority > recorded.
|
|
1335
|
+
const upgraded = !recorded || !fixed && priority > recorded.priority;
|
|
1336
1336
|
const carried = upgraded ? { priority, lane } : { priority: recorded.priority, lane: recorded.lane };
|
|
1337
1337
|
const entry = correlated.get(resolved.target) || {
|
|
1338
1338
|
source: resolved.source,
|
|
@@ -1402,7 +1402,6 @@ var CorrelateCycle = class {
|
|
|
1402
1402
|
for (const { stream, priority, lane } of streams) {
|
|
1403
1403
|
if (correlated.get(stream)?.upgraded)
|
|
1404
1404
|
this._dynamic_subscriptions.set(stream, {
|
|
1405
|
-
floor: priority,
|
|
1406
1405
|
priority,
|
|
1407
1406
|
lane
|
|
1408
1407
|
});
|
|
@@ -1431,7 +1430,6 @@ var CorrelateCycle = class {
|
|
|
1431
1430
|
);
|
|
1432
1431
|
if (!row) return;
|
|
1433
1432
|
this._dynamic_subscriptions.set(stream, {
|
|
1434
|
-
floor: row.priority,
|
|
1435
1433
|
priority: row.priority,
|
|
1436
1434
|
lane: row.lane
|
|
1437
1435
|
});
|
|
@@ -2857,8 +2855,8 @@ var SettleLoop = class {
|
|
|
2857
2855
|
* queues one more pass after it. Callers pass options, which the next
|
|
2858
2856
|
* pass uses; internal wake-ups pass none, so they never discard a
|
|
2859
2857
|
* caller's. The cycle runs correlate→drain in a
|
|
2860
|
-
* loop until no progress
|
|
2861
|
-
*
|
|
2858
|
+
* loop until a pass makes no progress (it read no events and leased no
|
|
2859
|
+
* streams) or `maxPasses` is reached, then emits the
|
|
2862
2860
|
* `"settled"` lifecycle event via {@link SettleDeps.on_settled}.
|
|
2863
2861
|
*/
|
|
2864
2862
|
schedule(options) {
|
|
@@ -3737,8 +3735,8 @@ var Act = class {
|
|
|
3737
3735
|
* `__snapshot__` events (counted in the result); `on_progress`
|
|
3738
3736
|
* fires once per event.
|
|
3739
3737
|
* @param sink - Where the events land. Defaults to this Act's store.
|
|
3740
|
-
* @returns {@link ScanResult}
|
|
3741
|
-
*
|
|
3738
|
+
* @returns The {@link ScanResult}: what was kept, migrated and dropped,
|
|
3739
|
+
* and how long it took.
|
|
3742
3740
|
*
|
|
3743
3741
|
* @example Restore a CSV backup into the connected store
|
|
3744
3742
|
* ```typescript
|
|
@@ -3909,7 +3907,7 @@ var Act = class {
|
|
|
3909
3907
|
* sets `autoSettle: false`. Call it at startup, to run what was pending
|
|
3910
3908
|
* before a restart, or with options for the next pass; the scheduling
|
|
3911
3909
|
* rule is in the event-sourcing docs (§ settle). Runs correlate→drain in a loop until a pass makes no
|
|
3912
|
-
* progress —
|
|
3910
|
+
* progress — it read no events and leased no streams —
|
|
3913
3911
|
* then emits the `"settled"` lifecycle event, so one call fully catches
|
|
3914
3912
|
* up paginated streams without forcing callers to loop.
|
|
3915
3913
|
*
|