@reventlessdev/reventless-core 3.0.0-alpha.207 → 3.0.0-alpha.208
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 3.0.0-alpha.208 (2026-08-03)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **aws:** make the slice callback protocol one declaration, not three ([d49e543](https://github.com/ReventlessDev/reventless-core/commit/d49e543f4715c955c75cec8bd691ee0927b7e2f4))
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
# 3.0.0-alpha.207 (2026-08-03)
|
|
7
14
|
|
|
8
15
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-core",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.208",
|
|
4
4
|
"description": "Core package for Reventless framework",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"sury": "11.0.0-alpha.4",
|
|
30
30
|
"uuid": "^13.0.0",
|
|
31
31
|
"@reventlessdev/rescript-effect": "0.1.0-alpha.32",
|
|
32
|
+
"@reventlessdev/rescript-fast-csv": "2.0.0-alpha.1",
|
|
33
|
+
"@reventlessdev/rescript-jest": "1.0.0-alpha.10",
|
|
32
34
|
"@reventlessdev/rescript-hash-object": "1.2.0-alpha.14",
|
|
33
35
|
"@reventlessdev/rescript-node": "2.0.0-alpha.1",
|
|
34
|
-
"@reventlessdev/rescript-jest": "1.0.0-alpha.10",
|
|
35
|
-
"@reventlessdev/rescript-fast-csv": "2.0.0-alpha.1",
|
|
36
36
|
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.18",
|
|
37
|
-
"@reventlessdev/rescript-uuid": "2.0.0-alpha.0",
|
|
38
37
|
"@reventlessdev/rescript-ssh2": "2.0.0-alpha.1",
|
|
39
38
|
"@reventlessdev/reventless-infra": "3.0.0-alpha.124",
|
|
39
|
+
"@reventlessdev/rescript-uuid": "2.0.0-alpha.0",
|
|
40
40
|
"@reventlessdev/reventless-interop": "3.0.0-alpha.30",
|
|
41
41
|
"@reventlessdev/reventless-spec": "3.0.0-alpha.99"
|
|
42
42
|
},
|
|
@@ -31,6 +31,30 @@ type todoRow = {
|
|
|
31
31
|
retryCount: int,
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
The runtime protocol between a built callback and whoever drives it — the same
|
|
36
|
+
arrangement as `OutboundTranslationSlice_Callback`, and for the same reason. The
|
|
37
|
+
AWS entry point builds callbacks dynamically and has to ascribe a structural type
|
|
38
|
+
at the JS boundary; pointing that ascription at these aliases is what keeps it
|
|
39
|
+
from becoming an unreconcilable second declaration of the shape.
|
|
40
|
+
|
|
41
|
+
Unlike outbound, phase 1 here takes *raw* envelope JSONs: the callback routes by
|
|
42
|
+
`meta.service` and unwraps `{id, meta, event}` itself, per-source, through the
|
|
43
|
+
registered Mappings.
|
|
44
|
+
*/
|
|
45
|
+
type phase1 = (array<JSON.t>, Reventless.AutomationSlice.context) => unit
|
|
46
|
+
|
|
47
|
+
/** Phase 2: process all pending items, publishing commands. */
|
|
48
|
+
type phase2 = ReventlessInfra.CommandTopic.publishJsons => promise<unit>
|
|
49
|
+
|
|
50
|
+
/** The whole protocol as a value, for a driver that holds a built callback and
|
|
51
|
+
knows nothing of the Spec behind it. */
|
|
52
|
+
type runtime = {
|
|
53
|
+
todoItems: Dict.t<todoRow>,
|
|
54
|
+
phase1: phase1,
|
|
55
|
+
phase2: phase2,
|
|
56
|
+
}
|
|
57
|
+
|
|
34
58
|
module type T = {
|
|
35
59
|
module Spec: Reventless.AutomationSlice.Spec
|
|
36
60
|
module Automation: Reventless.AutomationSlice.Automation with module Spec := Spec
|
|
@@ -40,10 +64,10 @@ module type T = {
|
|
|
40
64
|
|
|
41
65
|
/** Phase 1: update TODO list from a batch of raw event JSONs. Internally
|
|
42
66
|
decodes per-source via the registered Mappings. */
|
|
43
|
-
let phase1:
|
|
67
|
+
let phase1: phase1
|
|
44
68
|
|
|
45
69
|
/** Phase 2: process all pending items, publishing commands via publishJsons. */
|
|
46
|
-
let phase2:
|
|
70
|
+
let phase2: phase2
|
|
47
71
|
}
|
|
48
72
|
|
|
49
73
|
module Make = (
|
|
@@ -22,6 +22,34 @@ type todoRow = {
|
|
|
22
22
|
lastError?: string,
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
The runtime protocol between a built callback and whoever drives it.
|
|
27
|
+
|
|
28
|
+
Defined here, once, and referenced by every party — `module type T` below, the
|
|
29
|
+
in-process builder, and the AWS entry point, which cannot name `T` because it
|
|
30
|
+
builds callbacks dynamically per `HANDLER_CONFIG` entry and must ascribe a
|
|
31
|
+
structural type at the JS boundary.
|
|
32
|
+
|
|
33
|
+
That ascription is the reason these aliases exist. A driver that restates the
|
|
34
|
+
shape instead of referencing it becomes a second source of truth that the
|
|
35
|
+
compiler cannot reconcile with this one: when `phase1` gained its `sourceId`,
|
|
36
|
+
the AWS entry point kept passing bare events and nothing complained, because its
|
|
37
|
+
hand-written copy was internally consistent. The mismatch surfaced only at
|
|
38
|
+
runtime, as `undefined` destructured from a tuple that was never a tuple.
|
|
39
|
+
*/
|
|
40
|
+
type phase1<'event> = array<(string, 'event)> => unit
|
|
41
|
+
|
|
42
|
+
/** Phase 2: translate all pending items, optionally publishing commands. */
|
|
43
|
+
type phase2 = ReventlessInfra.CommandTopic.publishJsons => promise<unit>
|
|
44
|
+
|
|
45
|
+
/** The whole protocol as a value — what a driver holding a built callback needs,
|
|
46
|
+
with no knowledge of the Spec it was built from. */
|
|
47
|
+
type runtime<'event> = {
|
|
48
|
+
todoItems: Dict.t<todoRow>,
|
|
49
|
+
phase1: phase1<'event>,
|
|
50
|
+
phase2: phase2,
|
|
51
|
+
}
|
|
52
|
+
|
|
25
53
|
module type T = {
|
|
26
54
|
module Spec: Reventless.OutboundTranslationSlice.Spec
|
|
27
55
|
module Translation: Reventless.OutboundTranslationSlice.Translation with module Spec := Spec
|
|
@@ -32,10 +60,10 @@ module type T = {
|
|
|
32
60
|
/** Phase 1: update TODO list from a batch of `(sourceId, event)` pairs
|
|
33
61
|
(collect only, no resolve). `sourceId` is the envelope id of the entity the
|
|
34
62
|
event was published for. */
|
|
35
|
-
let phase1:
|
|
63
|
+
let phase1: phase1<Spec.consumedEvent>
|
|
36
64
|
|
|
37
65
|
/** Phase 2: translate all pending items, optionally publishing commands via publishJsons. */
|
|
38
|
-
let phase2:
|
|
66
|
+
let phase2: phase2
|
|
39
67
|
}
|
|
40
68
|
|
|
41
69
|
module Make = (
|