@rotorsoft/act 1.33.2 → 1.33.3

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.
@@ -292,13 +292,15 @@ export declare class Act<TSchemaReg extends SchemaRegister<TActions>, TEvents ex
292
292
  * @see {@link correlate} for dynamic stream discovery
293
293
  */
294
294
  drain(options?: DrainOptions): Promise<Drain<TEvents>>;
295
+ /** Arms correlate and every lane; false on an app with no reactions. */
295
296
  private _arm_all;
296
297
  /**
297
- * Settles what a change armed (a commit, a reset, an unblock, a restore,
298
- * a notification from another process), unless the app walks the
299
- * pipeline itself (`autoSettle: false`).
298
+ * Wakes what a change freed (a commit, a reset, an unblock, a restore,
299
+ * a notification from another process): arms the lanes these events
300
+ * react on, or every lane without names, and settles them unless the app
301
+ * walks the pipeline itself (`autoSettle: false`).
300
302
  */
301
- private _settle_armed;
303
+ private _wake;
302
304
  /** Schedules a settle pass; writer-only instances (`drain: false`) skip it. */
303
305
  private _schedule;
304
306
  /** Arms only the lanes these events react on; true when any was armed. */
@@ -1 +1 @@
1
- {"version":3,"file":"act.d.ts","sourceRoot":"","sources":["../../src/act.ts"],"names":[],"mappings":"AAoDA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,UAAU,EAKhB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EACV,KAAK,EACL,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,EAEZ,WAAW,EACX,WAAW,EACX,SAAS,EAET,SAAS,EACT,KAAK,EACL,YAAY,EACZ,SAAS,EACT,WAAW,EACX,IAAI,EACJ,UAAU,EAEV,UAAU,EAEV,OAAO,EACP,KAAK,EACL,QAAQ,EACR,WAAW,EACX,UAAU,EACV,MAAM,EACN,cAAc,EACd,OAAO,EACP,aAAa,EACb,eAAe,EACf,QAAQ,EACR,KAAK,EAEL,YAAY,EACZ,cAAc,EACd,MAAM,EACP,MAAM,kBAAkB,CAAC;AAkB1B;;;;;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E,aAAa,EAAE,EAC5B,OAAO,CAAC,EAAE,YAAY,GACrB,aAAa,CAAC,YAAY,CAAC,CAW7B;IAED;;;;;;;;;;;;;;;;;OAiBG;IACG,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAExE;IAED,yDAAyD;YAC3C,UAAU;IAuBxB;;;;;;;;;;;;;;;;;;OAkBG;IACG,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAIxD;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAKpC;CACF"}
@@ -3,7 +3,7 @@
3
3
  * and drain: schedule() coalesces rapid callers into a single cycle, then
4
4
  * runs correlate+drain in a loop until a pass produces no progress.
5
5
  *
6
- * Owns the debounce timer and the reentrancy flag. Everything else is
6
+ * Owns the debounce timer and the cycle in flight. Everything else is
7
7
  * supplied via the `SettleDeps` callbacks so this module stays free of
8
8
  * orchestrator state.
9
9
  */
