@reventlessdev/reventless-local 3.0.0-alpha.286 → 3.0.0-alpha.287
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 +17 -0
- package/package.json +10 -10
- package/src/adapter/Scheduler/LocalScheduledPublisher.res +5 -52
- package/src/adapter/Scheduler/LocalScheduledPublisher.res.mjs +7 -47
- package/src/adapter/Scheduler/LocalTimers.res +62 -0
- package/src/adapter/Scheduler/LocalTimers.res.mjs +63 -0
- package/src/components/AutomationSlice_Builder.res +23 -2
- package/src/components/AutomationSlice_Builder.res.mjs +19 -2
- package/src/components/LocalAutomationSchedules.res +59 -0
- package/src/components/LocalAutomationSchedules.res.mjs +72 -0
- package/src/test/TestRunner.res +1 -0
- package/src/test/TestRunner.res.mjs +6 -0
- package/tests/components/automationslice/AutomationRescheduleFixtures.res +142 -0
- package/tests/components/automationslice/AutomationRescheduleFixtures.res.mjs +259 -0
- package/tests/components/automationslice/AutomationRescheduleTest.res +96 -0
- package/tests/components/automationslice/AutomationRescheduleTest.res.mjs +177 -0
- package/tests/components/automationslice/AutomationScheduleFixtures.res +118 -0
- package/tests/components/automationslice/AutomationScheduleFixtures.res.mjs +263 -0
- package/tests/components/automationslice/AutomationScheduleTest.res +88 -0
- package/tests/components/automationslice/AutomationScheduleTest.res.mjs +108 -0
- package/tests/components/automationslice/AutomationSliceFixtures.res +4 -0
- package/tests/components/automationslice/AutomationSliceFixtures.res.mjs +14 -2
- package/tests/components/automationslice/AutomationSliceSelfDeadlockFixtures.res +2 -0
- package/tests/components/automationslice/AutomationSliceSelfDeadlockFixtures.res.mjs +7 -1
- package/tests/components/automationslice/AutomationSweepFixtures.res +2 -0
- package/tests/components/automationslice/AutomationSweepFixtures.res.mjs +7 -1
- package/tests/components/automationslice/MixedSourceAutomationSliceFixtures.res +3 -0
- package/tests/components/automationslice/MixedSourceAutomationSliceFixtures.res.mjs +13 -2
|
@@ -26,6 +26,7 @@ module CancelUnshippedSpec = {
|
|
|
26
26
|
let maxRetries = 2
|
|
27
27
|
let heartbeatInterval = 60
|
|
28
28
|
let targetName = "CancelOrder"
|
|
29
|
+
let schedule = None
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
module FromOrders = AutomationSlice.Mapping.Make(
|
|
@@ -40,6 +41,7 @@ module FromOrders = AutomationSlice.Mapping.Make(
|
|
|
40
41
|
| (OrderPlaced(_), None) => []
|
|
41
42
|
}
|
|
42
43
|
let resolve = (_event: OrderSource.event) => None
|
|
44
|
+
let reschedule = _ => []
|
|
43
45
|
},
|
|
44
46
|
)
|
|
45
47
|
|
|
@@ -64,6 +64,7 @@ let CancelUnshippedSpec = {
|
|
|
64
64
|
maxRetries: 2,
|
|
65
65
|
heartbeatInterval: 60,
|
|
66
66
|
targetName: "CancelOrder",
|
|
67
|
+
schedule: undefined,
|
|
67
68
|
authorizationOf: authorizationOf,
|
|
68
69
|
commandTransition: commandTransition,
|
|
69
70
|
traits: traits
|
|
@@ -88,13 +89,18 @@ function resolve(_event) {
|
|
|
88
89
|
|
|
89
90
|
}
|
|
90
91
|
|
|
92
|
+
function reschedule(param) {
|
|
93
|
+
return [];
|
|
94
|
+
}
|
|
95
|
+
|
|
91
96
|
let FromOrders = AutomationSlice$Reventless.Mapping.Make({
|
|
92
97
|
Id: Id$Reventless.$$String,
|
|
93
98
|
name: name,
|
|
94
99
|
eventSchema: eventSchema
|
|
95
100
|
})(CancelUnshippedSpec)({
|
|
96
101
|
collect: collect,
|
|
97
|
-
resolve: resolve
|
|
102
|
+
resolve: resolve,
|
|
103
|
+
reschedule: reschedule
|
|
98
104
|
});
|
|
99
105
|
|
|
100
106
|
function process(id, item, now) {
|
|
@@ -55,6 +55,7 @@ module AutoFulfillSpec = {
|
|
|
55
55
|
let maxRetries = 3
|
|
56
56
|
let heartbeatInterval = 60
|
|
57
57
|
let targetName = "MarkFulfilled"
|
|
58
|
+
let schedule = None
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
// Forward-declared per-source mappings live below; the merged `Automation`
|
|
@@ -88,6 +89,7 @@ module FromOrderAggregate = AutomationSlice.Mapping.Make(
|
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
let resolve = (_event: OrderAggregateSource.event) => None
|
|
92
|
+
let reschedule = _ => []
|
|
91
93
|
},
|
|
92
94
|
)
|
|
93
95
|
|
|
@@ -115,6 +117,7 @@ module FromInventoryDcb = AutomationSlice.Mapping.Make(
|
|
|
115
117
|
| StockReleased({orderId, productId}) => Some(orderId ++ ":" ++ productId)
|
|
116
118
|
| StockReserved(_) => None
|
|
117
119
|
}
|
|
120
|
+
let reschedule = _ => []
|
|
118
121
|
},
|
|
119
122
|
)
|
|
120
123
|
|
|
@@ -82,6 +82,7 @@ let AutoFulfillSpec = {
|
|
|
82
82
|
maxRetries: 3,
|
|
83
83
|
heartbeatInterval: 60,
|
|
84
84
|
targetName: "MarkFulfilled",
|
|
85
|
+
schedule: undefined,
|
|
85
86
|
authorizationOf: authorizationOf,
|
|
86
87
|
commandTransition: commandTransition,
|
|
87
88
|
traits: traits
|
|
@@ -109,13 +110,18 @@ function resolve(_event) {
|
|
|
109
110
|
|
|
110
111
|
}
|
|
111
112
|
|
|
113
|
+
function reschedule(param) {
|
|
114
|
+
return [];
|
|
115
|
+
}
|
|
116
|
+
|
|
112
117
|
let FromOrderAggregate = AutomationSlice$Reventless.Mapping.Make({
|
|
113
118
|
Id: Id$Reventless.$$String,
|
|
114
119
|
name: name,
|
|
115
120
|
eventSchema: eventSchema
|
|
116
121
|
})(AutoFulfillSpec)({
|
|
117
122
|
collect: collect,
|
|
118
|
-
resolve: resolve
|
|
123
|
+
resolve: resolve,
|
|
124
|
+
reschedule: reschedule
|
|
119
125
|
});
|
|
120
126
|
|
|
121
127
|
function collect$1(event, param, _ctx) {
|
|
@@ -142,13 +148,18 @@ function resolve$1(event) {
|
|
|
142
148
|
}
|
|
143
149
|
}
|
|
144
150
|
|
|
151
|
+
function reschedule$1(param) {
|
|
152
|
+
return [];
|
|
153
|
+
}
|
|
154
|
+
|
|
145
155
|
let FromInventoryDcb = AutomationSlice$Reventless.Mapping.Make({
|
|
146
156
|
Id: Id$Reventless.$$String,
|
|
147
157
|
name: name$1,
|
|
148
158
|
eventSchema: eventSchema$1
|
|
149
159
|
})(AutoFulfillSpec)({
|
|
150
160
|
collect: collect$1,
|
|
151
|
-
resolve: resolve$1
|
|
161
|
+
resolve: resolve$1,
|
|
162
|
+
reschedule: reschedule$1
|
|
152
163
|
});
|
|
153
164
|
|
|
154
165
|
function process(id, item, param) {
|