@reventlessdev/reventless-gwt 1.0.0-alpha.249 → 1.0.0-alpha.250

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,24 @@
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
+ # 1.0.0-alpha.250 (2026-10-21)
7
+
8
+ * feat!: a state view's row key is module Id ([08c9726](https://github.com/ReventlessDev/reventless-core/commit/08c972659a3d689a39fd5e2f2026597155e92210))
9
+ * feat!: a plugin structure's component definitions are read-side and write-side defs ([ea2ab69](https://github.com/ReventlessDev/reventless-core/commit/ea2ab69e928ba16d7e640e4c66ab0e9ba034fe5c))
10
+
11
+ ### BREAKING CHANGES
12
+
13
+ * a state view spec declares its row key as module Id. A
14
+ hand-written module Key in a spec under StateView/ or StateViewStream/
15
+ fails the build with "A state view's row key is `module Id`, not
16
+ `module Key`".
17
+ * Plugin.queryableDef, Plugin.writableDef, their schemas,
18
+ isPublicQueryable and encodeQueryableDef no longer exist; a reader names
19
+ readSideDef, writeSideDef, isPublicReadSide and encodeReadSideDef. There
20
+ are no aliases, so the compiler lists every reader.
21
+
22
+
23
+
6
24
  # 1.0.0-alpha.249 (2026-10-21)
7
25
 
8
26
  * 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))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-gwt",
3
- "version": "1.0.0-alpha.249",
3
+ "version": "1.0.0-alpha.250",
4
4
  "description": "Given-When-Then DSLs and test harness for Reventless slice testing",
5
5
  "license": "Apache-2.0",
