@rotorsoft/act 1.18.0 → 1.18.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/index.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  sleep,
20
20
  store,
21
21
  validate
22
- } from "./chunk-7XME4ZLK.js";
22
+ } from "./chunk-KL37CDMW.js";
23
23
  import {
24
24
  ActorSchema,
25
25
  CausationEventSchema,
@@ -44,7 +44,7 @@ import {
44
44
  pii_split,
45
45
  pii_strip,
46
46
  sensitive
47
- } from "./chunk-4TJN4G7L.js";
47
+ } from "./chunk-2RZSKBZZ.js";
48
48
  import "./chunk-YLJ4XMA6.js";
49
49
 
50
50
  // src/signals.ts
@@ -1497,8 +1497,8 @@ function compute_backoff_delay(retry, opts) {
1497
1497
  // src/internal/event-sourcing.ts
1498
1498
  var DEFAULT_BATCH = 500;
1499
1499
  async function snap(snapshot) {
1500
+ const { id, stream, name, meta, version } = snapshot.event;
1500
1501
  try {
1501
- const { id, stream, name, meta, version } = snapshot.event;
1502
1502
  await store().commit(
1503
1503
  stream,
1504
1504
  [{ name: SNAP_EVENT, data: snapshot.state }],
@@ -1510,7 +1510,10 @@ async function snap(snapshot) {
1510
1510
  // IMPORTANT! - state events are committed right after the snapshot event
1511
1511
  );
1512
1512
  } catch (error) {
1513
- log().error(error);
1513
+ const reason = error instanceof Error ? error.message : String(error);
1514
+ log().warn(
1515
+ `Snapshot write failed on stream "${stream}": ${reason} \u2014 cold starts will replay full history until snapshots succeed.`
1516
+ );
1514
1517
  }
1515
1518
  }
1516
1519
  async function tombstone(stream, expectedVersion, correlation) {