@reventlessdev/reventless-infra 3.0.0-alpha.192 → 3.0.0-alpha.193
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 +14 -0
- package/package.json +3 -3
- package/src/components/AutomationSlice.res +30 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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.193 (2026-10-16)
|
|
7
|
+
|
|
8
|
+
* feat!(automation): schedules set by events ([53bc436](https://github.com/ReventlessDev/reventless-core/commit/53bc4363dffce81ef36475728bf0dae704716021))
|
|
9
|
+
* feat!(automation): declared schedules tick an automation ([420acd2](https://github.com/ReventlessDev/reventless-core/commit/420acd2233aadf700141a31d9d3e0fdc8074bef7))
|
|
10
|
+
|
|
11
|
+
### BREAKING CHANGES
|
|
12
|
+
|
|
13
|
+
* a hand-written AutomationSlice.Mapping.Make the PPX does
|
|
14
|
+
not see must define `let reschedule = _ => []`.
|
|
15
|
+
* a hand-written AutomationSlice spec the PPX does not see must
|
|
16
|
+
declare `let schedule = None`.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
6
20
|
# 3.0.0-alpha.192 (2026-10-15)
|
|
7
21
|
|
|
8
22
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-infra",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.193",
|
|
4
4
|
"description": "Infrastructure types for Reventless framework",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"sury-ppx": "11.0.0",
|
|
18
18
|
"uuid": "^13.0.0",
|
|
19
19
|
"@reventlessdev/rescript-effect": "1.0.0-alpha.0",
|
|
20
|
-
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.23",
|
|
21
20
|
"@reventlessdev/rescript-uuid": "2.0.0-alpha.1",
|
|
22
|
-
"@reventlessdev/
|
|
21
|
+
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.23",
|
|
22
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.165"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"rescript": "12.3.1",
|
|
@@ -7,6 +7,25 @@ Deploy-time outputs produced when an `AutomationSlice` is provisioned.
|
|
|
7
7
|
type outputs = {
|
|
8
8
|
resources: array<Adapter.resource>,
|
|
9
9
|
queryDb: QueryDb.outputs,
|
|
10
|
+
/** The schedules store, made only for a slice that maps the `Clock`. */
|
|
11
|
+
schedulesDb?: QueryDb.outputs,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
The platform's schedules of one slice. It knows only when: each schedule is a key and
|
|
16
|
+
a time, and its firing reaches the slice as `Tick({key, at})`. A platform may name a
|
|
17
|
+
schedule otherwise than by its key (EventBridge Scheduler hashes a key it refuses),
|
|
18
|
+
so what it holds is read as names.
|
|
19
|
+
*/
|
|
20
|
+
type platformSchedules = {
|
|
21
|
+
/** Sets the key's schedule, replacing the one it has. */
|
|
22
|
+
put: (~key: string, Reventless.Schedule.time) => promise<unit>,
|
|
23
|
+
/** Removes a schedule by its platform name; one already gone is no error. */
|
|
24
|
+
removeName: string => promise<unit>,
|
|
25
|
+
/** The names of the schedules the platform holds for the slice. */
|
|
26
|
+
names: unit => promise<array<string>>,
|
|
27
|
+
/** The name the platform gives the key's schedule. */
|
|
28
|
+
nameOf: string => string,
|
|
10
29
|
}
|
|
11
30
|
|
|
12
31
|
/**
|
|
@@ -18,6 +37,15 @@ Runtime operations exposed by an `AutomationSlice` component.
|
|
|
18
37
|
type operations = {
|
|
19
38
|
enqueueEvent: EventCollector.enqueueEvent,
|
|
20
39
|
processPending: unit => promise<unit>,
|
|
40
|
+
/** Delivers `Tick({key, at})` from the `Clock` source, then runs Phase 2: what the
|
|
41
|
+
platform's Scheduler does when one of the slice's schedules comes due. */
|
|
42
|
+
tick: (~key: string, ~at: float) => promise<unit>,
|
|
43
|
+
/** Brings the declared time into the schedule rows and the platform's schedules in
|
|
44
|
+
line with the rows: what a deploy or a start runs. */
|
|
45
|
+
reconcileSchedules: unit => promise<unit>,
|
|
46
|
+
/** Rebuilds the schedule rows from the slice's source events, in order, then
|
|
47
|
+
reconciles. */
|
|
48
|
+
rebuildSchedules: array<JSON.t> => promise<unit>,
|
|
21
49
|
}
|
|
22
50
|
|
|
23
51
|
/**
|
|
@@ -36,6 +64,8 @@ module type T = {
|
|
|
36
64
|
module Automation: Reventless.AutomationSlice.Automation with module Spec := Spec
|
|
37
65
|
type component = Component.t<t, outputs, operations>
|
|
38
66
|
let queryDbName: string
|
|
67
|
+
/** The schedules store's name, for a slice that maps the `Clock`. */
|
|
68
|
+
let schedulesDbName: option<string>
|
|
39
69
|
/** Names of all sources this slice consumes (deduplicated). Used by
|
|
40
70
|
`Plugin_Builder` for the source-name fail-fast assembly check. */
|
|
41
71
|
let sourceNames: array<string>
|