6
6
  "jest": {
@@ -15,16 +15,16 @@
15
15
  "dependencies": {
16
16
  "sury": "11.0.0",
17
17
  "@reventlessdev/rescript-effect": "1.0.0-alpha.1",
18
- "@reventlessdev/rescript-jest": "1.0.0-alpha.13",
19
- "@reventlessdev/reventless-infra": "3.0.0-alpha.198",
20
18
  "@reventlessdev/rescript-node": "2.0.0-alpha.23",
21
- "@reventlessdev/reventless-core": "3.0.0-alpha.301",
22
- "@reventlessdev/reventless-spec": "3.0.0-alpha.170"
19
+ "@reventlessdev/reventless-infra": "3.0.0-alpha.199",
20
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.171",
21
+ "@reventlessdev/rescript-jest": "1.0.0-alpha.13",
22
+ "@reventlessdev/reventless-core": "3.0.0-alpha.302"
23
23
  },
24
24
  "devDependencies": {
25
25
  "rescript": "12.3.1",
26
26
  "sury-ppx": "11.0.0",
27
- "@reventlessdev/reventless-ppx": "1.0.0-alpha.103"
27
+ "@reventlessdev/reventless-ppx": "1.0.0-alpha.104"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "rescript": "^12.3.1"
@@ -20,7 +20,7 @@ module type Spec = {
20
20
 
21
21
  let stateSchema: S.t<state>
22
22
 
23
- module Key: Reventless.Id.T
23
+ module Id: Reventless.Id.T
24
24
 
25
25
  @schema
26
26
  type consumedEvent
@@ -33,7 +33,7 @@ module type Projection = {
33
33
  module Spec: Spec
34
34
 
35
35
  let project: Reventless.StateViewSlice.consumed<Spec.consumedEvent> => array<
36
- Reventless.Projection.action<Spec.Key.t, Spec.state>,
36
+ Reventless.Projection.action<Spec.Id.t, Spec.state>,
37
37
  >
38
38
  }
39
39
 
@@ -180,7 +180,7 @@ module Make = (Spec: Spec, Projection: Projection with module Spec := Spec): (
180
180
  ->Projection.project
181
181
  ->Array.map(action =>
182
182
  action
183
- ->Reventless.Projection.mapActionId(~to_=Spec.Key.toString, ~from=Spec.Key.makeFromString)
183
+ ->Reventless.Projection.mapActionId(~to_=Spec.Id.toString, ~from=Spec.Id.makeFromString)
184
184
  ->ReventlessCore.Projection.rewriteTrail(~at=TestFixtures.meta.time, Spec.stateSchema)
185
185
  )
186
186
  )
@@ -64,7 +64,7 @@ function Make(Spec) {
64
64
  event: ev,
65
65
  meta: TestFixtures$ReventlessGwt.meta,
66
66
  recordedAt: TestFixtures$ReventlessGwt.recordedAt
67
- }).map(action => Projection$ReventlessCore.rewriteTrail(Projection$Reventless.mapActionId(action, Spec.Key.toString, Spec.Key.makeFromString), TestFixtures$ReventlessGwt.meta.time, Spec.stateSchema))).flat();
67
+ }).map(action => Projection$ReventlessCore.rewriteTrail(Projection$Reventless.mapActionId(action, Spec.Id.toString, Spec.Id.makeFromString), TestFixtures$ReventlessGwt.meta.time, Spec.stateSchema))).flat();
68
68
  await runActions(actions, {
69
69
  load: extra => Promise.resolve({
70
70
  TAG: "Ok",
@@ -120,7 +120,7 @@ module ShipOrderDecision = {
120
120
  }
121
121
 
122
122
  module OrdersViewSlice = {
123
- module Key = Reventless.Id.StringPure
123
+ module Id = Reventless.Id.StringPure
124
124
  let name = "OrdersView"
125
125
 
126
126
  @schema
@@ -276,7 +276,7 @@ let consumedEventSchema$3 = Sury.union([
276
276
  ]);
277
277
 
278
278
  let OrdersViewSlice = {
279
- Key: undefined,
279
+ Id: undefined,
280
280
  name: name,
281
281
  stateSchema: stateSchema,
282
282
  consumedEventSchema: consumedEventSchema$3,
@@ -362,7 +362,7 @@ let Ship = Flow_GWT$ReventlessGwt.CommandStep(ShipOrderSlice)({
362
362
  let View = Flow_GWT$ReventlessGwt.ViewStep({
363
363
  name: name,
364
364
  stateSchema: stateSchema,
365
- Key: {
365
+ Id: {
366
366
  schema: Id$Reventless.StringPure.schema,
367
367
  make: prim => prim,
368
368
  makeFromString: prim => prim,
@@ -4,7 +4,7 @@
4
4
  open JestGlobals
5
5
 
6
6
  module CategoriesView = {
7
- module Key = Reventless.Id.StringPure
7
+ module Id = Reventless.Id.StringPure
8
8
  let name = "CategoriesView"
9
9
 
10
10
  @schema
@@ -20,7 +20,7 @@ let consumedEventSchema = Sury.$schema(s => ({
20
20
  }));
21
21
 
22
22
  let CategoriesView = {
23
- Key: undefined,
23
+ Id: undefined,
24
24
  name: name,
25
25
  stateSchema: stateSchema,
26
26
  consumedEventSchema: consumedEventSchema,
@@ -50,7 +50,7 @@ let CategoriesViewProjection = {
50
50
  let View = Projection_GWT$ReventlessGwt.Make({
51
51
  name: name,
52
52
  stateSchema: stateSchema,
53
- Key: {
53
+ Id: {
54
54
  schema: Id$Reventless.StringPure.schema,
55
55
  make: prim => prim,
56
56
  makeFromString: prim => prim,
@@ -36,7 +36,7 @@ test("loadGraph cold-loads structures from the real plugins", async () => {
36
36
  let catalog = structureFor(g, "Catalog")->Option.getOrThrow
37
37
  let category =
38
38
  catalog.aggregates
39
- ->Array.find((a: Reventless.Plugin.writableDef) => a.name == "Category")
39
+ ->Array.find((a: Reventless.Plugin.writeSideDef) => a.name == "Category")
40
40
  ->Option.getOrThrow
41
41
  ok(category.producedEventTypes->Array.includes("Catalog.Added"))
42
42
 
@@ -50,7 +50,7 @@ test("loadGraph cold-loads structures from the real plugins", async () => {
50
50
  let ordering = structureFor(g, "Ordering")->Option.getOrThrow
51
51
  let order =
52
52
  ordering.aggregates
53
- ->Array.find((a: Reventless.Plugin.writableDef) => a.name == "Order")
53
+ ->Array.find((a: Reventless.Plugin.writeSideDef) => a.name == "Order")
54
54
  ->Option.getOrThrow
55
55
  ok(order.producedEventTypes->Array.includes("Ordering.Placed"))
56
56
 
@@ -72,7 +72,7 @@ test("loadGraph cold-loads structures from the real plugins", async () => {
72
72
  )
73
73
  let product =
74
74
  catalog.aggregates
75
- ->Array.find((a: Reventless.Plugin.writableDef) => a.name == "Product")
75
+ ->Array.find((a: Reventless.Plugin.writeSideDef) => a.name == "Product")
76
76
  ->Option.getOrThrow
77
77
  ok(productsEp.sourceEventTypes->Array.every(e => product.producedEventTypes->Array.includes(e)))
78
78
  })
@@ -115,7 +115,7 @@ CategoriesQuery.describe("Categories ReadModel queries", () => {
115
115
  module OrdersView = {
116
116
  let name = "OrdersView"
117
117
  let moduleUrl = ""
118
- module Key = Reventless.Id.StringPure
118
+ module Id = Reventless.Id.StringPure
119
119
 
120
120
  @schema
121
121
  type state = {orderId: string, customerId: string, total: int}
@@ -242,7 +242,7 @@ let subIdConfig = {
242
242
  let OrdersView = {
243
243
  name: name$1,
244
244
  moduleUrl: moduleUrl$1,
245
- Key: undefined,
245
+ Id: undefined,
246
246
  stateSchema: stateSchema$1,
247
247
  consumedEventSchema: consumedEventSchema,
248
248
  project: project,
@@ -256,7 +256,7 @@ let OrdersQuery = Query_GWT$ReventlessGwt.Make(Query_GWT$ReventlessGwt.FromState
256
256
  name: name$1,
257
257
  moduleUrl: moduleUrl$1,
258
258
  stateSchema: stateSchema$1,
259
- Key: {
259
+ Id: {
260
260
  schema: Id$Reventless.StringPure.schema,
261
261
  make: prim => prim,
262
262
  makeFromString: prim => prim,
@@ -11,7 +11,7 @@
11
11
  open Reventless.Projection
12
12
 
13
13
  module CategoriesView = {
14
- module Key = Reventless.Id.StringPure
14
+ module Id = Reventless.Id.StringPure
15
15
  let name = "CategoriesView"
16
16
 
17
17
  @schema
@@ -30,7 +30,7 @@ let consumedEventSchema = Sury.union([
30
30
  ]);
31
31
 
32
32
  let CategoriesView = {
33
- Key: undefined,
33
+ Id: undefined,
34
34
  name: name,
35
35
  stateSchema: stateSchema,
36
36
  consumedEventSchema: consumedEventSchema,
@@ -85,7 +85,7 @@ let CategoriesViewProjection = {
85
85
  let include = Projection_GWT$ReventlessGwt.Make({
86
86
  name: name,
87
87
  stateSchema: stateSchema,
88
- Key: {
88
+ Id: {
89
89
  schema: Id$Reventless.StringPure.schema,
90
90
  make: prim => prim,
91
91
  makeFromString: prim => prim,