@rotorsoft/act 2.0.1 → 2.0.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/adapters/in-memory-store.d.ts.map +1 -1
- package/dist/@types/builders/state-builder.d.ts.map +1 -1
- package/dist/@types/internal/autoclose-policy.d.ts +0 -9
- package/dist/@types/internal/autoclose-policy.d.ts.map +1 -1
- package/dist/@types/utils.d.ts +36 -0
- package/dist/@types/utils.d.ts.map +1 -1
- package/dist/{chunk-S2BEPQ5Z.cjs → chunk-EAFNHF5S.cjs} +37 -25
- package/dist/chunk-EAFNHF5S.cjs.map +1 -0
- package/dist/{chunk-UO7HNLSH.js → chunk-ESFICIG2.js} +3 -3
- package/dist/{chunk-33D5NQNQ.js → chunk-ONPSBHE2.js} +27 -15
- package/dist/chunk-ONPSBHE2.js.map +1 -0
- package/dist/{chunk-3CQWJ4UA.cjs → chunk-VD4BLAY4.cjs} +2 -2
- package/dist/{chunk-3CQWJ4UA.cjs.map → chunk-VD4BLAY4.cjs.map} +1 -1
- package/dist/index.cjs +238 -238
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/test/index.cjs +4 -4
- package/dist/test/index.js +2 -2
- package/dist/types/index.cjs +2 -2
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-33D5NQNQ.js.map +0 -1
- package/dist/chunk-S2BEPQ5Z.cjs.map +0 -1
- /package/dist/{chunk-UO7HNLSH.js.map → chunk-ESFICIG2.js.map} +0 -0
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,
|
|
@@ -41,10 +42,12 @@ import {
|
|
|
41
42
|
resolveReactionConfig,
|
|
42
43
|
resolveSettleConfig,
|
|
43
44
|
resolveShutdownConfig,
|
|
45
|
+
seed_event,
|
|
44
46
|
sleep,
|
|
45
47
|
store,
|
|
48
|
+
throw_if_stale,
|
|
46
49
|
validate
|
|
47
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-ONPSBHE2.js";
|
|
48
51
|
import {
|
|
49
52
|
ActorSchema,
|
|
50
53
|
CausationEventSchema,
|
|
@@ -77,7 +80,7 @@ import {
|
|
|
77
80
|
pii_fields,
|
|
78
81
|
pii_schemas,
|
|
79
82
|
sensitive
|
|
80
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-ESFICIG2.js";
|
|
81
84
|
|
|
82
85
|
// src/signals.ts
|
|
83
86
|
process.once("SIGINT", async (arg) => {
|
|
@@ -862,13 +865,6 @@ function compile_is(is) {
|
|
|
862
865
|
function compile_reaches(reaches) {
|
|
863
866
|
return (_stream, _head, count) => count >= reaches;
|
|
864
867
|
}
|
|
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
868
|
function policy_after_windows(options) {
|
|
873
869
|
const parsed = AutoclosePolicySchema.parse(options);
|
|
874
870
|
return [parsed.after, parsed.or?.after].flatMap((w) => w ? [w.days] : []);
|
|
@@ -5304,8 +5300,9 @@ function action_builder(state2) {
|
|
|
5304
5300
|
internal.autoclose = compile_autoclose_policy(
|
|
5305
5301
|
policy
|
|
5306
5302
|
);
|
|
5307
|
-
|
|
5308
|
-
internal.autoclose_after_windows =
|
|
5303
|
+
const windows = policy_after_windows(policy);
|
|
5304
|
+
internal.autoclose_after_windows = windows;
|
|
5305
|
+
internal.autoclose_after_days = windows.length ? Math.min(...windows) : void 0;
|
|
5309
5306
|
internal.autoclose_keep_days = policy_keep_days(policy);
|
|
5310
5307
|
return builder;
|
|
5311
5308
|
},
|
|
@@ -5525,6 +5522,7 @@ export {
|
|
|
5525
5522
|
act,
|
|
5526
5523
|
cache,
|
|
5527
5524
|
check_appends,
|
|
5525
|
+
concurrency_error,
|
|
5528
5526
|
config,
|
|
5529
5527
|
dateReviver,
|
|
5530
5528
|
default_scope,
|
|
@@ -5538,11 +5536,13 @@ export {
|
|
|
5538
5536
|
port,
|
|
5539
5537
|
projection,
|
|
5540
5538
|
resolveAutocloseConfig2 as resolveAutocloseConfig,
|
|
5539
|
+
seed_event,
|
|
5541
5540
|
sensitive,
|
|
5542
5541
|
sleep,
|
|
5543
5542
|
slice,
|
|
5544
5543
|
state,
|
|
5545
5544
|
store,
|
|
5545
|
+
throw_if_stale,
|
|
5546
5546
|
validate
|
|
5547
5547
|
};
|
|
5548
5548
|
//# sourceMappingURL=index.js.map
|