@rotorsoft/act 1.31.12 → 1.31.13
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 +5 -2
- package/dist/@types/act.d.ts.map +1 -1
- package/dist/@types/internal/correlate-cycle.d.ts +20 -3
- package/dist/@types/internal/correlate-cycle.d.ts.map +1 -1
- package/dist/index.cjs +30 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -12
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/@types/act.d.ts
CHANGED
|
@@ -105,8 +105,11 @@ export type ActLifecycleEvents<_TSchemaReg extends SchemaRegister<TActions>, TEv
|
|
|
105
105
|
/**
|
|
106
106
|
* Options for {@link Act} construction (passed via {@link ActBuilder.build}).
|
|
107
107
|
*
|
|
108
|
-
* @property maxSubscribedStreams - Cap for the LRU
|
|
109
|
-
*
|
|
108
|
+
* @property maxSubscribedStreams - Cap for the LRU tracking what each
|
|
109
|
+
* dynamically resolved reaction target was last subscribed at. Statically
|
|
110
|
+
* declared targets are held outside it and never evicted, so their lane
|
|
111
|
+
* and priority stay owned by the build-time subscribe (#1582).
|
|
112
|
+
* Default: {@link DEFAULT_MAX_SUBSCRIBED_STREAMS}.
|
|
110
113
|
* @property settleDebounceMs - Debounce window (ms) used by `settle()` when
|
|
111
114
|
* the caller doesn't pass `SettleOptions.debounceMs`. Tune this once per
|
|
112
115
|
* Act instance instead of threading the value through every call site.
|
package/dist/@types/act.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"act.d.ts","sourceRoot":"","sources":["../../src/act.ts"],"names":[],"mappings":"AAWA,OAAO,EAOL,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EAYjB,KAAK,OAAO,EAUb,MAAM,qBAAqB,CAAC;AAQ7B,YAAY,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA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V,UAAU,CAAC,EAAE,aAAa,EAAE,EAC5B,OAAO,CAAC,EAAE,YAAY,GACrB,aAAa,CAAC,YAAY,CAAC,CAe7B;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACG,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAExE;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyDG;IACH;;;;OAIG;IACH;;;;;;;;;;;OAWG;YACW,qBAAqB;IAgBnC;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,4BAA4B;IAO9B,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CA0BxD;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,IAAI,CASxC;CACF"}
|
|
@@ -111,7 +111,23 @@ export declare class CorrelateCycle<TSchemaReg extends SchemaRegister<TActions>,
|
|
|
111
111
|
/** In-flight init, memoized for single-flight and cleared on failure. */
|
|
112
112
|
private _init_promise;
|
|
113
113
|
private _timer;
|
|
114
|
-
private readonly
|
|
114
|
+
private readonly _dynamic_subscriptions;
|
|
115
|
+
/**
|
|
116
|
+
* What each static target was subscribed at by `init`. A plain map, never
|
|
117
|
+
* evicted: the collection is the build-time `_static_targets` list, so it
|
|
118
|
+
* is already bounded by the registry and costs nothing the registry does
|
|
119
|
+
* not already hold.
|
|
120
|
+
*
|
|
121
|
+
* Keeping these out of the LRU is what makes the `+Infinity` floor an
|
|
122
|
+
* invariant rather than a race (#1582). Sharing the bounded map meant a
|
|
123
|
+
* churn of dynamic targets could evict a static record, and the next
|
|
124
|
+
* dynamic resolution to that target found no record, took the
|
|
125
|
+
* first-discovery branch, and re-subscribed the target with its own
|
|
126
|
+
* priority and lane — silently re-laning a stream whose lane the
|
|
127
|
+
* build-time subscribe owns, and starving it wherever `onlyLanes` had
|
|
128
|
+
* provisioned a worker for the declared lane.
|
|
129
|
+
*/
|
|
130
|
+
private readonly _static_subscriptions;
|
|
115
131
|
/** Compiled pattern sources, bounded by {@link PATTERN_CACHE_SIZE}. */
|
|
116
132
|
private readonly _patterns;
|
|
117
133
|
private readonly _registry;
|
|
@@ -182,8 +198,9 @@ export declare class CorrelateCycle<TSchemaReg extends SchemaRegister<TActions>,
|
|
|
182
198
|
* the documented per-aggregate shape `.to(e => ({target: e.stream}))`
|
|
183
199
|
* makes those two namespaces collide by construction (#1398).
|
|
184
200
|
*
|
|
185
|
-
* Static targets are left alone:
|
|
186
|
-
*
|
|
201
|
+
* Static targets are left alone: their record lives in
|
|
202
|
+
* `_static_subscriptions`, which this never touches, so they stay pinned
|
|
203
|
+
* at +Infinity and the dynamic path never re-opens them.
|
|
187
204
|
*/
|
|
188
205
|
forget_subscribed(streams: Iterable<string>): void;
|
|
189
206
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"correlate-cycle.d.ts","sourceRoot":"","sources":["../../../src/internal/correlate-cycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAEV,KAAK,EACL,QAAQ,EACR,cAAc,EACd,OAAO,EAER,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"correlate-cycle.d.ts","sourceRoot":"","sources":["../../../src/internal/correlate-cycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAEV,KAAK,EACL,QAAQ,EACR,cAAc,EACd,OAAO,EAER,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAuF3C;;;;;;;;;GASG;AACH,MAAM,MAAM,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;OASG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAiB1B;YAEa,SAAS;IAsCvB;;;;;;;;;;;;;;OAcG;IACH,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI,CAEjD;IAED;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB;IAcxB;;;;;;;;;OASG;IACG,SAAS,CACb,KAAK,GAAE,KAAgC;IACvC;;;;;;;;;;;;;OAaG;IACH,KAAK,UAAQ,GACZ,OAAO,CAAC;QACT,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,0EAA0E;QAC1E,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC,CA2OD;IAED;;;;OAIG;IACH,aAAa,CACX,KAAK,GAAE,KAAU,EACjB,SAAS,SAAS,EAClB,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,GACtC,OAAO,CA6BT;IAED,wDAAwD;IACxD;;;;;;;;;;;;;;;OAeG;IACG,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAgCzC;IAED,YAAY,IAAI,IAAI,CAKnB;CACF"}
|
package/dist/index.cjs
CHANGED
|
@@ -3111,13 +3111,33 @@ var CorrelateCycle = class {
|
|
|
3111
3111
|
/** In-flight init, memoized for single-flight and cleared on failure. */
|
|
3112
3112
|
_init_promise;
|
|
3113
3113
|
_timer = void 0;
|
|
3114
|
-
//
|
|
3114
|
+
// Dynamically discovered targets → what each was last subscribed at,
|
|
3115
|
+
// bounded by `maxSubscribedStreams`. The static half lives in
|
|
3116
|
+
// `_static_subscriptions` below, which is deliberately not evictable.
|
|
3117
|
+
//
|
|
3118
|
+
// Every scan re-subscribes the
|
|
3115
3119
|
// targets it resolved (that is how the work mark lands), so this no longer
|
|
3116
3120
|
// decides *whether* a target is sent — it decides *what* is sent with it:
|
|
3117
3121
|
// a resolution raises priority/lane only when it beats the recorded floor,
|
|
3118
3122
|
// and otherwise re-sends the row's own values so the mark changes nothing
|
|
3119
3123
|
// else. See {@link Subscription}.
|
|
3120
|
-
|
|
3124
|
+
_dynamic_subscriptions;
|
|
3125
|
+
/**
|
|
3126
|
+
* What each static target was subscribed at by `init`. A plain map, never
|
|
3127
|
+
* evicted: the collection is the build-time `_static_targets` list, so it
|
|
3128
|
+
* is already bounded by the registry and costs nothing the registry does
|
|
3129
|
+
* not already hold.
|
|
3130
|
+
*
|
|
3131
|
+
* Keeping these out of the LRU is what makes the `+Infinity` floor an
|
|
3132
|
+
* invariant rather than a race (#1582). Sharing the bounded map meant a
|
|
3133
|
+
* churn of dynamic targets could evict a static record, and the next
|
|
3134
|
+
* dynamic resolution to that target found no record, took the
|
|
3135
|
+
* first-discovery branch, and re-subscribed the target with its own
|
|
3136
|
+
* priority and lane — silently re-laning a stream whose lane the
|
|
3137
|
+
* build-time subscribe owns, and starving it wherever `onlyLanes` had
|
|
3138
|
+
* provisioned a worker for the declared lane.
|
|
3139
|
+
*/
|
|
3140
|
+
_static_subscriptions = /* @__PURE__ */ new Map();
|
|
3121
3141
|
/** Compiled pattern sources, bounded by {@link PATTERN_CACHE_SIZE}. */
|
|
3122
3142
|
_patterns = new LruMap(PATTERN_CACHE_SIZE);
|
|
3123
3143
|
_registry;
|
|
@@ -3170,7 +3190,7 @@ var CorrelateCycle = class {
|
|
|
3170
3190
|
}) {
|
|
3171
3191
|
this._lease_millis = lease_millis;
|
|
3172
3192
|
this._key = registry_key(registry.events);
|
|
3173
|
-
this.
|
|
3193
|
+
this._dynamic_subscriptions = new LruMap(max_subscribed_streams);
|
|
3174
3194
|
this._registry = registry;
|
|
3175
3195
|
this._declared_lanes = declared_lanes;
|
|
3176
3196
|
this._static_targets = static_targets;
|
|
@@ -3220,7 +3240,7 @@ var CorrelateCycle = class {
|
|
|
3220
3240
|
this._checkpoint = correlated_at >= 0 ? correlated_at : Math.max(-1, watermark - this._cold_start_back_scan);
|
|
3221
3241
|
this._on_init?.();
|
|
3222
3242
|
for (const { stream, priority = 0, lane } of this._static_targets) {
|
|
3223
|
-
this.
|
|
3243
|
+
this._static_subscriptions.set(stream, {
|
|
3224
3244
|
floor: Number.POSITIVE_INFINITY,
|
|
3225
3245
|
priority,
|
|
3226
3246
|
lane
|
|
@@ -3239,14 +3259,12 @@ var CorrelateCycle = class {
|
|
|
3239
3259
|
* the documented per-aggregate shape `.to(e => ({target: e.stream}))`
|
|
3240
3260
|
* makes those two namespaces collide by construction (#1398).
|
|
3241
3261
|
*
|
|
3242
|
-
* Static targets are left alone:
|
|
3243
|
-
*
|
|
3262
|
+
* Static targets are left alone: their record lives in
|
|
3263
|
+
* `_static_subscriptions`, which this never touches, so they stay pinned
|
|
3264
|
+
* at +Infinity and the dynamic path never re-opens them.
|
|
3244
3265
|
*/
|
|
3245
3266
|
forget_subscribed(streams) {
|
|
3246
|
-
const
|
|
3247
|
-
for (const stream of streams) {
|
|
3248
|
-
if (!statics.has(stream)) this._subscribed.delete(stream);
|
|
3249
|
-
}
|
|
3267
|
+
for (const stream of streams) this._dynamic_subscriptions.delete(stream);
|
|
3250
3268
|
}
|
|
3251
3269
|
/**
|
|
3252
3270
|
* Would an event from `stream` be fetched for a target subscribed with
|
|
@@ -3322,7 +3340,7 @@ var CorrelateCycle = class {
|
|
|
3322
3340
|
);
|
|
3323
3341
|
lane = void 0;
|
|
3324
3342
|
}
|
|
3325
|
-
const recorded = this.
|
|
3343
|
+
const recorded = this._static_subscriptions.get(resolved.target) ?? this._dynamic_subscriptions.get(resolved.target);
|
|
3326
3344
|
const priority = resolved.priority ?? 0;
|
|
3327
3345
|
const upgraded = !recorded || priority > recorded.floor;
|
|
3328
3346
|
const carried = upgraded ? { priority, lane } : { priority: recorded.priority, lane: recorded.lane };
|
|
@@ -3381,7 +3399,7 @@ var CorrelateCycle = class {
|
|
|
3381
3399
|
this._checkpoint = last_id;
|
|
3382
3400
|
for (const { stream, priority, lane } of streams) {
|
|
3383
3401
|
if (correlated.get(stream)?.upgraded)
|
|
3384
|
-
this.
|
|
3402
|
+
this._dynamic_subscriptions.set(stream, {
|
|
3385
3403
|
floor: priority,
|
|
3386
3404
|
priority,
|
|
3387
3405
|
lane
|