@reventlessdev/reventless-aws 3.0.0-alpha.387 → 3.0.0-alpha.389

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 (92) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +1 -1
  3. package/package.json +12 -12
  4. package/scripts/ProvisionIdentity.res +1 -1
  5. package/src/Platform.res +14 -14
  6. package/src/Platform.res.mjs +30 -30
  7. package/src/Platform_Stack.res +3 -3
  8. package/src/adapter/AWS_Tags.res +1 -1
  9. package/src/adapter/Api/Platform_ComponentDefinitions_Lambda.res +1 -1
  10. package/src/adapter/Api/Platform_ComponentDefinitions_Lambda_Ops.res +7 -7
  11. package/src/adapter/Api/Platform_ComponentDefinitions_Lambda_Ops.res.mjs +5 -5
  12. package/src/adapter/Auth/Auth_ActiveRolePoolAttachment.res +1 -1
  13. package/src/adapter/Auth/Auth_ActiveRoleStore_Ops.res +2 -2
  14. package/src/adapter/Auth/Auth_ActiveRoleStore_Schema.res +1 -1
  15. package/src/adapter/Auth/Auth_Cognito.res +1 -1
  16. package/src/adapter/Auth/Auth_LoginIdentifier.res +1 -1
  17. package/src/adapter/Auth/Auth_SignUpMode.res +1 -1
  18. package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb_Runtime.res +2 -2
  19. package/src/adapter/EventLog/EventLogBackend.res +1 -1
  20. package/src/adapter/QueryDb/PgQueryResolver_Lambda.res +2 -2
  21. package/src/adapter/Runtime/AggregateEntryPoint.mjs +6 -6
  22. package/src/adapter/Runtime/AggregateEntryPoint_Ops.res +1 -1
  23. package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res +20 -10
  24. package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res.mjs +7 -7
  25. package/src/adapter/Runtime/AggregateRuntime_Builder_Micro_Async.res +20 -10
  26. package/src/adapter/Runtime/AggregateRuntime_Builder_Micro_Async.res.mjs +7 -7
  27. package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate.res +19 -9
  28. package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate.res.mjs +6 -6
  29. package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate_Async.res +19 -9
  30. package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate_Async.res.mjs +6 -6
  31. package/src/adapter/Runtime/AggregateRuntime_Builder_Single.res +19 -9
  32. package/src/adapter/Runtime/AggregateRuntime_Builder_Single.res.mjs +6 -6
  33. package/src/adapter/Runtime/AggregateRuntime_Builder_Single_Async.res +19 -9
  34. package/src/adapter/Runtime/AggregateRuntime_Builder_Single_Async.res.mjs +6 -6
  35. package/src/adapter/Runtime/AutomationSliceEntryPoint_Ops.res +1 -1
  36. package/src/adapter/Runtime/AutomationSliceRuntime_Builder_Single.res +8 -3
  37. package/src/adapter/Runtime/DcbCommandTopicEntryPoint.mjs +7 -7
  38. package/src/adapter/Runtime/DcbCommandTopicEntryPoint_Ops.res +7 -7
  39. package/src/adapter/Runtime/DcbCommandTopicEntryPoint_Ops.res.mjs +2 -2
  40. package/src/adapter/Runtime/EventCollectorEntryPoint.mjs +1 -1
  41. package/src/adapter/Runtime/EventCollectorRuntime_Builder_PerEventCollector.res +6 -1
  42. package/src/adapter/Runtime/EventCollectorRuntime_Builder_Single.res +6 -1
  43. package/src/adapter/Runtime/RuntimeEnvironment_Lambda.res +4 -4
  44. package/src/adapter/Runtime/RuntimeExtensionEntryPoint_Ops.res +2 -2
  45. package/src/adapter/Runtime/SideEffectHandlerRuntime_Builder_Single.res +6 -1
  46. package/src/adapter/Runtime/StateChangeSliceRuntime_Builder_Single.res +10 -10
  47. package/src/adapter/Runtime/StateChangeSliceRuntime_Builder_Single.res.mjs +3 -3
  48. package/src/adapter/Runtime/StateViewSliceRuntime_Builder_Single.res +6 -1
  49. package/src/adapter/StateTopic/StateTopic_AppSync.res +2 -2
  50. package/src/capability/Capability_Messaging.res +2 -2
  51. package/src/components/Aggregate_Builder_Micro.res +3 -3
  52. package/src/components/Aggregate_Builder_Micro.res.mjs +3 -3
  53. package/src/components/Aggregate_Builder_NoResolver.res +3 -3
  54. package/src/components/Aggregate_Builder_NoResolver.res.mjs +3 -3
  55. package/src/components/Aggregate_Builder_PerAggregate.res +3 -3
  56. package/src/components/Aggregate_Builder_PerAggregate.res.mjs +3 -3
  57. package/src/components/Aggregate_Builder_Single.res +3 -3
  58. package/src/components/Aggregate_Builder_Single.res.mjs +3 -3
  59. package/src/components/Aggregate_Builder_Single_Async.res +3 -3
  60. package/src/components/Aggregate_Builder_Single_Async.res.mjs +3 -3
  61. package/src/components/Api/AppSync_Adapter.res +3 -3
  62. package/src/components/Api/AppSync_SdlDecorate.res +3 -3
  63. package/src/components/SideEffectHandler_PerSideEffectHandler.res +1 -1
  64. package/src/components/StateChangeSlice_Builder.res +4 -4
  65. package/src/components/StateChangeSlice_Builder.res.mjs +4 -4
  66. package/src/plugin/runtime/PluginRuntime_Builder.res +7 -7
  67. package/src/plugin/runtime/PluginRuntime_Builder.res.mjs +3 -3
  68. package/src/plugin/stack/Plugin_Stack.res +1 -1
  69. package/src/util/Util_Bundle.res +1 -1
  70. package/tests/AppSync_AdapterTest.res +1 -1
  71. package/tests/AppSync_RetirementNarrowingTest.res +1 -1
  72. package/tests/AppSync_SdlDecorateTest.res +1 -1
  73. package/tests/Auth_LoginIdentifierTest.res +1 -1
  74. package/tests/Auth_SignUpModeTest.res +1 -1
  75. package/tests/BakeConvergenceTest.res +11 -11
  76. package/tests/BakeConvergenceTest.res.mjs +13 -13
  77. package/tests/QueryDbResolvers_AppSyncTest.res +1 -1
  78. package/tests/Upload_ClaimTest.res +1 -1
  79. package/tests/Util_AwsErrorTest.res +1 -1
  80. package/tests/Util_StoreLayoutTest.res +1 -1
  81. package/tests/dcbColdStartPartition.mjs +3 -3
  82. package/tests/integration/{AggTestAggregateBehavior.res → AggTestAggregateDecision.res} +2 -2
  83. package/tests/integration/{AggTestAggregateBehavior.res.mjs → AggTestAggregateDecision.res.mjs} +1 -1
  84. package/tests/integration/AggregateEntryPoint_IntegrationTest.res +3 -3
  85. package/tests/integration/AggregateEntryPoint_IntegrationTest.res.mjs +2 -2
  86. package/tests/integration/DcbCommandTopicEntryPoint_IntegrationTest.res +5 -5
  87. package/tests/integration/DcbCommandTopicEntryPoint_IntegrationTest.res.mjs +4 -4
  88. package/tests/integration/DcbEventLogStorage_DynamoDb_IntegrationTest.res +1 -1
  89. package/tests/integration/{EpCompositeSliceBehavior.res → EpCompositeSliceDecision.res} +2 -2
  90. package/tests/integration/{EpCompositeSliceBehavior.res.mjs → EpCompositeSliceDecision.res.mjs} +1 -1
  91. package/tests/integration/{EpTestSliceBehavior.res → EpTestSliceDecision.res} +2 -2
  92. package/tests/integration/{EpTestSliceBehavior.res.mjs → EpTestSliceDecision.res.mjs} +1 -1
