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

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 (50) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +1 -1
  3. package/package.json +7 -7
  4. package/src/.gwtignore +1 -1
  5. package/src/{Behavior_GWT.res → Decision_GWT.res} +110 -40
  6. package/src/{Behavior_GWT.res.mjs → Decision_GWT.res.mjs} +92 -42
  7. package/src/Delegate_GWT.res +1 -1
  8. package/src/EventMapping_GWT.res +7 -7
  9. package/src/EventMapping_GWT.res.mjs +3 -3
  10. package/src/Flow_GWT.res +14 -14
  11. package/src/Flow_GWT.res.mjs +6 -6
  12. package/src/Hint.res +1 -1
  13. package/src/Mapping_GWT.res +8 -8
  14. package/src/Mapping_GWT.res.mjs +6 -6
  15. package/src/Outcome.res +1 -1
  16. package/src/Query_GWT.res +1 -1
  17. package/src/RunnerHook.res +1 -1
  18. package/src/ScenarioRecorder.res +182 -0
  19. package/src/ScenarioRecorder.res.mjs +287 -0
  20. package/src/StateChange/ExternalAddCategorySlice.res +1 -1
  21. package/src/StateChange/WithFixtures.res +1 -1
  22. package/src/StateChange/WithManualOpen.res +1 -1
  23. package/tests/CallerTest.res +7 -7
  24. package/tests/CallerTest.res.mjs +8 -8
  25. package/tests/FlowAggregateGwtTest.res +6 -6
  26. package/tests/FlowAggregateGwtTest.res.mjs +6 -6
  27. package/tests/FlowCrossPluginGwtTest.res +8 -8
  28. package/tests/FlowCrossPluginGwtTest.res.mjs +8 -8
  29. package/tests/FlowGwtTest.res +4 -4
  30. package/tests/FlowGwtTest.res.mjs +4 -4
  31. package/tests/HintTest.res +2 -2
  32. package/tests/HintTest.res.mjs +1 -1
  33. package/tests/MappingGwtTest.res +5 -5
  34. package/tests/MappingGwtTest.res.mjs +6 -6
  35. package/tests/ScenarioRecorderTest.res +101 -0
  36. package/tests/ScenarioRecorderTest.res.mjs +163 -0
  37. package/tests/StateChange/ExternalAddCategorySlice_GWT.res +3 -3
  38. package/tests/StateChange/ExternalAddCategorySlice_GWT.res.mjs +5 -5
  39. package/tests/StateChange/WithFixtures_GWT.res.mjs +5 -5
  40. package/tests/StateChange/WithManualOpen_GWT.res.mjs +5 -5
  41. package/tests/StateChangeSliceAuthorizeGwtTest.res +10 -10
  42. package/tests/StateChangeSliceAuthorizeGwtTest.res.mjs +14 -14
  43. package/tests/StateChangeSliceGwtTest.res +9 -9
  44. package/tests/StateChangeSliceGwtTest.res.mjs +12 -12
  45. /package/src/StateChange/{ExternalAddCategorySlice_Behavior.res → ExternalAddCategorySlice_Decision.res} +0 -0
  46. /package/src/StateChange/{ExternalAddCategorySlice_Behavior.res.mjs → ExternalAddCategorySlice_Decision.res.mjs} +0 -0
  47. /package/src/StateChange/{WithFixtures_Behavior.res → WithFixtures_Decision.res} +0 -0
  48. /package/src/StateChange/{WithFixtures_Behavior.res.mjs → WithFixtures_Decision.res.mjs} +0 -0
  49. /package/src/StateChange/{WithManualOpen_Behavior.res → WithManualOpen_Decision.res} +0 -0
  50. /package/src/StateChange/{WithManualOpen_Behavior.res.mjs → WithManualOpen_Decision.res.mjs} +0 -0
@@ -1,12 +1,12 @@
1
- // Worked example for Behavior_GWT (slice flavor).
1
+ // Worked example for Decision_GWT (slice flavor).
2
2
  // Uses the canonical "AddCategory" DCB slice shape — payload-less consumed
3
3
  // events, decide that appends `CategoryAdded` unless the category already
4
4
  // exists. Command carries a `@s.matches(DcbTag.string)` annotated ID so the
5
5
  // DCB optimistic-concurrency query resolves to a single-entity read.
6
6
  //
7
- // Plan 02 Phase 6: split-form Spec/Behavior; PPX inference resolves the
8
- // folder kind from the test path's "StateChangeSlice" substring → Behavior
9
- // DSL → emits [include Behavior_GWT.Make(Spec, Behavior)].
7
+ // Plan 02 Phase 6: split-form Spec/Decision; PPX inference resolves the
8
+ // folder kind from the test path's "StateChangeSlice" substring → Decision
9
+ // DSL → emits [include Decision_GWT.Make(Spec, Decision)].
10
10
 
11
11
  @@reventless.gwt
12
12
 
@@ -30,7 +30,7 @@ module AddCategorySlice = {
30
30
  CategoryAdded({categoryId: @s.matches(Reventless.DcbTag.string) string, name: string})
31
31
  }
32
32
 
