@rotorsoft/act 1.32.9 → 1.32.10

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.
@@ -1 +1 @@
1
- {"version":3,"file":"reaction-builder.d.ts","sourceRoot":"","sources":["../../../src/builders/reaction-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAIL,KAAK,MAAM,EACX,KAAK,WAAW,EAGjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EACL,KAAK,KAAK,EAIV,KAAK,MAAM,EAIX,KAAK,OAAO,EACb,MAAM,mBAAmB,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CACtB,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,EACxB,MAAM,SAAS,KAAK,GAAG,KAAK,IAC1B;IACF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;CACnE,CAAC;AAoDF;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,EACxB,MAAM,SAAS,KAAK,GAAG,KAAK,EAC5B,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAsFhE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,SAAS,OAAO,EACxD,MAAM,EAAE,MAAM,GACb,WAAW,CAAC,OAAO,CAAC,CA6BtB"}
1
+ {"version":3,"file":"reaction-builder.d.ts","sourceRoot":"","sources":["../../../src/builders/reaction-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAIL,KAAK,MAAM,EACX,KAAK,WAAW,EAGjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EACL,KAAK,KAAK,EAIV,KAAK,MAAM,EAIX,KAAK,OAAO,EACb,MAAM,mBAAmB,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CACtB,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,EACxB,MAAM,SAAS,KAAK,GAAG,KAAK,IAC1B;IACF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;CACnE,CAAC;AAoDF;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,EACxB,MAAM,SAAS,KAAK,GAAG,KAAK,EAC5B,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAsFhE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,SAAS,OAAO,EACxD,MAAM,EAAE,MAAM,GACb,WAAW,CAAC,OAAO,CAAC,CAsCtB"}
@@ -443,8 +443,8 @@ export type ActionBuilder<TState extends Schema, TEvents extends Schemas, TActio
443
443
  * `app.close({ stream, archive })` already uses — the cycle holds
444
444
  * the stream's guard while the archiver runs, and a thrown
445
445
  * archiver leaves the stream guarded but un-truncated. No partial
446
- * truncate state, no data loss; the cycle retries the candidate
447
- * on the next tick.
446
+ * truncate state, no data loss. It is not retried automatically;
447
+ * `app.close([{ stream, archive }])` resumes the guarded stream.
448
448
  *
449
449
  * One archiver per state. A second `.archives(...)` call replaces
450
450
  * the first (same shape as `.snap` / `.discloses` /
@@ -551,8 +551,8 @@ export type AutoclosePredicate<TEvents extends Schemas> = (stream: string, head:
551
551
  * {@link CloseTarget.archive} so the existing close-cycle's
552
552
  * archive-while-guarded invariant carries over: the stream is locked
553
553
  * against new writes while the archiver runs, and a thrown archiver
554
- * leaves the stream guarded but un-truncated (no data loss, the
555
- * cycle retries the candidate next tick).
554
+ * leaves the stream guarded but un-truncated (no data loss). It is not
555
+ * retried automatically; `app.close([{ stream, archive }])` resumes it.
556
556
  *
557
557
  * State-level (one per state, last-write-wins). Hosts with per-stream
558
558
  * archiving differences branch inside the function. Absent →
package/dist/index.cjs CHANGED
@@ -5090,9 +5090,13 @@ function build_handle(deps) {
5090
5090
  function build_handle_batch(logger) {
5091
5091
  return async (lease, payloads, batchHandler) => {
5092
5092
  const stream = lease.stream;
5093
- const events = payloads.map(
5094
- (p) => p.event
5095
- );
5093
+ const events = [];
5094
+ const seen = /* @__PURE__ */ new Set();
5095
+ for (const p of payloads) {
5096
+ if (seen.has(p.event.id)) continue;
5097
+ seen.add(p.event.id);
5098
+ events.push(p.event);
5099
+ }
5096
5100
  const options = payloads[0].options;
5097
5101
  if (lease.retry > 0)
5098
5102
  logger.warn(`Retrying batch ${stream}@${events[0].id} (${lease.retry}).`);