@reventlessdev/reventless-local 3.0.0-alpha.290 → 3.0.0-alpha.292

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/package.json +11 -11
  3. package/src/BakedManifest.res +7 -2
  4. package/src/BakedManifest.res.mjs +4 -4
  5. package/src/HostShellDist.res +11 -0
  6. package/src/HostShellDist.res.mjs +14 -1
  7. package/src/Platform.res +31 -19
  8. package/src/Platform.res.mjs +63 -60
  9. package/src/ShellConfig.res +27 -24
  10. package/src/ShellConfig.res.mjs +25 -13
  11. package/src/UiHints.res +4 -6
  12. package/src/UiSlots.res +2 -3
  13. package/src/adapter/Auth/LocalAuth.res +2 -2
  14. package/src/adapter/Backend.res +2 -2
  15. package/src/adapter/LocalBus.res +1 -1
  16. package/src/adapter/LocalUploadResolvers.res +1 -1
  17. package/src/components/Aggregate_Builder.res +2 -2
  18. package/src/components/Aggregate_Builder.res.mjs +4 -4
  19. package/src/components/DcbEventLog_Builder.res +1 -1
  20. package/src/components/StateChangeSlice_Builder.res +3 -3
  21. package/src/components/StateChangeSlice_Builder.res.mjs +3 -3
  22. package/src/reset/LocalSeedReset.res +1 -1
  23. package/tests/HostShellDistTest.res +70 -0
  24. package/tests/HostShellDistTest.res.mjs +75 -0
  25. package/tests/ShellConfigTest.res +45 -7
  26. package/tests/ShellConfigTest.res.mjs +45 -8
  27. package/tests/adapter/BackendParityTest.res +1 -1
  28. package/tests/adapter/EventHistoryResolverTest.res +2 -2
  29. package/tests/adapter/GraphQL_SchemaInspectorTest.res +1 -1
  30. package/tests/adapter/LocalAuthLoginTest.res +1 -1
  31. package/tests/adapter/QueryDbListResolverTest.res +1 -1
  32. package/tests/adapter/QueryDbResolvedFieldsTest.res +1 -1
  33. package/tests/components/aggregate/AggregateFixtures.res +6 -6
  34. package/tests/components/aggregate/AggregateFixtures.res.mjs +3 -3
  35. package/tests/components/aggregate/AggregateSelfMappingFixtures.res +2 -2
  36. package/tests/components/aggregate/AggregateSelfMappingFixtures.res.mjs +3 -3
  37. package/tests/components/automationslice/AutomationSliceSelfDeadlockFixtures.res +4 -4
  38. package/tests/components/automationslice/AutomationSliceSelfDeadlockFixtures.res.mjs +4 -4
  39. package/tests/components/commandgenerator/CommandGeneratorFixtures.res +3 -3
  40. package/tests/components/commandgenerator/CommandGeneratorFixtures.res.mjs +4 -4
  41. package/tests/components/dcb/DcbCrossPartitionFixtures.res +2 -2
  42. package/tests/components/dcb/DcbCrossPartitionFixtures.res.mjs +2 -2
  43. package/tests/components/dcb/DcbFixtures.res +2 -2
  44. package/tests/components/dcb/DcbFixtures.res.mjs +2 -2
  45. package/tests/components/outboundtranslationslice/OutboundTranslationSliceFixtures.res +1 -1
  46. package/tests/components/outboundtranslationslice/OutboundTranslationSlicePlatformFixtures.res +2 -2
  47. package/tests/components/outboundtranslationslice/OutboundTranslationSlicePlatformFixtures.res.mjs +2 -2
  48. package/tests/components/readmodel/DcbReadModelE2EFixtures.res +2 -2
  49. package/tests/components/readmodel/DcbReadModelE2EFixtures.res.mjs +2 -2
  50. package/tests/plugin/{PluginBehavior_GWT.res → PluginDecision_GWT.res} +2 -2
  51. package/tests/plugin/{PluginBehavior_GWT.res.mjs → PluginDecision_GWT.res.mjs} +8 -8
  52. package/tests/plugin/UiFragmentRegistry_GWT.res +1 -1
  53. package/tests/plugin/UiFragmentRegistry_GWT.res.mjs +5 -5
@@ -36,9 +36,36 @@ function threw(f) {
36
36
  }
37
37
 