33
- module AddCategorySliceBehavior = {
33
+ module AddCategorySliceDecision = {
34
34
  module Spec = AddCategorySlice
35
35
  open AddCategorySlice
36
36
 
@@ -107,7 +107,7 @@ module MissingTagSlice = {
107
107
  type event = Done({id: string})
108
108
  }
109
109
 
110
- module MissingTagBehavior = {
110
+ module MissingTagDecision = {
111
111
  // Qualify references through [Spec] to avoid shadowing the file-scope
112
112
  // [consumedEvent] / [command] / [event] / [error] brought in by the PPX-
113
113
  // injected [open AddCategorySlice].
@@ -124,7 +124,7 @@ module MissingTagBehavior = {
124
124
  }
125
125
  }
126
126
 
127
- module MissingTagGwt = Behavior_GWT.Make(MissingTagSlice, MissingTagBehavior)
127
+ module MissingTagGwt = Decision_GWT.Make(MissingTagSlice, MissingTagDecision)
128
128
 
129
129
  MissingTagGwt.describe("MissingTag slice implicit check", () => {
130
130
  MissingTagGwt.test(
@@ -192,7 +192,7 @@ module ShipOrderSlice = {
192
192
  })
193
193
  }
194
194
 
195
- module ShipOrderBehavior = {
195
+ module ShipOrderDecision = {
196
196
  module Spec = ShipOrderSlice
197
197
 
198
198
  type state = {placed: bool, shipped: bool}
@@ -217,7 +217,7 @@ module ShipOrderBehavior = {
217
217
  }
218
218
  }
219
219
 
220
- module ShipOrderGwt = Behavior_GWT.Make(ShipOrderSlice, ShipOrderBehavior)
220
+ module ShipOrderGwt = Decision_GWT.Make(ShipOrderSlice, ShipOrderDecision)
221
221
 
222
222
  ShipOrderGwt.describe("ShipOrder — a command reference no decision reads by", () => {
223
223
  ShipOrderGwt.test("reads the order's history without the carrier", () =>
@@ -3,7 +3,7 @@
3
3
  import * as Sury from "sury";
4
4
  import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
5
5
  import * as Outcome$ReventlessGwt from "../src/Outcome.res.mjs";
6
- import * as Behavior_GWT$ReventlessGwt from "../src/Behavior_GWT.res.mjs";
6
+ import * as Decision_GWT$ReventlessGwt from "../src/Decision_GWT.res.mjs";
7
7
 
8
8
  let consumedEventSchema = Sury.union([
9
9
  Sury.literal("CategoryAdded"),
@@ -83,14 +83,14 @@ function decide(state, command) {
83
83
  }
84
84
  }
85
85
 
86
- let AddCategorySliceBehavior = {
86
+ let AddCategorySliceDecision = {
87
87
  Spec: undefined,
88
88
  initialState: initialState,
89
89
  evolve: evolve,
90
90
  decide: decide
91
91
  };
92
92
 
93
- let include = Behavior_GWT$ReventlessGwt.Make(AddCategorySlice)({
93
+ let include = Decision_GWT$ReventlessGwt.Make(AddCategorySlice)({
94
94
  initialState: initialState,
95
95
  evolve: evolve,
96
96
  decide: decide
@@ -209,14 +209,14 @@ function decide$1(_state, cmd) {
209
209
  };
210
210
  }
211
211
 
212
- let MissingTagBehavior = {
212
+ let MissingTagDecision = {
213
213
  Spec: undefined,
214
214
  initialState: undefined,
215
215
  evolve: evolve$1,
216
216
  decide: decide$1
217
217
  };
218
218
 
219
- let MissingTagGwt = Behavior_GWT$ReventlessGwt.Make(MissingTagSlice)({
219
+ let MissingTagGwt = Decision_GWT$ReventlessGwt.Make(MissingTagSlice)({
220
220
  initialState: undefined,
221
221
  evolve: evolve$1,
222
222
  decide: decide$1
@@ -354,14 +354,14 @@ function decide$2(state, cmd) {
354
354
  }
355
355
  }
356
356
 
357
- let ShipOrderBehavior = {
357
+ let ShipOrderDecision = {
358
358
  Spec: undefined,
359
359
  initialState: initialState$1,
360
360
  evolve: evolve$2,
361
361
  decide: decide$2
362
362
  };
363
363
 
364
- let ShipOrderGwt = Behavior_GWT$ReventlessGwt.Make(ShipOrderSlice)({
364
+ let ShipOrderGwt = Decision_GWT$ReventlessGwt.Make(ShipOrderSlice)({
365
365
  initialState: initialState$1,
366
366
  evolve: evolve$2,
367
367
  decide: decide$2
@@ -417,11 +417,11 @@ let thenEventWithError = include.thenEventWithError;
417
417
 
418
418
  let thenEventsWithError = include.thenEventsWithError;
419
419
 
420
- let thenRefused = include.thenRefused;
420
+ let thenForbidden = include.thenForbidden;
421
421
 
422
422
  export {
423
423
  AddCategorySlice,
424
- AddCategorySliceBehavior,
424
+ AddCategorySliceDecision,
425
425
  Spec,
426
426
  describe,
427
427
  todo,
@@ -436,14 +436,14 @@ export {
436
436
  thenEventWithError,
437
437
  thenEventsWithError,
438
438
  thenError,
439
- thenRefused,
439
+ thenForbidden,
440
440
  thenAppendsConditionedOn,
441
441
  thenAppendsConditionedOnExactly,
442
442
  MissingTagSlice,
443
- MissingTagBehavior,
443
+ MissingTagDecision,
444
444
  MissingTagGwt,
445
445
  ShipOrderSlice,
446
- ShipOrderBehavior,
446
+ ShipOrderDecision,
447
447
  ShipOrderGwt,
448
448
  }
449
449
  /* consumedEventSchema Not a pure module */