@reventlessdev/reventless-core 3.0.0-alpha.251 → 3.0.0-alpha.253

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/package.json +8 -8
  3. package/src/admin/Platform_Admin_Structure.res +4 -1
  4. package/src/admin/Platform_Admin_Structure.res.mjs +4 -2
  5. package/src/admin/Platform_BakedManifest.res.mjs +3 -1
  6. package/src/admin/Platform_PluginStructuresApi.res +43 -7
  7. package/src/admin/Platform_PluginStructuresApi.res.mjs +47 -1
  8. package/src/admin/UiFragmentRegistry/StateChangeSlice/UiFragmentRegistry.res.mjs +8 -0
  9. package/src/components/Api/ApiNoApiHelpers.res +37 -3
  10. package/src/components/Api/ApiNoApiHelpers.res.mjs +29 -2
  11. package/src/components/AutomationSlice/AutomationSlice_Callback.res +4 -4
  12. package/src/components/AutomationSlice/AutomationSlice_Callback.res.mjs +3 -3
  13. package/src/plugin/api/PluginBaseFragment.res +3 -3
  14. package/src/plugin/component/Plugin_Structure.res +158 -25
  15. package/src/plugin/component/Plugin_Structure.res.mjs +82 -18
  16. package/src/plugin/connect/PluginConnectExtension_Mapping.res.mjs +3 -1
  17. package/src/plugin/connect/PluginExtensionPoint_Plugin.res.mjs +3 -1
  18. package/src/plugin/connect/PluginExtensionPoint_UiFragment.res.mjs +3 -1
  19. package/src/plugin/lifecycle/PluginBehavior.res +11 -11
  20. package/src/plugin/lifecycle/PluginBehavior.res.mjs +11 -11
  21. package/src/plugin/lifecycle/PluginSpec.res +39 -16
  22. package/src/plugin/lifecycle/PluginSpec.res.mjs +54 -56
  23. package/tests/admin/AdminApiSchemaDriftTest.res +27 -1
  24. package/tests/admin/AdminApiSchemaDriftTest.res.mjs +22 -2
  25. package/tests/admin/Platform_Admin_StructureTest.res +8 -3
  26. package/tests/admin/Platform_Admin_StructureTest.res.mjs +8 -2
  27. package/tests/admin/Platform_BakedManifestTest.res +2 -0
  28. package/tests/admin/Platform_BakedManifestTest.res.mjs +3 -1
  29. package/tests/admin/Platform_ComponentDefinitionsApiTest.res +4 -0
  30. package/tests/admin/Platform_ComponentDefinitionsApiTest.res.mjs +21 -7
  31. package/tests/admin/Platform_PluginStructuresApiTest.res +16 -0
  32. package/tests/admin/Platform_PluginStructuresApiTest.res.mjs +17 -3
  33. package/tests/aggregate/AggregateCacheTest.res.mjs +15 -3
  34. package/tests/aggregate/AggregateConflictTest.res.mjs +15 -3
  35. package/tests/aggregate/AggregateFixtures.res.mjs +15 -3
  36. package/tests/aggregate/AggregateSnapshotTest.res.mjs +21 -5
  37. package/tests/api/ApiNoApiTest.res +46 -0
  38. package/tests/api/ApiNoApiTest.res.mjs +49 -1
  39. package/tests/api/GraphQL_FragmentGeneratorTest.res.mjs +27 -3
  40. package/tests/commandgenerator/CommandGeneratorFixtures.res.mjs +12 -2
  41. package/tests/commandtopic/CommandOutcomeHookTest.res.mjs +2 -0
  42. package/tests/commandtopic/CommandTopicCallbackFixtures.res.mjs +12 -2
  43. package/tests/dcb/DcbFixtures.res.mjs +8 -0
  44. package/tests/dcb/DcbStateChangeSliceTest.res.mjs +18 -0
  45. package/tests/eventmapper/EventMapperFixtures.res.mjs +15 -3
  46. package/tests/extensionpoint/ExtensionPointFixtures.res.mjs +9 -1
  47. package/tests/extensionpoint/ExtensionPointOperationsTest.res.mjs +9 -1
  48. package/tests/message/MessageTest.res +2 -0
  49. package/tests/message/MessageTest.res.mjs +3 -1
  50. package/tests/plugin/PluginStructureAccessTest.res.mjs +2 -0
  51. package/tests/plugin/PluginStructureTest.res +191 -12
  52. package/tests/plugin/PluginStructureTest.res.mjs +246 -6
  53. package/tests/plugin/StateChangeSlice/PsAttachInvoice.res.mjs +8 -0
  54. package/tests/plugin/StateChangeSlice/PsChangePhoto.res.mjs +8 -0
  55. package/tests/plugin/StateChangeSlice/PsDispatchShipment.res +17 -7
  56. package/tests/plugin/StateChangeSlice/PsDispatchShipment.res.mjs +12 -11
  57. package/tests/plugin/StateChangeSlice/PsGatedCommands.res.mjs +8 -0
  58. package/tests/plugin/StateChangeSlice/PsPlaceOrder.res.mjs +8 -0
  59. package/tests/plugin/StateChangeSlice/PsReserveStock.res.mjs +8 -0
  60. package/tests/plugin/StateChangeSlice/PsShipOrder.res +17 -13
  61. package/tests/plugin/StateChangeSlice/PsShipOrder.res.mjs +17 -11
  62. package/tests/plugin/StateChangeSlice/PsTransitionSwitch.res +54 -0
  63. package/tests/plugin/StateChangeSlice/PsTransitionSwitch.res.mjs +104 -0
  64. package/tests/plugin/StateChangeSlice/PsTypoStore.res.mjs +8 -0
  65. package/tests/plugin/StateChangeSlice/PsUploadAvatar.res.mjs +8 -0
  66. package/tests/plugin/StateChangeSlice/PsUploadImages.res.mjs +8 -0
  67. package/tests/plugin/StateViewSlice/PsShipmentsView.res +1 -1
  68. package/tests/plugin/pluginDefinitionRequiredScalars.txt +18 -0
  69. package/tests/util/CommandPublisherTest.res.mjs +9 -1
  70. package/src/components/Api/ApiAllowedStatesHelpers.res +0 -18
  71. package/src/components/Api/ApiAllowedStatesHelpers.res.mjs +0 -16
  72. package/src/components/Api/ApiTargetStateHelpers.res +0 -21
  73. package/src/components/Api/ApiTargetStateHelpers.res.mjs +0 -16