38
38
  globalThis.describe("ShellConfig.overlay", () => {
39
- globalThis.test("is empty when the deployment declares nothing", () => {
39
+ globalThis.test("carries only the environment when the deployment declares nothing", () => {
40
40
  let out = ShellConfig$ReventlessLocal.overlay(undefined, undefined, undefined);
41
- globalThis.expect(Object.keys(out)).toEqual([]);
41
+ globalThis.expect(Object.keys(out)).toEqual([
42
+ "environment",
43
+ "environmentPurpose"
44
+ ]);
45
+ });
46
+ globalThis.test("names the environment and its purpose local", () => {
47
+ let out = ShellConfig$ReventlessLocal.overlay(undefined, undefined, undefined);
48
+ globalThis.expect([
49
+ str(out, "environment"),
50
+ str(out, "environmentPurpose")
51
+ ]).toEqual([
52
+ "local",
53
+ "local"
54
+ ]);
55
+ });
56
+ globalThis.test("refuses a shellConfig naming either environment key", () => {
57
+ globalThis.expect([
58
+ "environment",
59
+ "environmentPurpose"
60
+ ].map(key => threw(() => {
61
+ ShellConfig$ReventlessLocal.overlay(undefined, undefined, Object.fromEntries([[
62
+ key,
63
+ "prod"
64
+ ]]));
65
+ }))).toEqual([
66
+ true,
67
+ true
68
+ ]);
42
69
  });
43
70
  globalThis.test("points manifestUrl at the bake's default key", () => {
44
71
  let out = ShellConfig$ReventlessLocal.overlay(manifest(undefined), undefined, undefined);
@@ -96,10 +123,9 @@ globalThis.describe("ShellConfig.overlay — uiSlotsFile", () => {
96
123
  });
97
124
 
98
125
  globalThis.describe("ShellConfig.emit", () => {
99
- let shipped = `{\n "apiEndpoint": "/graphql",\n "appName": "Shipped"\n}`;
100
126
  let distWithConfig = () => {
101
127
  let dir = Nodefs.mkdtempSync(Nodepath.join(Nodeos.tmpdir(), "reventless-shellconfig-"));
102
- Nodefs.writeFileSync(Nodepath.join(dir, "config.json"), shipped, "utf8");
128
+ Nodefs.writeFileSync(Nodepath.join(dir, "config.json"), `{\n "apiEndpoint": "/graphql",\n "appName": "Shipped"\n}`, "utf8");
103
129
  return dir;
104
130
  };
105
131
  let readJson = path => Stdlib_Option.getOrThrow(Stdlib_JSON.Decode.object(JSON.parse(Nodefs.readFileSync(path, "utf8"))), undefined);
@@ -116,11 +142,22 @@ globalThis.describe("ShellConfig.emit", () => {
116
142
  globalThis.expect(str(out, "manifestUrl")).toEqual("/component-manifest.json");
117
143
  globalThis.expect(str(out, "apiEndpoint")).toEqual("/graphql");
118
144
  });
119
- globalThis.test("leaves a platform that declares nothing entirely alone", () => {
145
+ globalThis.test("adds only the environment for a platform that declares nothing", () => {
120
146
  let dir = distWithConfig();
121
147
  ShellConfig$ReventlessLocal.emit(undefined, undefined, undefined, dir);
122
- globalThis.expect(Nodefs.readFileSync(Nodepath.join(dir, "config.json"), "utf8")).toEqual(shipped);
123
- globalThis.expect(Nodefs.existsSync(Nodepath.join(dir, "config.base.json"))).toBe(false);
148
+ let out = readConfig(dir);
149
+ globalThis.expect(Object.keys(out)).toEqual([
150
+ "apiEndpoint",
151
+ "appName",
152
+ "environment",
153
+ "environmentPurpose"
154
+ ]);
155
+ globalThis.expect(str(readBaseline(dir), "appName")).toEqual("Shipped");
156
+ });
157
+ globalThis.test("writes nothing and refuses nothing when only the environment has no baseline", () => {
158
+ let dir = Nodefs.mkdtempSync(Nodepath.join(Nodeos.tmpdir(), "reventless-shellconfig-"));
159
+ ShellConfig$ReventlessLocal.emit(undefined, undefined, undefined, dir);
160
+ globalThis.expect(Nodefs.readdirSync(dir, {})).toEqual([]);
124
161
  });
125
162
  globalThis.test("starts every boot from the shipped file, not the last output", () => {
126
163
  let dir = distWithConfig();
@@ -219,7 +256,7 @@ globalThis.describe("ShellConfig.overlay — journeys", () => {
219
256
  globalThis.describe("ShellConfig.overlay — adminGroup", () => {
220
257
  globalThis.test("is absent while the administrator role keeps its own name", () => {
221
258
  Role$Reventless.clearGroups();
222
- globalThis.expect(Object.keys(ShellConfig$ReventlessLocal.overlay(undefined, undefined, undefined))).toEqual([]);
259
+ globalThis.expect(ShellConfig$ReventlessLocal.overlay(undefined, undefined, undefined)["adminGroup"]).toEqual(undefined);
223
260
  });
224
261
  globalThis.test("carries the group a renamed administrator role maps to", () => {
225
262
  Role$Reventless.clearGroups();
@@ -1,4 +1,4 @@
1
- // Behavioural parity between Memory, Sqlite, and Postgres backends at the adapter
1
+ // Behavioral parity between Memory, Sqlite, and Postgres backends at the adapter
2
2
  // layer. Each test runs the same scenario against every BackendState setting.
3
3
  //
4
4
  // The Postgres arm is exercised only when PG_URL is set (so the default test run
@@ -1,6 +1,6 @@
1
- // Behavioural tests for the event-history query resolver's pure core —
1
+ // Behavioral tests for the event-history query resolver's pure core —
2
2
  // position ordering, filtering, and keyset pagination. That is where the
3
- // behaviour lives; the Bus fork around them is two registry lookups.
3
+ // behavior lives; the Bus fork around them is two registry lookups.
4
4
 
5
5
  @@warning("-44")
6
6
 
@@ -755,7 +755,7 @@ describe("GraphQL_SchemaInspector", () => {
755
755
  // Per-field eq inputs derived from @id and @index
756
756
  expect(sdl->String.includes("input IndexedProductFilter"))->toBe(true)
757
757
  expect(sdl->String.includes("productIdEq: ID"))->toBe(true)
758
- // ownerId is detected as an entity reference → ID (matches SchemaType.fromSury behaviour)
758
+ // ownerId is detected as an entity reference → ID (matches SchemaType.fromSury behavior)
759
759
  expect(sdl->String.includes("ownerIdEq: ID"))->toBe(true)
760
760
  // OrderField enum lists the same fields
761
761
  expect(sdl->String.includes("enum IndexedProductOrderField"))->toBe(true)
@@ -418,7 +418,7 @@ describe("the conformance table, minted locally", () => {
418
418
  )
419
419
  switch (minted, expected) {
420
420
  | (Ok(token), Some(groups)) => expect(decodeOrThrow(token).groups)->toEqual(groups)
421
- // `None` means refused — not honoured, not ignored, and not reduced to the
421
+ // `None` means refused — not honored, not ignored, and not reduced to the
422
422
  // empty set. A token minted here at all would be the vulnerability.
423
423
  | (Ok(_), None) => JsError.throwWithMessage("expected the request to be refused")
424
424
  | (Error(msg), Some(_)) => JsError.throwWithMessage("expected a token, got: " ++ msg)
@@ -1,4 +1,4 @@
1
- // Behavioural tests for the in-memory connection list resolver
1
+ // Behavioral tests for the in-memory connection list resolver
2
2
  // (QueryDbResolvers_GraphQL). Phase 1.5 — keyset pagination on top of the
3
3
  // Phase 1 filter / sort wiring.
4
4
 
@@ -1,4 +1,4 @@
1
- // Behavioural tests for the in-memory cross-table field resolvers
1
+ // Behavioral tests for the in-memory cross-table field resolvers
2
2
  // (`@resolves` / `@resolvesMany`). An Orders view carries a foreign `productId`
3
3
  // and a `productIds` array; both follow into a Products view's rows.
4
4
  //
@@ -1,5 +1,5 @@
1
1
  // E2E test fixtures for the Aggregate E2E test.
2
- // Contains specs, behavior, bus setup, and shared test data.
2
+ // Contains specs, decision, bus setup, and shared test data.
3
3
 
4
4
  // ─────────────────────────────────────────────────────────────
5
5
  // Simple Item aggregate spec
@@ -22,16 +22,16 @@ module ItemSpec = {
22
22
  }
23
23
 
24
24
  // ─────────────────────────────────────────────────────────────
25
- // Item behavior: CreateItem → ItemCreated
25
+ // Item decision: CreateItem → ItemCreated
26
26
  // ─────────────────────────────────────────────────────────────
27
27
 
28
- module ItemBehavior: ReventlessCore.Behavior.T with module Spec := ItemSpec = {
28
+ module ItemDecision: ReventlessCore.Decision.T with module Spec := ItemSpec = {
29
29
  type state = bool // true = item exists
30
30
 
31
31
  let initialState = false
32
32
 
33
- // Hand-written behavior (no @@reventless.behavior PPX) — satisfy the
34
- // Behavior.T snapshot field manually.
33
+ // Hand-written decision (no @@reventless.decision PPX) — satisfy the
34
+ // Decision.T snapshot field manually.
35
35
  let snapshot = None
36
36
 
37
37
  let moduleUrl: string = %raw(`import.meta.url`)
@@ -75,7 +75,7 @@ let _ = TestRunner.setup()
75
75
  module ItemAggregateMaker = Aggregate_Builder.Make(Bus)
76
76
  module ItemAgg = ItemAggregateMaker.Make(
77
77
  ItemSpec,
78
- ItemBehavior,
78
+ ItemDecision,
79
79
  ReventlessInfra.NoEventMappings.Make(ItemSpec),
80
80
  )
81
81
 
@@ -68,7 +68,7 @@ function decide(state, command) {
68
68
  }
69
69
  }
70
70
 
71
- let ItemBehavior = {
71
+ let ItemDecision = {
72
72
  initialState: false,
73
73
  evolve: evolve,
74
74
  decide: decide,
@@ -100,7 +100,7 @@ let ItemAgg = ItemAggregateMaker.Make({
100
100
  authorizationOf: authorizationOf,
101
101
  commandTransition: commandTransition,
102
102
  traits: traits
103
- })(ItemBehavior)(NoEventMappings$ReventlessInfra.Make({
103
+ })(ItemDecision)(NoEventMappings$ReventlessInfra.Make({
104
104
  name: name,
105
105
  Id: Id$Reventless.$$String,
106
106
  commandSchema: commandSchema
@@ -110,7 +110,7 @@ let agg = ItemAgg.make(undefined, undefined, undefined);
110
110
 
111
111
  export {
112
112
  ItemSpec,
113
- ItemBehavior,
113
+ ItemDecision,
114
114
  Bus,
115
115
  capturedEventCount,
116
116
  ItemAggregateMaker,
@@ -22,7 +22,7 @@ module ShipmentSpec = {
22
22
  let moduleUrl: string = %raw(`import.meta.url`)
23
23
  }
24
24
 
25
- module ShipmentBehavior: ReventlessCore.Behavior.T with module Spec := ShipmentSpec = {
25
+ module ShipmentDecision: ReventlessCore.Decision.T with module Spec := ShipmentSpec = {
26
26
  type state = int // events seen
27
27
 
28
28
  let initialState = 0
@@ -68,7 +68,7 @@ let _ = Bus.subscribeToEvents("TestShipmentAggrEventTopic", async (_, _, _) => {
68
68
  let _ = TestRunner.setup()
69
69
 
70
70
  module ShipmentAggregateMaker = Aggregate_Builder.Make(Bus)
71
- module ShipmentAgg = ShipmentAggregateMaker.Make(ShipmentSpec, ShipmentBehavior, ShipmentMappings)
71
+ module ShipmentAgg = ShipmentAggregateMaker.Make(ShipmentSpec, ShipmentDecision, ShipmentMappings)
72
72
 
73
73
  let agg = ShipmentAgg.make(~api=())
74
74
 
@@ -84,7 +84,7 @@ function decide(state, command) {
84
84
  }
85
85
  }
86
86
 
87
- let ShipmentBehavior = {
87
+ let ShipmentDecision = {
88
88
  initialState: 0,
89
89
  evolve: evolve,
90
90
  decide: decide,
@@ -158,7 +158,7 @@ let ShipmentAgg = ShipmentAggregateMaker.Make({
158
158
  authorizationOf: authorizationOf,
159
159
  commandTransition: commandTransition,
160
160
  traits: traits
161
- })(ShipmentBehavior)({
161
+ })(ShipmentDecision)({
162
162
  moduleUrl: moduleUrl$2,
163
163
  mappings: mappings,
164
164
  counter: undefined
@@ -191,7 +191,7 @@ async function withTimeout(p, ms) {
191
191
 
192
192
  export {
193
193
  ShipmentSpec,
194
- ShipmentBehavior,
194
+ ShipmentDecision,
195
195
  ShipmentMappings,
196
196
  Bus,
197
197
  publishedEvents,
@@ -43,7 +43,7 @@ module PlaceSpec = {
43
43
  let commandSchema = commandSchema
44
44
  }
45
45
 
46
- module PlaceBehavior = {
46
+ module PlaceDecision = {
47
47
  module Spec = PlaceSpec
48
48
  let moduleUrl: string = %raw(`import.meta.url`)
49
49
 
@@ -86,7 +86,7 @@ module ShipSpec = {
86
86
  let commandSchema = commandSchema
87
87
  }
88
88
 
89
- module ShipBehavior = {
89
+ module ShipDecision = {
90
90
  module Spec = ShipSpec
91
91
  let moduleUrl: string = %raw(`import.meta.url`)
92
92
 
@@ -234,10 +234,10 @@ let publishJsonsOutput = publishJsons->Pulumi.Output.make
234
234
  // Wire StateChangeSlices to the DcbEventLog + AutomationSlice to the topic
235
235
  // ─────────────────────────────────────────────────────────────
236
236
 
237
- module PlaceMaker = StateChangeSlice_Builder.Make(PlaceSpec, PlaceBehavior)
237
+ module PlaceMaker = StateChangeSlice_Builder.Make(PlaceSpec, PlaceDecision)
238
238
  let _placeSlice = PlaceMaker.make(~dcbEventLog, ~publishJsons=publishJsonsOutput)
239
239
 
240
- module ShipMaker = StateChangeSlice_Builder.Make(ShipSpec, ShipBehavior)
240
+ module ShipMaker = StateChangeSlice_Builder.Make(ShipSpec, ShipDecision)
241
241
  let _shipSlice = ShipMaker.make(~dcbEventLog, ~publishJsons=publishJsonsOutput)
242
242
 
243
243
  let dcbTopicOutputs: ReventlessInfra.EventTopic.outputs = (
@@ -84,7 +84,7 @@ function decide(state, command) {
84
84
  }
85
85
  }
86
86
 
87
- let PlaceBehavior = {
87
+ let PlaceDecision = {
88
88
  Spec: undefined,
89
89
  moduleUrl: moduleUrl$1,
90
90
  initialState: false,
@@ -185,7 +185,7 @@ function decide$1(state, command) {
185
185
  }
186
186
  }
187
187
 
188
- let ShipBehavior = {
188
+ let ShipDecision = {
189
189
  Spec: undefined,
190
190
  moduleUrl: moduleUrl$3,
191
191
  initialState: initialState,
@@ -461,9 +461,9 @@ async function readEventTypes(orderId) {
461
461
 
462
462
  export {
463
463
  PlaceSpec,
464
- PlaceBehavior,
464
+ PlaceDecision,
465
465
  ShipSpec,
466
- ShipBehavior,
466
+ ShipDecision,
467
467
  DcbSource,
468
468
  AutoShipSpec,
469
469
  FromDcb,
@@ -5,7 +5,7 @@
5
5
  let _ = TestRunner.setup()
6
6
 
7
7
  // ─────────────────────────────────────────────────────────────
8
- // Aggregate spec (matches the Behavior used in CommandGenerator_Builder.Make)
8
+ // Aggregate spec (matches the Decision used in CommandGenerator_Builder.Make)
9
9
  // ─────────────────────────────────────────────────────────────
10
10
 
11
11
  module CGSpec = {
@@ -25,10 +25,10 @@ module CGSpec = {
25
25
  }
26
26
 
27
27
  // ─────────────────────────────────────────────────────────────
28
- // Behavior
28
+ // Decision
29
29
  // ─────────────────────────────────────────────────────────────
30
30
 
31
- module CGBehavior = {
31
+ module CGDecision = {
32
32
  module Spec = CGSpec
33
33
  type state = {name: string}
34
34
 
@@ -64,14 +64,14 @@ function decide(_state, command) {
64
64
  };
65
65
  }
66
66
 
67
- let CGBehavior_initialState = {
67
+ let CGDecision_initialState = {
68
68
  name: ""
69
69
  };
70
70
 
71
- let CGBehavior = {
71
+ let CGDecision = {
72
72
  Spec: undefined,
73
73
  moduleUrl: moduleUrl$1,
74
- initialState: CGBehavior_initialState,
74
+ initialState: CGDecision_initialState,
75
75
  evolve: evolve,
76
76
  decide: decide
77
77
  };
@@ -108,7 +108,7 @@ function resetMocks() {
108
108
 
109
109
  export {
110
110
  CGSpec,
111
- CGBehavior,
111
+ CGDecision,
112
112
  CGMaker,
113
113
  capturedCmds,
114
114
  mockPublish,
@@ -56,7 +56,7 @@ module AddProductSpec = {
56
56
  let commandSchema = commandSchema
57
57
  }
58
58
 
59
- module AddProductBehavior = {
59
+ module AddProductDecision = {
60
60
  module Spec = AddProductSpec
61
61
  let moduleUrl: string = %raw(`import.meta.url`)
62
62
 
@@ -107,7 +107,7 @@ let eventLog = CatalogLogMaker.make(
107
107
  )
108
108
 
109
109
  // ─── StateChangeSlice, threaded with the INFERRED scope ───
110
- module AddProductMaker = StateChangeSlice_Builder.Make(AddProductSpec, AddProductBehavior)
110
+ module AddProductMaker = StateChangeSlice_Builder.Make(AddProductSpec, AddProductDecision)
111
111
 
112
112
  let publishJsons: ReventlessInfra.CommandTopic.publishJsons = async cmdJsons => {
113
113
  let _ = await cmdJsons
@@ -141,7 +141,7 @@ function decide(state, command) {
141
141
  }
142
142
  }
143
143
 
144
- let AddProductBehavior = {
144
+ let AddProductDecision = {
145
145
  Spec: undefined,
146
146
  moduleUrl: moduleUrl$1,
147
147
  initialState: initialState,
@@ -269,7 +269,7 @@ function addProductJson(productId, categoryId, name) {
269
269
  export {
270
270
  CatalogLog,
271
271
  AddProductSpec,
272
- AddProductBehavior,
272
+ AddProductDecision,
273
273
  Bus,
274
274
  capturedEventCount,
275
275
  CatalogLogMaker,
@@ -36,7 +36,7 @@ module AddItemSpec = {
36
36
  let commandSchema = commandSchema // auto-generated by @schema
37
37
  }
38
38
 
39
- module AddItemBehavior = {
39
+ module AddItemDecision = {
40
40
  module Spec = AddItemSpec
41
41
  let moduleUrl: string = %raw(`import.meta.url`)
42
42
 
@@ -87,7 +87,7 @@ let eventLog = ItemEventLogMaker.make(
87
87
  // Build StateChangeSlice
88
88
  // ─────────────────────────────────────────────────────────────
89
89
 
90
- module AddItemMaker = StateChangeSlice_Builder.Make(AddItemSpec, AddItemBehavior)
90
+ module AddItemMaker = StateChangeSlice_Builder.Make(AddItemSpec, AddItemDecision)
91
91
 
92
92
  // publishJsons routing — dispatches each command to its registered handler.
93
93
  let publishJsons: ReventlessInfra.CommandTopic.publishJsons = async cmdJsons => {
@@ -93,7 +93,7 @@ function decide(state, command) {
93
93
  }
94
94
  }
95
95
 
96
- let AddItemBehavior = {
96
+ let AddItemDecision = {
97
97
  Spec: undefined,
98
98
  moduleUrl: moduleUrl$1,
99
99
  initialState: false,
@@ -213,7 +213,7 @@ function addItemJson(id, name) {
213
213
  export {
214
214
  ItemEventLog,
215
215
  AddItemSpec,
216
- AddItemBehavior,
216
+ AddItemDecision,
217
217
  Bus,
218
218
  capturedEventCount,
219
219
  ItemEventLogMaker,
@@ -72,7 +72,7 @@ module ProcessPaymentSpec = {
72
72
  (string, outboundItem) => promise<result<option<(string, inboundCommand)>, string>>,
73
73
  > = ref(async (id, _item) => Ok(Some((id, ConfirmPayment({orderId: id})))))
74
74
 
75
- // The mock stays two-arg: a test that wants to vary behaviour varies it on
75
+ // The mock stays two-arg: a test that wants to vary behavior varies it on
76
76
  // the item, and threading capabilities into every fixture would make each
77
77
  // one restate a type it does not use.
78
78
  let translate = (id, item, ~capabilities as _) => translateFn.contents(id, item)
@@ -39,7 +39,7 @@ module PlaceSpec = {
39
39
  let commandSchema = commandSchema
40
40
  }
41
41
 
42
- module PlaceBehavior = {
42
+ module PlaceDecision = {
43
43
  module Spec = PlaceSpec
44
44
  let moduleUrl: string = %raw(`import.meta.url`)
45
45
 
@@ -172,7 +172,7 @@ let publishJsonsOutput = publishJsons->Pulumi.Output.make
172
172
  // Wire the StateChangeSlice + the OutboundTranslationSlice
173
173
  // ─────────────────────────────────────────────────────────────
174
174
 
175
- module PlaceMaker = StateChangeSlice_Builder.Make(PlaceSpec, PlaceBehavior)
175
+ module PlaceMaker = StateChangeSlice_Builder.Make(PlaceSpec, PlaceDecision)
176
176
  let _placeSlice = PlaceMaker.make(~dcbEventLog, ~publishJsons=publishJsonsOutput)
177
177
 
178
178
  let dcbTopicOutputs: ReventlessInfra.EventTopic.outputs = (
@@ -85,7 +85,7 @@ function decide(state, command) {
85
85
  }
86
86
  }
87
87
 
88
- let PlaceBehavior = {
88
+ let PlaceDecision = {
89
89
  Spec: undefined,
90
90
  moduleUrl: moduleUrl$1,
91
91
  initialState: false,
@@ -274,7 +274,7 @@ async function flush() {
274
274
 
275
275
  export {
276
276
  PlaceSpec,
277
- PlaceBehavior,
277
+ PlaceDecision,
278
278
  SendConfirmSpec,
279
279
  collectCalls,
280
280
  externalCalls,
@@ -35,7 +35,7 @@ module AddProductSpec = {
35
35
  let commandSchema = commandSchema
36
36
  }
37
37
 
38
- module AddProductBehavior = {
38
+ module AddProductDecision = {
39
39
  module Spec = AddProductSpec
40
40
  let moduleUrl: string = %raw(`import.meta.url`)
41
41
 
@@ -130,7 +130,7 @@ let dcbEventLog = DcbLogMaker.make(
130
130
  ~partitionTag=Reventless.DcbTag.Simple({key: "productId"}),
131
131
  )
132
132
 
133
- module AddProductMaker = StateChangeSlice_Builder.Make(AddProductSpec, AddProductBehavior)
133
+ module AddProductMaker = StateChangeSlice_Builder.Make(AddProductSpec, AddProductDecision)
134
134
 
135
135
  let publishJsons: ReventlessInfra.CommandTopic.publishJsons = async cmdJsons => {
136
136
  let _ = await cmdJsons
@@ -89,7 +89,7 @@ function decide(state, command) {
89
89
  }
90
90
  }
91
91
 
92
- let AddProductBehavior = {
92
+ let AddProductDecision = {
93
93
  Spec: undefined,
94
94
  moduleUrl: moduleUrl$1,
95
95
  initialState: false,
@@ -294,7 +294,7 @@ async function loadState(productId) {
294
294
 
295
295
  export {
296
296
  AddProductSpec,
297
- AddProductBehavior,
297
+ AddProductDecision,
298
298
  ProductCatalogDcbSource,
299
299
  ProductsReadModelSpec,
300
300
  ProductsFromDcb,
@@ -1,7 +1,7 @@
1
1
  open ReventlessCore
2
2
  open PluginSpec
3
3
  open Plugin_Fixtures
4
- module PluginTest = ReventlessGwt.Behavior_GWT.MakeFromAggregate(PluginSpec, PluginBehavior)
4
+ module PluginTest = ReventlessGwt.Decision_GWT.MakeFromAggregate(PluginSpec, PluginDecision)
5
5
  open PluginTest
6
6
 
7
7
  // Name-keyed lifecycle aggregate. Commands carry the version; the aggregate
@@ -15,7 +15,7 @@ let supersededV1ByV2 = VersionSuperseded({
15
15
  newDefinition: pluginDefinitionV2,
16
16
  })
17
17
 
18
- describe("PluginBehavior:", () => {
18
+ describe("PluginDecision:", () => {
19
19
  // ── Detection → connect handshake ──────────────────────────────────────────
20
20
  test("Heartbeat for an unknown version triggers detection", () =>
21
21
  givenEvents([])->whenCmd(Heartbeat("1"))->thenEvents([VersionDetected("1")])
@@ -1,11 +1,11 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
3
  import * as PluginSpec$ReventlessCore from "@reventlessdev/reventless-core/src/plugin/lifecycle/PluginSpec.res.mjs";
4
- import * as Behavior_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Behavior_GWT.res.mjs";
5
- import * as PluginBehavior$ReventlessCore from "@reventlessdev/reventless-core/src/plugin/lifecycle/PluginBehavior.res.mjs";
4
+ import * as Decision_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Decision_GWT.res.mjs";
5
+ import * as PluginDecision$ReventlessCore from "@reventlessdev/reventless-core/src/plugin/lifecycle/PluginDecision.res.mjs";
6
6
  import * as Plugin_Fixtures$ReventlessLocal from "./Plugin_Fixtures.res.mjs";
7
7
 
8
- let PluginTest = Behavior_GWT$ReventlessGwt.MakeFromAggregate({
8
+ let PluginTest = Decision_GWT$ReventlessGwt.MakeFromAggregate({
9
9
  name: PluginSpec$ReventlessCore.name,
10
10
  commandSchema: PluginSpec$ReventlessCore.commandSchema,
11
11
  eventSchema: PluginSpec$ReventlessCore.eventSchema,
@@ -19,11 +19,11 @@ let PluginTest = Behavior_GWT$ReventlessGwt.MakeFromAggregate({
19
19
  errorSchema: PluginSpec$ReventlessCore.errorSchema,
20
20
  authorizationOf: PluginSpec$ReventlessCore.authorizationOf
21
21
  },
22
- initialState: PluginBehavior$ReventlessCore.initialState,
23
- evolve: PluginBehavior$ReventlessCore.evolve,
24
- decide: PluginBehavior$ReventlessCore.decide,
22
+ initialState: PluginDecision$ReventlessCore.initialState,
23
+ evolve: PluginDecision$ReventlessCore.evolve,
24
+ decide: PluginDecision$ReventlessCore.decide,
25
25
  snapshot: undefined,
26
- moduleUrl: PluginBehavior$ReventlessCore.moduleUrl
26
+ moduleUrl: PluginDecision$ReventlessCore.moduleUrl
27
27
  });
28
28
 
29
29
  let supersededV1ByV2 = {
@@ -36,7 +36,7 @@ let supersededV1ByV2 = {
36
36
  }
37
37
  };
38
38
 
39
- PluginTest.describe("PluginBehavior:", () => {
39
+ PluginTest.describe("PluginDecision:", () => {
40
40
  PluginTest.test("Heartbeat for an unknown version triggers detection", () => PluginTest.thenEvents(PluginTest.whenCmd(PluginTest.givenEvents([]), {
41
41
  TAG: "Heartbeat",
42
42
  _0: "1"
@@ -3,7 +3,7 @@
3
3
  open ReventlessCore
4
4
  open Plugin_Fixtures
5
5
 
6
- module Test = ReventlessGwt.Behavior_GWT.Make(UiFragmentRegistry, UiFragmentRegistry_Behavior)
6
+ module Test = ReventlessGwt.Decision_GWT.Make(UiFragmentRegistry, UiFragmentRegistry_Decision)
7
7
  open Test
8
8
  open UiFragmentRegistry
9
9
 
@@ -1,11 +1,11 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
- import * as Behavior_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Behavior_GWT.res.mjs";
3
+ import * as Decision_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Decision_GWT.res.mjs";
4
4
  import * as Plugin_Fixtures$ReventlessLocal from "./Plugin_Fixtures.res.mjs";
5
5
  import * as UiFragmentRegistry$ReventlessCore from "@reventlessdev/reventless-core/src/admin/UiFragmentRegistry/StateChange/UiFragmentRegistry.res.mjs";
6
- import * as UiFragmentRegistry_Behavior$ReventlessCore from "@reventlessdev/reventless-core/src/admin/UiFragmentRegistry/StateChange/UiFragmentRegistry_Behavior.res.mjs";
6
+ import * as UiFragmentRegistry_Decision$ReventlessCore from "@reventlessdev/reventless-core/src/admin/UiFragmentRegistry/StateChange/UiFragmentRegistry_Decision.res.mjs";
7
7
 
8
- let Test = Behavior_GWT$ReventlessGwt.Make({
8
+ let Test = Decision_GWT$ReventlessGwt.Make({
9
9
  name: UiFragmentRegistry$ReventlessCore.name,
10
10
  consumedEventSchema: UiFragmentRegistry$ReventlessCore.consumedEventSchema,
11
11
  commandSchema: UiFragmentRegistry$ReventlessCore.commandSchema,
@@ -14,8 +14,8 @@ let Test = Behavior_GWT$ReventlessGwt.Make({
14
14
  authorizationOf: UiFragmentRegistry$ReventlessCore.authorizationOf
15
15
  })({
16
16
  initialState: undefined,
17
- evolve: UiFragmentRegistry_Behavior$ReventlessCore.evolve,
18
- decide: UiFragmentRegistry_Behavior$ReventlessCore.decide
17
+ evolve: UiFragmentRegistry_Decision$ReventlessCore.evolve,
18
+ decide: UiFragmentRegistry_Decision$ReventlessCore.decide
19
19
  });
20
20
 
21
21
  let manifest2_panels = [];