@reventlessdev/reventless-core 3.0.0-alpha.237 → 3.0.0-alpha.238
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 +12 -0
- package/package.json +7 -7
- package/src/Message.res +1 -1
- package/src/adapter/Monitoring/Monitoring.res +1 -1
- package/src/admin/UiFragmentRegistry/StateChangeSlice/UiFragmentRegistry.res +1 -1
- package/src/components/Aggregate/Aggregate_Callback.res +2 -2
- package/src/components/Api/ApiAllowedStatesHelpers.res +2 -3
- package/src/components/Api/ApiTargetStateHelpers.res +4 -3
- package/src/components/Dcb/Dcb_Builder.res +79 -16
- package/src/components/Dcb/Dcb_Builder.res.mjs +41 -5
- package/src/components/EventLog/EventLog.res +1 -1
- package/src/plugin/component/Plugin_Structure.res +269 -7
- package/src/plugin/component/Plugin_Structure.res.mjs +128 -1
- package/src/plugin/connect/PluginExtensionPoint_UiFragment.res +1 -1
- package/tests/aggregate/AggregateCacheTest.res +1 -1
- package/tests/aggregate/AggregateSnapshotTest.res +1 -1
- package/tests/commandgenerator/OwnerStampingTest.res +57 -0
- package/tests/commandgenerator/OwnerStampingTest.res.mjs +19 -0
- package/tests/message/MessageTest.res +1 -1
- package/tests/plugin/HeartbeatDisconnectGraceTest.res +1 -1
- package/tests/plugin/PluginStructureTest.res +164 -3
- package/tests/plugin/PluginStructureTest.res.mjs +170 -1
- package/tests/plugin/StateChangeSlice/PsDispatchShipment.res +31 -0
- package/tests/plugin/StateChangeSlice/PsDispatchShipment.res.mjs +73 -0
- package/tests/plugin/StateChangeSlice/PsShipOrder.res +16 -1
- package/tests/plugin/StateChangeSlice/PsShipOrder.res.mjs +7 -2
- package/tests/plugin/StateViewSlice/PsShipmentsView.res +26 -0
- package/tests/plugin/StateViewSlice/PsShipmentsView.res.mjs +101 -0
- package/tests/util/CsvStreamTest.res +1 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as S from "sury/src/S.res.mjs";
|
|
4
|
+
import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
|
|
5
|
+
import * as ReadModel$Reventless from "@reventlessdev/reventless-spec/src/components/ReadModel.res.mjs";
|
|
6
|
+
import * as StateAnnotations$Reventless from "@reventlessdev/reventless-spec/src/components/StateAnnotations.res.mjs";
|
|
7
|
+
|
|
8
|
+
let consumedEventSchema = S.union([
|
|
9
|
+
S.schema(s => ({
|
|
10
|
+
TAG: "ShipmentBooked",
|
|
11
|
+
shipmentId: s.m(DcbTag$Reventless.string)
|
|
12
|
+
})),
|
|
13
|
+
S.schema(s => ({
|
|
14
|
+
TAG: "ShipmentDispatched",
|
|
15
|
+
shipmentId: s.m(DcbTag$Reventless.string)
|
|
16
|
+
}))
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
let shipmentStatusSchema = S.union([
|
|
20
|
+
S.literal("Booked"),
|
|
21
|
+
S.literal("Dispatched")
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
let stateSchema = S.schema(s => ({
|
|
25
|
+
shipmentId: s.m(S.string),
|
|
26
|
+
shipmentStatus: s.m(shipmentStatusSchema)
|
|
27
|
+
}));
|
|
28
|
+
|
|
29
|
+
function project(param) {
|
|
30
|
+
let event = param.event;
|
|
31
|
+
if (event.TAG !== "ShipmentBooked") {
|
|
32
|
+
return [{
|
|
33
|
+
TAG: "Update",
|
|
34
|
+
_0: event.shipmentId,
|
|
35
|
+
_1: s => ({
|
|
36
|
+
shipmentId: s.shipmentId,
|
|
37
|
+
shipmentStatus: "Dispatched"
|
|
38
|
+
})
|
|
39
|
+
}];
|
|
40
|
+
}
|
|
41
|
+
let shipmentId = event.shipmentId;
|
|
42
|
+
return [{
|
|
43
|
+
TAG: "Set",
|
|
44
|
+
_0: shipmentId,
|
|
45
|
+
_1: {
|
|
46
|
+
shipmentId: shipmentId,
|
|
47
|
+
shipmentStatus: "Booked"
|
|
48
|
+
}
|
|
49
|
+
}];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
let config = ReadModel$Reventless.config(undefined, undefined, undefined);
|
|
53
|
+
|
|
54
|
+
let stateSchema$1 = S.Metadata.set(stateSchema, StateAnnotations$Reventless.stateAnnotationsId, {
|
|
55
|
+
ids: [],
|
|
56
|
+
compositeIds: [],
|
|
57
|
+
subIds: [],
|
|
58
|
+
compositeSubIds: [],
|
|
59
|
+
indexes: [],
|
|
60
|
+
hidden: [],
|
|
61
|
+
summary: [],
|
|
62
|
+
drillTargets: [],
|
|
63
|
+
drillTargetKeys: [],
|
|
64
|
+
collapsed: [],
|
|
65
|
+
scan: [],
|
|
66
|
+
scanSort: [],
|
|
67
|
+
semantic: [],
|
|
68
|
+
metric: [],
|
|
69
|
+
lifecycle: "shipmentStatus",
|
|
70
|
+
groupBy: undefined,
|
|
71
|
+
visibility: undefined,
|
|
72
|
+
live: undefined,
|
|
73
|
+
retired: undefined
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
let name = "Shipments";
|
|
77
|
+
|
|
78
|
+
let Id;
|
|
79
|
+
|
|
80
|
+
let subIdConfig;
|
|
81
|
+
|
|
82
|
+
let moduleUrl = "@reventlessdev/reventless-core/tests/plugin/StateViewSlice/PsShipmentsView.res.mjs";
|
|
83
|
+
|
|
84
|
+
let authorization = "AllowAuthenticated";
|
|
85
|
+
|
|
86
|
+
let visibility = "Public";
|
|
87
|
+
|
|
88
|
+
export {
|
|
89
|
+
name,
|
|
90
|
+
Id,
|
|
91
|
+
consumedEventSchema,
|
|
92
|
+
shipmentStatusSchema,
|
|
93
|
+
project,
|
|
94
|
+
config,
|
|
95
|
+
subIdConfig,
|
|
96
|
+
stateSchema$1 as stateSchema,
|
|
97
|
+
moduleUrl,
|
|
98
|
+
authorization,
|
|
99
|
+
visibility,
|
|
100
|
+
}
|
|
101
|
+
/* consumedEventSchema Not a pure module */
|