@@ -26,6 +26,12 @@ function commandAuthorization(param) {
26
26
  return "AllowAuthenticated";
27
27
  }
28
28
 
29
+ function commandTransition(param) {
30
+ return "Unrestricted";
31
+ }
32
+
33
+ let traits = [];
34
+
29
35
  let AggSpec = {
30
36
  Id: undefined,
31
37
  name: name,
@@ -33,7 +39,9 @@ let AggSpec = {
33
39
  eventSchema: eventSchema,
34
40
  errorSchema: errorSchema,
35
41
  moduleUrl: moduleUrl,
36
- commandAuthorization: commandAuthorization
42
+ commandAuthorization: commandAuthorization,
43
+ commandTransition: commandTransition,
44
+ traits: traits
37
45
  };
38
46
 
39
47
  let initialState = {
@@ -194,7 +202,9 @@ let TestHandler = Aggregate_Callback$ReventlessCore.Make({
194
202
  errorSchema: errorSchema,
195
203
  commandSchema: commandSchema,
196
204
  moduleUrl: moduleUrl,
197
- commandAuthorization: commandAuthorization
205
+ commandAuthorization: commandAuthorization,
206
+ commandTransition: commandTransition,
207
+ traits: traits
198
208
  })({
199
209
  initialState: initialState,
200
210
  evolve: evolve,
@@ -215,7 +225,9 @@ let TestHandler = Aggregate_Callback$ReventlessCore.Make({
215
225
  errorSchema: errorSchema,
216
226
  commandSchema: commandSchema,
217
227
  moduleUrl: moduleUrl,
218
- commandAuthorization: commandAuthorization
228
+ commandAuthorization: commandAuthorization,
229
+ commandTransition: commandTransition,
230
+ traits: traits
219
231
  },
220
232
  EventLog: {
221
233
  Spec: {
@@ -40,6 +40,12 @@ function commandAuthorization(param) {
40
40
  return "AllowAuthenticated";
41
41
  }
42
42
 
43
+ function commandTransition(param) {
44
+ return "Unrestricted";
45
+ }
46
+
47
+ let traits = [];
48
+
43
49
  let AggSpec = {
44
50
  Id: undefined,
45
51
  name: name,
@@ -47,7 +53,9 @@ let AggSpec = {
47
53
  eventSchema: eventSchema,
48
54
  errorSchema: errorSchema,
49
55
  moduleUrl: moduleUrl,
50
- commandAuthorization: commandAuthorization
56
+ commandAuthorization: commandAuthorization,
57
+ commandTransition: commandTransition,
58
+ traits: traits
51
59
  };
52
60
 
53
61
  let stateSchema = Sury.union([
@@ -229,7 +237,9 @@ let TestHandler = Aggregate_Callback$ReventlessCore.Make({
229
237
  errorSchema: errorSchema,
230
238
  commandSchema: commandSchema,
231
239
  moduleUrl: moduleUrl,
232
- commandAuthorization: commandAuthorization
240
+ commandAuthorization: commandAuthorization,
241
+ commandTransition: commandTransition,
242
+ traits: traits
233
243
  })({
234
244
  initialState: "NotCreated",
235
245
  evolve: evolve,
@@ -250,7 +260,9 @@ let TestHandler = Aggregate_Callback$ReventlessCore.Make({
250
260
  errorSchema: errorSchema,
251
261
  commandSchema: commandSchema,
252
262
  moduleUrl: moduleUrl,
253
- commandAuthorization: commandAuthorization
263
+ commandAuthorization: commandAuthorization,
264
+ commandTransition: commandTransition,
265
+ traits: traits
254
266
  },
255
267
  EventLog: {
256
268
  Spec: {
@@ -32,6 +32,12 @@ function commandAuthorization(param) {
32
32
  return "AllowAuthenticated";
33
33
  }
34
34
 
35
+ function commandTransition(param) {
36
+ return "Unrestricted";
37
+ }
38
+
39
+ let traits = [];
40
+
35
41
  let AggSpec = {
36
42
  Id: undefined,
37
43
  name: name,
@@ -39,7 +45,9 @@ let AggSpec = {
39
45
  eventSchema: eventSchema,
40
46
  errorSchema: errorSchema,
41
47
  moduleUrl: moduleUrl,
42
- commandAuthorization: commandAuthorization
48
+ commandAuthorization: commandAuthorization,
49
+ commandTransition: commandTransition,
50
+ traits: traits
43
51
  };
44
52
 
45
53
  let stateSchema = Sury.$schema(s => ({
@@ -284,7 +292,9 @@ let TestHandler = Aggregate_Callback$ReventlessCore.Make({
284
292
  errorSchema: errorSchema,
285
293
  commandSchema: commandSchema,
286
294
  moduleUrl: moduleUrl,
287
- commandAuthorization: commandAuthorization
295
+ commandAuthorization: commandAuthorization,
296
+ commandTransition: commandTransition,
297
+ traits: traits
288
298
  })({
289
299
  initialState: initialState,
290
300
  evolve: evolve,
@@ -305,7 +315,9 @@ let TestHandler = Aggregate_Callback$ReventlessCore.Make({
305
315
  errorSchema: errorSchema,
306
316
  commandSchema: commandSchema,
307
317
  moduleUrl: moduleUrl,
308
- commandAuthorization: commandAuthorization
318
+ commandAuthorization: commandAuthorization,
319
+ commandTransition: commandTransition,
320
+ traits: traits
309
321
  },
310
322
  EventLog: {
311
323
  Spec: {
@@ -426,7 +438,9 @@ let PlainHandler = Aggregate_Callback$ReventlessCore.Make({
426
438
  errorSchema: errorSchema,
427
439
  commandSchema: commandSchema,
428
440
  moduleUrl: moduleUrl,
429
- commandAuthorization: commandAuthorization
441
+ commandAuthorization: commandAuthorization,
442
+ commandTransition: commandTransition,
443
+ traits: traits
430
444
  })({
431
445
  initialState: initialState$1,
432
446
  evolve: evolve$1,
@@ -447,7 +461,9 @@ let PlainHandler = Aggregate_Callback$ReventlessCore.Make({
447
461
  errorSchema: errorSchema,
448
462
  commandSchema: commandSchema,
449
463
  moduleUrl: moduleUrl,
450
- commandAuthorization: commandAuthorization
464
+ commandAuthorization: commandAuthorization,
465
+ commandTransition: commandTransition,
466
+ traits: traits
451
467
  },
452
468
  EventLog: {
453
469
  Spec: {
@@ -1,6 +1,52 @@
1
1
  open JestGlobals
2
2
  open ApiNoApiHelpers
3
3
 
4
+ // The exclusion has to survive a variant spread. Splicing copies a union's
5
+ // members, not its metadata, so an exclusion recorded only on the union vanishes
6
+ // on the way into the host — and the host publishes as a mutation and a
7
+ // subscription a command whose author marked it internal. No error, no warning.
8
+ //
9
+ // Built the way the PPX builds it (`markNoApiVariants` on a freshly made union),
10
+ // then spliced the way the compiler splices it (concatenating `anyOf`), so this
11
+ // exercises the real path rather than a hand-stamped stand-in.
12
+ let member = name =>
13
+ S.object(o => {
14
+ let _ = o.field("TAG", S.literal(name))
15
+ })->S.castToUnknown
16
+
17
+ let sourceUnion =
18
+ S.union([member("Public"), member("Internal")])->ReventlessInfra.Api.markNoApiVariants([
19
+ "Internal",
20
+ ])
21
+
22
+ let spliced = switch sourceUnion {
23
+ | AnyOf({anyOf}) => S.union(Array.concat([member("HostOwn")], anyOf))
24
+ | _ => sourceUnion
25
+ }
26
+
27
+ describe("a spread carries its exclusions", () => {
28
+ testSync("the source union still reports its own exclusion", () =>
29
+ expect(getExcludedVariants(sourceUnion)->Option.map(Set.toArray))->toEqual(Some(["Internal"]))
30
+ )
31
+
32
+ testSync("a host that splices the members inherits the exclusion", () =>
33
+ expect(getExcludedVariants(spliced)->Option.map(Set.toArray))->toEqual(Some(["Internal"]))
34
+ )
35
+
36
+ // The failure this closes, stated as the thing it must not do: the spliced
37
+ // internal variant must not appear among the host's callable fields.
38
+ testSync("the spliced internal variant is filtered out of a host's fields", () =>
39
+ expect(filterNoApiVariants(["HostOwn", "Public", "Internal"], spliced))->toEqual([
40
+ "HostOwn",
41
+ "Public",
42
+ ])
43
+ )
44
+
45
+ testSync("nothing else is filtered", () =>
46
+ expect(filterNoApiVariants(["HostOwn", "Public"], spliced))->toEqual(["HostOwn", "Public"])
47
+ )
48
+ })
49
+
4
50
  describe("ApiNoApiHelpers:", () => {
5
51
  testSync("isNoApi returns false for schema without noApi metadata", () => {
6
52
  let schema = S.string->S.castToUnknown
@@ -5,6 +5,49 @@ import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
5
5
  import * as Api$ReventlessInfra from "@reventlessdev/reventless-infra/src/components/Api.res.mjs";
6
6
  import * as ApiNoApiHelpers$ReventlessCore from "../../src/components/Api/ApiNoApiHelpers.res.mjs";
7
7
 
8
+ function member(name) {
9
+ return Sury.object(o => {
10
+ o.f("TAG", Sury.literal(name));
11
+ });
12
+ }
13
+
14
+ let sourceUnion = Api$ReventlessInfra.markNoApiVariants(Sury.union([
15
+ member("Public"),
16
+ member("Internal")
17
+ ]), ["Internal"]);
18
+
19
+ let spliced;
20
+
21
+ spliced = sourceUnion.type === "anyOf" ? Sury.union([member("HostOwn")].concat(sourceUnion.anyOf)) : sourceUnion;
22
+
23
+ globalThis.describe("a spread carries its exclusions", () => {
24
+ globalThis.test("the source union still reports its own exclusion", () => {
25
+ globalThis.expect(Stdlib_Option.map(ApiNoApiHelpers$ReventlessCore.getExcludedVariants(sourceUnion), prim => Array.from(prim))).toEqual(["Internal"]);
26
+ });
27
+ globalThis.test("a host that splices the members inherits the exclusion", () => {
28
+ globalThis.expect(Stdlib_Option.map(ApiNoApiHelpers$ReventlessCore.getExcludedVariants(spliced), prim => Array.from(prim))).toEqual(["Internal"]);
29
+ });
30
+ globalThis.test("the spliced internal variant is filtered out of a host's fields", () => {
31
+ globalThis.expect(ApiNoApiHelpers$ReventlessCore.filterNoApiVariants([
32
+ "HostOwn",
33
+ "Public",
34
+ "Internal"
35
+ ], spliced)).toEqual([
36
+ "HostOwn",
37
+ "Public"
38
+ ]);
39
+ });
40
+ globalThis.test("nothing else is filtered", () => {
41
+ globalThis.expect(ApiNoApiHelpers$ReventlessCore.filterNoApiVariants([
42
+ "HostOwn",
43
+ "Public"
44
+ ], spliced)).toEqual([
45
+ "HostOwn",
46
+ "Public"
47
+ ]);
48
+ });
49
+ });
50
+
8
51
  globalThis.describe("ApiNoApiHelpers:", () => {
9
52
  globalThis.test("isNoApi returns false for schema without noApi metadata", () => {
10
53
  let schema = Sury.string;
@@ -95,4 +138,9 @@ globalThis.describe("ApiNoApiHelpers:", () => {
95
138
  });
96
139
  });
97
140
 
98
- /* Not a pure module */
141
+ export {
142
+ member,
143
+ sourceUnion,
144
+ spliced,
145
+ }
146
+ /* sourceUnion Not a pure module */
@@ -24,9 +24,17 @@ function commandAuthorization(param) {
24
24
  return "AllowAuthenticated";
25
25
  }
26
26
 
27
+ function commandTransition(param) {
28
+ return "Unrestricted";
29
+ }
30
+
31
+ let traits = [];
32
+
27
33
  let OrderSliceCmd = {
28
34
  commandSchema: commandSchema,
29
- commandAuthorization: commandAuthorization
35
+ commandAuthorization: commandAuthorization,
36
+ commandTransition: commandTransition,
37
+ traits: traits
30
38
  };
31
39
 
32
40
  function mutationFor(fragment, needle) {
@@ -196,9 +204,17 @@ function commandAuthorization$1(param) {
196
204
  return "AllowAuthenticated";
197
205
  }
198
206
 
207
+ function commandTransition$1(param) {
208
+ return "Unrestricted";
209
+ }
210
+
211
+ let traits$1 = [];
212
+
199
213
  let AddProductCmd = {
200
214
  commandSchema: commandSchema$1,
201
- commandAuthorization: commandAuthorization$1
215
+ commandAuthorization: commandAuthorization$1,
216
+ commandTransition: commandTransition$1,
217
+ traits: traits$1
202
218
  };
203
219
 
204
220
  let commandSchema$2 = Sury.union([
@@ -217,9 +233,17 @@ function commandAuthorization$2(param) {
217
233
  return "AllowAuthenticated";
218
234
  }
219
235
 
236
+ function commandTransition$2(param) {
237
+ return "Unrestricted";
238
+ }
239
+
240
+ let traits$2 = [];
241
+
220
242
  let ChangePriceCmd = {
221
243
  commandSchema: commandSchema$2,
222
- commandAuthorization: commandAuthorization$2
244
+ commandAuthorization: commandAuthorization$2,
245
+ commandTransition: commandTransition$2,
246
+ traits: traits$2
223
247
  };
224
248
 
225
249
  globalThis.describe("semantic composites are named once, not once per field", () => {
@@ -32,6 +32,12 @@ function commandAuthorization(param) {
32
32
  return "AllowAuthenticated";
33
33
  }
34
34
 
35
+ function commandTransition(param) {
36
+ return "Unrestricted";
37
+ }
38
+
39
+ let traits = [];
40
+
35
41
  let CmdGenAggSpec = {
36
42
  Id: undefined,
37
43
  name: name,
@@ -39,7 +45,9 @@ let CmdGenAggSpec = {
39
45
  eventSchema: eventSchema,
40
46
  errorSchema: errorSchema,
41
47
  moduleUrl: moduleUrl,
42
- commandAuthorization: commandAuthorization
48
+ commandAuthorization: commandAuthorization,
49
+ commandTransition: commandTransition,
50
+ traits: traits
43
51
  };
44
52
 
45
53
  let moduleUrl$1 = import.meta.url;
@@ -106,7 +114,9 @@ let TestGenerator = CommandGenerator_Callback$ReventlessCore.Make(MockPublishSpe
106
114
  errorSchema: errorSchema,
107
115
  commandSchema: commandSchema,
108
116
  moduleUrl: moduleUrl,
109
- commandAuthorization: commandAuthorization
117
+ commandAuthorization: commandAuthorization,
118
+ commandTransition: commandTransition,
119
+ traits: traits
110
120
  });
111
121
 
112
122
  let singleTagCommandSchema = Sury.$schema(s => ({
@@ -65,6 +65,8 @@ let SliceHandler = StateChangeSlice_Callback$ReventlessCore.Make({
65
65
  eventSchema: DcbFixtures$ReventlessCore.TestCommandSpec.eventSchema,
66
66
  commandSchema: DcbFixtures$ReventlessCore.TestCommandSpec.commandSchema,
67
67
  commandAuthorization: DcbFixtures$ReventlessCore.TestCommandSpec.commandAuthorization,
68
+ commandTransition: DcbFixtures$ReventlessCore.TestCommandSpec.commandTransition,
69
+ traits: DcbFixtures$ReventlessCore.TestCommandSpec.traits,
68
70
  readConsistency: DcbFixtures$ReventlessCore.TestCommandSpec.readConsistency
69
71
  })(SliceBehavior);
70
72
 
@@ -25,11 +25,19 @@ function commandAuthorization(param) {
25
25
  return "AllowAuthenticated";
26
26
  }
27
27
 
28
+ function commandTransition(param) {
29
+ return "Unrestricted";
30
+ }
31
+
32
+ let traits = [];
33
+
28
34
  let TestSpec = {
29
35
  Id: undefined,
30
36
  name: name,
31
37
  commandSchema: commandSchema,
32
- commandAuthorization: commandAuthorization
38
+ commandAuthorization: commandAuthorization,
39
+ commandTransition: commandTransition,
40
+ traits: traits
33
41
  };
34
42
 
35
43
  let capturedItems = {
@@ -64,7 +72,9 @@ let TestOps_Spec = {
64
72
  Id: Id$Reventless.StringPure,
65
73
  name: name,
66
74
  commandSchema: commandSchema,
67
- commandAuthorization: commandAuthorization
75
+ commandAuthorization: commandAuthorization,
76
+ commandTransition: commandTransition,
77
+ traits: traits
68
78
  };
69
79
 
70
80
  let TestOps = {
@@ -156,6 +156,12 @@ function commandAuthorization(param) {
156
156
  return "AllowAuthenticated";
157
157
  }
158
158
 
159
+ function commandTransition(param) {
160
+ return "Unrestricted";
161
+ }
162
+
163
+ let traits = [];
164
+
159
165
  let TestCommandSpec_initialState = {
160
166
  exists: false,
161
167
  currentName: undefined
@@ -173,6 +179,8 @@ let TestCommandSpec = {
173
179
  evolve: evolve,
174
180
  decide: decide,
175
181
  commandAuthorization: commandAuthorization,
182
+ commandTransition: commandTransition,
183
+ traits: traits,
176
184
  readConsistency: "EscalateOnRetry"
177
185
  };
178
186
 
@@ -61,6 +61,8 @@ let TestHandler = StateChangeSlice_Callback$ReventlessCore.Make({
61
61
  eventSchema: DcbFixtures$ReventlessCore.TestCommandSpec.eventSchema,
62
62
  commandSchema: DcbFixtures$ReventlessCore.TestCommandSpec.commandSchema,
63
63
  commandAuthorization: DcbFixtures$ReventlessCore.TestCommandSpec.commandAuthorization,
64
+ commandTransition: DcbFixtures$ReventlessCore.TestCommandSpec.commandTransition,
65
+ traits: DcbFixtures$ReventlessCore.TestCommandSpec.traits,
64
66
  readConsistency: DcbFixtures$ReventlessCore.TestCommandSpec.readConsistency
65
67
  })(TestCommandBehavior);
66
68
 
@@ -78,6 +80,10 @@ let errorSchema = DcbFixtures$ReventlessCore.TestCommandSpec.errorSchema;
78
80
 
79
81
  let commandAuthorization = DcbFixtures$ReventlessCore.TestCommandSpec.commandAuthorization;
80
82
 
83
+ let commandTransition = DcbFixtures$ReventlessCore.TestCommandSpec.commandTransition;
84
+
85
+ let traits = DcbFixtures$ReventlessCore.TestCommandSpec.traits;
86
+
81
87
  let StrongSpec_Id = DcbFixtures$ReventlessCore.TestCommandSpec.Id;
82
88
 
83
89
  let StrongSpec_initialState = DcbFixtures$ReventlessCore.TestCommandSpec.initialState;
@@ -98,6 +104,8 @@ let StrongSpec = {
98
104
  evolve: StrongSpec_evolve,
99
105
  decide: StrongSpec_decide,
100
106
  commandAuthorization: commandAuthorization,
107
+ commandTransition: commandTransition,
108
+ traits: traits,
101
109
  readConsistency: "AlwaysStrong"
102
110
  };
103
111
 
@@ -115,6 +123,10 @@ let errorSchema$1 = DcbFixtures$ReventlessCore.TestCommandSpec.errorSchema;
115
123
 
116
124
  let commandAuthorization$1 = DcbFixtures$ReventlessCore.TestCommandSpec.commandAuthorization;
117
125
 
126
+ let commandTransition$1 = DcbFixtures$ReventlessCore.TestCommandSpec.commandTransition;
127
+
128
+ let traits$1 = DcbFixtures$ReventlessCore.TestCommandSpec.traits;
129
+
118
130
  let EventualSpec_Id = DcbFixtures$ReventlessCore.TestCommandSpec.Id;
119
131
 
120
132
  let EventualSpec_initialState = DcbFixtures$ReventlessCore.TestCommandSpec.initialState;
@@ -135,6 +147,8 @@ let EventualSpec = {
135
147
  evolve: EventualSpec_evolve,
136
148
  decide: EventualSpec_decide,
137
149
  commandAuthorization: commandAuthorization$1,
150
+ commandTransition: commandTransition$1,
151
+ traits: traits$1,
138
152
  readConsistency: "AlwaysEventual"
139
153
  };
140
154
 
@@ -147,6 +161,8 @@ let StrongHandler = StateChangeSlice_Callback$ReventlessCore.Make({
147
161
  eventSchema: eventSchema,
148
162
  commandSchema: commandSchema,
149
163
  commandAuthorization: commandAuthorization,
164
+ commandTransition: commandTransition,
165
+ traits: traits,
150
166
  readConsistency: "AlwaysStrong"
151
167
  })(TestCommandBehavior);
152
168
 
@@ -159,6 +175,8 @@ let EventualHandler = StateChangeSlice_Callback$ReventlessCore.Make({
159
175
  eventSchema: eventSchema$1,
160
176
  commandSchema: commandSchema$1,
161
177
  commandAuthorization: commandAuthorization$1,
178
+ commandTransition: commandTransition$1,
179
+ traits: traits$1,
162
180
  readConsistency: "AlwaysEventual"
163
181
  })(TestCommandBehavior);
164
182
 
@@ -153,12 +153,20 @@ function commandAuthorization(param) {
153
153
  return "AllowAuthenticated";
154
154
  }
155
155
 
156
+ function commandTransition(param) {
157
+ return "Unrestricted";
158
+ }
159
+
160
+ let traits = [];
161
+
156
162
  let CmdTargetSpec = {
157
163
  Id: undefined,
158
164
  name: name$3,
159
165
  commandSchema: commandSchema,
160
166
  moduleUrl: moduleUrl$2,
161
- commandAuthorization: commandAuthorization
167
+ commandAuthorization: commandAuthorization,
168
+ commandTransition: commandTransition,
169
+ traits: traits
162
170
  };
163
171
 
164
172
  function map(id, event, _queryEngine) {
@@ -233,7 +241,9 @@ let OrderMappings_Target = {
233
241
  name: name$3,
234
242
  commandSchema: commandSchema,
235
243
  moduleUrl: moduleUrl$2,
236
- commandAuthorization: commandAuthorization
244
+ commandAuthorization: commandAuthorization,
245
+ commandTransition: commandTransition,
246
+ traits: traits
237
247
  };
238
248
 
239
249
  let OrderMappings = {
@@ -262,7 +272,9 @@ let CountOrderMappings_Target = {
262
272
  name: name$3,
263
273
  commandSchema: commandSchema,
264
274
  moduleUrl: moduleUrl$2,
265
- commandAuthorization: commandAuthorization
275
+ commandAuthorization: commandAuthorization,
276
+ commandTransition: commandTransition,
277
+ traits: traits
266
278
  };
267
279
 
268
280
  let CountOrderMappings = {
@@ -30,13 +30,21 @@ function commandAuthorization(param) {
30
30
  return "AllowAuthenticated";
31
31
  }
32
32
 
33
+ function commandTransition(param) {
34
+ return "Unrestricted";
35
+ }
36
+
37
+ let traits = [];
38
+
33
39
  let TestEPSpec = {
34
40
  name: name,
35
41
  commandSchema: commandSchema,
36
42
  eventSchema: eventSchema,
37
43
  directiveSchema: directiveSchema,
38
44
  moduleUrl: moduleUrl,
39
- commandAuthorization: commandAuthorization
45
+ commandAuthorization: commandAuthorization,
46
+ commandTransition: commandTransition,
47
+ traits: traits
40
48
  };
41
49
 
42
50
  let capturedPublishedCmds = {
@@ -25,13 +25,21 @@ function commandAuthorization(param) {
25
25
  return "AllowAuthenticated";
26
26
  }
27
27
 
28
+ function commandTransition(param) {
29
+ return "Unrestricted";
30
+ }
31
+
32
+ let traits = [];
33
+
28
34
  let OpsEPSpec = {
29
35
  name: name,
30
36
  commandSchema: commandSchema,
31
37
  eventSchema: eventSchema,
32
38
  directiveSchema: directiveSchema,
33
39
  moduleUrl: moduleUrl,
34
- commandAuthorization: commandAuthorization
40
+ commandAuthorization: commandAuthorization,
41
+ commandTransition: commandTransition,
42
+ traits: traits
35
43
  };
36
44
 
37
45
  let capturedPublished = {
@@ -133,6 +133,8 @@ describe("Message should", () => {
133
133
  extensionPoints: None,
134
134
  requiredStores: None,
135
135
  requiredStoreDeclarations: None,
136
+ requiredCapabilities: None,
137
+ traitDeclarations: None,
136
138
  })),
137
139
  dcbEventLog: None,
138
140
  kind: Domain,
@@ -124,7 +124,9 @@ globalThis.describe("Message should", () => {
124
124
  extensions: [],
125
125
  extensionPoints: undefined,
126
126
  requiredStores: undefined,
127
- requiredStoreDeclarations: undefined
127
+ requiredStoreDeclarations: undefined,
128
+ requiredCapabilities: undefined,
129
+ traitDeclarations: undefined
128
130
  }
129
131
  },
130
132
  dcbEventLog: undefined,
@@ -28,6 +28,8 @@ let PsGatedCommandsSlice_Spec = {
28
28
  eventSchema: PsGatedCommands$ReventlessCore.eventSchema,
29
29
  commandSchema: PsGatedCommands$ReventlessCore.commandSchema,
30
30
  commandAuthorization: PsGatedCommands$ReventlessCore.commandAuthorization,
31
+ commandTransition: PsGatedCommands$ReventlessCore.commandTransition,
32
+ traits: PsGatedCommands$ReventlessCore.traits,
31
33
  readConsistency: PsGatedCommands$ReventlessCore.readConsistency
32
34
  };
33
35