@@ -12,8 +12,8 @@ import * as EventCollectorChannel_DynamoDbStream$ReventlessAws from "../adapter/
12
12
  import * as AggregateRuntime_Builder_PerAggregate$ReventlessAws from "../adapter/Runtime/AggregateRuntime_Builder_PerAggregate.res.mjs";
13
13
 
14
14
  function Make(Spec) {
15
- return Behavior => (EventMappings => {
16
- let Inner = Aggregate_Builder$ReventlessCore.Make(Spec)(Behavior)({
15
+ return Decision => (EventMappings => {
16
+ let Inner = Aggregate_Builder$ReventlessCore.Make(Spec)(Decision)({
17
17
  mappings: EventMappings.mappings,
18
18
  counter: EventMappings.counter
19
19
  })({
@@ -48,7 +48,7 @@ function Make(Spec) {
48
48
  let eventLogOutputs = Inner.outputs(aggregate).eventLog;
49
49
  let tableResource = eventLogOutputs.resources[0];
50
50
  let eventLogTableName = tableResource.name;
51
- AggregateRuntime_Builder_PerAggregate$ReventlessAws.registerAggregate(Spec.name, Util_Bundle$ReventlessAws.getModuleSpecifier(Spec.moduleUrl), Util_Bundle$ReventlessAws.getModuleSpecifier(Behavior.moduleUrl), eventLogTableName);
51
+ AggregateRuntime_Builder_PerAggregate$ReventlessAws.registerAggregate(Spec.name, Util_Bundle$ReventlessAws.getModuleSpecifier(Spec.moduleUrl), Util_Bundle$ReventlessAws.getModuleSpecifier(Decision.moduleUrl), eventLogTableName);
52
52
  return aggregate;
53
53
  };
54
54
  let finish = () => AggregateRuntime_Builder_PerAggregate$ReventlessAws.finish();
@@ -7,7 +7,7 @@ module AggregateRuntimeBuilder = AggregateRuntime_Builder_Single
7
7
 
8
8
  module Make = (
9
9
  Spec: Reventless.Aggregate.Spec,
10
- Behavior: Reventless.Behavior.T with module Spec := Spec,
10
+ Decision: Reventless.Decision.T with module Spec := Spec,
11
11
  EventMappings: ReventlessInfra.EventMapper.Mappings with module Target := Spec,
12
12
  ): (
13
13
  ReventlessInfra.Aggregate.T
@@ -16,7 +16,7 @@ module Make = (
16
16
  ) => {
17
17
  module Inner = ReventlessCore.Aggregate_Builder.Make(
18
18
  Spec,
19
- Behavior,
19
+ Decision,
20
20
  EventMappings,
21
21
  RuntimeEnvironment,
22
22
  CommandGeneratorResolvers,
@@ -53,7 +53,7 @@ module Make = (
53
53
  AggregateRuntimeBuilder.registerAggregate(
54
54
  ~aggregateName=Spec.name,
55
55
  ~specModulePath=Util_Bundle.getModuleSpecifier(Spec.moduleUrl),
56
- ~behaviorModulePath=Util_Bundle.getModuleSpecifier(Behavior.moduleUrl),
56
+ ~decisionModulePath=Util_Bundle.getModuleSpecifier(Decision.moduleUrl),
57
57
  ~eventLogTableName,
58
58
  )
59
59
 
@@ -14,8 +14,8 @@ import * as EventTopicPublisher_DynamoDbStream$ReventlessAws from "../adapter/Ev
14
14
  import * as EventCollectorChannel_DynamoDbStream$ReventlessAws from "../adapter/EventCollector/EventCollectorChannel_DynamoDbStream.res.mjs";
15
15
 
16
16
  function Make(Spec) {
17
- return Behavior => (EventMappings => {
18
- let Inner = Aggregate_Builder$ReventlessCore.Make(Spec)(Behavior)({
17
+ return Decision => (EventMappings => {
18
+ let Inner = Aggregate_Builder$ReventlessCore.Make(Spec)(Decision)({
19
19
  mappings: EventMappings.mappings,
20
20
  counter: EventMappings.counter
21
21
  })({
@@ -54,7 +54,7 @@ function Make(Spec) {
54
54
  let eventLogOutputs = Inner.outputs(aggregate).eventLog;
55
55
  eventLogTableName = eventLogOutputs.resources[0].name;
56
56
  }
57
- AggregateRuntime_Builder_Single$ReventlessAws.registerAggregate(Spec.name, Util_Bundle$ReventlessAws.getModuleSpecifier(Spec.moduleUrl), Util_Bundle$ReventlessAws.getModuleSpecifier(Behavior.moduleUrl), eventLogTableName);
57
+ AggregateRuntime_Builder_Single$ReventlessAws.registerAggregate(Spec.name, Util_Bundle$ReventlessAws.getModuleSpecifier(Spec.moduleUrl), Util_Bundle$ReventlessAws.getModuleSpecifier(Decision.moduleUrl), eventLogTableName);
58
58
  return aggregate;
59
59
  };
60
60
  let finish = () => AggregateRuntime_Builder_Single$ReventlessAws.finish();
@@ -7,7 +7,7 @@ module AggregateRuntimeBuilder = AggregateRuntime_Builder_Single_Async
7
7
 
8
8
  module Make = (
9
9
  Spec: Reventless.Aggregate.Spec,
10
- Behavior: Reventless.Behavior.T with module Spec := Spec,
10
+ Decision: Reventless.Decision.T with module Spec := Spec,
11
11
  EventMappings: ReventlessInfra.EventMapper.Mappings with module Target := Spec,
12
12
  ): (
13
13
  ReventlessInfra.Aggregate.T
@@ -16,7 +16,7 @@ module Make = (
16
16
  ) => {
17
17
  module Inner = ReventlessCore.Aggregate_Builder.Make(
18
18
  Spec,
19
- Behavior,
19
+ Decision,
20
20
  EventMappings,
21
21
  RuntimeEnvironment,
22
22
  CommandGeneratorResolvers,
@@ -53,7 +53,7 @@ module Make = (
53
53
  AggregateRuntimeBuilder.registerAggregate(
54
54
  ~aggregateName=Spec.name,
55
55
  ~specModulePath=Util_Bundle.getModuleSpecifier(Spec.moduleUrl),
56
- ~behaviorModulePath=Util_Bundle.getModuleSpecifier(Behavior.moduleUrl),
56
+ ~decisionModulePath=Util_Bundle.getModuleSpecifier(Decision.moduleUrl),
57
57
  ~eventLogTableName,
58
58
  )
59
59
 
@@ -14,8 +14,8 @@ import * as EventCollectorChannel_DynamoDbStream$ReventlessAws from "../adapter/
14
14
  import * as AggregateRuntime_Builder_Single_Async$ReventlessAws from "../adapter/Runtime/AggregateRuntime_Builder_Single_Async.res.mjs";
15
15
 
16
16
  function Make(Spec) {
17
- return Behavior => (EventMappings => {
18
- let Inner = Aggregate_Builder$ReventlessCore.Make(Spec)(Behavior)({
17
+ return Decision => (EventMappings => {
18
+ let Inner = Aggregate_Builder$ReventlessCore.Make(Spec)(Decision)({
19
19
  mappings: EventMappings.mappings,
20
20
  counter: EventMappings.counter
21
21
  })({
@@ -54,7 +54,7 @@ function Make(Spec) {
54
54
  let eventLogOutputs = Inner.outputs(aggregate).eventLog;
55
55
  eventLogTableName = eventLogOutputs.resources[0].name;
56
56
  }
57
- AggregateRuntime_Builder_Single_Async$ReventlessAws.registerAggregate(Spec.name, Util_Bundle$ReventlessAws.getModuleSpecifier(Spec.moduleUrl), Util_Bundle$ReventlessAws.getModuleSpecifier(Behavior.moduleUrl), eventLogTableName);
57
+ AggregateRuntime_Builder_Single_Async$ReventlessAws.registerAggregate(Spec.name, Util_Bundle$ReventlessAws.getModuleSpecifier(Spec.moduleUrl), Util_Bundle$ReventlessAws.getModuleSpecifier(Decision.moduleUrl), eventLogTableName);
58
58
  return aggregate;
59
59
  };
60
60
  let finish = () => AggregateRuntime_Builder_Single_Async$ReventlessAws.finish();
@@ -197,13 +197,13 @@ let rec waitForMergeSuccess = async (
197
197
  // the opposite of what the spec says. AppSync has no anonymous mode to emit
198
198
  // instead (`authenticationType` is API_KEY | AWS_IAM | AMAZON_COGNITO_USER_POOLS
199
199
  // | OPENID_CONNECT, and this adapter provisions Cognito primary with AWS_IAM
200
- // additional), so there is no directive that means "no auth". The old behaviour
200
+ // additional), so there is no directive that means "no auth". The old behavior
201
201
  // deployed green, passed `assertGateable`, worked on the local platform — whose
202
- // resolvers call `Authorization.isAllowed` and honour the rule — and refused
202
+ // resolvers call `Authorization.isAllowed` and honor the rule — and refused
203
203
  // anonymous callers only on AWS. It failed CLOSED, which is why nothing
204
204
  // surfaced it.
205
205
  //
206
- // Refusing follows `Auth_LoginIdentifier`'s rule for an unrecognised spelling:
206
+ // Refusing follows `Auth_LoginIdentifier`'s rule for an unrecognized spelling:
207
207
  // a silent contradiction of the source is worse than a stopped deploy, because
208
208
  // only one of the two is discoverable. AppSync mutations have no runtime
209
209
  // authorization check to fall back on — the only `Authorization.isAllowed` call
@@ -71,7 +71,7 @@ let injectAwsSubscribe = (
71
71
  // Cognito group gate. `@aws_cognito_user_pools(cognito_groups: [...])` — NOT the
72
72
  // single-mode `@aws_auth(cognito_groups: [...])`.
73
73
  //
74
- // `@aws_auth` is honoured only on an API whose sole authorization mode is
74
+ // `@aws_auth` is honored only on an API whose sole authorization mode is
75
75
  // AMAZON_COGNITO_USER_POOLS. This adapter always configures AWS_IAM as an
76
76
  // additional provider (see AppSync_Adapter's api args — the server-to-server
77
77
  // lambdas need it), so every API we provision is multi-auth and the service
@@ -323,7 +323,7 @@ let stampTypeDualAuth = (decl: string): string =>
323
323
  //
324
324
  // Two conditions, and the second is the one that matters:
325
325
  //
326
- // 1. A root field or object type carrying NO directive AppSync honours here
326
+ // 1. A root field or object type carrying NO directive AppSync honors here
327
327
  // is reachable by any authenticated Cognito caller under `ALLOW`.
328
328
  // 2. ANY `@aws_auth` at all. It is the single-mode form, silently ignored on
329
329
  // a multi-auth API — so its presence means something believes it is gated
@@ -332,7 +332,7 @@ let stampTypeDualAuth = (decl: string): string =>
332
332
  // Condition 2 is why this is not merely "does it have a directive?". The
333
333
  // original outage had `@aws_auth(cognito_groups: ["Admin"])` present on all 18
334
334
  // admin fields for its entire life; a presence check would have passed it every
335
- // single time. Only a check that knows WHICH directive the service honours
335
+ // single time. Only a check that knows WHICH directive the service honors
336
336
  // would have failed that deploy.
337
337
  let enforcedDirectives = ["@aws_cognito_user_pools", "@aws_iam"]
338
338
 
@@ -13,7 +13,7 @@
13
13
  // in that registry, so it took the builder's `None` arm, logged
14
14
  // "no bundled info registered", and created nothing — silently.
15
15
  //
16
- // Matching signatures are not matching behaviour. The registry a builder reads is
16
+ // Matching signatures are not matching behavior. The registry a builder reads is
17
17
  // the part that has to line up: side-effect handlers need `sideEffectInfos` and
18
18
  // `SideEffectEntryPoint.mjs`, which is what `SideEffectHandler_Single` registers into.
19
19
  //
@@ -2,15 +2,15 @@
2
2
 
3
3
  module Make = (
4
4
  Spec: Reventless.StateChangeSlice.Spec,
5
- Behavior: Reventless.StateChangeSlice.Behavior with module Spec := Spec,
5
+ Decision: Reventless.StateChangeSlice.Decision with module Spec := Spec,
6
6
  ): (ReventlessCore.StateChangeSlice.T with module Spec = Spec) => {
7
7
  PluginRuntime_Builder.registerStateChangeSliceSpec(
8
8
  ~specPath=Util_Bundle.getModuleSpecifier(Spec.moduleUrl),
9
- ~behaviorPath=Util_Bundle.getModuleSpecifier(Behavior.moduleUrl),
9
+ ~decisionPath=Util_Bundle.getModuleSpecifier(Decision.moduleUrl),
10
10
  )
11
- module Inner = ReventlessCore.StateChangeSlice_Builder.Make(Spec, Behavior)
11
+ module Inner = ReventlessCore.StateChangeSlice_Builder.Make(Spec, Decision)
12
12
  module Spec = Spec
13
- module Behavior = Behavior
13
+ module Decision = Decision
14
14
  let isAsync = Inner.isAsync
15
15
  type component = Inner.component
16
16
  let make = Inner.make
@@ -5,12 +5,12 @@ import * as PluginRuntime_Builder$ReventlessAws from "../plugin/runtime/PluginRu
5
5
  import * as StateChangeSlice_Builder$ReventlessCore from "@reventlessdev/reventless-core/src/components/StateChangeSlice/StateChangeSlice_Builder.res.mjs";
6
6
 
7
7
  function Make(Spec) {
8
- return Behavior => {
9
- PluginRuntime_Builder$ReventlessAws.registerStateChangeSliceSpec(Util_Bundle$ReventlessAws.getModuleSpecifier(Spec.moduleUrl), Util_Bundle$ReventlessAws.getModuleSpecifier(Behavior.moduleUrl));
10
- let Inner = StateChangeSlice_Builder$ReventlessCore.Make(Spec)(Behavior);
8
+ return Decision => {
9
+ PluginRuntime_Builder$ReventlessAws.registerStateChangeSliceSpec(Util_Bundle$ReventlessAws.getModuleSpecifier(Spec.moduleUrl), Util_Bundle$ReventlessAws.getModuleSpecifier(Decision.moduleUrl));
10
+ let Inner = StateChangeSlice_Builder$ReventlessCore.Make(Spec)(Decision);
11
11
  return {
12
12
  Spec: Spec,
13
- Behavior: Behavior,
13
+ Decision: Decision,
14
14
  isAsync: Inner.isAsync,
15
15
  make: Inner.make
16
16
  };
@@ -93,7 +93,7 @@ let messagingProvisioned = () => messagingProvisionedRef.contents
93
93
 
94
94
  type sliceModulePaths = {
95
95
  specPath: string,
96
- behaviorPath: string,
96
+ decisionPath: string,
97
97
  }
98
98
 
99
99
  type dcbConfig = {
@@ -110,8 +110,8 @@ let dcbConfigRef: ref<dcbConfig> = ref({
110
110
 
111
111
  let registeredSliceModulePaths: array<sliceModulePaths> = []
112
112
 
113
- let registerStateChangeSliceSpec = (~specPath: string, ~behaviorPath: string) => {
114
- let _ = registeredSliceModulePaths->Array.push({specPath, behaviorPath})
113
+ let registerStateChangeSliceSpec = (~specPath: string, ~decisionPath: string) => {
114
+ let _ = registeredSliceModulePaths->Array.push({specPath, decisionPath})
115
115
  }
116
116
 
117
117
  // InboundTranslationSlice registration for the shared DCB command Lambda. Unlike
@@ -338,7 +338,7 @@ module Make = (
338
338
  }
339
339
 
340
340
  let forPluginEventCollector: ReventlessCore.Runtime.forEventCollector<
341
- ReventlessCore.Runtime.effectHandler<
341
+ ReventlessCore.Runtime.effectInvocationHandler<
342
342
  EventCollectorChannel.callbackEvent,
343
343
  context,
344
344
  unit,
@@ -873,7 +873,7 @@ module Make = (
873
873
  }
874
874
 
875
875
  let forPluginHeartbeat: ReventlessCore.Runtime.forComponent<
876
- ReventlessCore.Runtime.eventHandler<unit, context, unit>,
876
+ ReventlessCore.Runtime.invocationHandler<unit, context, unit>,
877
877
  runtimeParts,
878
878
  ReventlessCore.Heartbeat.component,
879
879
  > = (~handler as _, ~connect, ~memorySize=1024, ~timeout=30, heartbeat) => {
@@ -922,7 +922,7 @@ module Make = (
922
922
  // here). Merges slice module paths: auto-registered (from moduleUrl) + manually
923
923
  // registered (from registerDcbConfig).
924
924
  let forDcbCommandTopic: ReventlessCore.Runtime.forComponent<
925
- ReventlessCore.Runtime.effectHandler<'callbackEvent, context, unit, string>,
925
+ ReventlessCore.Runtime.effectInvocationHandler<'callbackEvent, context, unit, string>,
926
926
  runtimeParts,
927
927
  ReventlessCore.CommandTopic.component<'op>,
928
928
  // `~memorySize`/`~timeout` carry the per-component runtime floor (max across
@@ -933,7 +933,7 @@ module Make = (
933
933
  let slicePaths =
934
934
  registeredSliceModulePaths
935
935
  ->Array.concat(dcbConfig.stateChangeSliceModulePaths)
936
- ->Array.map(({specPath, behaviorPath}) => (specPath, behaviorPath))
936
+ ->Array.map(({specPath, decisionPath}) => (specPath, decisionPath))
937
937
  // Drop registrations that never received their module paths (a bare
938
938
  // audit-table registration with no matching spec functor — shouldn't happen,
939
939
  // but keeps a half-registered slice out of HANDLER_CONFIG).
@@ -101,10 +101,10 @@ let dcbConfigRef = {
101
101
 
102
102
  let registeredSliceModulePaths = [];
103
103
 
104
- function registerStateChangeSliceSpec(specPath, behaviorPath) {
104
+ function registerStateChangeSliceSpec(specPath, decisionPath) {
105
105
  registeredSliceModulePaths.push({
106
106
  specPath: specPath,
107
- behaviorPath: behaviorPath
107
+ decisionPath: decisionPath
108
108
  });
109
109
  }
110
110
 
@@ -547,7 +547,7 @@ function Make(EventCollectorChannel) {
547
547
  let dcbConfig = dcbConfigRef.contents;
548
548
  let slicePaths = registeredSliceModulePaths.concat(dcbConfig.stateChangeSliceModulePaths).map(param => [
549
549
  param.specPath,
550
- param.behaviorPath
550
+ param.decisionPath
551
551
  ]);
552
552
  let inboundSlices = Stdlib_Array.filterMap(Object.values(registeredInboundSlices), reg => {
553
553
  if (reg.specPath === "") {
@@ -524,7 +524,7 @@ let makeUiBundleDistribution = (
524
524
 
525
525
  // Auto-invalidate CloudFront once every object is (re)uploaded. Stable-named
526
526
  // entry files (index.html, the module-federation mf-entry-bootstrap-*.js)
527
- // are served by the long-TTL default cache behaviour, so without this a
527
+ // are served by the long-TTL default cache behavior, so without this a
528
528
  // `pulumi up` lands the new bundle in S3 while CloudFront keeps serving the
529
529
  // prior build until its TTL expires. Chained on the upload etags so it runs
530
530
  // AFTER the new content is in S3; `/*` is a single invalidation path (well
@@ -254,7 +254,7 @@ type codeArchive = {
254
254
  *
255
255
  * `ReventlessCore.RuntimeExtension` carries `import.meta.url`s because that is
256
256
  * what an extension module can state about itself; the npm specifier a Lambda
257
- * resolves is derived here, the same conversion spec and behavior modules go
257
+ * resolves is derived here, the same conversion spec and decision modules go
258
258
  * through.
259
259
  */
260
260
  let runtimeExtensionSpecifiers = (): array<string> =>
@@ -330,7 +330,7 @@ describe("AppSync_Adapter.injectAwsAuth — Stage E2 permission lifting", () =>
330
330
  // and emitted the same group-less directive, which on this Cognito-primary
331
331
  // API means *any authenticated caller* — the inverse of the declaration. It
332
332
  // deployed green, passed `assertGateable`, and worked on the local platform,
333
- // whose resolvers call `Authorization.isAllowed` and honour the rule. It
333
+ // whose resolvers call `Authorization.isAllowed` and honor the rule. It
334
334
  // failed closed, so no deployment ever reported it.
335
335
 
336
336
  let refuses = (run: unit => 'a): bool =>
@@ -192,7 +192,7 @@ describe("the by-index door's owner scoping", () => {
192
192
  )->Expect.toBe(true)
193
193
  )
194
194
 
195
- // The generic argument loop turns an unrecognised arg into a `contains` filter.
195
+ // The generic argument loop turns an unrecognized arg into a `contains` filter.
196
196
  // `includeRetired` is a request to lift a restriction, and filtering on it
197
197
  // would match no row at all.
198
198
  testSync("never treats includeRetired as a column to match on", () =>
@@ -270,7 +270,7 @@ describe("AppSync_SdlDecorate.assertGateable", () => {
270
270
 
271
271
  // The original outage, exactly. A "does it have a directive?" check passes
272
272
  // this — @aws_auth was present on all 18 admin fields the whole time it was
273
- // inert. Only knowing WHICH directive the service honours catches it.
273
+ // inert. Only knowing WHICH directive the service honors catches it.
274
274
  testSync("refuses @aws_auth, the directive AppSync ignores here", () => {
275
275
  let sdl = `type Query @aws_cognito_user_pools {\n Admin_Thing: String @aws_auth(cognito_groups: ["Admin"])\n}`
276
276
  expect(refuses(sdl))->toBe(true)
@@ -1,7 +1,7 @@
1
1
  open JestGlobals
2
2
 
3
3
  // The sign-in attribute is the one pool setting no later deploy can correct, so
4
- // what these cover is the parse: absent must mean today's behaviour, and a
4
+ // what these cover is the parse: absent must mean today's behavior, and a
5
5
  // spelling this build does not know must refuse rather than default.
6
6
 
7
7
  module LoginIdentifier = Auth_LoginIdentifier
@@ -2,7 +2,7 @@ open JestGlobals
2
2
 
3
3
  // Sign-up mode is correctable on a live pool, unlike the sign-in attribute, so
4
4
  // what these cover is not permanence but silence: absent must mean today's
5
- // behaviour, an unknown spelling must refuse rather than quietly close the pool,
5
+ // behavior, an unknown spelling must refuse rather than quietly close the pool,
6
6
  // and the mapping onto Cognito's inverted field must not be readable backwards.
7
7
 
8
8
  module SignUpMode = Auth_SignUpMode
@@ -94,10 +94,10 @@ let row = (def: Reventless.Plugin.pluginDefinition, ~at: string): dict<JSON.t> =
94
94
  ->JSON.Decode.object
95
95
  ->Option.getOr(Dict.make())
96
96
 
97
- let apply = (state, events) => events->Array.reduce(state, ReventlessCore.PluginBehavior.evolve)
97
+ let apply = (state, events) => events->Array.reduce(state, ReventlessCore.PluginDecision.evolve)
98
98
 
99
99
  let connect = (state, def) =>
100
- switch ReventlessCore.PluginBehavior.decide(state, ReventlessCore.PluginSpec.Connect(def)) {
100
+ switch ReventlessCore.PluginDecision.decide(state, ReventlessCore.PluginSpec.Connect(def)) {
101
101
  | Ok(events) => events
102
102
  | Error(_) => []
103
103
  }
@@ -153,16 +153,16 @@ describe("the bake converges when a plugin's structure changes", () => {
153
153
  // unchanged one, so this is the step a broken chain silently skips.
154
154
  testSync("a redeploy with a changed structure re-emits VersionConnected", () => {
155
155
  let connected =
156
- ReventlessCore.PluginBehavior.initialState->apply(
157
- connect(ReventlessCore.PluginBehavior.initialState, shipped(defA)),
156
+ ReventlessCore.PluginDecision.initialState->apply(
157
+ connect(ReventlessCore.PluginDecision.initialState, shipped(defA)),
158
158
  )
159
159
  expect(connect(connected, shipped(defB))->Array.length)->toBe(1)
160
160
  })
161
161
 
162
162
  testSync("once it lands, the plugin reads as registered by this deploy", () => {
163
163
  let connected =
164
- ReventlessCore.PluginBehavior.initialState->apply(
165
- connect(ReventlessCore.PluginBehavior.initialState, shipped(defA)),
164
+ ReventlessCore.PluginDecision.initialState->apply(
165
+ connect(ReventlessCore.PluginDecision.initialState, shipped(defA)),
166
166
  )
167
167
  let redeployed = connected->apply(connect(connected, shipped(defB)))
168
168
  let def = switch redeployed.known->Dict.get("1.0.0") {
@@ -180,8 +180,8 @@ describe("the bake converges when a plugin's structure changes", () => {
180
180
  // counts it apart from a plugin that did register.
181
181
  testSync("an unchanged structure passes without re-registering", () => {
182
182
  let connected =
183
- ReventlessCore.PluginBehavior.initialState->apply(
184
- connect(ReventlessCore.PluginBehavior.initialState, shipped(defA)),
183
+ ReventlessCore.PluginDecision.initialState->apply(
184
+ connect(ReventlessCore.PluginDecision.initialState, shipped(defA)),
185
185
  )
186
186
  expect(connect(connected, shipped(defA)))->toEqual([])
187
187
  expect(
@@ -198,11 +198,11 @@ describe("the bake converges when a plugin's structure changes", () => {
198
198
  // and the changed structure never reaches the read model.
199
199
  testSync("a redeploy re-detects an already-connected version", () => {
200
200
  let connected =
201
- ReventlessCore.PluginBehavior.initialState->apply(
202
- connect(ReventlessCore.PluginBehavior.initialState, shipped(defA)),
201
+ ReventlessCore.PluginDecision.initialState->apply(
202
+ connect(ReventlessCore.PluginDecision.initialState, shipped(defA)),
203
203
  )
204
204
  expect(
205
- ReventlessCore.PluginBehavior.decide(connected, ReventlessCore.PluginSpec.Redetect("1.0.0")),
205
+ ReventlessCore.PluginDecision.decide(connected, ReventlessCore.PluginSpec.Redetect("1.0.0")),
206
206
  )->toEqual(Ok([ReventlessCore.PluginSpec.VersionDetected("1.0.0")]))
207
207
  })
208
208
  })
@@ -6,7 +6,7 @@ import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
6
6
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
7
7
  import * as Plugin$Reventless from "@reventlessdev/reventless-spec/src/components/Plugin.res.mjs";
8
8
  import * as Util_Sury$Reventless from "@reventlessdev/reventless-spec/src/util/Util_Sury.res.mjs";
9
- import * as PluginBehavior$ReventlessCore from "@reventlessdev/reventless-core/src/plugin/lifecycle/PluginBehavior.res.mjs";
9
+ import * as PluginDecision$ReventlessCore from "@reventlessdev/reventless-core/src/plugin/lifecycle/PluginDecision.res.mjs";
10
10
  import * as Plugin_Helpers$ReventlessCore from "@reventlessdev/reventless-core/src/plugin/component/Plugin_Helpers.res.mjs";
11
11
  import * as PluginsProjection$ReventlessCore from "@reventlessdev/reventless-core/src/plugin/lifecycle/PluginsProjection.res.mjs";
12
12
  import * as Platform_ComponentDefinitions_Lambda_Ops$ReventlessAws from "../src/adapter/Api/Platform_ComponentDefinitions_Lambda_Ops.res.mjs";
@@ -97,11 +97,11 @@ function row(def, at) {
97
97
  }
98
98
 
99
99
  function apply(state, events) {
100
- return Stdlib_Array.reduce(events, state, PluginBehavior$ReventlessCore.evolve);
100
+ return Stdlib_Array.reduce(events, state, PluginDecision$ReventlessCore.evolve);
101
101
  }
102
102
 
103
103
  function connect(state, def) {
104
- let events = PluginBehavior$ReventlessCore.decide(state, {
104
+ let events = PluginDecision$ReventlessCore.decide(state, {
105
105
  TAG: "Connect",
106
106
  _0: def
107
107
  });
@@ -156,15 +156,15 @@ globalThis.describe("the bake converges when a plugin's structure changes", () =
156
156
  ]], deployedAt)).toEqual("behind");
157
157
  });
158
158
  globalThis.test("a redeploy with a changed structure re-emits VersionConnected", () => {
159
- let events = connect(PluginBehavior$ReventlessCore.initialState, shipped(defA));
160
- let connected = Stdlib_Array.reduce(events, PluginBehavior$ReventlessCore.initialState, PluginBehavior$ReventlessCore.evolve);
159
+ let events = connect(PluginDecision$ReventlessCore.initialState, shipped(defA));
160
+ let connected = Stdlib_Array.reduce(events, PluginDecision$ReventlessCore.initialState, PluginDecision$ReventlessCore.evolve);
161
161
  globalThis.expect(connect(connected, shipped(defB)).length).toBe(1);
162
162
  });
163
163
  globalThis.test("once it lands, the plugin reads as registered by this deploy", () => {
164
- let events = connect(PluginBehavior$ReventlessCore.initialState, shipped(defA));
165
- let connected = Stdlib_Array.reduce(events, PluginBehavior$ReventlessCore.initialState, PluginBehavior$ReventlessCore.evolve);
164
+ let events = connect(PluginDecision$ReventlessCore.initialState, shipped(defA));
165
+ let connected = Stdlib_Array.reduce(events, PluginDecision$ReventlessCore.initialState, PluginDecision$ReventlessCore.evolve);
166
166
  let events$1 = connect(connected, shipped(defB));
167
- let redeployed = Stdlib_Array.reduce(events$1, connected, PluginBehavior$ReventlessCore.evolve);
167
+ let redeployed = Stdlib_Array.reduce(events$1, connected, PluginDecision$ReventlessCore.evolve);
168
168
  let match = redeployed.known["1.0.0"];
169
169
  let def = match !== undefined ? match.definition : shipped(defA);
170
170
  globalThis.expect(stateOf([row(def, afterDeploy)], [[
@@ -173,8 +173,8 @@ globalThis.describe("the bake converges when a plugin's structure changes", () =
173
173
  ]], deployedAt)).toEqual("registered");
174
174
  });
175
175
  globalThis.test("an unchanged structure passes without re-registering", () => {
176
- let events = connect(PluginBehavior$ReventlessCore.initialState, shipped(defA));
177
- let connected = Stdlib_Array.reduce(events, PluginBehavior$ReventlessCore.initialState, PluginBehavior$ReventlessCore.evolve);
176
+ let events = connect(PluginDecision$ReventlessCore.initialState, shipped(defA));
177
+ let connected = Stdlib_Array.reduce(events, PluginDecision$ReventlessCore.initialState, PluginDecision$ReventlessCore.evolve);
178
178
  globalThis.expect(connect(connected, shipped(defA))).toEqual([]);
179
179
  globalThis.expect(stateOf([row(shipped(defA), beforeDeploy)], [[
180
180
  "Ordering",
@@ -182,9 +182,9 @@ globalThis.describe("the bake converges when a plugin's structure changes", () =
182
182
  ]], deployedAt)).toEqual("unchanged");
183
183
  });
184
184
  globalThis.test("a redeploy re-detects an already-connected version", () => {
185
- let events = connect(PluginBehavior$ReventlessCore.initialState, shipped(defA));
186
- let connected = Stdlib_Array.reduce(events, PluginBehavior$ReventlessCore.initialState, PluginBehavior$ReventlessCore.evolve);
187
- globalThis.expect(PluginBehavior$ReventlessCore.decide(connected, {
185
+ let events = connect(PluginDecision$ReventlessCore.initialState, shipped(defA));
186
+ let connected = Stdlib_Array.reduce(events, PluginDecision$ReventlessCore.initialState, PluginDecision$ReventlessCore.evolve);
187
+ globalThis.expect(PluginDecision$ReventlessCore.decide(connected, {
188
188
  TAG: "Redetect",
189
189
  _0: "1.0.0"
190
190
  })).toEqual({
@@ -43,7 +43,7 @@ describe("AppSync_Resolver_Retrying.Functions.listAllItemsConnection", () => {
43
43
  )
44
44
  })
45
45
 
46
- // Tripwires for the Scan connection's paging. The behaviour itself is exercised
46
+ // Tripwires for the Scan connection's paging. The behavior itself is exercised
47
47
  // against the evaluated resolver in `rescript/pulumi-aws`; these guard the wiring
48
48
  // this package is responsible for emitting.
49
49
  describe("listAllItemsConnection — paging", () => {
@@ -4,7 +4,7 @@
4
4
  // decided by three functions in `Upload_Claim_S3_Ops`: which table a record came
5
5
  // from, which refs a declared field holds, and whether a ref resolves to an
6
6
  // object this claimer may touch. The untag itself has no branching left in it,
7
- // so pinning these pins the behaviour that matters.
7
+ // so pinning these pins the behavior that matters.
8
8
  //
9
9
  // The direction under test throughout is refusal. An untag this component
10
10
  // wrongly *skips* costs a delayed cleanup; one it wrongly *performs* removes the
@@ -18,7 +18,7 @@ external throwAwsError: (string, string) => unit = "throwAwsError"
18
18
 
19
19
  🚨 **Thrown and caught, not constructed.** ReScript's `exn` for a JS error is
20
20
  the wrapper its own `catch` builds — a bare `Error` value is a different thing
21
- and `JsExn.fromException` does not recognise it. A fixture that returned one
21
+ and `JsExn.fromException` does not recognize it. A fixture that returned one
22
22
  would make every predicate here look broken while the code was fine, which is
23
23
  exactly the wrong way round for a regression test. */
24
24
  let awsError = (~name: string, ~message: string): exn =>
@@ -28,7 +28,7 @@ describe("Util_StoreLayout.layoutFor", () => {
28
28
  )
29
29
 
30
30
  // The accepted fail-open: a production stack whose name is not on the list
31
- // gets the weaker layout silently. Asserted so the behaviour is a decision on
31
+ // gets the weaker layout silently. Asserted so the behavior is a decision on
32
32
  // record rather than a surprise, and so the config override is the documented
33
33
  // fix rather than a code change.
34
34
  testSync("an unlisted production name falls open to the shared layout", () =>
@@ -23,7 +23,7 @@ export async function invokeAfterFailedStartup() {
23
23
  process.on("unhandledRejection", onUnhandled);
24
24
  process.env.HANDLER_CONFIG = JSON.stringify({
25
25
  ...baseConfig,
26
- stateChangeSliceModules: [{ spec: "cold-start-test/missing-spec.mjs", behavior: "cold-start-test/missing-behavior.mjs" }],
26
+ stateChangeSliceModules: [{ spec: "cold-start-test/missing-spec.mjs", decision: "cold-start-test/missing-decision.mjs" }],
27
27
  });
28
28
  try {
29
29
  const { handler } = await import(ENTRY);
@@ -51,12 +51,12 @@ export async function startWithUnresolvedSlice() {
51
51
  const { buildHandlersForConfig } = await import(ENTRY);
52
52
  const loadModule = async (specifier) => {
53
53
  if (specifier === "cold-start-test://spec") return await import("./DcbUnresolvedPartitionSlice.res.mjs");
54
- if (specifier === "cold-start-test://behavior") return {};
54
+ if (specifier === "cold-start-test://decision") return {};
55
55
  throw new Error("unknown test specifier: " + specifier);
56
56
  };
57
57
  try {
58
58
  await buildHandlersForConfig(
59
- { ...baseConfig, stateChangeSliceModules: [{ spec: "cold-start-test://spec", behavior: "cold-start-test://behavior" }] },
59
+ { ...baseConfig, stateChangeSliceModules: [{ spec: "cold-start-test://spec", decision: "cold-start-test://decision" }] },
60
60
  { loadModule },
61
61
  );
62
62
  return "started";
@@ -1,4 +1,4 @@
1
- // Behavior pair for `AggTestAggregate`. Create-once / reject-on-seen.
1
+ // Decision pair for `AggTestAggregate`. Create-once / reject-on-seen.
2
2
 
3
3
  type state = NotCreated | Active
4
4
 
@@ -15,4 +15,4 @@ let decide = (state, command: AggTestAggregate.command): result<
15
15
  | (NotCreated, Add({name})) => Ok([Added({name: name})])
16
16
  }
17
17
 
18
- let moduleUrl = "agg-test://AggTestAggregateBehavior"
18
+ let moduleUrl = "agg-test://AggTestAggregateDecision"
@@ -24,7 +24,7 @@ function decide(state, command) {
24
24
 
25
25
  let initialState = "NotCreated";
26
26
 
27
- let moduleUrl = "agg-test://AggTestAggregateBehavior";
27
+ let moduleUrl = "agg-test://AggTestAggregateDecision";
28
28
 
29
29
  export {
30
30
  initialState,
@@ -1,7 +1,7 @@
1
1
  // Integration regression guard for the Aggregate Lambda entry point.
2
2
  //
3
3
  // Drives the real `AggregateEntryPoint.mjs` against a DynamoDB Local EventLog
4
- // table, with a test loader supplying a tiny `AggTestAggregate` spec/behavior
4
+ // table, with a test loader supplying a tiny `AggTestAggregate` spec/decision
5
5
  // pair in place of the production Lambda's `/var/task/node_modules` dynamic
6
6
  // import. Covers the same regression class as the DCB entry-point test: the
7
7
  // shell wires the compiled EventLog/Aggregate/CommandTopic functors and the
@@ -38,14 +38,14 @@ let runOneAppSyncEvent: (string, JSON.t) => promise<JSON.t> = %raw(`
38
38
 
39
39
  const loadModule = async (specifier) => {
40
40
  if (specifier === "agg-test://spec") return await import("./AggTestAggregate.res.mjs");
41
- if (specifier === "agg-test://behavior") return await import("./AggTestAggregateBehavior.res.mjs");
41
+ if (specifier === "agg-test://decision") return await import("./AggTestAggregateDecision.res.mjs");
42
42
  throw new Error("unknown test specifier: " + specifier);
43
43
  };
44
44
 
45
45
  const config = {
46
46
  handlers: [{
47
47
  specModule: "agg-test://spec",
48
- behaviorModule: "agg-test://behavior",
48
+ decisionModule: "agg-test://decision",
49
49
  eventLogTable: tableName,
50
50
  queueUrl: "https://sqs.eu-west-1.amazonaws.com/000000000000/agg-test-queue",
51
51
  queueArn: "arn:aws:sqs:eu-west-1:000000000000:agg-test-queue",
@@ -17,14 +17,14 @@ let runOneAppSyncEvent = (async (tableName, event) => {
17
17
 
18
18
  const loadModule = async (specifier) => {
19
19
  if (specifier === "agg-test://spec") return await import("./AggTestAggregate.res.mjs");
20
- if (specifier === "agg-test://behavior") return await import("./AggTestAggregateBehavior.res.mjs");
20
+ if (specifier === "agg-test://decision") return await import("./AggTestAggregateDecision.res.mjs");
21
21
  throw new Error("unknown test specifier: " + specifier);
22
22
  };
23
23
 
24
24
  const config = {
25
25
  handlers: [{
26
26
  specModule: "agg-test://spec",
27
- behaviorModule: "agg-test://behavior",
27
+ decisionModule: "agg-test://decision",
28
28
  eventLogTable: tableName,
29
29
  queueUrl: "https://sqs.eu-west-1.amazonaws.com/000000000000/agg-test-queue",
30
30
  queueArn: "arn:aws:sqs:eu-west-1:000000000000:agg-test-queue",