@reventlessdev/online-shop-dcb-ordering 1.0.0-alpha.228 → 1.0.0-alpha.229
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 +24 -0
- package/lib/bs/.compiler.log +2 -2
- package/lib/bs/compiler-info.json +1 -1
- package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmj +0 -0
- package/lib/bs/src/Extension/Products_Extension-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Extension/Products_Extension.ast +0 -0
- package/lib/bs/src/Extension/Products_Extension.res +1 -0
- package/lib/bs/src/Extension/Products_Extension.res.mjs +15 -0
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping.ast +0 -0
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping.res +3 -4
- package/lib/bs/src/ExtensionPoint/Orders_ExtensionPointMapping.res.mjs +15 -0
- package/lib/bs/src/Order/StateChangeSlice/CancelOrder-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChangeSlice/CancelOrder-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChangeSlice/CancelOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChangeSlice/CancelOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChangeSlice/ShipOrder-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChangeSlice/ShipOrder-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Order/StateChangeSlice/ShipOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Order/StateChangeSlice/ShipOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Plugin-OrderingPlugin.cmi +0 -0
- package/lib/bs/src/Plugin-OrderingPlugin.cmt +0 -0
- package/lib/bs/src/Plugin.res.mjs +9 -3
- package/lib/bs/tests/CatalogProduct/StateChangeSlice/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/StateChangeSlice/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/CatalogProduct/StateViewSlice/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/CatalogProduct/StateViewSlice/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/ChangeAddress_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/ChangeAddress_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/ChangeEmail_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/ChangeEmail_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/DeactivateCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/DeactivateCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/RegisterCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateChangeSlice/RegisterCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Customer/StateViewSlice/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Customer/StateViewSlice/Customers_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Extension/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Extension/Products_Extension_GWT.res.mjs +3 -1
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +3 -1
- package/lib/bs/tests/Order/AutomationSlice/AutoShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/AutomationSlice/AutoShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/OutboundTranslationSlice/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/OutboundTranslationSlice/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateChangeSlice/CancelOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChangeSlice/CancelOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateChangeSlice/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChangeSlice/PlaceOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateChangeSlice/ShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateChangeSlice/ShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/bs/tests/Order/StateViewSlice/Orders_GWT-OrderingPlugin.cmi +0 -0
- package/lib/bs/tests/Order/StateViewSlice/Orders_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/.compiler.log +2 -2
- package/lib/ocaml/AutoShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AutoShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/AvailableProducts_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CancelOrder-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CancelOrder-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CancelOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CancelOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/CancelOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/CancelOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeAddress_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeAddress_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ChangeEmail_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ChangeEmail_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Customers_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Customers_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/DeactivateCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/DeactivateCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping.ast +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping.res +3 -4
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_ExtensionPointMapping_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Orders_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Orders_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/PlaceOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/PlaceOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Plugin-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Plugin-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Products_Extension-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Products_Extension-OrderingPlugin.cmj +0 -0
- package/lib/ocaml/Products_Extension-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/Products_Extension.ast +0 -0
- package/lib/ocaml/Products_Extension.res +1 -0
- package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/Products_Extension_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/RegisterCustomer_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/RegisterCustomer_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SendOrderConfirmation_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SendOrderConfirmation_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder_Behavior-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder_Behavior-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/ShipOrder_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/ShipOrder_GWT-OrderingPlugin.cmt +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmi +0 -0
- package/lib/ocaml/SyncCatalogProduct_GWT-OrderingPlugin.cmt +0 -0
- package/package.json +8 -8
- package/src/Extension/Products_Extension.res +1 -0
- package/src/Extension/Products_Extension.res.mjs +15 -0
- package/src/ExtensionPoint/Orders_ExtensionPointMapping.res +3 -4
- package/src/ExtensionPoint/Orders_ExtensionPointMapping.res.mjs +15 -0
- package/src/Plugin.res.mjs +9 -3
- package/tests/Extension/Products_Extension_GWT.res.mjs +3 -1
- package/tests/ExtensionPoint/Orders_ExtensionPointMapping_GWT.res.mjs +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 1.0.0-alpha.229 (2026-08-27)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **ppx:** follow a let-bound action array merged into an arm's result ([230c72e](https://github.com/ReventlessDev/reventless-core/commit/230c72e25856d8ed20d0860e742b133b2c672d4a))
|
|
11
|
+
* feat(spec)!: reflect the command direction across a port, both halves ([f2fe258](https://github.com/ReventlessDev/reventless-core/commit/f2fe258d195b74f4a61488edee305665341020ea))
|
|
12
|
+
* feat(spec)!: read the port's translation table off the mapping's arms ([956348a](https://github.com/ReventlessDev/reventless-core/commit/956348a9fcb256cfff9db51809bdc27d73360e6c))
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* `ExtensionPointMapping.Mapping` gains `acceptedCommands` and
|
|
17
|
+
`ExtensionMapping.Mapping` gains `issuedCommands`; both are derived, so a
|
|
18
|
+
mapping the ppx can read needs no source change, and one it cannot names itself
|
|
19
|
+
at compile time. Definitions persisted before the two new def fields must be
|
|
20
|
+
re-emitted before a consumer can read them as present — and until then they
|
|
21
|
+
decode as None, which means unknown, not "issues nothing".
|
|
22
|
+
* `ExtensionPointMapping.Mapping` requires `publishedEvents` and
|
|
23
|
+
`ExtensionMapping.Mapping` requires `handledEvents`; the ppx injects both for
|
|
24
|
+
mappings it can read, so app code must build against the matching ppx. Plugin
|
|
25
|
+
definitions persisted before the new fields must be re-emitted before a consumer
|
|
26
|
+
reads them as present.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
# 1.0.0-alpha.228 (2026-08-23)
|
|
7
31
|
|
|
8
32
|
**Note:** Version bump only for package @reventlessdev/online-shop-dcb-ordering
|
package/lib/bs/.compiler.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Start(
|
|
2
|
-
#Done(
|
|
1
|
+
#Start(1787790330016)
|
|
2
|
+
#Done(1787790332856)
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
"bsc_hash": "75e3a59c95cc953608fd3dd6ea6ed68141bba4414a20a52f114261b8a48385fa",
|
|
5
5
|
"rescript_config_hash": "2b45634c4ef9d26c69e2cd8282eb5d077ce9cf087ded0065001d0f0d889e241c",
|
|
6
6
|
"runtime_path": "/home/runner/work/reventless-core/reventless-core/node_modules/@rescript/runtime",
|
|
7
|
-
"generated_at": "
|
|
7
|
+
"generated_at": "1787790332858"
|
|
8
8
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -25,11 +25,26 @@ function mapIncomingEvent(_id, event, _meta, _pluginDef, _queryEngine) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
let handledEvents = [
|
|
29
|
+
{
|
|
30
|
+
name: "ProductBecameAvailable",
|
|
31
|
+
toCommandTypes: ["SyncNewProduct"]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "ProductPriceChanged",
|
|
35
|
+
toCommandTypes: ["ChangeSyncedPrice"]
|
|
36
|
+
}
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
let issuedCommands = [];
|
|
40
|
+
|
|
28
41
|
let Mapping = {
|
|
29
42
|
ExtensionPoint: undefined,
|
|
30
43
|
Delegate: undefined,
|
|
31
44
|
mapIncomingEvent: mapIncomingEvent,
|
|
32
45
|
mapOutgoingEvent: undefined,
|
|
46
|
+
handledEvents: handledEvents,
|
|
47
|
+
issuedCommands: issuedCommands,
|
|
33
48
|
delegateModuleUrl: SyncCatalogProduct$OrderingPlugin.moduleUrl,
|
|
34
49
|
moduleUrl: "@reventlessdev/online-shop-dcb-ordering/src/Extension/Products_Extension.res.mjs"
|
|
35
50
|
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
// Maps internal Ordering events to the
|
|
2
|
-
//
|
|
1
|
+
// Maps internal Ordering events to the Orders_ExtensionPoint public API, one
|
|
2
|
+
// published event per product in a batch.
|
|
3
3
|
@@reventless.spec
|
|
4
4
|
|
|
5
5
|
module ExtensionPoint = OrderingSpec.Orders_ExtensionPoint
|
|
6
6
|
|
|
7
|
-
// DCB adapter
|
|
8
|
-
// Only the events relevant to the extension point are included.
|
|
7
|
+
// DCB adapter carrying only the events this port maps.
|
|
9
8
|
module Delegate = {
|
|
10
9
|
let name = "OrderingDcbEventLog"
|
|
11
10
|
@schema
|
|
@@ -66,6 +66,19 @@ let mapOutgoingEvent = (_id, event, _meta, _queryEngine) => {
|
|
|
66
66
|
}));
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
+
let publishedEvents = [
|
|
70
|
+
{
|
|
71
|
+
name: "ItemOrdered",
|
|
72
|
+
fromEventTypes: ["OrderPlaced"]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "ItemOrderCancelled",
|
|
76
|
+
fromEventTypes: ["OrderCancelled"]
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
let acceptedCommands = [];
|
|
81
|
+
|
|
69
82
|
let name = "Orders";
|
|
70
83
|
|
|
71
84
|
let Id;
|
|
@@ -82,5 +95,7 @@ export {
|
|
|
82
95
|
mapIncomingCommand,
|
|
83
96
|
mapOutgoingEvent,
|
|
84
97
|
moduleUrl,
|
|
98
|
+
publishedEvents,
|
|
99
|
+
acceptedCommands,
|
|
85
100
|
}
|
|
86
101
|
/* commandSchema Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -251,7 +251,9 @@ function Make(Platform) {
|
|
|
251
251
|
},
|
|
252
252
|
moduleUrl: Orders_ExtensionPointMapping$OrderingPlugin.moduleUrl,
|
|
253
253
|
mapIncomingCommand: Orders_ExtensionPointMapping$OrderingPlugin.mapIncomingCommand,
|
|
254
|
-
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent
|
|
254
|
+
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent,
|
|
255
|
+
publishedEvents: Orders_ExtensionPointMapping$OrderingPlugin.publishedEvents,
|
|
256
|
+
acceptedCommands: Orders_ExtensionPointMapping$OrderingPlugin.acceptedCommands
|
|
255
257
|
});
|
|
256
258
|
let Products_Extension = Platform.Extension.Make({
|
|
257
259
|
ExtensionPoint: {
|
|
@@ -273,7 +275,9 @@ function Make(Platform) {
|
|
|
273
275
|
moduleUrl: Products_Extension$OrderingPlugin.Mapping.moduleUrl,
|
|
274
276
|
delegateModuleUrl: Products_Extension$OrderingPlugin.Mapping.delegateModuleUrl,
|
|
275
277
|
mapIncomingEvent: Products_Extension$OrderingPlugin.Mapping.mapIncomingEvent,
|
|
276
|
-
mapOutgoingEvent: Products_Extension$OrderingPlugin.Mapping.mapOutgoingEvent
|
|
278
|
+
mapOutgoingEvent: Products_Extension$OrderingPlugin.Mapping.mapOutgoingEvent,
|
|
279
|
+
handledEvents: Products_Extension$OrderingPlugin.Mapping.handledEvents,
|
|
280
|
+
issuedCommands: Products_Extension$OrderingPlugin.Mapping.issuedCommands
|
|
277
281
|
});
|
|
278
282
|
let pluginStructure = Platform.Plugin.makePluginDefinition("Ordering", undefined, undefined, [
|
|
279
283
|
AvailableProductsSlice,
|
|
@@ -307,7 +311,9 @@ function Make(Platform) {
|
|
|
307
311
|
},
|
|
308
312
|
moduleUrl: Orders_ExtensionPointMapping$OrderingPlugin.moduleUrl,
|
|
309
313
|
mapIncomingCommand: Orders_ExtensionPointMapping$OrderingPlugin.mapIncomingCommand,
|
|
310
|
-
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent
|
|
314
|
+
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent,
|
|
315
|
+
publishedEvents: Orders_ExtensionPointMapping$OrderingPlugin.publishedEvents,
|
|
316
|
+
acceptedCommands: Orders_ExtensionPointMapping$OrderingPlugin.acceptedCommands
|
|
311
317
|
}], Object.fromEntries([
|
|
312
318
|
[
|
|
313
319
|
"AutoShipOrder",
|
package/lib/bs/tests/CatalogProduct/StateChangeSlice/SyncCatalogProduct_GWT-OrderingPlugin.cmi
CHANGED
|
Binary file
|
package/lib/bs/tests/CatalogProduct/StateChangeSlice/SyncCatalogProduct_GWT-OrderingPlugin.cmt
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -26,7 +26,9 @@ let include = Delegate_GWT$ReventlessGwt.FromExtension({
|
|
|
26
26
|
moduleUrl: Products_Extension$OrderingPlugin.Mapping.moduleUrl,
|
|
27
27
|
delegateModuleUrl: Products_Extension$OrderingPlugin.Mapping.delegateModuleUrl,
|
|
28
28
|
mapIncomingEvent: Products_Extension$OrderingPlugin.Mapping.mapIncomingEvent,
|
|
29
|
-
mapOutgoingEvent: Products_Extension$OrderingPlugin.Mapping.mapOutgoingEvent
|
|
29
|
+
mapOutgoingEvent: Products_Extension$OrderingPlugin.Mapping.mapOutgoingEvent,
|
|
30
|
+
handledEvents: Products_Extension$OrderingPlugin.Mapping.handledEvents,
|
|
31
|
+
issuedCommands: Products_Extension$OrderingPlugin.Mapping.issuedCommands
|
|
30
32
|
});
|
|
31
33
|
|
|
32
34
|
let describe = include.describe;
|
|
Binary file
|
|
Binary file
|
|
@@ -24,7 +24,9 @@ let include = Delegate_GWT$ReventlessGwt.FromExtensionPoint({
|
|
|
24
24
|
},
|
|
25
25
|
moduleUrl: Orders_ExtensionPointMapping$OrderingPlugin.moduleUrl,
|
|
26
26
|
mapIncomingCommand: Orders_ExtensionPointMapping$OrderingPlugin.mapIncomingCommand,
|
|
27
|
-
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent
|
|
27
|
+
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent,
|
|
28
|
+
publishedEvents: Orders_ExtensionPointMapping$OrderingPlugin.publishedEvents,
|
|
29
|
+
acceptedCommands: Orders_ExtensionPointMapping$OrderingPlugin.acceptedCommands
|
|
28
30
|
});
|
|
29
31
|
|
|
30
32
|
let describe = include.describe;
|
|
Binary file
|
|
Binary file
|
package/lib/bs/tests/Order/OutboundTranslationSlice/SendOrderConfirmation_GWT-OrderingPlugin.cmi
CHANGED
|
Binary file
|
package/lib/bs/tests/Order/OutboundTranslationSlice/SendOrderConfirmation_GWT-OrderingPlugin.cmt
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/ocaml/.compiler.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Start(
|
|
2
|
-
#Done(
|
|
1
|
+
#Start(1787790330016)
|
|
2
|
+
#Done(1787790332856)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
// Maps internal Ordering events to the
|
|
2
|
-
//
|
|
1
|
+
// Maps internal Ordering events to the Orders_ExtensionPoint public API, one
|
|
2
|
+
// published event per product in a batch.
|
|
3
3
|
@@reventless.spec
|
|
4
4
|
|
|
5
5
|
module ExtensionPoint = OrderingSpec.Orders_ExtensionPoint
|
|
6
6
|
|
|
7
|
-
// DCB adapter
|
|
8
|
-
// Only the events relevant to the extension point are included.
|
|
7
|
+
// DCB adapter carrying only the events this port maps.
|
|
9
8
|
module Delegate = {
|
|
10
9
|
let name = "OrderingDcbEventLog"
|
|
11
10
|
@schema
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/online-shop-dcb-ordering",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.229",
|
|
4
4
|
"description": "Online Shop example — Ordering bounded context (Customer & Order) using the DCB pattern",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"sury": "11.0.0-rc.2",
|
|
24
|
-
"@reventlessdev/online-shop-dcb-ordering-spec": "1.0.0-alpha.
|
|
24
|
+
"@reventlessdev/online-shop-dcb-ordering-spec": "1.0.0-alpha.124",
|
|
25
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.152",
|
|
25
26
|
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.19",
|
|
26
|
-
"@reventlessdev/
|
|
27
|
-
"@reventlessdev/
|
|
28
|
-
"@reventlessdev/reventless-
|
|
29
|
-
"@reventlessdev/reventless-spec": "3.0.0-alpha.
|
|
30
|
-
"@reventlessdev/reventless-local": "3.0.0-alpha.238"
|
|
27
|
+
"@reventlessdev/reventless-gwt": "1.0.0-alpha.198",
|
|
28
|
+
"@reventlessdev/online-shop-dcb-catalog-spec": "1.0.0-alpha.124",
|
|
29
|
+
"@reventlessdev/reventless-local": "3.0.0-alpha.239",
|
|
30
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.124"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"rescript": "12.3.0",
|
|
34
34
|
"sury-ppx": "11.0.0-rc.2",
|
|
35
|
-
"@reventlessdev/reventless-ppx": "1.0.0-alpha.
|
|
35
|
+
"@reventlessdev/reventless-ppx": "1.0.0-alpha.74"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"rescript": "12.3.0"
|
|
@@ -25,11 +25,26 @@ function mapIncomingEvent(_id, event, _meta, _pluginDef, _queryEngine) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
let handledEvents = [
|
|
29
|
+
{
|
|
30
|
+
name: "ProductBecameAvailable",
|
|
31
|
+
toCommandTypes: ["SyncNewProduct"]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "ProductPriceChanged",
|
|
35
|
+
toCommandTypes: ["ChangeSyncedPrice"]
|
|
36
|
+
}
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
let issuedCommands = [];
|
|
40
|
+
|
|
28
41
|
let Mapping = {
|
|
29
42
|
ExtensionPoint: undefined,
|
|
30
43
|
Delegate: undefined,
|
|
31
44
|
mapIncomingEvent: mapIncomingEvent,
|
|
32
45
|
mapOutgoingEvent: undefined,
|
|
46
|
+
handledEvents: handledEvents,
|
|
47
|
+
issuedCommands: issuedCommands,
|
|
33
48
|
delegateModuleUrl: SyncCatalogProduct$OrderingPlugin.moduleUrl,
|
|
34
49
|
moduleUrl: "@reventlessdev/online-shop-dcb-ordering/src/Extension/Products_Extension.res.mjs"
|
|
35
50
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
// Maps internal Ordering events to the
|
|
2
|
-
//
|
|
1
|
+
// Maps internal Ordering events to the Orders_ExtensionPoint public API, one
|
|
2
|
+
// published event per product in a batch.
|
|
3
3
|
@@reventless.spec
|
|
4
4
|
|
|
5
5
|
module ExtensionPoint = OrderingSpec.Orders_ExtensionPoint
|
|
6
6
|
|
|
7
|
-
// DCB adapter
|
|
8
|
-
// Only the events relevant to the extension point are included.
|
|
7
|
+
// DCB adapter carrying only the events this port maps.
|
|
9
8
|
module Delegate = {
|
|
10
9
|
let name = "OrderingDcbEventLog"
|
|
11
10
|
@schema
|
|
@@ -66,6 +66,19 @@ let mapOutgoingEvent = (_id, event, _meta, _queryEngine) => {
|
|
|
66
66
|
}));
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
+
let publishedEvents = [
|
|
70
|
+
{
|
|
71
|
+
name: "ItemOrdered",
|
|
72
|
+
fromEventTypes: ["OrderPlaced"]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "ItemOrderCancelled",
|
|
76
|
+
fromEventTypes: ["OrderCancelled"]
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
let acceptedCommands = [];
|
|
81
|
+
|
|
69
82
|
let name = "Orders";
|
|
70
83
|
|
|
71
84
|
let Id;
|
|
@@ -82,5 +95,7 @@ export {
|
|
|
82
95
|
mapIncomingCommand,
|
|
83
96
|
mapOutgoingEvent,
|
|
84
97
|
moduleUrl,
|
|
98
|
+
publishedEvents,
|
|
99
|
+
acceptedCommands,
|
|
85
100
|
}
|
|
86
101
|
/* commandSchema Not a pure module */
|
package/src/Plugin.res.mjs
CHANGED
|
@@ -251,7 +251,9 @@ function Make(Platform) {
|
|
|
251
251
|
},
|
|
252
252
|
moduleUrl: Orders_ExtensionPointMapping$OrderingPlugin.moduleUrl,
|
|
253
253
|
mapIncomingCommand: Orders_ExtensionPointMapping$OrderingPlugin.mapIncomingCommand,
|
|
254
|
-
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent
|
|
254
|
+
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent,
|
|
255
|
+
publishedEvents: Orders_ExtensionPointMapping$OrderingPlugin.publishedEvents,
|
|
256
|
+
acceptedCommands: Orders_ExtensionPointMapping$OrderingPlugin.acceptedCommands
|
|
255
257
|
});
|
|
256
258
|
let Products_Extension = Platform.Extension.Make({
|
|
257
259
|
ExtensionPoint: {
|
|
@@ -273,7 +275,9 @@ function Make(Platform) {
|
|
|
273
275
|
moduleUrl: Products_Extension$OrderingPlugin.Mapping.moduleUrl,
|
|
274
276
|
delegateModuleUrl: Products_Extension$OrderingPlugin.Mapping.delegateModuleUrl,
|
|
275
277
|
mapIncomingEvent: Products_Extension$OrderingPlugin.Mapping.mapIncomingEvent,
|
|
276
|
-
mapOutgoingEvent: Products_Extension$OrderingPlugin.Mapping.mapOutgoingEvent
|
|
278
|
+
mapOutgoingEvent: Products_Extension$OrderingPlugin.Mapping.mapOutgoingEvent,
|
|
279
|
+
handledEvents: Products_Extension$OrderingPlugin.Mapping.handledEvents,
|
|
280
|
+
issuedCommands: Products_Extension$OrderingPlugin.Mapping.issuedCommands
|
|
277
281
|
});
|
|
278
282
|
let pluginStructure = Platform.Plugin.makePluginDefinition("Ordering", undefined, undefined, [
|
|
279
283
|
AvailableProductsSlice,
|
|
@@ -307,7 +311,9 @@ function Make(Platform) {
|
|
|
307
311
|
},
|
|
308
312
|
moduleUrl: Orders_ExtensionPointMapping$OrderingPlugin.moduleUrl,
|
|
309
313
|
mapIncomingCommand: Orders_ExtensionPointMapping$OrderingPlugin.mapIncomingCommand,
|
|
310
|
-
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent
|
|
314
|
+
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent,
|
|
315
|
+
publishedEvents: Orders_ExtensionPointMapping$OrderingPlugin.publishedEvents,
|
|
316
|
+
acceptedCommands: Orders_ExtensionPointMapping$OrderingPlugin.acceptedCommands
|
|
311
317
|
}], Object.fromEntries([
|
|
312
318
|
[
|
|
313
319
|
"AutoShipOrder",
|
|
@@ -26,7 +26,9 @@ let include = Delegate_GWT$ReventlessGwt.FromExtension({
|
|
|
26
26
|
moduleUrl: Products_Extension$OrderingPlugin.Mapping.moduleUrl,
|
|
27
27
|
delegateModuleUrl: Products_Extension$OrderingPlugin.Mapping.delegateModuleUrl,
|
|
28
28
|
mapIncomingEvent: Products_Extension$OrderingPlugin.Mapping.mapIncomingEvent,
|
|
29
|
-
mapOutgoingEvent: Products_Extension$OrderingPlugin.Mapping.mapOutgoingEvent
|
|
29
|
+
mapOutgoingEvent: Products_Extension$OrderingPlugin.Mapping.mapOutgoingEvent,
|
|
30
|
+
handledEvents: Products_Extension$OrderingPlugin.Mapping.handledEvents,
|
|
31
|
+
issuedCommands: Products_Extension$OrderingPlugin.Mapping.issuedCommands
|
|
30
32
|
});
|
|
31
33
|
|
|
32
34
|
let describe = include.describe;
|
|
@@ -24,7 +24,9 @@ let include = Delegate_GWT$ReventlessGwt.FromExtensionPoint({
|
|
|
24
24
|
},
|
|
25
25
|
moduleUrl: Orders_ExtensionPointMapping$OrderingPlugin.moduleUrl,
|
|
26
26
|
mapIncomingCommand: Orders_ExtensionPointMapping$OrderingPlugin.mapIncomingCommand,
|
|
27
|
-
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent
|
|
27
|
+
mapOutgoingEvent: Orders_ExtensionPointMapping$OrderingPlugin.mapOutgoingEvent,
|
|
28
|
+
publishedEvents: Orders_ExtensionPointMapping$OrderingPlugin.publishedEvents,
|
|
29
|
+
acceptedCommands: Orders_ExtensionPointMapping$OrderingPlugin.acceptedCommands
|
|
28
30
|
});
|
|
29
31
|
|
|
30
32
|
let describe = include.describe;
|