@reventlessdev/reventless-core 3.0.0-alpha.292 → 3.0.0-alpha.294
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 +19 -0
- package/package.json +9 -9
- package/src/admin/Platform_Admin_Structure.res +1 -2
- package/src/admin/Platform_Admin_Structure.res.mjs +1 -1
- package/src/admin/UiFragmentRegistry/StateChange/UiFragmentRegistry.res.mjs +2 -2
- package/src/components/Dcb/Dcb_Builder.res +11 -20
- package/src/components/Dcb/Dcb_Builder.res.mjs +7 -12
- package/src/components/InboundTranslationSlice/InboundTranslationSlice_Callback.res +27 -24
- package/src/components/InboundTranslationSlice/InboundTranslationSlice_Callback.res.mjs +4 -4
- package/src/plugin/component/Plugin_Builder.res +8 -18
- package/src/plugin/component/Plugin_Builder.res.mjs +2 -8
- package/src/plugin/component/Plugin_Helpers.res +5 -6
- package/src/plugin/component/Plugin_Helpers.res.mjs +1 -1
- package/src/plugin/component/Plugin_Structure.res +22 -28
- package/src/plugin/component/Plugin_Structure.res.mjs +12 -12
- package/src/plugin/connect/PluginConnectExtension_Mapping.res.mjs +1 -1
- package/src/plugin/connect/PluginExtensionPoint_Plugin.res.mjs +1 -1
- package/src/plugin/connect/PluginExtensionPoint_UiFragment.res +1 -1
- package/src/plugin/connect/PluginExtensionPoint_UiFragment.res.mjs +1 -1
- package/src/plugin/lifecycle/PluginSpec.res.mjs +2 -2
- package/tests/aggregate/AggregateCacheTest.res.mjs +4 -4
- package/tests/aggregate/AggregateConflictTest.res.mjs +4 -4
- package/tests/aggregate/AggregateFixtures.res.mjs +4 -4
- package/tests/aggregate/AggregateSnapshotTest.res.mjs +6 -6
- package/tests/api/GraphQL_FragmentGeneratorTest.res.mjs +6 -6
- package/tests/commandgenerator/CommandGeneratorFixtures.res.mjs +3 -3
- package/tests/commandgenerator/OwnerActingTest.res.mjs +7 -7
- package/tests/commandtopic/CommandOutcomeHookTest.res.mjs +1 -1
- package/tests/commandtopic/CommandTopicCallbackFixtures.res.mjs +3 -3
- package/tests/dcb/DcbFixtures.res.mjs +2 -2
- package/tests/dcb/DcbStateChangeSliceTest.res.mjs +7 -7
- package/tests/eventmapper/EventMapperFixtures.res.mjs +4 -4
- package/tests/extensionpoint/ExtensionPointFixtures.res.mjs +2 -2
- package/tests/extensionpoint/ExtensionPointOperationsTest.res.mjs +2 -2
- package/tests/plugin/PluginStructureAccessTest.res +6 -5
- package/tests/plugin/PluginStructureAccessTest.res.mjs +17 -14
- package/tests/plugin/PluginStructureTest.res.mjs +10 -10
- package/tests/plugin/StateChange/PsAttachInvoice.res.mjs +2 -2
- package/tests/plugin/StateChange/PsChangePhoto.res.mjs +2 -2
- package/tests/plugin/StateChange/PsDispatchShipment.res.mjs +2 -2
- package/tests/plugin/StateChange/PsGatedCommands.res.mjs +3 -3
- package/tests/plugin/StateChange/PsPlaceOrder.res.mjs +2 -2
- package/tests/plugin/StateChange/PsReserveStock.res.mjs +2 -2
- package/tests/plugin/StateChange/PsShipOrder.res.mjs +2 -2
- package/tests/plugin/StateChange/PsTransitionSwitch.res.mjs +2 -2
- package/tests/plugin/StateChange/PsTypoStore.res.mjs +2 -2
- package/tests/plugin/StateChange/PsUploadAvatar.res.mjs +2 -2
- package/tests/plugin/StateChange/PsUploadImages.res.mjs +2 -2
- package/tests/util/CommandPublisherTest.res.mjs +2 -2
|
@@ -30,7 +30,7 @@ let PsGatedCommandsSlice_Spec = {
|
|
|
30
30
|
errorSchema: PsGatedCommands$ReventlessCore.errorSchema,
|
|
31
31
|
eventSchema: PsGatedCommands$ReventlessCore.eventSchema,
|
|
32
32
|
commandSchema: PsGatedCommands$ReventlessCore.commandSchema,
|
|
33
|
-
|
|
33
|
+
authorizationOf: PsGatedCommands$ReventlessCore.authorizationOf,
|
|
34
34
|
commandTransition: PsGatedCommands$ReventlessCore.commandTransition,
|
|
35
35
|
traits: PsGatedCommands$ReventlessCore.traits,
|
|
36
36
|
readConsistency: PsGatedCommands$ReventlessCore.readConsistency
|
|
@@ -195,17 +195,20 @@ let commandSchema = Sury.union([
|
|
|
195
195
|
}))
|
|
196
196
|
]);
|
|
197
197
|
|
|
198
|
-
function
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
198
|
+
function authorizationOf(name) {
|
|
199
|
+
switch (name) {
|
|
200
|
+
case "AddCategory" :
|
|
201
|
+
return {
|
|
202
|
+
TAG: "AllowRoles",
|
|
203
|
+
_0: ["Admin"]
|
|
204
|
+
};
|
|
205
|
+
case "AddProduct" :
|
|
206
|
+
return {
|
|
207
|
+
TAG: "AllowRoles",
|
|
208
|
+
_0: ["Merchandiser"]
|
|
209
|
+
};
|
|
210
|
+
default:
|
|
211
|
+
return "DenyAll";
|
|
209
212
|
}
|
|
210
213
|
}
|
|
211
214
|
|
|
@@ -218,7 +221,7 @@ let PsTwoRuleFeed = {
|
|
|
218
221
|
commandSchema: commandSchema,
|
|
219
222
|
targetName: "AddProduct",
|
|
220
223
|
externalSystem: undefined,
|
|
221
|
-
|
|
224
|
+
authorizationOf: authorizationOf,
|
|
222
225
|
traits: traits
|
|
223
226
|
};
|
|
224
227
|
|
|
@@ -246,7 +249,7 @@ let PsTwoRuleFeedSlice = {
|
|
|
246
249
|
};
|
|
247
250
|
|
|
248
251
|
globalThis.describe("an inbound slice's roles", () => {
|
|
249
|
-
let door = Dcb_Builder$ReventlessCore.inboundDoorPermission(commandSchema,
|
|
252
|
+
let door = Dcb_Builder$ReventlessCore.inboundDoorPermission(commandSchema, authorizationOf);
|
|
250
253
|
globalThis.test("the door admits any constructor's roles", () => {
|
|
251
254
|
globalThis.expect(Stdlib_Option.map(door, Authorization$Reventless.rolesOf)).toEqual([
|
|
252
255
|
"Merchandiser",
|
|
@@ -53,7 +53,7 @@ let PsPlaceOrderSlice_Spec = {
|
|
|
53
53
|
errorSchema: PsPlaceOrder$ReventlessCore.errorSchema,
|
|
54
54
|
eventSchema: PsPlaceOrder$ReventlessCore.eventSchema,
|
|
55
55
|
commandSchema: PsPlaceOrder$ReventlessCore.commandSchema,
|
|
56
|
-
|
|
56
|
+
authorizationOf: PsPlaceOrder$ReventlessCore.authorizationOf,
|
|
57
57
|
commandTransition: PsPlaceOrder$ReventlessCore.commandTransition,
|
|
58
58
|
traits: PsPlaceOrder$ReventlessCore.traits,
|
|
59
59
|
readConsistency: PsPlaceOrder$ReventlessCore.readConsistency
|
|
@@ -84,7 +84,7 @@ let PsShipOrderSlice_Spec = {
|
|
|
84
84
|
errorSchema: PsShipOrder$ReventlessCore.errorSchema,
|
|
85
85
|
eventSchema: PsShipOrder$ReventlessCore.eventSchema,
|
|
86
86
|
commandSchema: PsShipOrder$ReventlessCore.commandSchema,
|
|
87
|
-
|
|
87
|
+
authorizationOf: PsShipOrder$ReventlessCore.authorizationOf,
|
|
88
88
|
commandTransition: PsShipOrder$ReventlessCore.commandTransition,
|
|
89
89
|
traits: PsShipOrder$ReventlessCore.traits,
|
|
90
90
|
readConsistency: PsShipOrder$ReventlessCore.readConsistency
|
|
@@ -280,7 +280,7 @@ let PsAttachInvoiceSlice_Spec = {
|
|
|
280
280
|
errorSchema: PsAttachInvoice$ReventlessCore.errorSchema,
|
|
281
281
|
eventSchema: PsAttachInvoice$ReventlessCore.eventSchema,
|
|
282
282
|
commandSchema: PsAttachInvoice$ReventlessCore.commandSchema,
|
|
283
|
-
|
|
283
|
+
authorizationOf: PsAttachInvoice$ReventlessCore.authorizationOf,
|
|
284
284
|
commandTransition: PsAttachInvoice$ReventlessCore.commandTransition,
|
|
285
285
|
traits: PsAttachInvoice$ReventlessCore.traits,
|
|
286
286
|
readConsistency: PsAttachInvoice$ReventlessCore.readConsistency
|
|
@@ -311,7 +311,7 @@ let PsUploadAvatarSlice_Spec = {
|
|
|
311
311
|
errorSchema: PsUploadAvatar$ReventlessCore.errorSchema,
|
|
312
312
|
eventSchema: PsUploadAvatar$ReventlessCore.eventSchema,
|
|
313
313
|
commandSchema: PsUploadAvatar$ReventlessCore.commandSchema,
|
|
314
|
-
|
|
314
|
+
authorizationOf: PsUploadAvatar$ReventlessCore.authorizationOf,
|
|
315
315
|
commandTransition: PsUploadAvatar$ReventlessCore.commandTransition,
|
|
316
316
|
traits: PsUploadAvatar$ReventlessCore.traits,
|
|
317
317
|
readConsistency: PsUploadAvatar$ReventlessCore.readConsistency
|
|
@@ -342,7 +342,7 @@ let PsUploadImagesSlice_Spec = {
|
|
|
342
342
|
errorSchema: PsUploadImages$ReventlessCore.errorSchema,
|
|
343
343
|
eventSchema: PsUploadImages$ReventlessCore.eventSchema,
|
|
344
344
|
commandSchema: PsUploadImages$ReventlessCore.commandSchema,
|
|
345
|
-
|
|
345
|
+
authorizationOf: PsUploadImages$ReventlessCore.authorizationOf,
|
|
346
346
|
commandTransition: PsUploadImages$ReventlessCore.commandTransition,
|
|
347
347
|
traits: PsUploadImages$ReventlessCore.traits,
|
|
348
348
|
readConsistency: PsUploadImages$ReventlessCore.readConsistency
|
|
@@ -373,7 +373,7 @@ let PsTypoStoreSlice_Spec = {
|
|
|
373
373
|
errorSchema: PsTypoStore$ReventlessCore.errorSchema,
|
|
374
374
|
eventSchema: PsTypoStore$ReventlessCore.eventSchema,
|
|
375
375
|
commandSchema: PsTypoStore$ReventlessCore.commandSchema,
|
|
376
|
-
|
|
376
|
+
authorizationOf: PsTypoStore$ReventlessCore.authorizationOf,
|
|
377
377
|
commandTransition: PsTypoStore$ReventlessCore.commandTransition,
|
|
378
378
|
traits: PsTypoStore$ReventlessCore.traits,
|
|
379
379
|
readConsistency: PsTypoStore$ReventlessCore.readConsistency
|
|
@@ -404,7 +404,7 @@ let PsChangePhotoSlice_Spec = {
|
|
|
404
404
|
errorSchema: PsChangePhoto$ReventlessCore.errorSchema,
|
|
405
405
|
eventSchema: PsChangePhoto$ReventlessCore.eventSchema,
|
|
406
406
|
commandSchema: PsChangePhoto$ReventlessCore.commandSchema,
|
|
407
|
-
|
|
407
|
+
authorizationOf: PsChangePhoto$ReventlessCore.authorizationOf,
|
|
408
408
|
commandTransition: PsChangePhoto$ReventlessCore.commandTransition,
|
|
409
409
|
traits: PsChangePhoto$ReventlessCore.traits,
|
|
410
410
|
readConsistency: PsChangePhoto$ReventlessCore.readConsistency
|
|
@@ -435,7 +435,7 @@ let PsReserveStockSlice_Spec = {
|
|
|
435
435
|
errorSchema: PsReserveStock$ReventlessCore.errorSchema,
|
|
436
436
|
eventSchema: PsReserveStock$ReventlessCore.eventSchema,
|
|
437
437
|
commandSchema: PsReserveStock$ReventlessCore.commandSchema,
|
|
438
|
-
|
|
438
|
+
authorizationOf: PsReserveStock$ReventlessCore.authorizationOf,
|
|
439
439
|
commandTransition: PsReserveStock$ReventlessCore.commandTransition,
|
|
440
440
|
traits: PsReserveStock$ReventlessCore.traits,
|
|
441
441
|
readConsistency: PsReserveStock$ReventlessCore.readConsistency
|
|
@@ -466,7 +466,7 @@ let PsDispatchShipmentSlice_Spec = {
|
|
|
466
466
|
errorSchema: PsDispatchShipment$ReventlessCore.errorSchema,
|
|
467
467
|
eventSchema: PsDispatchShipment$ReventlessCore.eventSchema,
|
|
468
468
|
commandSchema: PsDispatchShipment$ReventlessCore.commandSchema,
|
|
469
|
-
|
|
469
|
+
authorizationOf: PsDispatchShipment$ReventlessCore.authorizationOf,
|
|
470
470
|
commandTransition: PsDispatchShipment$ReventlessCore.commandTransition,
|
|
471
471
|
traits: PsDispatchShipment$ReventlessCore.traits,
|
|
472
472
|
readConsistency: PsDispatchShipment$ReventlessCore.readConsistency
|
|
@@ -497,7 +497,7 @@ let PsTransitionSwitchSlice_Spec = {
|
|
|
497
497
|
errorSchema: PsTransitionSwitch$ReventlessCore.errorSchema,
|
|
498
498
|
eventSchema: PsTransitionSwitch$ReventlessCore.eventSchema,
|
|
499
499
|
commandSchema: PsTransitionSwitch$ReventlessCore.commandSchema,
|
|
500
|
-
|
|
500
|
+
authorizationOf: PsTransitionSwitch$ReventlessCore.authorizationOf,
|
|
501
501
|
commandTransition: PsTransitionSwitch$ReventlessCore.commandTransition,
|
|
502
502
|
traits: PsTransitionSwitch$ReventlessCore.traits,
|
|
503
503
|
readConsistency: PsTransitionSwitch$ReventlessCore.readConsistency
|
|
@@ -32,7 +32,7 @@ function decide(_state, _command) {
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
function
|
|
35
|
+
function authorizationOf(param) {
|
|
36
36
|
return "AllowAuthenticated";
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -63,7 +63,7 @@ export {
|
|
|
63
63
|
eventSchema,
|
|
64
64
|
decide,
|
|
65
65
|
moduleUrl,
|
|
66
|
-
|
|
66
|
+
authorizationOf,
|
|
67
67
|
readConsistency,
|
|
68
68
|
commandTransition,
|
|
69
69
|
traits,
|
|
@@ -33,7 +33,7 @@ function decide(_state, _command) {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
function
|
|
36
|
+
function authorizationOf(param) {
|
|
37
37
|
return "AllowAuthenticated";
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -64,7 +64,7 @@ export {
|
|
|
64
64
|
eventSchema,
|
|
65
65
|
decide,
|
|
66
66
|
moduleUrl,
|
|
67
|
-
|
|
67
|
+
authorizationOf,
|
|
68
68
|
readConsistency,
|
|
69
69
|
commandTransition,
|
|
70
70
|
traits,
|
|
@@ -39,7 +39,7 @@ function commandTransition(command) {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
function
|
|
42
|
+
function authorizationOf(param) {
|
|
43
43
|
return "AllowAuthenticated";
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -67,7 +67,7 @@ export {
|
|
|
67
67
|
decide,
|
|
68
68
|
commandTransition,
|
|
69
69
|
moduleUrl,
|
|
70
|
-
|
|
70
|
+
authorizationOf,
|
|
71
71
|
readConsistency,
|
|
72
72
|
traits,
|
|
73
73
|
}
|
|
@@ -45,8 +45,8 @@ function decide(_state, _command) {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
function
|
|
49
|
-
if (
|
|
48
|
+
function authorizationOf(name) {
|
|
49
|
+
if (name === "Restock") {
|
|
50
50
|
return {
|
|
51
51
|
TAG: "AllowRoles",
|
|
52
52
|
_0: [
|
|
@@ -87,7 +87,7 @@ export {
|
|
|
87
87
|
eventSchema,
|
|
88
88
|
decide,
|
|
89
89
|
moduleUrl,
|
|
90
|
-
|
|
90
|
+
authorizationOf,
|
|
91
91
|
readConsistency,
|
|
92
92
|
commandTransition,
|
|
93
93
|
traits,
|
|
@@ -31,7 +31,7 @@ function decide(_state, _command) {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function
|
|
34
|
+
function authorizationOf(param) {
|
|
35
35
|
return "AllowAuthenticated";
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -62,7 +62,7 @@ export {
|
|
|
62
62
|
eventSchema,
|
|
63
63
|
decide,
|
|
64
64
|
moduleUrl,
|
|
65
|
-
|
|
65
|
+
authorizationOf,
|
|
66
66
|
readConsistency,
|
|
67
67
|
commandTransition,
|
|
68
68
|
traits,
|
|
@@ -42,7 +42,7 @@ function decide(_state, _command) {
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
function
|
|
45
|
+
function authorizationOf(param) {
|
|
46
46
|
return "AllowAuthenticated";
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -74,7 +74,7 @@ export {
|
|
|
74
74
|
eventSchema,
|
|
75
75
|
decide,
|
|
76
76
|
moduleUrl,
|
|
77
|
-
|
|
77
|
+
authorizationOf,
|
|
78
78
|
readConsistency,
|
|
79
79
|
commandTransition,
|
|
80
80
|
traits,
|
|
@@ -59,7 +59,7 @@ function commandTransition(command) {
|
|
|
59
59
|
|
|
60
60
|
let commandSchema$1 = Api$ReventlessInfra.markNoApiVariants(commandSchema, ["CancelShipment"]);
|
|
61
61
|
|
|
62
|
-
function
|
|
62
|
+
function authorizationOf(param) {
|
|
63
63
|
return "AllowAuthenticated";
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -87,7 +87,7 @@ export {
|
|
|
87
87
|
commandTransition,
|
|
88
88
|
commandSchema$1 as commandSchema,
|
|
89
89
|
moduleUrl,
|
|
90
|
-
|
|
90
|
+
authorizationOf,
|
|
91
91
|
readConsistency,
|
|
92
92
|
traits,
|
|
93
93
|
}
|
|
@@ -71,7 +71,7 @@ let traits = [{
|
|
|
71
71
|
posture: "SelfContained"
|
|
72
72
|
}];
|
|
73
73
|
|
|
74
|
-
function
|
|
74
|
+
function authorizationOf(param) {
|
|
75
75
|
return "AllowAuthenticated";
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -98,7 +98,7 @@ export {
|
|
|
98
98
|
commandTransition,
|
|
99
99
|
traits,
|
|
100
100
|
moduleUrl,
|
|
101
|
-
|
|
101
|
+
authorizationOf,
|
|
102
102
|
readConsistency,
|
|
103
103
|
}
|
|
104
104
|
/* consumedEventSchema Not a pure module */
|
|
@@ -31,7 +31,7 @@ function decide(_state, _command) {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function
|
|
34
|
+
function authorizationOf(param) {
|
|
35
35
|
return "AllowAuthenticated";
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -62,7 +62,7 @@ export {
|
|
|
62
62
|
eventSchema,
|
|
63
63
|
decide,
|
|
64
64
|
moduleUrl,
|
|
65
|
-
|
|
65
|
+
authorizationOf,
|
|
66
66
|
readConsistency,
|
|
67
67
|
commandTransition,
|
|
68
68
|
traits,
|
|
@@ -33,7 +33,7 @@ function decide(_state, _command) {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
function
|
|
36
|
+
function authorizationOf(param) {
|
|
37
37
|
return "AllowAuthenticated";
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -64,7 +64,7 @@ export {
|
|
|
64
64
|
eventSchema,
|
|
65
65
|
decide,
|
|
66
66
|
moduleUrl,
|
|
67
|
-
|
|
67
|
+
authorizationOf,
|
|
68
68
|
readConsistency,
|
|
69
69
|
commandTransition,
|
|
70
70
|
traits,
|
|
@@ -35,7 +35,7 @@ function decide(_state, _command) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function
|
|
38
|
+
function authorizationOf(param) {
|
|
39
39
|
return "AllowAuthenticated";
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -66,7 +66,7 @@ export {
|
|
|
66
66
|
eventSchema,
|
|
67
67
|
decide,
|
|
68
68
|
moduleUrl,
|
|
69
|
-
|
|
69
|
+
authorizationOf,
|
|
70
70
|
readConsistency,
|
|
71
71
|
commandTransition,
|
|
72
72
|
traits,
|
|
@@ -11,7 +11,7 @@ let commandSchema = Sury.$schema(s => ({
|
|
|
11
11
|
value: s.m(Sury.int32)
|
|
12
12
|
}));
|
|
13
13
|
|
|
14
|
-
function
|
|
14
|
+
function authorizationOf(param) {
|
|
15
15
|
return "AllowAuthenticated";
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -24,7 +24,7 @@ let traits = [];
|
|
|
24
24
|
let TestSpec = {
|
|
25
25
|
name: "TestCmd",
|
|
26
26
|
commandSchema: commandSchema,
|
|
27
|
-
|
|
27
|
+
authorizationOf: authorizationOf,
|
|
28
28
|
commandTransition: commandTransition,
|
|
29
29
|
traits: traits
|
|
30
30
|
};
|