@rotorsoft/act 2.0.1 → 2.0.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.
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ import {
15
15
  cache,
16
16
  check_appends,
17
17
  check_store,
18
+ concurrency_error,
18
19
  config,
19
20
  current_autoclose_window,
20
21
  current_reacting,
@@ -28,6 +29,7 @@ import {
28
29
  log,
29
30
  make_reaction_scope,
30
31
  make_run_scoped,
32
+ notification_of,
31
33
  port,
32
34
  register_weak_disposer,
33
35
  resolveActConfig,
@@ -41,10 +43,12 @@ import {
41
43
  resolveReactionConfig,
42
44
  resolveSettleConfig,
43
45
  resolveShutdownConfig,
46
+ seed_event,
44
47
  sleep,
45
48
  store,
49
+ throw_if_stale,
46
50
  validate
47
- } from "./chunk-33D5NQNQ.js";
51
+ } from "./chunk-YAHM7P64.js";
48
52
  import {
49
53
  ActorSchema,
50
54
  CausationEventSchema,
@@ -77,7 +81,7 @@ import {
77
81
  pii_fields,
78
82
  pii_schemas,
79
83
  sensitive
80
- } from "./chunk-UO7HNLSH.js";
84
+ } from "./chunk-ESFICIG2.js";
81
85
 
82
86
  // src/signals.ts
83
87
  process.once("SIGINT", async (arg) => {
@@ -862,13 +866,6 @@ function compile_is(is) {
862
866
  function compile_reaches(reaches) {
863
867
  return (_stream, _head, count) => count >= reaches;
864
868
  }
865
- function policy_min_after_days(options) {
866
- const parsed = AutoclosePolicySchema.parse(options);
867
- const windows = [];
868
- if (parsed.after) windows.push(parsed.after.days);
869
- if (parsed.or?.after) windows.push(parsed.or.after.days);
870
- return windows.length ? Math.min(...windows) : void 0;
871
- }
872
869
  function policy_after_windows(options) {
873
870
  const parsed = AutoclosePolicySchema.parse(options);
874
871
  return [parsed.after, parsed.or?.after].flatMap((w) => w ? [w.days] : []);
@@ -5304,8 +5301,9 @@ function action_builder(state2) {
5304
5301
  internal.autoclose = compile_autoclose_policy(
5305
5302
  policy
5306
5303
  );
5307
- internal.autoclose_after_days = policy_min_after_days(policy);
5308
- internal.autoclose_after_windows = policy_after_windows(policy);
5304
+ const windows = policy_after_windows(policy);
5305
+ internal.autoclose_after_windows = windows;
5306
+ internal.autoclose_after_days = windows.length ? Math.min(...windows) : void 0;
5309
5307
  internal.autoclose_keep_days = policy_keep_days(policy);
5310
5308
  return builder;
5311
5309
  },
@@ -5525,6 +5523,7 @@ export {
5525
5523
  act,
5526
5524
  cache,
5527
5525
  check_appends,
5526
+ concurrency_error,
5528
5527
  config,
5529
5528
  dateReviver,
5530
5529
  default_scope,
@@ -5534,15 +5533,18 @@ export {
5534
5533
  fair_slots,
5535
5534
  is_literal_source,
5536
5535
  log,
5536
+ notification_of,
5537
5537
  pii_fields,
5538
5538
  port,
5539
5539
  projection,
5540
5540
  resolveAutocloseConfig2 as resolveAutocloseConfig,
5541
+ seed_event,
5541
5542
  sensitive,
5542
5543
  sleep,
5543
5544
  slice,
5544
5545
  state,
5545
5546
  store,
5547
+ throw_if_stale,
5546
5548
  validate
5547
5549
  };
5548
5550
  //# sourceMappingURL=index.js.map