@reventlessdev/online-shop-aggregates-catalog 3.0.0-alpha.103 → 3.0.0-alpha.105
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/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_Behavior-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Category/Aggregate/Category_Behavior-CatalogPlugin.cmj +0 -0
- package/lib/bs/src/Category/Aggregate/Category_Behavior-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Category/Aggregate/Category_Behavior.ast +0 -0
- package/lib/bs/src/Category/Aggregate/Category_Behavior.res.mjs +3 -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_Projections-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Category/ReadModel/Categories_Projections-CatalogPlugin.cmt +0 -0
- 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.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 +3 -0
- 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_Behavior-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Product/Aggregate/Product_Behavior-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/Product/Aggregate/Product_Behavior.ast +0 -0
- package/lib/bs/src/Product/Aggregate/Product_Behavior.res +6 -0
- package/lib/bs/src/Product/Aggregate/Product_Behavior.res.mjs +6 -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_Projections-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/Product/ReadModel/Products_Projections-CatalogPlugin.cmt +0 -0
- 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_Behavior-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/ProductDemand/Aggregate/ProductDemand_Behavior-CatalogPlugin.cmj +0 -0
- package/lib/bs/src/ProductDemand/Aggregate/ProductDemand_Behavior-CatalogPlugin.cmt +0 -0
- package/lib/bs/src/ProductDemand/Aggregate/ProductDemand_Behavior.ast +0 -0
- package/lib/bs/src/ProductDemand/Aggregate/ProductDemand_Behavior.res.mjs +3 -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_Projections-CatalogPlugin.cmi +0 -0
- package/lib/bs/src/ProductDemand/ReadModel/ProductDemands_Projections-CatalogPlugin.cmt +0 -0
- 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/Aggregate/Category_GWT.res.mjs +1 -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/ExtensionPoint/Products_ExtensionPointMapping_GWT-CatalogPlugin.cmi +0 -0
- package/lib/bs/tests/ExtensionPoint/Products_ExtensionPointMapping_GWT-CatalogPlugin.cmt +0 -0
- 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/Aggregate/Product_GWT.res.mjs +1 -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/Aggregate/ProductDemand_GWT.res.mjs +1 -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/Categories-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Categories-CatalogPlugin.cmt +0 -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_Behavior-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Category_Behavior-CatalogPlugin.cmj +0 -0
- package/lib/ocaml/Category_Behavior-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Category_Behavior.ast +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/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/ProductDemand-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/ProductDemand-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/ProductDemand_Behavior-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/ProductDemand_Behavior-CatalogPlugin.cmj +0 -0
- package/lib/ocaml/ProductDemand_Behavior-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/ProductDemand_Behavior.ast +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_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_Behavior.ast +0 -0
- package/lib/ocaml/Product_Behavior.res +6 -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_ExtensionPointMapping-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Products_ExtensionPointMapping-CatalogPlugin.cmt +0 -0
- package/lib/ocaml/Products_ExtensionPointMapping_GWT-CatalogPlugin.cmi +0 -0
- package/lib/ocaml/Products_ExtensionPointMapping_GWT-CatalogPlugin.cmt +0 -0
- 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_Behavior.res.mjs +3 -0
- package/src/Plugin.res.mjs +3 -0
- package/src/Product/Aggregate/Product_Behavior.res +6 -0
- package/src/Product/Aggregate/Product_Behavior.res.mjs +6 -0
- package/src/ProductDemand/Aggregate/ProductDemand_Behavior.res.mjs +3 -0
- package/tests/Category/Aggregate/Category_GWT.res.mjs +1 -0
- package/tests/Product/Aggregate/Product_GWT.res.mjs +1 -0
- package/tests/ProductDemand/Aggregate/ProductDemand_GWT.res.mjs +1 -0
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.105 (2026-07-04)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **examples,docs:** enable aggregate snapshots on the Product example + document the feature (aggregate-snapshotting plan, steps 6-7, COMPLETE) ([fdda793](https://github.com/ReventlessDev/reventless-core/commit/fdda793e7bba0cd7482b4ba3ac1c73572f75a3c0))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# 3.0.0-alpha.104 (2026-07-03)
|
|
14
|
+
|
|
15
|
+
**Note:** Version bump only for package @reventlessdev/online-shop-aggregates-catalog
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
# 3.0.0-alpha.103 (2026-07-02)
|
|
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(1783190314371)
|
|
2
|
+
#Done(1783190315724)
|
|
@@ -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": "1783190315738"
|
|
8
8
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -95,6 +95,8 @@ let initialState = "NotCreated";
|
|
|
95
95
|
|
|
96
96
|
let moduleUrl = "@reventlessdev/online-shop-aggregates-catalog/src/Category/Aggregate/Category_Behavior.res.mjs";
|
|
97
97
|
|
|
98
|
+
let snapshot;
|
|
99
|
+
|
|
98
100
|
export {
|
|
99
101
|
Spec,
|
|
100
102
|
stateSchema,
|
|
@@ -102,5 +104,6 @@ export {
|
|
|
102
104
|
evolve,
|
|
103
105
|
decide,
|
|
104
106
|
moduleUrl,
|
|
107
|
+
snapshot,
|
|
105
108
|
}
|
|
106
109
|
/* stateSchema Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -34,6 +34,7 @@ function Make(Platform) {
|
|
|
34
34
|
initialState: Category_Behavior$CatalogPlugin.initialState,
|
|
35
35
|
evolve: Category_Behavior$CatalogPlugin.evolve,
|
|
36
36
|
decide: Category_Behavior$CatalogPlugin.decide,
|
|
37
|
+
snapshot: undefined,
|
|
37
38
|
moduleUrl: Category_Behavior$CatalogPlugin.moduleUrl
|
|
38
39
|
})(NoEventMappings$ReventlessInfra.Make({
|
|
39
40
|
name: Category$CatalogPlugin.name,
|
|
@@ -52,6 +53,7 @@ function Make(Platform) {
|
|
|
52
53
|
initialState: Product_Behavior$CatalogPlugin.initialState,
|
|
53
54
|
evolve: Product_Behavior$CatalogPlugin.evolve,
|
|
54
55
|
decide: Product_Behavior$CatalogPlugin.decide,
|
|
56
|
+
snapshot: Product_Behavior$CatalogPlugin.snapshot,
|
|
55
57
|
moduleUrl: Product_Behavior$CatalogPlugin.moduleUrl
|
|
56
58
|
})(NoEventMappings$ReventlessInfra.Make({
|
|
57
59
|
name: Product$CatalogPlugin.name,
|
|
@@ -70,6 +72,7 @@ function Make(Platform) {
|
|
|
70
72
|
initialState: ProductDemand_Behavior$CatalogPlugin.initialState,
|
|
71
73
|
evolve: ProductDemand_Behavior$CatalogPlugin.evolve,
|
|
72
74
|
decide: ProductDemand_Behavior$CatalogPlugin.decide,
|
|
75
|
+
snapshot: undefined,
|
|
73
76
|
moduleUrl: ProductDemand_Behavior$CatalogPlugin.moduleUrl
|
|
74
77
|
})(NoEventMappings$ReventlessInfra.Make({
|
|
75
78
|
name: ProductDemand$CatalogPlugin.name,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
// Product aggregate behavior.
|
|
2
2
|
// Implements the state machine for adding and updating products.
|
|
3
|
+
//
|
|
4
|
+
// Snapshotting is enabled (every 50 events): a long-lived product with many
|
|
5
|
+
// price/name updates seeds its cold replay from the latest snapshot instead of
|
|
6
|
+
// folding full history. See the "Replay cost and snapshots" section of the
|
|
7
|
+
// aggregate component docs.
|
|
3
8
|
|
|
4
9
|
@@reventless.behavior
|
|
10
|
+
@@reventless.snapshots(50)
|
|
5
11
|
|
|
6
12
|
@schema
|
|
7
13
|
type state =
|
|
@@ -133,6 +133,11 @@ function decide(state, command) {
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
let snapshot = {
|
|
137
|
+
interval: 50,
|
|
138
|
+
stateSchema: stateSchema
|
|
139
|
+
};
|
|
140
|
+
|
|
136
141
|
let Spec;
|
|
137
142
|
|
|
138
143
|
let initialState = "NotCreated";
|
|
@@ -146,5 +151,6 @@ export {
|
|
|
146
151
|
evolve,
|
|
147
152
|
decide,
|
|
148
153
|
moduleUrl,
|
|
154
|
+
snapshot,
|
|
149
155
|
}
|
|
150
156
|
/* stateSchema Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -91,6 +91,8 @@ let initialState = "NotCreated";
|
|
|
91
91
|
|
|
92
92
|
let moduleUrl = "@reventlessdev/online-shop-aggregates-catalog/src/ProductDemand/Aggregate/ProductDemand_Behavior.res.mjs";
|
|
93
93
|
|
|
94
|
+
let snapshot;
|
|
95
|
+
|
|
94
96
|
export {
|
|
95
97
|
Spec,
|
|
96
98
|
stateSchema,
|
|
@@ -98,5 +100,6 @@ export {
|
|
|
98
100
|
evolve,
|
|
99
101
|
decide,
|
|
100
102
|
moduleUrl,
|
|
103
|
+
snapshot,
|
|
101
104
|
}
|
|
102
105
|
/* stateSchema Not a pure module */
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -19,6 +19,7 @@ let include = Behavior_GWT$ReventlessGwt.MakeFromAggregate({
|
|
|
19
19
|
initialState: Category_Behavior$CatalogPlugin.initialState,
|
|
20
20
|
evolve: Category_Behavior$CatalogPlugin.evolve,
|
|
21
21
|
decide: Category_Behavior$CatalogPlugin.decide,
|
|
22
|
+
snapshot: undefined,
|
|
22
23
|
moduleUrl: Category_Behavior$CatalogPlugin.moduleUrl
|
|
23
24
|
});
|
|
24
25
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -19,6 +19,7 @@ let include = Behavior_GWT$ReventlessGwt.MakeFromAggregate({
|
|
|
19
19
|
initialState: Product_Behavior$CatalogPlugin.initialState,
|
|
20
20
|
evolve: Product_Behavior$CatalogPlugin.evolve,
|
|
21
21
|
decide: Product_Behavior$CatalogPlugin.decide,
|
|
22
|
+
snapshot: Product_Behavior$CatalogPlugin.snapshot,
|
|
22
23
|
moduleUrl: Product_Behavior$CatalogPlugin.moduleUrl
|
|
23
24
|
});
|
|
24
25
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -19,6 +19,7 @@ let include = Behavior_GWT$ReventlessGwt.MakeFromAggregate({
|
|
|
19
19
|
initialState: ProductDemand_Behavior$CatalogPlugin.initialState,
|
|
20
20
|
evolve: ProductDemand_Behavior$CatalogPlugin.evolve,
|
|
21
21
|
decide: ProductDemand_Behavior$CatalogPlugin.decide,
|
|
22
|
+
snapshot: undefined,
|
|
22
23
|
moduleUrl: ProductDemand_Behavior$CatalogPlugin.moduleUrl
|
|
23
24
|
});
|
|
24
25
|
|
|
Binary file
|
|
Binary file
|
package/lib/ocaml/.compiler.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Start(
|
|
2
|
-
#Done(
|
|
1
|
+
#Start(1783190314371)
|
|
2
|
+
#Done(1783190315724)
|
|
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
|
|
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,7 +1,13 @@
|
|
|
1
1
|
// Product aggregate behavior.
|
|
2
2
|
// Implements the state machine for adding and updating products.
|
|
3
|
+
//
|
|
4
|
+
// Snapshotting is enabled (every 50 events): a long-lived product with many
|
|
5
|
+
// price/name updates seeds its cold replay from the latest snapshot instead of
|
|
6
|
+
// folding full history. See the "Replay cost and snapshots" section of the
|
|
7
|
+
// aggregate component docs.
|
|
3
8
|
|
|
4
9
|
@@reventless.behavior
|
|
10
|
+
@@reventless.snapshots(50)
|
|
5
11
|
|
|
6
12
|
@schema
|
|
7
13
|
type state =
|
|
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-aggregates-catalog",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.105",
|
|
4
4
|
"description": "Online Shop example — Catalog plugin (Product & Category aggregates)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"sury": "^11.0.0-alpha.4",
|
|
24
|
-
"@reventlessdev/online-shop-aggregates-catalog-spec": "3.0.0-alpha.
|
|
25
|
-
"@reventlessdev/online-shop-aggregates-ordering-spec": "3.0.0-alpha.
|
|
24
|
+
"@reventlessdev/online-shop-aggregates-catalog-spec": "3.0.0-alpha.60",
|
|
25
|
+
"@reventlessdev/online-shop-aggregates-ordering-spec": "3.0.0-alpha.60",
|
|
26
26
|
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.14",
|
|
27
|
-
"@reventlessdev/reventless-gwt": "1.0.0-alpha.
|
|
28
|
-
"@reventlessdev/reventless-infra": "3.0.0-alpha.
|
|
29
|
-
"@reventlessdev/reventless-local": "3.0.0-alpha.
|
|
30
|
-
"@reventlessdev/reventless-spec": "3.0.0-alpha.
|
|
27
|
+
"@reventlessdev/reventless-gwt": "1.0.0-alpha.78",
|
|
28
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.84",
|
|
29
|
+
"@reventlessdev/reventless-local": "3.0.0-alpha.117",
|
|
30
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.64"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"rescript": "^12.3.0",
|
|
34
34
|
"sury-ppx": "11.0.0-alpha.2",
|
|
35
|
-
"@reventlessdev/reventless-ppx": "1.0.0-alpha.
|
|
35
|
+
"@reventlessdev/reventless-ppx": "1.0.0-alpha.50"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"rescript": "^12.3.0"
|
|
@@ -95,6 +95,8 @@ let initialState = "NotCreated";
|
|
|
95
95
|
|
|
96
96
|
let moduleUrl = "@reventlessdev/online-shop-aggregates-catalog/src/Category/Aggregate/Category_Behavior.res.mjs";
|
|
97
97
|
|
|
98
|
+
let snapshot;
|
|
99
|
+
|
|
98
100
|
export {
|
|
99
101
|
Spec,
|
|
100
102
|
stateSchema,
|
|
@@ -102,5 +104,6 @@ export {
|
|
|
102
104
|
evolve,
|
|
103
105
|
decide,
|
|
104
106
|
moduleUrl,
|
|
107
|
+
snapshot,
|
|
105
108
|
}
|
|
106
109
|
/* stateSchema Not a pure module */
|
package/src/Plugin.res.mjs
CHANGED
|
@@ -34,6 +34,7 @@ function Make(Platform) {
|
|
|
34
34
|
initialState: Category_Behavior$CatalogPlugin.initialState,
|
|
35
35
|
evolve: Category_Behavior$CatalogPlugin.evolve,
|
|
36
36
|
decide: Category_Behavior$CatalogPlugin.decide,
|
|
37
|
+
snapshot: undefined,
|
|
37
38
|
moduleUrl: Category_Behavior$CatalogPlugin.moduleUrl
|
|
38
39
|
})(NoEventMappings$ReventlessInfra.Make({
|
|
39
40
|
name: Category$CatalogPlugin.name,
|
|
@@ -52,6 +53,7 @@ function Make(Platform) {
|
|
|
52
53
|
initialState: Product_Behavior$CatalogPlugin.initialState,
|
|
53
54
|
evolve: Product_Behavior$CatalogPlugin.evolve,
|
|
54
55
|
decide: Product_Behavior$CatalogPlugin.decide,
|
|
56
|
+
snapshot: Product_Behavior$CatalogPlugin.snapshot,
|
|
55
57
|
moduleUrl: Product_Behavior$CatalogPlugin.moduleUrl
|
|
56
58
|
})(NoEventMappings$ReventlessInfra.Make({
|
|
57
59
|
name: Product$CatalogPlugin.name,
|
|
@@ -70,6 +72,7 @@ function Make(Platform) {
|
|
|
70
72
|
initialState: ProductDemand_Behavior$CatalogPlugin.initialState,
|
|
71
73
|
evolve: ProductDemand_Behavior$CatalogPlugin.evolve,
|
|
72
74
|
decide: ProductDemand_Behavior$CatalogPlugin.decide,
|
|
75
|
+
snapshot: undefined,
|
|
73
76
|
moduleUrl: ProductDemand_Behavior$CatalogPlugin.moduleUrl
|
|
74
77
|
})(NoEventMappings$ReventlessInfra.Make({
|
|
75
78
|
name: ProductDemand$CatalogPlugin.name,
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
// Product aggregate behavior.
|
|
2
2
|
// Implements the state machine for adding and updating products.
|
|
3
|
+
//
|
|
4
|
+
// Snapshotting is enabled (every 50 events): a long-lived product with many
|
|
5
|
+
// price/name updates seeds its cold replay from the latest snapshot instead of
|
|
6
|
+
// folding full history. See the "Replay cost and snapshots" section of the
|
|
7
|
+
// aggregate component docs.
|
|
3
8
|
|
|
4
9
|
@@reventless.behavior
|
|
10
|
+
@@reventless.snapshots(50)
|
|
5
11
|
|
|
6
12
|
@schema
|
|
7
13
|
type state =
|
|
@@ -133,6 +133,11 @@ function decide(state, command) {
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
let snapshot = {
|
|
137
|
+
interval: 50,
|
|
138
|
+
stateSchema: stateSchema
|
|
139
|
+
};
|
|
140
|
+
|
|
136
141
|
let Spec;
|
|
137
142
|
|
|
138
143
|
let initialState = "NotCreated";
|
|
@@ -146,5 +151,6 @@ export {
|
|
|
146
151
|
evolve,
|
|
147
152
|
decide,
|
|
148
153
|
moduleUrl,
|
|
154
|
+
snapshot,
|
|
149
155
|
}
|
|
150
156
|
/* stateSchema Not a pure module */
|
|
@@ -91,6 +91,8 @@ let initialState = "NotCreated";
|
|
|
91
91
|
|
|
92
92
|
let moduleUrl = "@reventlessdev/online-shop-aggregates-catalog/src/ProductDemand/Aggregate/ProductDemand_Behavior.res.mjs";
|
|
93
93
|
|
|
94
|
+
let snapshot;
|
|
95
|
+
|
|
94
96
|
export {
|
|
95
97
|
Spec,
|
|
96
98
|
stateSchema,
|
|
@@ -98,5 +100,6 @@ export {
|
|
|
98
100
|
evolve,
|
|
99
101
|
decide,
|
|
100
102
|
moduleUrl,
|
|
103
|
+
snapshot,
|
|
101
104
|
}
|
|
102
105
|
/* stateSchema Not a pure module */
|
|
@@ -19,6 +19,7 @@ let include = Behavior_GWT$ReventlessGwt.MakeFromAggregate({
|
|
|
19
19
|
initialState: Category_Behavior$CatalogPlugin.initialState,
|
|
20
20
|
evolve: Category_Behavior$CatalogPlugin.evolve,
|
|
21
21
|
decide: Category_Behavior$CatalogPlugin.decide,
|
|
22
|
+
snapshot: undefined,
|
|
22
23
|
moduleUrl: Category_Behavior$CatalogPlugin.moduleUrl
|
|
23
24
|
});
|
|
24
25
|
|
|
@@ -19,6 +19,7 @@ let include = Behavior_GWT$ReventlessGwt.MakeFromAggregate({
|
|
|
19
19
|
initialState: Product_Behavior$CatalogPlugin.initialState,
|
|
20
20
|
evolve: Product_Behavior$CatalogPlugin.evolve,
|
|
21
21
|
decide: Product_Behavior$CatalogPlugin.decide,
|
|
22
|
+
snapshot: Product_Behavior$CatalogPlugin.snapshot,
|
|
22
23
|
moduleUrl: Product_Behavior$CatalogPlugin.moduleUrl
|
|
23
24
|
});
|
|
24
25
|
|
|
@@ -19,6 +19,7 @@ let include = Behavior_GWT$ReventlessGwt.MakeFromAggregate({
|
|
|
19
19
|
initialState: ProductDemand_Behavior$CatalogPlugin.initialState,
|
|
20
20
|
evolve: ProductDemand_Behavior$CatalogPlugin.evolve,
|
|
21
21
|
decide: ProductDemand_Behavior$CatalogPlugin.decide,
|
|
22
|
+
snapshot: undefined,
|
|
22
23
|
moduleUrl: ProductDemand_Behavior$CatalogPlugin.moduleUrl
|
|
23
24
|
});
|
|
24
25
|
|