@reventlessdev/online-shop-aggregates-catalog 3.0.0-alpha.243 → 3.0.0-alpha.245
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 +15 -0
- package/lib/bs/.compiler.log +2 -2
- package/lib/bs/CatalogPlugin.cmi +0 -0
- package/lib/bs/CatalogPlugin.cmt +0 -0
- package/lib/bs/CatalogPlugin.mlmap +1 -0
- package/lib/bs/compiler-info.json +1 -1
- package/lib/bs/src/Category/Aggregate/Category-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Category/Aggregate/Category-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Category/Aggregate/Category.ast +0 -0
- package/lib/bs/src/Category/Aggregate/Category.res +2 -0
- package/lib/bs/src/Category/Aggregate/Category_Behavior-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Category/Aggregate/Category_Behavior-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Category/CategoryId-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Category/CategoryId-CatalogPlugin.cmj +0 -0
- package/lib/bs/src/Category/CategoryId-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Category/CategoryId.ast +0 -0
- package/lib/bs/src/Category/CategoryId.res +4 -0
- package/lib/bs/src/Category/CategoryId.res.mjs +29 -0
- package/lib/bs/src/Category/ReadModel/Categories-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Category/ReadModel/Categories-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Category/ReadModel/Categories.ast +0 -0
- package/lib/bs/src/Category/ReadModel/Categories.res +2 -0
- package/lib/bs/src/Category/ReadModel/Categories_Projections-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Category/ReadModel/Categories_Projections-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Category/ReadModel/Categories_Projections.res.mjs +4 -4
- package/lib/bs/src/Extension/Orders_Extension-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Extension/Orders_Extension-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/ExtensionPoint/Products_ExtensionPointMapping-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/ExtensionPoint/Products_ExtensionPointMapping-CatalogPlugin.cmj +0 -0
- package/lib/bs/src/ExtensionPoint/Products_ExtensionPointMapping-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/ExtensionPoint/Products_ExtensionPointMapping.ast +0 -0
- package/lib/bs/src/ExtensionPoint/Products_ExtensionPointMapping.res +9 -2
- package/lib/bs/src/ExtensionPoint/Products_ExtensionPointMapping.res.mjs +4 -3
- package/lib/bs/src/LifecycleModel-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/LifecycleModel-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Plugin-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Plugin-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Plugin.res.mjs +15 -14
- package/lib/bs/src/Product/Aggregate/Product-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Product/Aggregate/Product-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Product/Aggregate/Product.ast +0 -0
- package/lib/bs/src/Product/Aggregate/Product.res +2 -0
- package/lib/bs/src/Product/Aggregate/Product_Behavior-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Product/Aggregate/Product_Behavior-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Product/ReadModel/Products-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Product/ReadModel/Products-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Product/ReadModel/Products.ast +0 -0
- package/lib/bs/src/Product/ReadModel/Products.res +2 -0
- package/lib/bs/src/Product/ReadModel/Products_Projections-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Product/ReadModel/Products_Projections-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Product/ReadModel/Products_Projections.res.mjs +4 -4
- package/lib/bs/src/ProductDemand/Aggregate/ProductDemand-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/ProductDemand/Aggregate/ProductDemand-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/ProductDemand/Aggregate/ProductDemand.ast +0 -0
- package/lib/bs/src/ProductDemand/Aggregate/ProductDemand.res +2 -0
- package/lib/bs/src/ProductDemand/Aggregate/ProductDemand_Behavior-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/ProductDemand/Aggregate/ProductDemand_Behavior-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/ProductDemand/ReadModel/ProductDemands-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/ProductDemand/ReadModel/ProductDemands-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/ProductDemand/ReadModel/ProductDemands.ast +0 -0
- package/lib/bs/src/ProductDemand/ReadModel/ProductDemands.res +2 -0
- package/lib/bs/src/ProductDemand/ReadModel/ProductDemands_Projections-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/ProductDemand/ReadModel/ProductDemands_Projections-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/ProductDemand/ReadModel/ProductDemands_Projections.res.mjs +6 -6
- package/lib/bs/src/Task/ImportProducts-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Task/ImportProducts-CatalogPlugin.cmt +0 -0
- package/lib/bs/tests/Category/Aggregate/Category_GWT-CatalogPlugin.cmi +0 -0
- package/lib/bs/tests/Category/Aggregate/Category_GWT-CatalogPlugin.cmt +0 -0
- package/lib/bs/tests/Category/ReadModel/Categories_GWT-CatalogPlugin.cmi +0 -0
- package/lib/bs/tests/Category/ReadModel/Categories_GWT-CatalogPlugin.cmt +0 -0
- package/lib/bs/tests/Extension/Orders_Extension_GWT-CatalogPlugin.cmi +0 -0
- package/lib/bs/tests/Extension/Orders_Extension_GWT-CatalogPlugin.cmt +0 -0
- package/lib/bs/tests/Extension/Orders_Extension_GWT.res.mjs +2 -2
- package/lib/bs/tests/ExtensionPoint/Products_ExtensionPointMapping_GWT-CatalogPlugin.cmi +0 -0
- package/lib/bs/tests/ExtensionPoint/Products_ExtensionPointMapping_GWT-CatalogPlugin.cmt +0 -0
- package/lib/bs/tests/ExtensionPoint/Products_ExtensionPointMapping_GWT.ast +0 -0
- package/lib/bs/tests/ExtensionPoint/Products_ExtensionPointMapping_GWT.res +4 -2
- package/lib/bs/tests/ExtensionPoint/Products_ExtensionPointMapping_GWT.res.mjs +7 -4
- package/lib/bs/tests/Product/Aggregate/Product_GWT-CatalogPlugin.cmi +0 -0
- package/lib/bs/tests/Product/Aggregate/Product_GWT-CatalogPlugin.cmt +0 -0
- package/lib/bs/tests/Product/ReadModel/Products_GWT-CatalogPlugin.cmi +0 -0
- package/lib/bs/tests/Product/ReadModel/Products_GWT-CatalogPlugin.cmt +0 -0
- package/lib/bs/tests/ProductDemand/Aggregate/ProductDemand_GWT-CatalogPlugin.cmi +0 -0
- package/lib/bs/tests/ProductDemand/Aggregate/ProductDemand_GWT-CatalogPlugin.cmt +0 -0
- package/lib/bs/tests/ProductDemand/ReadModel/ProductDemands_GWT-CatalogPlugin.cmi +0 -0
- package/lib/bs/tests/ProductDemand/ReadModel/ProductDemands_GWT-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/.compiler.log +2 -2
- package/lib/ocaml/CatalogPlugin.cmi +0 -0
- package/lib/ocaml/CatalogPlugin.cmt +0 -0
- package/lib/ocaml/CatalogPlugin.mlmap +1 -0
- package/lib/ocaml/Categories-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Categories-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Categories.ast +0 -0
- package/lib/ocaml/Categories.res +2 -0
- package/lib/ocaml/Categories_GWT-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Categories_GWT-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Categories_Projections-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Categories_Projections-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Category-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Category-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Category.ast +0 -0
- package/lib/ocaml/Category.res +2 -0
- package/lib/ocaml/CategoryId-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/CategoryId-CatalogPlugin.cmj +0 -0
- package/lib/ocaml/CategoryId-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/CategoryId.ast +0 -0
- package/lib/ocaml/CategoryId.res +4 -0
- package/lib/ocaml/Category_Behavior-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Category_Behavior-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Category_GWT-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Category_GWT-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/ImportProducts-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/ImportProducts-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/LifecycleModel-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/LifecycleModel-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Orders_Extension-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Orders_Extension-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Orders_Extension_GWT-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Orders_Extension_GWT-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Plugin-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Plugin-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Product-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Product-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Product.ast +0 -0
- package/lib/ocaml/Product.res +2 -0
- package/lib/ocaml/ProductDemand-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/ProductDemand-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/ProductDemand.ast +0 -0
- package/lib/ocaml/ProductDemand.res +2 -0
- package/lib/ocaml/ProductDemand_Behavior-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/ProductDemand_Behavior-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/ProductDemand_GWT-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/ProductDemand_GWT-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/ProductDemands-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/ProductDemands-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/ProductDemands.ast +0 -0
- package/lib/ocaml/ProductDemands.res +2 -0
- package/lib/ocaml/ProductDemands_GWT-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/ProductDemands_GWT-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/ProductDemands_Projections-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/ProductDemands_Projections-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Product_Behavior-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Product_Behavior-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Product_GWT-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Product_GWT-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Products-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Products-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Products.ast +0 -0
- package/lib/ocaml/Products.res +2 -0
- package/lib/ocaml/Products_ExtensionPointMapping-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Products_ExtensionPointMapping-CatalogPlugin.cmj +0 -0
- package/lib/ocaml/Products_ExtensionPointMapping-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Products_ExtensionPointMapping.ast +0 -0
- package/lib/ocaml/Products_ExtensionPointMapping.res +9 -2
- package/lib/ocaml/Products_ExtensionPointMapping_GWT-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Products_ExtensionPointMapping_GWT-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Products_ExtensionPointMapping_GWT.ast +0 -0
- package/lib/ocaml/Products_ExtensionPointMapping_GWT.res +4 -2
- package/lib/ocaml/Products_GWT-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Products_GWT-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Products_Projections-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Products_Projections-CatalogPlugin.cmt +0 -0
- package/package.json +8 -8
- package/src/Category/Aggregate/Category.res +2 -0
- package/src/Category/CategoryId.res +4 -0
- package/src/Category/CategoryId.res.mjs +29 -0
- package/src/Category/ReadModel/Categories.res +2 -0
- package/src/Category/ReadModel/Categories_Projections.res.mjs +4 -4
- package/src/ExtensionPoint/Products_ExtensionPointMapping.res +9 -2
- package/src/ExtensionPoint/Products_ExtensionPointMapping.res.mjs +4 -3
- package/src/Plugin.res.mjs +15 -14
- package/src/Product/Aggregate/Product.res +2 -0
- package/src/Product/ReadModel/Products.res +2 -0
- package/src/Product/ReadModel/Products_Projections.res.mjs +4 -4
- package/src/ProductDemand/Aggregate/ProductDemand.res +2 -0
- package/src/ProductDemand/ReadModel/ProductDemands.res +2 -0
- package/src/ProductDemand/ReadModel/ProductDemands_Projections.res.mjs +6 -6
- package/tests/Extension/Orders_Extension_GWT.res.mjs +2 -2
- package/tests/ExtensionPoint/Products_ExtensionPointMapping_GWT.res +4 -2
- package/tests/ExtensionPoint/Products_ExtensionPointMapping_GWT.res.mjs +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
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
|
+
# 3.0.0-alpha.245 (2026-09-21)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **examples:** the aggregates example types its ids ([10795b4](https://github.com/ReventlessDev/reventless-core/commit/10795b40e4991e7255c851ef9b37f2f1836da613))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# 3.0.0-alpha.244 (2026-09-21)
|
|
14
|
+
|
|
15
|
+
**Note:** Version bump only for package @reventlessdev/online-shop-aggregates-catalog
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
# 3.0.0-alpha.243 (2026-09-20)
|
|
7
22
|
|
|
8
23
|
**Note:** Version bump only for package @reventlessdev/online-shop-aggregates-catalog
|
package/lib/bs/.compiler.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Start(
|
|
2
|
-
#Done(
|
|
1
|
+
#Start(1789994023812)
|
|
2
|
+
#Done(1789994029825)
|
package/lib/bs/CatalogPlugin.cmi
CHANGED
|
Binary file
|
package/lib/bs/CatalogPlugin.cmt
CHANGED
|
Binary file
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
"bsc_hash": "75e3a59c95cc953608fd3dd6ea6ed68141bba4414a20a52f114261b8a48385fa",
|
|
5
5
|
"rescript_config_hash": "50d5358a2cbe328e82ae9b442e4615b86dbfe6b2ce05e9eca04a0c78da0e4708",
|
|
6
6
|
"runtime_path": "/home/runner/work/reventless-core/reventless-core/node_modules/@rescript/runtime",
|
|
7
|
-
"generated_at": "
|
|
7
|
+
"generated_at": "1789994029826"
|
|
8
8
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
4
|
+
|
|
5
|
+
let include = Id$Reventless.Make({
|
|
6
|
+
key: "categoryId"
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
let schema = include.schema;
|
|
10
|
+
|
|
11
|
+
let make = include.make;
|
|
12
|
+
|
|
13
|
+
let makeFromString = include.makeFromString;
|
|
14
|
+
|
|
15
|
+
let toString = include.toString;
|
|
16
|
+
|
|
17
|
+
let cmp = include.cmp;
|
|
18
|
+
|
|
19
|
+
let key = include.key;
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
schema,
|
|
23
|
+
make,
|
|
24
|
+
makeFromString,
|
|
25
|
+
toString,
|
|
26
|
+
cmp,
|
|
27
|
+
key,
|
|
28
|
+
}
|
|
29
|
+
/* include Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
4
3
|
import * as Projection$Reventless from "@reventlessdev/reventless-spec/src/types/Projection.res.mjs";
|
|
5
4
|
import * as Category$CatalogPlugin from "../Aggregate/Category.res.mjs";
|
|
6
5
|
import * as Categories$CatalogPlugin from "./Categories.res.mjs";
|
|
6
|
+
import * as CategoryId$CatalogPlugin from "../CategoryId.res.mjs";
|
|
7
7
|
|
|
8
8
|
let M = Projection$Reventless.Mappings.Make({
|
|
9
|
-
Id:
|
|
9
|
+
Id: CategoryId$CatalogPlugin,
|
|
10
10
|
name: Categories$CatalogPlugin.name,
|
|
11
11
|
stateSchema: Categories$CatalogPlugin.stateSchema,
|
|
12
12
|
subIdConfig: undefined
|
|
@@ -47,11 +47,11 @@ function project(param) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
let CategoryMapping = Projection$Reventless.Mapping.Make({
|
|
50
|
-
Id:
|
|
50
|
+
Id: CategoryId$CatalogPlugin,
|
|
51
51
|
name: Category$CatalogPlugin.name,
|
|
52
52
|
eventSchema: Category$CatalogPlugin.eventSchema
|
|
53
53
|
})({
|
|
54
|
-
Id:
|
|
54
|
+
Id: CategoryId$CatalogPlugin,
|
|
55
55
|
name: Categories$CatalogPlugin.name,
|
|
56
56
|
stateSchema: Categories$CatalogPlugin.stateSchema,
|
|
57
57
|
subIdConfig: undefined
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -12,13 +12,20 @@ let mapOutgoingEvent = Some(
|
|
|
12
12
|
| Product.Added({name, price}) => [
|
|
13
13
|
PublishEvent(
|
|
14
14
|
id,
|
|
15
|
-
CatalogSpec.Products_ExtensionPoint.ProductBecameAvailable({
|
|
15
|
+
CatalogSpec.Products_ExtensionPoint.ProductBecameAvailable({
|
|
16
|
+
productId: CatalogSpec.ProductId.makeFromString(id),
|
|
17
|
+
name,
|
|
18
|
+
price,
|
|
19
|
+
}),
|
|
16
20
|
),
|
|
17
21
|
]
|
|
18
22
|
| Product.PriceUpdated({price}) => [
|
|
19
23
|
PublishEvent(
|
|
20
24
|
id,
|
|
21
|
-
CatalogSpec.Products_ExtensionPoint.ProductPriceChanged({
|
|
25
|
+
CatalogSpec.Products_ExtensionPoint.ProductPriceChanged({
|
|
26
|
+
productId: CatalogSpec.ProductId.makeFromString(id),
|
|
27
|
+
price,
|
|
28
|
+
}),
|
|
22
29
|
),
|
|
23
30
|
]
|
|
24
31
|
| _ => []
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
+
import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-aggregates-catalog-spec/src/ProductId.res.mjs";
|
|
3
4
|
|
|
4
5
|
function mapIncomingCommand(_id, _command, _meta) {
|
|
5
6
|
return [];
|
|
@@ -13,7 +14,7 @@ let mapOutgoingEvent = (id, event, _meta, _queryEngine) => {
|
|
|
13
14
|
_0: id,
|
|
14
15
|
_1: {
|
|
15
16
|
TAG: "ProductBecameAvailable",
|
|
16
|
-
productId: id,
|
|
17
|
+
productId: ProductId$CatalogSpec.makeFromString(id),
|
|
17
18
|
name: event.name,
|
|
18
19
|
price: event.price
|
|
19
20
|
}
|
|
@@ -24,7 +25,7 @@ let mapOutgoingEvent = (id, event, _meta, _queryEngine) => {
|
|
|
24
25
|
_0: id,
|
|
25
26
|
_1: {
|
|
26
27
|
TAG: "ProductPriceChanged",
|
|
27
|
-
productId: id,
|
|
28
|
+
productId: ProductId$CatalogSpec.makeFromString(id),
|
|
28
29
|
price: event.price
|
|
29
30
|
}
|
|
30
31
|
}];
|
|
@@ -67,4 +68,4 @@ export {
|
|
|
67
68
|
publishedEvents,
|
|
68
69
|
acceptedCommands,
|
|
69
70
|
}
|
|
70
|
-
/*
|
|
71
|
+
/* ProductId-CatalogSpec Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
4
3
|
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
5
4
|
import * as Product$CatalogPlugin from "./Product/Aggregate/Product.res.mjs";
|
|
5
|
+
import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-aggregates-catalog-spec/src/ProductId.res.mjs";
|
|
6
6
|
import * as Category$CatalogPlugin from "./Category/Aggregate/Category.res.mjs";
|
|
7
7
|
import * as Products$CatalogPlugin from "./Product/ReadModel/Products.res.mjs";
|
|
8
8
|
import * as Categories$CatalogPlugin from "./Category/ReadModel/Categories.res.mjs";
|
|
9
|
+
import * as CategoryId$CatalogPlugin from "./Category/CategoryId.res.mjs";
|
|
9
10
|
import * as ProductDemand$CatalogPlugin from "./ProductDemand/Aggregate/ProductDemand.res.mjs";
|
|
10
11
|
import * as ImportProducts$CatalogPlugin from "./Task/ImportProducts.res.mjs";
|
|
11
12
|
import * as LifecycleModel$CatalogPlugin from "./LifecycleModel.res.mjs";
|
|
@@ -24,7 +25,7 @@ import * as Products_ExtensionPointMapping$CatalogPlugin from "./ExtensionPoint/
|
|
|
24
25
|
|
|
25
26
|
function Make(Platform) {
|
|
26
27
|
let CategoryAggregate = Platform.Aggregate.Make({
|
|
27
|
-
Id:
|
|
28
|
+
Id: CategoryId$CatalogPlugin,
|
|
28
29
|
name: Category$CatalogPlugin.name,
|
|
29
30
|
eventSchema: Category$CatalogPlugin.eventSchema,
|
|
30
31
|
errorSchema: Category$CatalogPlugin.errorSchema,
|
|
@@ -41,11 +42,11 @@ function Make(Platform) {
|
|
|
41
42
|
moduleUrl: Category_Behavior$CatalogPlugin.moduleUrl
|
|
42
43
|
})(NoEventMappings$ReventlessInfra.Make({
|
|
43
44
|
name: Category$CatalogPlugin.name,
|
|
44
|
-
Id:
|
|
45
|
+
Id: CategoryId$CatalogPlugin,
|
|
45
46
|
commandSchema: Category$CatalogPlugin.commandSchema
|
|
46
47
|
}));
|
|
47
48
|
let ProductAggregate = Platform.Aggregate.Make({
|
|
48
|
-
Id:
|
|
49
|
+
Id: ProductId$CatalogSpec,
|
|
49
50
|
name: Product$CatalogPlugin.name,
|
|
50
51
|
eventSchema: Product$CatalogPlugin.eventSchema,
|
|
51
52
|
errorSchema: Product$CatalogPlugin.errorSchema,
|
|
@@ -62,11 +63,11 @@ function Make(Platform) {
|
|
|
62
63
|
moduleUrl: Product_Behavior$CatalogPlugin.moduleUrl
|
|
63
64
|
})(NoEventMappings$ReventlessInfra.Make({
|
|
64
65
|
name: Product$CatalogPlugin.name,
|
|
65
|
-
Id:
|
|
66
|
+
Id: ProductId$CatalogSpec,
|
|
66
67
|
commandSchema: Product$CatalogPlugin.commandSchema
|
|
67
68
|
}));
|
|
68
69
|
let ProductDemandAggregate = Platform.Aggregate.Make({
|
|
69
|
-
Id:
|
|
70
|
+
Id: ProductId$CatalogSpec,
|
|
70
71
|
name: ProductDemand$CatalogPlugin.name,
|
|
71
72
|
eventSchema: ProductDemand$CatalogPlugin.eventSchema,
|
|
72
73
|
errorSchema: ProductDemand$CatalogPlugin.errorSchema,
|
|
@@ -83,11 +84,11 @@ function Make(Platform) {
|
|
|
83
84
|
moduleUrl: ProductDemand_Behavior$CatalogPlugin.moduleUrl
|
|
84
85
|
})(NoEventMappings$ReventlessInfra.Make({
|
|
85
86
|
name: ProductDemand$CatalogPlugin.name,
|
|
86
|
-
Id:
|
|
87
|
+
Id: ProductId$CatalogSpec,
|
|
87
88
|
commandSchema: ProductDemand$CatalogPlugin.commandSchema
|
|
88
89
|
}));
|
|
89
90
|
let CategoriesReadModel = Platform.ReadModel.Make({
|
|
90
|
-
Id:
|
|
91
|
+
Id: CategoryId$CatalogPlugin,
|
|
91
92
|
name: Categories$CatalogPlugin.name,
|
|
92
93
|
moduleUrl: Categories$CatalogPlugin.moduleUrl,
|
|
93
94
|
stateSchema: Categories$CatalogPlugin.stateSchema,
|
|
@@ -100,7 +101,7 @@ function Make(Platform) {
|
|
|
100
101
|
mappings: Categories_Projections$CatalogPlugin.mappings
|
|
101
102
|
});
|
|
102
103
|
let ProductDemandsReadModel = Platform.ReadModel.Make({
|
|
103
|
-
Id:
|
|
104
|
+
Id: ProductId$CatalogSpec,
|
|
104
105
|
name: ProductDemands$CatalogPlugin.name,
|
|
105
106
|
moduleUrl: ProductDemands$CatalogPlugin.moduleUrl,
|
|
106
107
|
stateSchema: ProductDemands$CatalogPlugin.stateSchema,
|
|
@@ -113,7 +114,7 @@ function Make(Platform) {
|
|
|
113
114
|
mappings: ProductDemands_Projections$CatalogPlugin.mappings
|
|
114
115
|
});
|
|
115
116
|
let ProductsReadModel = Platform.ReadModel.Make({
|
|
116
|
-
Id:
|
|
117
|
+
Id: ProductId$CatalogSpec,
|
|
117
118
|
name: Products$CatalogPlugin.name,
|
|
118
119
|
moduleUrl: Products$CatalogPlugin.moduleUrl,
|
|
119
120
|
stateSchema: Products$CatalogPlugin.stateSchema,
|
|
@@ -139,7 +140,7 @@ function Make(Platform) {
|
|
|
139
140
|
directiveSchema: Products_ExtensionPoint$CatalogSpec.directiveSchema
|
|
140
141
|
},
|
|
141
142
|
Delegate: {
|
|
142
|
-
Id:
|
|
143
|
+
Id: ProductId$CatalogSpec,
|
|
143
144
|
name: Product$CatalogPlugin.name,
|
|
144
145
|
eventSchema: Product$CatalogPlugin.eventSchema,
|
|
145
146
|
errorSchema: Product$CatalogPlugin.errorSchema,
|
|
@@ -164,7 +165,7 @@ function Make(Platform) {
|
|
|
164
165
|
directiveSchema: Orders_ExtensionPoint$OrderingSpec.directiveSchema
|
|
165
166
|
},
|
|
166
167
|
Delegate: {
|
|
167
|
-
Id:
|
|
168
|
+
Id: ProductId$CatalogSpec,
|
|
168
169
|
name: ProductDemand$CatalogPlugin.name,
|
|
169
170
|
eventSchema: ProductDemand$CatalogPlugin.eventSchema,
|
|
170
171
|
errorSchema: ProductDemand$CatalogPlugin.errorSchema,
|
|
@@ -198,7 +199,7 @@ function Make(Platform) {
|
|
|
198
199
|
directiveSchema: Products_ExtensionPoint$CatalogSpec.directiveSchema
|
|
199
200
|
},
|
|
200
201
|
Delegate: {
|
|
201
|
-
Id:
|
|
202
|
+
Id: ProductId$CatalogSpec,
|
|
202
203
|
name: Product$CatalogPlugin.name,
|
|
203
204
|
eventSchema: Product$CatalogPlugin.eventSchema,
|
|
204
205
|
errorSchema: Product$CatalogPlugin.errorSchema,
|
|
@@ -266,4 +267,4 @@ function Make(Platform) {
|
|
|
266
267
|
export {
|
|
267
268
|
Make,
|
|
268
269
|
}
|
|
269
|
-
/*
|
|
270
|
+
/* Product-CatalogPlugin Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
4
3
|
import * as Product$CatalogPlugin from "../Aggregate/Product.res.mjs";
|
|
4
|
+
import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-aggregates-catalog-spec/src/ProductId.res.mjs";
|
|
5
5
|
import * as Projection$Reventless from "@reventlessdev/reventless-spec/src/types/Projection.res.mjs";
|
|
6
6
|
import * as Products$CatalogPlugin from "./Products.res.mjs";
|
|
7
7
|
|
|
8
8
|
let M = Projection$Reventless.Mappings.Make({
|
|
9
|
-
Id:
|
|
9
|
+
Id: ProductId$CatalogSpec,
|
|
10
10
|
name: Products$CatalogPlugin.name,
|
|
11
11
|
stateSchema: Products$CatalogPlugin.stateSchema,
|
|
12
12
|
subIdConfig: undefined
|
|
@@ -79,11 +79,11 @@ function project(param) {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
let ProductMapping = Projection$Reventless.Mapping.Make({
|
|
82
|
-
Id:
|
|
82
|
+
Id: ProductId$CatalogSpec,
|
|
83
83
|
name: Product$CatalogPlugin.name,
|
|
84
84
|
eventSchema: Product$CatalogPlugin.eventSchema
|
|
85
85
|
})({
|
|
86
|
-
Id:
|
|
86
|
+
Id: ProductId$CatalogSpec,
|
|
87
87
|
name: Products$CatalogPlugin.name,
|
|
88
88
|
stateSchema: Products$CatalogPlugin.stateSchema,
|
|
89
89
|
subIdConfig: undefined
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
4
3
|
import * as Primitive_int from "@rescript/runtime/lib/es6/Primitive_int.js";
|
|
5
4
|
import * as Product$CatalogPlugin from "../../Product/Aggregate/Product.res.mjs";
|
|
5
|
+
import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-aggregates-catalog-spec/src/ProductId.res.mjs";
|
|
6
6
|
import * as Projection$Reventless from "@reventlessdev/reventless-spec/src/types/Projection.res.mjs";
|
|
7
7
|
import * as ProductDemand$CatalogPlugin from "../Aggregate/ProductDemand.res.mjs";
|
|
8
8
|
import * as ProductDemands$CatalogPlugin from "./ProductDemands.res.mjs";
|
|
9
9
|
|
|
10
10
|
let M = Projection$Reventless.Mappings.Make({
|
|
11
|
-
Id:
|
|
11
|
+
Id: ProductId$CatalogSpec,
|
|
12
12
|
name: ProductDemands$CatalogPlugin.name,
|
|
13
13
|
stateSchema: ProductDemands$CatalogPlugin.stateSchema,
|
|
14
14
|
subIdConfig: undefined
|
|
@@ -31,11 +31,11 @@ function project(param) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
let ProductMapping = Projection$Reventless.Mapping.Make({
|
|
34
|
-
Id:
|
|
34
|
+
Id: ProductId$CatalogSpec,
|
|
35
35
|
name: Product$CatalogPlugin.name,
|
|
36
36
|
eventSchema: Product$CatalogPlugin.eventSchema
|
|
37
37
|
})({
|
|
38
|
-
Id:
|
|
38
|
+
Id: ProductId$CatalogSpec,
|
|
39
39
|
name: ProductDemands$CatalogPlugin.name,
|
|
40
40
|
stateSchema: ProductDemands$CatalogPlugin.stateSchema,
|
|
41
41
|
subIdConfig: undefined
|
|
@@ -67,11 +67,11 @@ function project$1(param) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
let ProductDemandMapping = Projection$Reventless.Mapping.Make({
|
|
70
|
-
Id:
|
|
70
|
+
Id: ProductId$CatalogSpec,
|
|
71
71
|
name: ProductDemand$CatalogPlugin.name,
|
|
72
72
|
eventSchema: ProductDemand$CatalogPlugin.eventSchema
|
|
73
73
|
})({
|
|
74
|
-
Id:
|
|
74
|
+
Id: ProductId$CatalogSpec,
|
|
75
75
|
name: ProductDemands$CatalogPlugin.name,
|
|
76
76
|
stateSchema: ProductDemands$CatalogPlugin.stateSchema,
|
|
77
77
|
subIdConfig: undefined
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as ProductId$CatalogSpec from "@reventlessdev/online-shop-aggregates-catalog-spec/src/ProductId.res.mjs";
|
|
4
4
|
import * as Delegate_GWT$ReventlessGwt from "@reventlessdev/reventless-gwt/src/Delegate_GWT.res.mjs";
|
|
5
5
|
import * as ProductDemand$CatalogPlugin from "../../src/ProductDemand/Aggregate/ProductDemand.res.mjs";
|
|
6
6
|
import * as Orders_Extension$CatalogPlugin from "../../src/Extension/Orders_Extension.res.mjs";
|
|
@@ -15,7 +15,7 @@ let include = Delegate_GWT$ReventlessGwt.FromExtension({
|
|
|
15
15
|
directiveSchema: Orders_ExtensionPoint$OrderingSpec.directiveSchema
|
|
16
16
|
},
|
|
17
17
|
Delegate: {
|
|
18
|
-
Id:
|
|
18
|
+
Id: ProductId$CatalogSpec,
|
|
19
19
|
name: ProductDemand$CatalogPlugin.name,
|
|
20
20
|
eventSchema: ProductDemand$CatalogPlugin.eventSchema,
|
|
21
21
|
errorSchema: ProductDemand$CatalogPlugin.errorSchema,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// events become the stable public events Ordering subscribes to.
|
|
3
3
|
@@reventless.gwt
|
|
4
4
|
|
|
5
|
+
let gwtId = CatalogSpec.ProductId.make("gwt-id")
|
|
6
|
+
|
|
5
7
|
describe("Products ExtensionPoint mapping", () => {
|
|
6
8
|
test("Added publishes ProductBecameAvailable", () =>
|
|
7
9
|
whenDelegateEvent(
|
|
@@ -13,14 +15,14 @@ describe("Products ExtensionPoint mapping", () => {
|
|
|
13
15
|
}),
|
|
14
16
|
)->thenPublishesEvent(
|
|
15
17
|
"gwt-id",
|
|
16
|
-
ExtensionPoint.ProductBecameAvailable({productId:
|
|
18
|
+
ExtensionPoint.ProductBecameAvailable({productId: gwtId, name: "Book", price: 9.99}),
|
|
17
19
|
)
|
|
18
20
|
)
|
|
19
21
|
|
|
20
22
|
test("PriceUpdated publishes ProductPriceChanged", () =>
|
|
21
23
|
whenDelegateEvent(Delegate.PriceUpdated({price: 7.5}))->thenPublishesEvent(
|
|
22
24
|
"gwt-id",
|
|
23
|
-
ExtensionPoint.ProductPriceChanged({productId:
|
|
25
|
+
ExtensionPoint.ProductPriceChanged({productId: gwtId, price: 7.5}),
|
|
24
26
|
)
|
|
25
27
|
)
|
|
26
28
|
|