@reventlessdev/reventless-local 3.0.0-alpha.291 → 3.0.0-alpha.293
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 +27 -0
- package/package.json +13 -13
- package/src/Platform.res +13 -13
- package/src/Platform.res.mjs +48 -48
- package/src/UiHints.res +1 -1
- package/src/adapter/Auth/LocalAuth.res +2 -2
- package/src/adapter/Backend.res +2 -2
- package/src/adapter/CommandTopic/LocalCommandTopicChannel.res +1 -1
- package/src/adapter/LocalBus.res +1 -1
- package/src/adapter/LocalUploadResolvers.res +1 -1
- package/src/adapter/Runtime/LocalRuntimeEnvironment.res +8 -3
- package/src/adapter/Task/LocalTaskBucket.res +1 -1
- package/src/components/Aggregate_Builder.res +2 -2
- package/src/components/Aggregate_Builder.res.mjs +4 -4
- package/src/components/DcbEventLog_Builder.res +1 -1
- package/src/components/StateChangeSlice_Builder.res +3 -3
- package/src/components/StateChangeSlice_Builder.res.mjs +3 -3
- package/src/reset/LocalSeedReset.res +1 -1
- package/tests/adapter/BackendParityTest.res +1 -1
- package/tests/adapter/EventHistoryResolverTest.res +2 -2
- package/tests/adapter/GraphQL_SchemaInspectorTest.res +1 -1
- package/tests/adapter/LocalAuthLoginTest.res +1 -1
- package/tests/adapter/QueryDbListResolverTest.res +1 -1
- package/tests/adapter/QueryDbResolvedFieldsTest.res +1 -1
- package/tests/components/aggregate/AggregateFixtures.res +6 -6
- package/tests/components/aggregate/AggregateFixtures.res.mjs +3 -3
- package/tests/components/aggregate/AggregateSelfMappingFixtures.res +2 -2
- package/tests/components/aggregate/AggregateSelfMappingFixtures.res.mjs +3 -3
- package/tests/components/automationslice/AutomationSliceSelfDeadlockFixtures.res +4 -4
- package/tests/components/automationslice/AutomationSliceSelfDeadlockFixtures.res.mjs +4 -4
- package/tests/components/commandgenerator/CommandGeneratorFixtures.res +3 -3
- package/tests/components/commandgenerator/CommandGeneratorFixtures.res.mjs +4 -4
- package/tests/components/dcb/DcbCrossPartitionFixtures.res +2 -2
- package/tests/components/dcb/DcbCrossPartitionFixtures.res.mjs +2 -2
- package/tests/components/dcb/DcbFixtures.res +2 -2
- package/tests/components/dcb/DcbFixtures.res.mjs +2 -2
- package/tests/components/heartbeat/HeartbeatFixtures.res +1 -1
- package/tests/components/outboundtranslationslice/OutboundTranslationSliceFixtures.res +1 -1
- package/tests/components/outboundtranslationslice/OutboundTranslationSlicePlatformFixtures.res +2 -2
- package/tests/components/outboundtranslationslice/OutboundTranslationSlicePlatformFixtures.res.mjs +2 -2
- package/tests/components/readmodel/DcbReadModelE2EFixtures.res +2 -2
- package/tests/components/readmodel/DcbReadModelE2EFixtures.res.mjs +2 -2
- package/tests/components/stateviewslice/StateViewSliceDisplayNameFixtures.res +1 -1
- package/tests/components/stateviewslice/StateViewSliceDisplayNameFixtures.res.mjs +2 -2
- package/tests/components/stateviewslice/StateViewSliceFixtures.res +1 -1
- package/tests/components/stateviewslice/StateViewSliceFixtures.res.mjs +2 -2
- package/tests/components/stateviewslice/StateViewSliceSubIdFixtures.res +1 -1
- package/tests/components/stateviewslice/StateViewSliceSubIdFixtures.res.mjs +2 -2
- package/tests/plugin/{PluginBehavior_GWT.res → PluginDecision_GWT.res} +2 -2
- package/tests/plugin/{PluginBehavior_GWT.res.mjs → PluginDecision_GWT.res.mjs} +8 -8
- package/tests/plugin/UiFragmentRegistry_GWT.res +1 -1
- package/tests/plugin/UiFragmentRegistry_GWT.res.mjs +5 -5
- package/tests/plugin/UiFragments_GWT.res.mjs +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
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,
|
|
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
|
|
25
|
+
// Item decision: CreateItem → ItemCreated
|
|
26
26
|
// ─────────────────────────────────────────────────────────────
|
|
27
27
|
|
|
28
|
-
module
|
|
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
|
|
34
|
-
//
|
|
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
|
-
|
|
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
|
|
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
|
-
})(
|
|
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
|
-
|
|
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
|
|
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,
|
|
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
|
|
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
|
-
})(
|
|
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
|
-
|
|
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
|
|
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
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
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
|
-
|
|
464
|
+
PlaceDecision,
|
|
465
465
|
ShipSpec,
|
|
466
|
-
|
|
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
|
|
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
|
-
//
|
|
28
|
+
// Decision
|
|
29
29
|
// ─────────────────────────────────────────────────────────────
|
|
30
30
|
|
|
31
|
-
module
|
|
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
|
|
67
|
+
let CGDecision_initialState = {
|
|
68
68
|
name: ""
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
let
|
|
71
|
+
let CGDecision = {
|
|
72
72
|
Spec: undefined,
|
|
73
73
|
moduleUrl: moduleUrl$1,
|
|
74
|
-
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
|
-
|
|
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
|
|
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,
|
|
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
|
|
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
|
-
|
|
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
|
|
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,
|
|
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
|
|
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
|
-
|
|
216
|
+
AddItemDecision,
|
|
217
217
|
Bus,
|
|
218
218
|
capturedEventCount,
|
|
219
219
|
ItemEventLogMaker,
|
|
@@ -33,7 +33,7 @@ let mockPublish: ReventlessInfra.CommandTopic.publishJsons = async cmds => {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// resolvedHandler populated in beforeAllAsync before tests run.
|
|
36
|
-
// makeHandler returns
|
|
36
|
+
// makeHandler returns invocationHandler<unit, 'ctx, unit> = (unit, ctx) => promise<unit>.
|
|
37
37
|
// The runtime handlerRef expects (JSON.t, unit) => promise<unit> — same in JS, safe to cast.
|
|
38
38
|
let resolvedHandler: ref<option<(unit, unit) => promise<unit>>> = ref(None)
|
|
39
39
|
|
|
@@ -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
|
|
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)
|
package/tests/components/outboundtranslationslice/OutboundTranslationSlicePlatformFixtures.res
CHANGED
|
@@ -39,7 +39,7 @@ module PlaceSpec = {
|
|
|
39
39
|
let commandSchema = commandSchema
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
module
|
|
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,
|
|
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 = (
|
package/tests/components/outboundtranslationslice/OutboundTranslationSlicePlatformFixtures.res.mjs
CHANGED
|
@@ -85,7 +85,7 @@ function decide(state, command) {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
let
|
|
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
|
-
|
|
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
|
|
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,
|
|
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
|
|
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
|
-
|
|
297
|
+
AddProductDecision,
|
|
298
298
|
ProductCatalogDcbSource,
|
|
299
299
|
ProductsReadModelSpec,
|
|
300
300
|
ProductsFromDcb,
|
|
@@ -64,7 +64,7 @@ let stateSchema$1 = Sury.$Metadata_set(stateSchema, DisplayName$Reventless.displ
|
|
|
64
64
|
let config = ReadModel$Reventless.config(undefined, undefined, undefined);
|
|
65
65
|
|
|
66
66
|
let OrdersViewSpec = {
|
|
67
|
-
|
|
67
|
+
Id: undefined,
|
|
68
68
|
name: name,
|
|
69
69
|
moduleUrl: moduleUrl,
|
|
70
70
|
consumedEventSchema: consumedEventSchema,
|
|
@@ -130,7 +130,7 @@ let OrdersViewMaker = SVMaker.Make({
|
|
|
130
130
|
name: name,
|
|
131
131
|
moduleUrl: moduleUrl,
|
|
132
132
|
stateSchema: stateSchema$1,
|
|
133
|
-
|
|
133
|
+
Id: {
|
|
134
134
|
schema: Id$Reventless.StringPure.schema,
|
|
135
135
|
make: prim => prim,
|
|
136
136
|
makeFromString: prim => prim,
|
|
@@ -20,7 +20,7 @@ module ItemEventLog = {
|
|
|
20
20
|
// ─────────────────────────────────────────────────────────────
|
|
21
21
|
|
|
22
22
|
module ItemsViewSpec = {
|
|
23
|
-
module
|
|
23
|
+
module Id = Reventless.Id.StringPure
|
|
24
24
|
let name = "ItemsView"
|
|
25
25
|
let moduleUrl: string = %raw(`import.meta.url`)
|
|
26
26
|
|
|
@@ -64,7 +64,7 @@ let stateSchema = Sury.$schema(s => ({
|
|
|
64
64
|
let config = ReadModel$Reventless.config(undefined, undefined, undefined);
|
|
65
65
|
|
|
66
66
|
let ItemsViewSpec = {
|
|
67
|
-
|
|
67
|
+
Id: undefined,
|
|
68
68
|
name: name,
|
|
69
69
|
moduleUrl: moduleUrl,
|
|
70
70
|
consumedEventSchema: consumedEventSchema,
|
|
@@ -133,7 +133,7 @@ let ItemsViewMaker = SVMaker.Make({
|
|
|
133
133
|
name: name,
|
|
134
134
|
moduleUrl: moduleUrl,
|
|
135
135
|
stateSchema: stateSchema,
|
|
136
|
-
|
|
136
|
+
Id: {
|
|
137
137
|
schema: Id$Reventless.StringPure.schema,
|
|
138
138
|
make: prim => prim,
|
|
139
139
|
makeFromString: prim => prim,
|
|
@@ -29,7 +29,7 @@ module ScoreEventLog = {
|
|
|
29
29
|
// ─────────────────────────────────────────────────────────────
|
|
30
30
|
|
|
31
31
|
module ScoresViewSpec = {
|
|
32
|
-
module
|
|
32
|
+
module Id = Reventless.Id.StringPure
|
|
33
33
|
let name = "ScoresView"
|
|
34
34
|
let moduleUrl: string = %raw(`import.meta.url`)
|
|
35
35
|
|
|
@@ -69,7 +69,7 @@ let subIdConfig = {
|
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
let ScoresViewSpec = {
|
|
72
|
-
|
|
72
|
+
Id: undefined,
|
|
73
73
|
name: name,
|
|
74
74
|
moduleUrl: moduleUrl,
|
|
75
75
|
consumedEventSchema: consumedEventSchema,
|
|
@@ -128,7 +128,7 @@ let ScoresViewMaker = SVMaker.Make({
|
|
|
128
128
|
name: name,
|
|
129
129
|
moduleUrl: moduleUrl,
|
|
130
130
|
stateSchema: stateSchema,
|
|
131
|
-
|
|
131
|
+
Id: {
|
|
132
132
|
schema: Id$Reventless.StringPure.schema,
|
|
133
133
|
make: prim => prim,
|
|
134
134
|
makeFromString: prim => prim,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
open ReventlessCore
|
|
2
2
|
open PluginSpec
|
|
3
3
|
open Plugin_Fixtures
|
|
4
|
-
module PluginTest = ReventlessGwt.
|
|
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("
|
|
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
|
|
5
|
-
import * as
|
|
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 =
|
|
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:
|
|
23
|
-
evolve:
|
|
24
|
-
decide:
|
|
22
|
+
initialState: PluginDecision$ReventlessCore.initialState,
|
|
23
|
+
evolve: PluginDecision$ReventlessCore.evolve,
|
|
24
|
+
decide: PluginDecision$ReventlessCore.decide,
|
|
25
25
|
snapshot: undefined,
|
|
26
|
-
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("
|
|
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.
|
|
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
|
|
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
|
|
6
|
+
import * as UiFragmentRegistry_Decision$ReventlessCore from "@reventlessdev/reventless-core/src/admin/UiFragmentRegistry/StateChange/UiFragmentRegistry_Decision.res.mjs";
|
|
7
7
|
|
|
8
|
-
let Test =
|
|
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:
|
|
18
|
-
decide:
|
|
17
|
+
evolve: UiFragmentRegistry_Decision$ReventlessCore.evolve,
|
|
18
|
+
decide: UiFragmentRegistry_Decision$ReventlessCore.decide
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
let manifest2_panels = [];
|
|
@@ -9,7 +9,7 @@ import * as UiFragments_Projection$ReventlessCore from "@reventlessdev/reventles
|
|
|
9
9
|
let Test = Projection_GWT$ReventlessGwt.Make({
|
|
10
10
|
name: UiFragments$ReventlessCore.name,
|
|
11
11
|
stateSchema: UiFragments$ReventlessCore.stateSchema,
|
|
12
|
-
|
|
12
|
+
Id: {
|
|
13
13
|
schema: Id$Reventless.StringPure.schema,
|
|
14
14
|
make: prim => prim,
|
|
15
15
|
makeFromString: prim => prim,
|