@reventlessdev/reventless-spec 3.0.0-alpha.167 → 3.0.0-alpha.169
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,22 @@
|
|
|
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.169 (2026-10-19)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **gwt:** record behaviour scenarios as they run, for suites whose source names none ([256b253](https://github.com/ReventlessDev/reventless-core/commit/256b253153ec043105c38ac742a1a3efbde48c87))
|
|
11
|
+
* **spec,aws,local:** tell the host shell which environment it runs in, and write local host UI files into a chosen assetsDir ([4f896d1](https://github.com/ReventlessDev/reventless-core/commit/4f896d13ae9ec0d211c33dbd9271e7197cfebc41))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 3.0.0-alpha.168 (2026-10-17)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @reventlessdev/reventless-spec
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# 3.0.0-alpha.167 (2026-10-16)
|
|
7
23
|
|
|
8
24
|
* feat!(inbound): a translation slice can declare a signed webhook URL ([0ad6994](https://github.com/ReventlessDev/reventless-core/commit/0ad69949fcc91c2756c60ca8cb120dd468841d8b))
|
package/package.json
CHANGED
|
@@ -39,11 +39,10 @@ let process = (id, item) =>
|
|
|
39
39
|
Some((id, CreateShipment({orderId: item.orderId, address: item.shippingAddress})))
|
|
40
40
|
|
|
41
41
|
let maxRetries = 3
|
|
42
|
-
let heartbeatInterval = 60
|
|
43
42
|
```
|
|
44
43
|
*/
|
|
45
44
|
/**
|
|
46
|
-
The lean Spec for an AutomationSlice — types, identity, schemas,
|
|
45
|
+
The lean Spec for an AutomationSlice — types, identity, schemas, retry config.
|
|
47
46
|
|
|
48
47
|
Plan 04 dropped `consumedEvent` from the Spec — the framework now derives the
|
|
49
48
|
consumed-event set from each per-source Mapping's `sourceEventSchema`, so a
|
|
@@ -67,9 +66,6 @@ module type Spec = {
|
|
|
67
66
|
/** Maximum number of retries for a failed processing attempt. */
|
|
68
67
|
let maxRetries: int
|
|
69
68
|
|
|
70
|
-
/** Heartbeat interval in seconds for sweeping pending/failed items. */
|
|
71
|
-
let heartbeatInterval: int
|
|
72
|
-
|
|
73
69
|
/** Name of the aggregate or StateChangeSlice that receives the produced command. */
|
|
74
70
|
let targetName: string
|
|
75
71
|
|
|
@@ -15,7 +15,7 @@ Event(s) -> TODO List (read model) -> Translator -> External Service
|
|
|
15
15
|
|
|
16
16
|
Plan 02 splits the merged spec into two module types:
|
|
17
17
|
|
|
18
|
-
- `Spec` — types, identity, schemas,
|
|
18
|
+
- `Spec` — types, identity, schemas, retry config. Per D2, `outboundItem`
|
|
19
19
|
lives here (persisted TODO state with schema).
|
|
20
20
|
- `Translation` — `collect` (sync, observable in tests) and `translate`
|
|
21
21
|
(async, mocked in tests via `whenTranslateMocked`).
|
|
@@ -41,11 +41,10 @@ let translate = async (_id, item, ~capabilities as _) => {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
let maxRetries = 3
|
|
44
|
-
let heartbeatInterval = 60
|
|
45
44
|
```
|
|
46
45
|
*/
|
|
47
46
|
/**
|
|
48
|
-
The lean Spec for an OutboundTranslationSlice — types, identity, schemas,
|
|
47
|
+
The lean Spec for an OutboundTranslationSlice — types, identity, schemas, retry config.
|
|
49
48
|
*/
|
|
50
49
|
module type Spec = {
|
|
51
50
|
/** Logical name of this outbound translation slice (used as a component prefix). */
|
|
@@ -71,9 +70,6 @@ module type Spec = {
|
|
|
71
70
|
/** Maximum number of retries for a failed translate attempt. */
|
|
72
71
|
let maxRetries: int
|
|
73
72
|
|
|
74
|
-
/** Heartbeat interval in seconds for sweeping pending/failed items. */
|
|
75
|
-
let heartbeatInterval: int
|
|
76
|
-
|
|
77
73
|
/** Name of the aggregate or StateChangeSlice that receives the inbound command, or None for fire-and-forget. */
|
|
78
74
|
let targetName: option<string>
|
|
79
75
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/***
|
|
2
|
+
Which environment a host shell runs in, as `config.json` tells it: the name, and
|
|
3
|
+
the purpose when it is known. The shell badges everything that is not
|
|
4
|
+
`production`, so an unknown purpose shows rather than hides.
|
|
5
|
+
|
|
6
|
+
One answer for every caller, from the two the deploy already gives: a declared
|
|
7
|
+
environment ([DeploymentProvenance]) and the stacks the platform treats as
|
|
8
|
+
production. Pure; the caller passes the stack and the list.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
type t = {name: string, purpose: option<string>}
|
|
12
|
+
|
|
13
|
+
let nameKey = "environment"
|
|
14
|
+
let purposeKey = "environmentPurpose"
|
|
15
|
+
|
|
16
|
+
/** What the local platform says about itself. */
|
|
17
|
+
let local = {name: "local", purpose: Some("local")}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
The declared environment wins over the stack, its purpose over the stack list.
|
|
21
|
+
A stack in `prodStacks` with no declared purpose is `production`; any other is
|
|
22
|
+
unknown.
|
|
23
|
+
*/
|
|
24
|
+
let resolve = (
|
|
25
|
+
~provenance: DeploymentProvenance.t,
|
|
26
|
+
~stack: string,
|
|
27
|
+
~prodStacks: array<string>,
|
|
28
|
+
): t => {
|
|
29
|
+
name: provenance.environment->Option.getOr(stack),
|
|
30
|
+
purpose: provenance.purpose->Option.orElse(
|
|
31
|
+
prodStacks->Array.includes(stack) ? Some(Environments.purposeName(Production)) : None,
|
|
32
|
+
),
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** The `config.json` entries; no purpose key when the purpose is unknown. */
|
|
36
|
+
let configFields = (env: t): array<(string, JSON.t)> =>
|
|
37
|
+
[(nameKey, JSON.Encode.string(env.name))]->Array.concat(
|
|
38
|
+
env.purpose->Option.mapOr([], p => [(purposeKey, JSON.Encode.string(p))]),
|
|
39
|
+
)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
4
|
+
import * as Environments$Reventless from "./Environments.res.mjs";
|
|
5
|
+
|
|
6
|
+
let nameKey = "environment";
|
|
7
|
+
|
|
8
|
+
let purposeKey = "environmentPurpose";
|
|
9
|
+
|
|
10
|
+
function resolve(provenance, stack, prodStacks) {
|
|
11
|
+
return {
|
|
12
|
+
name: Stdlib_Option.getOr(provenance.environment, stack),
|
|
13
|
+
purpose: Stdlib_Option.orElse(provenance.purpose, prodStacks.includes(stack) ? Environments$Reventless.purposeName("Production") : undefined)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function configFields(env) {
|
|
18
|
+
return [[
|
|
19
|
+
nameKey,
|
|
20
|
+
env.name
|
|
21
|
+
]].concat(Stdlib_Option.mapOr(env.purpose, [], p => [[
|
|
22
|
+
purposeKey,
|
|
23
|
+
p
|
|
24
|
+
]]));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let local = {
|
|
28
|
+
name: "local",
|
|
29
|
+
purpose: "local"
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
nameKey,
|
|
34
|
+
purposeKey,
|
|
35
|
+
local,
|
|
36
|
+
resolve,
|
|
37
|
+
configFields,
|
|
38
|
+
}
|
|
39
|
+
/* Environments-Reventless Not a pure module */
|