@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/.tsbuildinfo +1 -1
- package/dist/@types/builders/act-builder.d.ts +4 -28
- package/dist/@types/builders/act-builder.d.ts.map +1 -1
- package/dist/@types/builders/builder-base.d.ts +70 -0
- package/dist/@types/builders/builder-base.d.ts.map +1 -0
- package/dist/@types/builders/slice-builder.d.ts +3 -29
- package/dist/@types/builders/slice-builder.d.ts.map +1 -1
- package/dist/@types/builders/state-builder.d.ts +1 -1
- package/dist/@types/internal/builder-utils.d.ts +1 -20
- package/dist/@types/internal/builder-utils.d.ts.map +1 -1
- package/dist/@types/internal/event-sourcing.d.ts.map +1 -1
- package/dist/@types/internal/index.d.ts +1 -1
- package/dist/@types/internal/index.d.ts.map +1 -1
- package/dist/@types/types/action.d.ts +1 -1
- package/dist/@types/types/errors.d.ts +3 -3
- package/dist/@types/types/ports.d.ts +19 -6
- package/dist/@types/types/ports.d.ts.map +1 -1
- package/dist/{chunk-4TJN4G7L.js → chunk-2RZSKBZZ.js} +1 -1
- package/dist/chunk-2RZSKBZZ.js.map +1 -0
- package/dist/{chunk-7XME4ZLK.js → chunk-KL37CDMW.js} +2 -2
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/test/index.cjs.map +1 -1
- package/dist/test/index.js +2 -2
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-4TJN4G7L.js.map +0 -1
- /package/dist/{chunk-7XME4ZLK.js.map → chunk-KL37CDMW.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
sleep,
|
|
20
20
|
store,
|
|
21
21
|
validate
|
|
22
|
-
} from "./chunk-
|
|
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-
|
|
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
|
-
|
|
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) {
|