@rotorsoft/act 2.2.3 → 2.2.5

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
@@ -28,7 +28,7 @@ import {
28
28
  store,
29
29
  unscoped_ports,
30
30
  validate
31
- } from "./chunk-BJSOC2ZV.js";
31
+ } from "./chunk-SJJVHRME.js";
32
32
  import {
33
33
  checkAppends,
34
34
  checkVersion,
@@ -37,7 +37,7 @@ import {
37
37
  isStreamName,
38
38
  parseNotification,
39
39
  seedEvent
40
- } from "./chunk-53JUJWPI.js";
40
+ } from "./chunk-KTMIRM5Z.js";
41
41
  import {
42
42
  ActorSchema,
43
43
  CausationEventSchema,
@@ -67,7 +67,7 @@ import {
67
67
  ZodEmpty,
68
68
  __name,
69
69
  sensitive
70
- } from "./chunk-TI6QERGQ.js";
70
+ } from "./chunk-ROC62MEU.js";
71
71
 
72
72
  // src/signals.ts
73
73
  process.once("SIGINT", async (arg) => {
@@ -4221,8 +4221,9 @@ var Act = class {
4221
4221
  * lifecycle and per-event insert.
4222
4222
  *
4223
4223
  * Safe in a live process: restoring into this Act's own store waits
4224
- * for its correlate passes in flight, replaces the log, then restarts
4225
- * correlation and settles. A correlate pass that starts meanwhile
4224
+ * for its correlate passes in flight, replaces the log, clears the cache
4225
+ * and the state projections' fold caches, then restarts correlation and
4226
+ * settles. A correlate pass that starts meanwhile
4226
4227
  * reads nothing. Other processes on the same store keep their
4227
4228
  * correlation state and must be restarted.
4228
4229
  *
@@ -4248,7 +4249,6 @@ var Act = class {
4248
4249
  * ```typescript
4249
4250
  * const result = await app.restore(new CsvFile({ path: "./backup.csv" }));
4250
4251
  * console.log(`Restored ${result.kept} events in ${result.duration_ms}ms`);
4251
- * await cache().clear(); // operator's responsibility
4252
4252
  * ```
4253
4253
  *
4254
4254
  * @see {@link Store.restore} for the underlying driver-pattern primitive.
@@ -4278,6 +4278,7 @@ var Act = class {
4278
4278
  if (sink) await run();
4279
4279
  else {
4280
4280
  await this._correlate.restart(run);
4281
+ await cache().clear();
4281
4282
  this._reset_folds();
4282
4283
  this._wake();
4283
4284
  }