@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.
- package/CHANGELOG.md +21 -0
- package/README.md +1 -1
- package/package.json +7 -7
- package/src/.gwtignore +1 -1
- package/src/{Behavior_GWT.res → Decision_GWT.res} +110 -40
- package/src/{Behavior_GWT.res.mjs → Decision_GWT.res.mjs} +92 -42
- package/src/Delegate_GWT.res +1 -1
- package/src/EventMapping_GWT.res +7 -7
- package/src/EventMapping_GWT.res.mjs +3 -3
- package/src/Flow_GWT.res +14 -14
- package/src/Flow_GWT.res.mjs +6 -6
- package/src/Hint.res +1 -1
- package/src/Mapping_GWT.res +8 -8
- package/src/Mapping_GWT.res.mjs +6 -6
- package/src/Outcome.res +1 -1
- package/src/Query_GWT.res +1 -1
- package/src/RunnerHook.res +1 -1
- package/src/ScenarioRecorder.res +182 -0
- package/src/ScenarioRecorder.res.mjs +287 -0
- package/src/StateChange/ExternalAddCategorySlice.res +1 -1
- package/src/StateChange/WithFixtures.res +1 -1
- package/src/StateChange/WithManualOpen.res +1 -1
- package/tests/CallerTest.res +7 -7
- package/tests/CallerTest.res.mjs +8 -8
- package/tests/FlowAggregateGwtTest.res +6 -6
- package/tests/FlowAggregateGwtTest.res.mjs +6 -6
- package/tests/FlowCrossPluginGwtTest.res +8 -8
- package/tests/FlowCrossPluginGwtTest.res.mjs +8 -8
- package/tests/FlowGwtTest.res +4 -4
- package/tests/FlowGwtTest.res.mjs +4 -4
- package/tests/HintTest.res +2 -2
- package/tests/HintTest.res.mjs +1 -1
- package/tests/MappingGwtTest.res +5 -5
- package/tests/MappingGwtTest.res.mjs +6 -6
- package/tests/ScenarioRecorderTest.res +101 -0
- package/tests/ScenarioRecorderTest.res.mjs +163 -0
- package/tests/StateChange/ExternalAddCategorySlice_GWT.res +3 -3
- package/tests/StateChange/ExternalAddCategorySlice_GWT.res.mjs +5 -5
- package/tests/StateChange/WithFixtures_GWT.res.mjs +5 -5
- package/tests/StateChange/WithManualOpen_GWT.res.mjs +5 -5
- package/tests/StateChangeSliceAuthorizeGwtTest.res +10 -10
- package/tests/StateChangeSliceAuthorizeGwtTest.res.mjs +14 -14
- package/tests/StateChangeSliceGwtTest.res +9 -9
- package/tests/StateChangeSliceGwtTest.res.mjs +12 -12
- /package/src/StateChange/{ExternalAddCategorySlice_Behavior.res → ExternalAddCategorySlice_Decision.res} +0 -0
- /package/src/StateChange/{ExternalAddCategorySlice_Behavior.res.mjs → ExternalAddCategorySlice_Decision.res.mjs} +0 -0
- /package/src/StateChange/{WithFixtures_Behavior.res → WithFixtures_Decision.res} +0 -0
- /package/src/StateChange/{WithFixtures_Behavior.res.mjs → WithFixtures_Decision.res.mjs} +0 -0
- /package/src/StateChange/{WithManualOpen_Behavior.res → WithManualOpen_Decision.res} +0 -0
- /package/src/StateChange/{WithManualOpen_Behavior.res.mjs → WithManualOpen_Decision.res.mjs} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// Worked example for
|
|
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/
|
|
8
|
-
// folder kind from the test path's "StateChangeSlice" substring →
|
|
9
|
-
// DSL → emits [include
|
|
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
|
|
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
|
|
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 =
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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 =
|
|
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
|
|
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 =
|
|
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
|
|
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 =
|
|
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
|
|
420
|
+
let thenForbidden = include.thenForbidden;
|
|
421
421
|
|
|
422
422
|
export {
|
|
423
423
|
AddCategorySlice,
|
|
424
|
-
|
|
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
|
-
|
|
439
|
+
thenForbidden,
|
|
440
440
|
thenAppendsConditionedOn,
|
|
441
441
|
thenAppendsConditionedOnExactly,
|
|
442
442
|
MissingTagSlice,
|
|
443
|
-
|
|
443
|
+
MissingTagDecision,
|
|
444
444
|
MissingTagGwt,
|
|
445
445
|
ShipOrderSlice,
|
|
446
|
-
|
|
446
|
+
ShipOrderDecision,
|
|
447
447
|
ShipOrderGwt,
|
|
448
448
|
}
|
|
449
449
|
/* consumedEventSchema Not a pure module */
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/StateChange/{WithManualOpen_Behavior.res.mjs → WithManualOpen_Decision.res.mjs}
RENAMED
|
File without changes
|