@reventlessdev/reventless-infra 3.0.0-alpha.197 → 3.0.0-alpha.199

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,33 @@
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.199 (2026-10-21)
7
+
8
+ * feat!: a plugin structure's component definitions are read-side and write-side defs ([ea2ab69](https://github.com/ReventlessDev/reventless-core/commit/ea2ab69e928ba16d7e640e4c66ab0e9ba034fe5c))
9
+
10
+ ### BREAKING CHANGES
11
+
12
+ * Plugin.queryableDef, Plugin.writableDef, their schemas,
13
+ isPublicQueryable and encodeQueryableDef no longer exist; a reader names
14
+ readSideDef, writeSideDef, isPublicReadSide and encodeReadSideDef. There
15
+ are no aliases, so the compiler lists every reader.
16
+
17
+
18
+
19
+ # 3.0.0-alpha.198 (2026-10-21)
20
+
21
+ * feat!: the write-side logic module is called the decision, and a codemod moves an app over ([cb573ff](https://github.com/ReventlessDev/reventless-core/commit/cb573ff5b928c7d7f3e75988dfaa65066f8c95eb))
22
+
23
+ ### BREAKING CHANGES
24
+
25
+ * <Spec>_Behavior.res, @@reventless.behavior,
26
+ Reventless.Behavior.T, StateChangeSlice.Behavior, Behavior_GWT and
27
+ thenRefused no longer exist. Run `npx reventless-rename-to-decision` at an
28
+ app's root, then rebuild; comments are not rewritten. The PPX must be the
29
+ matching release.
30
+
31
+
32
+
6
33
  # 3.0.0-alpha.197 (2026-10-19)
7
34
 
8
35
  **Note:** Version bump only for package @reventlessdev/reventless-infra
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-infra",
3
- "version": "3.0.0-alpha.197",
3
+ "version": "3.0.0-alpha.199",
4
4
  "description": "Infrastructure types for Reventless framework",
5
5
  "license": "Apache-2.0",
6
6
  "jest": {
@@ -16,14 +16,14 @@
16
16
  "sury": "11.0.0",
17
17
  "sury-ppx": "11.0.0",
18
18
  "uuid": "^13.0.0",
19
- "@reventlessdev/rescript-pulumi-pulumi": "3.0.0-alpha.0",
19
+ "@reventlessdev/rescript-effect": "1.0.0-alpha.1",
20
20
  "@reventlessdev/rescript-uuid": "2.0.0-alpha.1",
21
- "@reventlessdev/reventless-spec": "3.0.0-alpha.169",
22
- "@reventlessdev/rescript-effect": "1.0.0-alpha.0"
21
+ "@reventlessdev/rescript-pulumi-pulumi": "3.0.0-alpha.0",
22
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.171"
23
23
  },
24
24
  "devDependencies": {
25
25
  "rescript": "12.3.1",
26
- "@reventlessdev/rescript-jest": "1.0.0-alpha.12"
26
+ "@reventlessdev/rescript-jest": "1.0.0-alpha.13"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "rescript": "^12.3.1"
@@ -44,7 +44,7 @@ type operations = {
44
44
  }
45
45
 
46
46
  /**
47
- Module type produced by `Platform.Aggregate.Make(Spec, Behavior, Mappings)`.
47
+ Module type produced by `Platform.Aggregate.Make(Spec, Decision, Mappings)`.
48
48
 
49
49
  The resulting module exposes `make` for instantiating the aggregate at deploy time
50
50
  and `operations` for publishing commands at runtime.
@@ -54,7 +54,7 @@ and `operations` for publishing commands at runtime.
54
54
  // CatalogPlugin.res
55
55
  module CategoryAggregate = Platform.Aggregate.Make(
56
56
  Category,
57
- CategoryBehavior,
57
+ CategoryDecision,
58
58
  NoEventMappings.Make(Category),
59
59
  )
60
60
 
@@ -41,7 +41,7 @@ module type T = {
41
41
  mapping's source event schema (Projection.Mapping.sourceEventSchema). Unlike
42
42
  `sourceNames` (the source aggregate / DCB-log names) this names the actual events — so
43
43
  a DCB-log-sourced mapping (e.g. consuming `OrderPlaced`) is captured, which sourceNames
44
- cannot express. Plugin_Structure qualifies + exposes these as `queryableDef.consumedEventTypes`. */
44
+ cannot express. Plugin_Structure qualifies + exposes these as `readSideDef.consumedEventTypes`. */
45
45
  let consumedEventNames: array<string>
46
46
  let make: (
47
47
  ~api: api,
@@ -15,18 +15,18 @@ type operations = {publishJsons: CommandTopic.publishJsons}
15
15
  type t
16
16
 
17
17
  /**
18
- Module type produced by `Platform.StateChangeSlice.Make(Spec, Behavior)`.
18
+ Module type produced by `Platform.StateChangeSlice.Make(Spec, Decision)`.
19
19
 
20
20
  @example
21
21
  ```rescript
22
22
  // CatalogPlugin.res
23
- module AddCategorySlice = Platform.StateChangeSlice.Make(AddCategory, AddCategory_Behavior)
23
+ module AddCategorySlice = Platform.StateChangeSlice.Make(AddCategory, AddCategory_Decision)
24
24
  let slice = AddCategorySlice.make(~dcbEventLog=log, ~publishJsons=publishJsonsOutput)
25
25
  ```
26
26
  */
27
27
  module type T = {
28
28
  module Spec: Reventless.StateChangeSlice.Spec
29
- module Behavior: Reventless.StateChangeSlice.Behavior with module Spec := Spec
29
+ module Decision: Reventless.StateChangeSlice.Decision with module Spec := Spec
30
30
  /** `true` when built with `Platform.StateChangeSlice.MakeAsync` — uses FIFO channel, returns `CommandPending`. */
31
31
  let isAsync: bool
32
32
  type component = Component.t<t, outputs, operations>
@@ -10,7 +10,7 @@ aggregate's events do not trigger commands on other aggregates.
10
10
  // CatalogPlugin.res
11
11
  module CategoryAggregate = Platform.Aggregate.Make(
12
12
  Category,
13
- CategoryBehavior,
13
+ CategoryDecision,
14
14
  NoEventMappings.Make(Category),
15
15
  )
16
16
  ```
@@ -7,7 +7,7 @@
7
7
  //
8
8
  // // app/MyPlugin.res — imports reventless-infra
9
9
  // module Make = (Platform: ReventlessInfra.Platform.T) => {
10
- // module MyAggregate = Platform.Aggregate.Make(MySpec, MyBehavior, MyMappings)
10
+ // module MyAggregate = Platform.Aggregate.Make(MySpec, MyDecision, MyMappings)
11
11
  // module MyReadModel = Platform.ReadModel.Make(MyRmSpec, MyMappings)
12
12
  // // ...
13
13
  // }
@@ -35,7 +35,7 @@ the composition root, and use its nested `Make` functors everywhere else.
35
35
  module Make = (Platform: Platform.T) => {
36
36
  module CategoryAggregate = Platform.Aggregate.Make(
37
37
  Category,
38
- CategoryBehavior,
38
+ CategoryDecision,
39
39
  NoEventMappings.Make(Category),
40
40
  )
41
41
  module CategoryReadModel = Platform.ReadModel.Make(CategoriesReadModel, CategoryMappings)
@@ -83,7 +83,7 @@ type objectStore = {
83
83
  // The prefix this store's object keys are rooted at, and therefore the path
84
84
  // it must be served under for a minted `/{key}` ref to resolve. Written once
85
85
  // here and read by both the mint side (the presign service) and the serve
86
- // side (the CDN behaviour), so the two cannot disagree — the property the
86
+ // side (the CDN behavior), so the two cannot disagree — the property the
87
87
  // single served prefix already had, now carried per store.
88
88
  //
89
89
  // Rooting keys at the store name in *every* layout is what keeps a stored ref
@@ -284,13 +284,13 @@ module type T = {
284
284
  module Aggregate: {
285
285
  module Make: (
286
286
  Spec: Reventless.Aggregate.Spec,
287
- Behavior: Reventless.Behavior.T with module Spec := Spec,
287
+ Decision: Reventless.Decision.T with module Spec := Spec,
288
288
  EventMappings: EventMapper.Mappings with module Target := Spec,
289
289
  ) => (Aggregate.T with type api = api)
290
290
  /** Async variant — uses FIFO channel, returns `CommandPending`. */
291
291
  module MakeAsync: (
292
292
  Spec: Reventless.Aggregate.Spec,
293
- Behavior: Reventless.Behavior.T with module Spec := Spec,
293
+ Decision: Reventless.Decision.T with module Spec := Spec,
294
294
  EventMappings: EventMapper.Mappings with module Target := Spec,
295
295
  ) => (Aggregate.T with type api = api)
296
296
  }
@@ -359,12 +359,12 @@ module type T = {
359
359
  module StateChangeSlice: {
360
360
  module Make: (
361
361
  Spec: Reventless.StateChangeSlice.Spec,
362
- Behavior: Reventless.StateChangeSlice.Behavior with module Spec := Spec,
362
+ Decision: Reventless.StateChangeSlice.Decision with module Spec := Spec,
363
363
  ) => (StateChangeSlice.T with module Spec = Spec)
364
364
  /** Async variant — uses FIFO channel, returns `CommandPending`. */
365
365
  module MakeAsync: (
366
366
  Spec: Reventless.StateChangeSlice.Spec,
367
- Behavior: Reventless.StateChangeSlice.Behavior with module Spec := Spec,
367
+ Decision: Reventless.StateChangeSlice.Decision with module Spec := Spec,
368
368
  ) => (StateChangeSlice.T with module Spec = Spec)
369
369
  }
370
370
 
@@ -127,13 +127,13 @@ let fieldReferenceSchema = Plugin$Reventless.fieldReferenceSchema;
127
127
 
128
128
  let commandDefSchema = Plugin$Reventless.commandDefSchema;
129
129
 
130
- let queryableDefSchema = Plugin$Reventless.queryableDefSchema;
130
+ let readSideDefSchema = Plugin$Reventless.readSideDefSchema;
131
131
 
132
132
  let eventDefSchema = Plugin$Reventless.eventDefSchema;
133
133
 
134
134
  let errorDefSchema = Plugin$Reventless.errorDefSchema;
135
135
 
136
- let writableDefSchema = Plugin$Reventless.writableDefSchema;
136
+ let writeSideDefSchema = Plugin$Reventless.writeSideDefSchema;
137
137
 
138
138
  let automationSliceDefSchema = Plugin$Reventless.automationSliceDefSchema;
139
139
 
@@ -185,10 +185,10 @@ export {
185
185
  commandLevelSchema,
186
186
  fieldReferenceSchema,
187
187
  commandDefSchema,
188
- queryableDefSchema,
188
+ readSideDefSchema,
189
189
  eventDefSchema,
190
190
  errorDefSchema,
191
- writableDefSchema,
191
+ writeSideDefSchema,
192
192
  automationSliceDefSchema,
193
193
  outboundTranslationSliceDefSchema,
194
194
  inboundTranslationSliceDefSchema,