@@ -39,10 +39,9 @@ export type SettleDeps<TEvents extends Schemas> = {
39
39
  */
40
40
  export declare class SettleLoop<TEvents extends Schemas> {
41
41
  private _timer;
42
- private _running;
43
42
  /**
44
- * Resolves when the cycle in flight finishes, so shutdown can wait for
45
- * it (`stop()` cancels scheduling only). Never rejects.
43
+ * The cycle in flight, set while one runs. Shutdown waits for it
44
+ * (`stop()` cancels scheduling only). Never rejects.
46
45
  */
47
46
  private _inflight;
48
47
  /** A wake-up arrived while a cycle ran: run one more pass after it. */
@@ -1 +1 @@
1
- {"version":3,"file":"settle.d.ts","sourceRoot":"","sources":["../../../src/internal/settle.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,KAAK,EACL,YAAY,EACZ,KAAK,EACL,OAAO,EACP,aAAa,EACd,MAAM,mBAAmB,CAAC;A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E;;;OAGG;IACH,OAAO,CAAC,SAAS,CAA4B;IAC7C,uEAAuE;IACvE,OAAO,CAAC,QAAQ,CAAS;IACzB,wDAAwD;IACxD,OAAO,CAAC,KAAK,CAAwC;IACrD,gDAAgD;IAChD,OAAO,CAAC,IAAI,CAAK;IACjB,gDAAgD;IAChD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;IAC5C,+FAA+F;IAC/F,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAE9C,YAAY,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,mBAAmB,EAAE,MAAM,EAGjE;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAmFtC;IAED;;;;OAIG;IACH,IAAI,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAExC;IAED;;;OAGG;IACH,IAAI,CAAC,KAAK,UAAQ,GAAG,IAAI,CAUxB;CACF"}
package/dist/index.cjs CHANGED
@@ -2785,24 +2785,23 @@ function build_handle_batch(logger) {
2785
2785
  // src/internal/settle.ts
2786
2786
  var SettleLoop = (_class6 = class {
2787
2787
  __init18() {this._timer = void 0}
2788
- __init19() {this._running = false}
2789
2788
  /**
2790
- * Resolves when the cycle in flight finishes, so shutdown can wait for
2791
- * it (`stop()` cancels scheduling only). Never rejects.
2789
+ * The cycle in flight, set while one runs. Shutdown waits for it
2790
+ * (`stop()` cancels scheduling only). Never rejects.
2792
2791
  */
2793
2792
 
2794
2793
  /** A wake-up arrived while a cycle ran: run one more pass after it. */
2795
- __init20() {this._pending = false}
2794
+ __init19() {this._pending = false}
2796
2795
  /** The last caller's options, used by the next pass. */
2797
- __init21() {this._next = void 0}
2796
+ __init20() {this._next = void 0}
2798
2797
  /** When the scheduled pass fires (epoch ms). */
2799
- __init22() {this._due = 0}
2798
+ __init21() {this._due = 0}
2800
2799
  /** Set at shutdown: nothing schedules again. */
2801
- __init23() {this._stopped = false}
2800
+ __init22() {this._stopped = false}
2802
2801
 
2803
2802
  /** Debounce window applied when the caller doesn't override via `SettleOptions.debounceMs`. */
2804
2803
 
2805
- constructor(deps, default_debounce_ms) {;_class6.prototype.__init18.call(this);_class6.prototype.__init19.call(this);_class6.prototype.__init20.call(this);_class6.prototype.__init21.call(this);_class6.prototype.__init22.call(this);_class6.prototype.__init23.call(this);
2804
+ constructor(deps, default_debounce_ms) {;_class6.prototype.__init18.call(this);_class6.prototype.__init19.call(this);_class6.prototype.__init20.call(this);_class6.prototype.__init21.call(this);_class6.prototype.__init22.call(this);
2806
2805
  this._deps = deps;
2807
2806
  this._default_debounce_ms = default_debounce_ms;
2808
2807
  }
@@ -2820,7 +2819,7 @@ var SettleLoop = (_class6 = class {
2820
2819
  schedule(options) {
2821
2820
  if (this._stopped) return;
2822
2821
  if (options) this._next = options;
2823
- if (this._running) {
2822
+ if (this._inflight) {
2824
2823
  this._pending = true;
2825
2824
  return;
2826
2825
  }
@@ -2840,12 +2839,7 @@ var SettleLoop = (_class6 = class {
2840
2839
  ...drain_options
2841
2840
  } = _nullishCoalesce(this._next, () => ( {}));
2842
2841
  this._next = void 0;
2843
- this._running = true;
2844
- let settle_done;
2845
- this._inflight = new Promise((done) => {
2846
- settle_done = done;
2847
- });
2848
- (async () => {
2842
+ this._inflight = (async () => {
2849
2843
  await this._deps.init();
2850
2844
  let settled_drain;
2851
2845
  for (let i = 0; i < maxPasses && !this._stopped; i++) {
@@ -2869,9 +2863,7 @@ var SettleLoop = (_class6 = class {
2869
2863
  })().catch((err) => {
2870
2864
  this._deps.breaker.failed(Date.now(), err);
2871
2865
  }).finally(() => {
2872
- this._running = false;
2873
2866
  this._inflight = void 0;
2874
- settle_done();
2875
2867
  if (this._pending) {
2876
2868
  this._pending = false;
2877
2869
  this.schedule(this._next);
@@ -2913,7 +2905,7 @@ function validate_only_lanes(options, lanes) {
2913
2905
  );
2914
2906
  }
2915
2907
  var Act = (_class7 = class {
2916
- __init24() {this._emitter = new (0, _events2.default)()}
2908
+ __init23() {this._emitter = new (0, _events2.default)()}
2917
2909
 
2918
2910
 
2919
2911
 
@@ -2990,22 +2982,22 @@ var Act = (_class7 = class {
2990
2982
  /** Lanes to arm per event; `"all"` when a dynamic resolver hides the lane. */
2991
2983
 
2992
2984
 
2993
- __init25() {this._logger = _chunkO6QIJQRNcjs.log.call(void 0, )}
2985
+ __init24() {this._logger = _chunkO6QIJQRNcjs.log.call(void 0, )}
2994
2986
  /** This Act's ports: its own bag, or the singleton adapters. */
2995
2987
 
2996
2988
  /** Runs a body so internal `store()`/`cache()` calls resolve to `_ports`. */
2997
2989
 
2998
2990
 
2999
2991
  // Bound once, reused by every reaction payload.
3000
- __init26() {this._bound_do = this.do.bind(this)}
3001
- __init27() {this._bound_load = this.load.bind(this)}
3002
- __init28() {this._bound_query = this.query.bind(this)}
3003
- __init29() {this._bound_query_array = this.query_array.bind(this)}
3004
- __init30() {this._bound_forget = this.forget.bind(this)}
2992
+ __init25() {this._bound_do = this.do.bind(this)}
2993
+ __init26() {this._bound_load = this.load.bind(this)}
2994
+ __init27() {this._bound_query = this.query.bind(this)}
2995
+ __init28() {this._bound_query_array = this.query_array.bind(this)}
2996
+ __init29() {this._bound_forget = this.forget.bind(this)}
3005
2997
 
3006
2998
 
3007
2999
 
3008
- __init31() {this._close_lock = new CloseLock()}
3000
+ __init30() {this._close_lock = new CloseLock()}
3009
3001
  /** Every lane a controller can exist for: `"default"` plus each declared one. */
3010
3002
 
3011
3003
  /** Drain lanes declared via `.withLane(...)`. Implicit default not included. */
@@ -3013,7 +3005,7 @@ var Act = (_class7 = class {
3013
3005
  return this._lanes;
3014
3006
  }
3015
3007
  /** Use the {@link act} builder rather than constructing directly. */
3016
- constructor(registry, states = /* @__PURE__ */ new Map(), batch_handlers = /* @__PURE__ */ new Map(), options = {}, lanes = [], patch_fn = bare_patch) {;_class7.prototype.__init24.call(this);_class7.prototype.__init25.call(this);_class7.prototype.__init26.call(this);_class7.prototype.__init27.call(this);_class7.prototype.__init28.call(this);_class7.prototype.__init29.call(this);_class7.prototype.__init30.call(this);_class7.prototype.__init31.call(this);
3008
+ constructor(registry, states = /* @__PURE__ */ new Map(), batch_handlers = /* @__PURE__ */ new Map(), options = {}, lanes = [], patch_fn = bare_patch) {;_class7.prototype.__init23.call(this);_class7.prototype.__init24.call(this);_class7.prototype.__init25.call(this);_class7.prototype.__init26.call(this);_class7.prototype.__init27.call(this);_class7.prototype.__init28.call(this);_class7.prototype.__init29.call(this);_class7.prototype.__init30.call(this);
3017
3009
  this.registry = registry;
3018
3010
  this._states = states;
3019
3011
  this._batch_handlers = batch_handlers;
@@ -3178,7 +3170,9 @@ var Act = (_class7 = class {
3178
3170
  { ...q, limit: _nullishCoalesce(_nullishCoalesce(q.limit, () => ( this._poll_limit)), () => ( 100)) },
3179
3171
  true
3180
3172
  ),
3181
- drain: (o) => this.drain(o),
3173
+ // `settle()` validated the options, and `_schedule` skips writer-only
3174
+ // instances, so the loop drains through the internal path.
3175
+ drain: (o) => this._scoped(() => this._drain_all(o)),
3182
3176
  on_settled: (drain) => this.emit("settled", drain),
3183
3177
  breaker: this._breaker
3184
3178
  },
@@ -3256,12 +3250,7 @@ var Act = (_class7 = class {
3256
3250
  return await s.notify((notification) => {
3257
3251
  try {
3258
3252
  this.emit("notified", notification);
3259
- if (this._drain) {
3260
- const armed = this._arm_for_event_names(
3261
- notification.events.map((e) => e.name)
3262
- );
3263
- this._settle_armed(armed);
3264
- }
3253
+ this._wake(notification.events.map((e) => e.name));
3265
3254
  } catch (err) {
3266
3255
  this._logger.error(err, "notified handler threw");
3267
3256
  }
@@ -3319,10 +3308,7 @@ var Act = (_class7 = class {
3319
3308
  payload,
3320
3309
  do_options
3321
3310
  );
3322
- const armed = this._arm_for_event_names(
3323
- snapshots.map((s) => s.event.name)
3324
- );
3325
- this._settle_armed(armed);
3311
+ this._wake(snapshots.map((s) => s.event.name));
3326
3312
  this.emit("committed", snapshots);
3327
3313
  return snapshots;
3328
3314
  });
@@ -3469,17 +3455,21 @@ var Act = (_class7 = class {
3469
3455
  return { fetched: [], leased: [], acked: [], blocked: [] };
3470
3456
  return this._scoped(() => this._drain_all(options));
3471
3457
  }
3458
+ /** Arms correlate and every lane; false on an app with no reactions. */
3472
3459
  _arm_all() {
3473
- if (!this._reactive) return;
3460
+ if (!this._reactive) return false;
3474
3461
  this._correlate.arm();
3475
3462
  for (const c of this._drain_controllers.values()) c.arm();
3463
+ return true;
3476
3464
  }
3477
3465
  /**
3478
- * Settles what a change armed (a commit, a reset, an unblock, a restore,
3479
- * a notification from another process), unless the app walks the
3480
- * pipeline itself (`autoSettle: false`).
3466
+ * Wakes what a change freed (a commit, a reset, an unblock, a restore,
3467
+ * a notification from another process): arms the lanes these events
3468
+ * react on, or every lane without names, and settles them unless the app
3469
+ * walks the pipeline itself (`autoSettle: false`).
3481
3470
  */
3482
- _settle_armed(armed) {
3471
+ _wake(names) {
3472
+ const armed = names ? this._arm_for_event_names(names) : this._arm_all();
3483
3473
  if (armed && this._auto_settle) this._schedule();
3484
3474
  }
3485
3475
  /** Schedules a settle pass; writer-only instances (`drain: false`) skip it. */
@@ -3647,8 +3637,7 @@ var Act = (_class7 = class {
3647
3637
  for (const handler of this._batch_handlers.values())
3648
3638
  _optionalChain([handler, 'access', _139 => _139[FOLD_RESET], 'optionalCall', _140 => _140()]);
3649
3639
  if (count > 0) {
3650
- this._arm_all();
3651
- this._settle_armed(this._reactive);
3640
+ this._wake();
3652
3641
  }
3653
3642
  return count;
3654
3643
  });
@@ -3682,8 +3671,7 @@ var Act = (_class7 = class {
3682
3671
  return this._scoped(async () => {
3683
3672
  const count = await _chunkO6QIJQRNcjs.store.call(void 0, ).unblock(input);
3684
3673
  if (count > 0) {
3685
- this._arm_all();
3686
- this._settle_armed(this._reactive);
3674
+ this._wake();
3687
3675
  }
3688
3676
  return count;
3689
3677
  });
@@ -3745,8 +3733,7 @@ var Act = (_class7 = class {
3745
3733
  });
3746
3734
  if (!sink) {
3747
3735
  this._correlate.restart();
3748
- this._arm_all();
3749
- this._settle_armed(this._reactive);
3736
+ this._wake();
3750
3737
  }
3751
3738
  return { kept, migrated, dropped, duration_ms: Date.now() - started };
3752
3739
  });