@reventlessdev/reventless-core 3.0.0-alpha.259 → 3.0.0-alpha.261

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 (209) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.json +11 -11
  3. package/src/Behavior.res +1 -4
  4. package/src/Message.res +17 -14
  5. package/src/Projection.res +51 -25
  6. package/src/RequestContext.res +8 -9
  7. package/src/ResourceAttribution.res +28 -14
  8. package/src/adapter/Adapter.res +48 -4
  9. package/src/adapter/EventLogProvisioning/EventLogProvisioning.res +5 -5
  10. package/src/adapter/Messaging/Messaging_Log_Backend.res +10 -7
  11. package/src/adapter/Messaging/Messaging_Log_Backend.res.mjs +2 -4
  12. package/src/adapter/Monitoring/Monitoring.res +16 -17
  13. package/src/adapter/QueryInterception/QueryInterception.res +0 -1
  14. package/src/adapter/Runtime/AggregateRuntime_Builder_Common.res +12 -5
  15. package/src/adapter/Runtime/EventCollectorRuntime_Builder_Single.res +11 -7
  16. package/src/adapter/Runtime/PluginRuntime_Builder_Micro.res +1 -7
  17. package/src/adapter/Runtime/PluginRuntime_Builder_Single.res +1 -7
  18. package/src/adapter/RuntimeExtension/RuntimeExtension.res +0 -1
  19. package/src/admin/Platform_Admin.res +17 -6
  20. package/src/admin/Platform_AdminApi.res +14 -9
  21. package/src/admin/Platform_Admin_Callback.res +1 -1
  22. package/src/admin/Platform_BakedManifest.res +34 -34
  23. package/src/admin/Platform_ComponentDefinitionsApi.res +9 -21
  24. package/src/admin/Platform_PluginStructuresApi.res +15 -12
  25. package/src/admin/UiFragmentRegistry/StateChange/UiFragmentRegistry.res +1 -1
  26. package/src/components/Aggregate/Aggregate.res +13 -12
  27. package/src/components/Aggregate/Aggregate_Builder.res +22 -21
  28. package/src/components/Aggregate/Aggregate_Callback.res +91 -86
  29. package/src/components/Api/ApiNoApiHelpers.res +1 -3
  30. package/src/components/Api/Api_Ids.res +0 -1
  31. package/src/components/Api/Api_Naming.res +41 -18
  32. package/src/components/Api/GraphQL_FragmentGenerator.res +42 -52
  33. package/src/components/Api/GraphQL_FragmentGenerator.res.mjs +11 -4
  34. package/src/components/Api/GraphQL_SchemaInspector.res +5 -3
  35. package/src/components/Api/GraphQL_Stitcher.res +9 -10
  36. package/src/components/Api/MCP_SchemaGenerator.res +8 -12
  37. package/src/components/Api/OwnerScopeDiagnostics.res +1 -2
  38. package/src/components/Api/QueryDbListQuery.res +13 -6
  39. package/src/components/Api/SchemaType.res +40 -20
  40. package/src/components/Api/SchemaType.res.mjs +16 -0
  41. package/src/components/Api/SuryToJsonSchema.res +18 -10
  42. package/src/components/Api/SuryToJsonSchema.res.mjs +135 -121
  43. package/src/components/AutomationSlice/AutomationSlice.res +4 -4
  44. package/src/components/AutomationSlice/AutomationSlice_Builder.res +15 -14
  45. package/src/components/AutomationSlice/AutomationSlice_Callback.res +3 -3
  46. package/src/components/Builder_Helpers.res +12 -23
  47. package/src/components/CommandGenerator/CommandGenerator.res +6 -1
  48. package/src/components/CommandGenerator/CommandGenerator_Builder.res +29 -21
  49. package/src/components/CommandGenerator/CommandGenerator_Callback.res +17 -21
  50. package/src/components/CommandTopic/CommandTopic.res +3 -3
  51. package/src/components/CommandTopic/CommandTopic_Builder.res +10 -10
  52. package/src/components/CommandTopic/CommandTopic_Callback.res +1 -4
  53. package/src/components/CommandTopic/CommandTopic_Helpers.res +1 -2
  54. package/src/components/Counter/Counter_Builder.res +1 -6
  55. package/src/components/Counter/Counter_Callback.res +3 -3
  56. package/src/components/Dcb/Dcb_Builder.res +970 -956
  57. package/src/components/DcbEventLog/DcbEventLog.res +4 -4
  58. package/src/components/DcbEventLog/DcbEventLog_Builder.res +0 -1
  59. package/src/components/DcbEventLog/DcbEventLog_Operations.res +17 -18
  60. package/src/components/EventCollector/EventCollector_Builder.res +2 -1
  61. package/src/components/EventLog/EventLog.res +5 -1
  62. package/src/components/EventLog/EventLog_Operations.res +12 -8
  63. package/src/components/EventMapper/EventMapper.res +8 -10
  64. package/src/components/EventMapper/EventMapper_Builder.res +4 -1
  65. package/src/components/EventMapper/EventMapper_Callback.res +46 -31
  66. package/src/components/EventTopic/EventTopic.res +3 -3
  67. package/src/components/EventTopic/EventTopic_Builder.res +1 -1
  68. package/src/components/Extension/Extension.res +4 -1
  69. package/src/components/Extension/Extension_Operations.res +11 -3
  70. package/src/components/ExtensionPoint/ExtensionPoint.res +3 -3
  71. package/src/components/ExtensionPoint/ExtensionPoint_Builder.res +9 -10
  72. package/src/components/ExtensionPoint/ExtensionPoint_Callback.res +2 -6
  73. package/src/components/ExtensionPoint/ExtensionPoint_Operations.res +13 -5
  74. package/src/components/Heartbeat/Heartbeat_Callback.res +3 -3
  75. package/src/components/InboundTranslationSlice/InboundTranslationSlice.res +4 -4
  76. package/src/components/InboundTranslationSlice/InboundTranslationSlice_Builder.res +7 -10
  77. package/src/components/OutboundTranslationSlice/OutboundTranslationSlice.res +4 -4
  78. package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Builder.res +15 -14
  79. package/src/components/QueryDb/QueryDb_Adapter.res +1 -3
  80. package/src/components/QueryDb/QueryDb_Operations.res +10 -10
  81. package/src/components/ReadModel/ReadModel.res +3 -3
  82. package/src/components/ReadModel/ReadModel_Builder.res +1 -2
  83. package/src/components/ReadModel/ReadModel_Callback.res +2 -1
  84. package/src/components/SideEffectHandler/SideEffectHandler_Callback.res +5 -2
  85. package/src/components/StateChangeSlice/StateChangeSlice.res +3 -3
  86. package/src/components/StateChangeSlice/StateChangeSlice_Builder.res +23 -4
  87. package/src/components/StateChangeSlice/StateChangeSlice_Callback.res +22 -6
  88. package/src/components/StateTopic.res +1 -3
  89. package/src/components/StateViewSlice/StateViewSlice.res +4 -4
  90. package/src/components/StateViewSlice/StateViewSlice_Builder.res +79 -68
  91. package/src/components/StateViewSlice/StateViewSlice_Callback.res +3 -1
  92. package/src/components/Task/Task.res +3 -3
  93. package/src/components/Task/Task_Adapter.res +4 -1
  94. package/src/components/Task/Task_Builder.res +24 -21
  95. package/src/plugin/api/PluginBaseFragment.res +9 -3
  96. package/src/plugin/component/Capability_Inference.res +8 -10
  97. package/src/plugin/component/Plugin.res +6 -6
  98. package/src/plugin/component/Plugin_Builder.res +54 -50
  99. package/src/plugin/component/Plugin_Callback.res +10 -6
  100. package/src/plugin/component/Plugin_Helpers.res +264 -230
  101. package/src/plugin/component/Plugin_Structure.res +370 -324
  102. package/src/plugin/component/Plugin_SubscriptionSchema.res +8 -6
  103. package/src/plugin/component/SchemaWalker.res +11 -12
  104. package/src/plugin/connect/PluginConnectExtension_Mapping.res +45 -50
  105. package/src/plugin/lifecycle/PluginBehavior.res +3 -4
  106. package/src/plugin/lifecycle/PluginSpec.res +1 -2
  107. package/src/plugin/lifecycle/PluginsProjection.res +16 -5
  108. package/src/plugin/lifecycle/PluginsReadModelSpec.res +0 -2
  109. package/src/util/CommandPublisher.res +9 -2
  110. package/src/util/CsvStream.res +3 -3
  111. package/src/util/Interstack.res +7 -15
  112. package/src/util/Interstack.resi +3 -3
  113. package/src/util/LogFormat.res +5 -9
  114. package/src/util/Logger.res +1 -2
  115. package/src/util/Lru.res +2 -1
  116. package/src/util/Lru.resi +2 -3
  117. package/src/util/ScheduleOps.res +24 -27
  118. package/src/util/StorePrefixCollision.res +6 -9
  119. package/src/util/Util_Promise.res +4 -1
  120. package/src/util/Util_Promise.res.mjs +1 -1
  121. package/tests/IdentityTest.res +166 -113
  122. package/tests/ResourceAttributionTest.res +28 -25
  123. package/tests/StorePrefixCollisionTest.res +2 -1
  124. package/tests/TaskBucketNamingTest.res +3 -2
  125. package/tests/adapter/EventLogProvisioningTest.res +51 -48
  126. package/tests/adapter/MonitoringTest.res +81 -38
  127. package/tests/adapter/QueryInterceptionTest.res +2 -2
  128. package/tests/adapter/RefusalVocabularyTest.res +31 -23
  129. package/tests/adapter/RuntimeExtensionHookReachTest.res +9 -8
  130. package/tests/adapter/RuntimeExtensionTest.res +5 -3
  131. package/tests/admin/AdminApiSchemaDriftTest.res +22 -16
  132. package/tests/admin/Platform_Admin_StructureTest.res +10 -11
  133. package/tests/admin/Platform_BakedManifestTest.res +31 -35
  134. package/tests/admin/Platform_ComponentDefinitionsApiTest.res +18 -15
  135. package/tests/admin/Platform_PluginStructuresApiTest.res +5 -3
  136. package/tests/admin/Platform_UIFragmentsApiTest.res +6 -3
  137. package/tests/aggregate/AggregateCacheTest.res +10 -12
  138. package/tests/aggregate/AggregateCallbackTest.res +75 -46
  139. package/tests/aggregate/AggregateCausationTest.res +19 -20
  140. package/tests/aggregate/AggregateConflictTest.res +41 -19
  141. package/tests/aggregate/AggregateFixtures.res +15 -5
  142. package/tests/aggregate/AggregateRejectionTest.res +97 -80
  143. package/tests/aggregate/AggregateSnapshotTest.res +44 -16
  144. package/tests/api/Api_IdsTest.res +10 -4
  145. package/tests/api/BrandedMarkerCompositionTest.res +48 -36
  146. package/tests/api/GeolocationSemanticTest.res +3 -3
  147. package/tests/api/GraphQL_FragmentGeneratorTest.res +66 -54
  148. package/tests/api/OwnerScopeDiagnosticsTest.res +31 -27
  149. package/tests/api/StorageRefFieldsTest.res +30 -18
  150. package/tests/api/SuryToJsonSchemaTest.res +1338 -981
  151. package/tests/api/SuryToJsonSchemaTest.res.mjs +31 -0
  152. package/tests/api/TaggedUnionSchemaTest.res +17 -24
  153. package/tests/commandgenerator/CommandGeneratorCallbackTest.res +235 -179
  154. package/tests/commandgenerator/CommandGeneratorFixtures.res +8 -13
  155. package/tests/commandgenerator/OwnerStampingTest.res +91 -76
  156. package/tests/commandtopic/CommandOutcomeHookTest.res +198 -155
  157. package/tests/commandtopic/CommandTopicCallbackFixtures.res +5 -4
  158. package/tests/commandtopic/CommandTopicCallbackTest.res +61 -43
  159. package/tests/commandtopic/CommandTopicHelpersRejectionTest.res +70 -55
  160. package/tests/counter/CounterCallbackTest.res +40 -34
  161. package/tests/counter/CounterFixtures.res +4 -4
  162. package/tests/dcb/DcbDecodeTest.res +115 -84
  163. package/tests/dcb/DcbEventLogOperationsTest.res +194 -143
  164. package/tests/dcb/DcbEventLogSchemaTest.res +13 -13
  165. package/tests/dcb/DcbFixtures.res +4 -5
  166. package/tests/dcb/DcbScopeInferenceTest.res +173 -114
  167. package/tests/dcb/DcbStateChangeSliceTest.res +391 -262
  168. package/tests/dcb/DcbTagTest.res +22 -11
  169. package/tests/dcb/DcbValidationTest.res +288 -218
  170. package/tests/eventlog/EventLogFixtures.res +4 -4
  171. package/tests/eventlog/EventLogOperationsTest.res +102 -67
  172. package/tests/eventlog/EventLogRetryTest.res +104 -65
  173. package/tests/eventmapper/EventMapperCallbackTest.res +118 -83
  174. package/tests/eventmapper/EventMapperFixtures.res +15 -23
  175. package/tests/eventmapper/EventMapperTest.res +54 -38
  176. package/tests/eventtopic/EventTopicFixtures.res +3 -4
  177. package/tests/eventtopic/EventTopicOperationsTest.res +41 -29
  178. package/tests/extensionpoint/ExtensionPointCallbackTest.res +58 -45
  179. package/tests/extensionpoint/ExtensionPointFixtures.res +16 -20
  180. package/tests/extensionpoint/ExtensionPointOperationsTest.res +70 -49
  181. package/tests/extensionpoint/PluginDisconnectScheduleTest.res +2 -1
  182. package/tests/logger/LogFormatTest.res +104 -82
  183. package/tests/logger/LoggerLazyTest.res +21 -12
  184. package/tests/message/MessageTest.res +96 -93
  185. package/tests/message/MetaEnvelopeTest.res +26 -30
  186. package/tests/plugin/HeartbeatDisconnectGraceTest.res +31 -25
  187. package/tests/plugin/ManifestVisibilityTest.res +20 -12
  188. package/tests/plugin/PluginDefinitionScalars.res +1 -2
  189. package/tests/plugin/PluginLifecycleCorpusTest.res +15 -12
  190. package/tests/plugin/PluginSpecExperiment.res +0 -1
  191. package/tests/plugin/PluginStructureTest.res +1533 -1030
  192. package/tests/plugin/PluginStructureTest.res.mjs +6 -0
  193. package/tests/plugin/Plugin_EventQuerySchemaTest.res +21 -10
  194. package/tests/plugin/SchemaWalkerTest.res +116 -70
  195. package/tests/plugin/StateChange/PsReserveStock.res +4 -4
  196. package/tests/plugin/StateView/PsAnnotatedView.res +6 -4
  197. package/tests/plugin/StateView/PsAnnotatedView.res.mjs +7 -3
  198. package/tests/plugin/StateView/PsCustomersView.res +4 -4
  199. package/tests/plugin/StateView/PsShipmentsView.res +3 -2
  200. package/tests/projection/LifecycleTrailTest.res +1 -4
  201. package/tests/projection/ProjectionOptimizeTest.res +13 -9
  202. package/tests/querydb/QueryDbFixtures.res +0 -1
  203. package/tests/querydb/QueryDbOperationsTest.res +99 -64
  204. package/tests/querydb/TaggedUnionStampTest.res +10 -8
  205. package/tests/sideeffecthandler/SideEffectHandlerCallbackTest.res +50 -35
  206. package/tests/sideeffecthandler/SideEffectHandlerFixtures.res +4 -10
  207. package/tests/util/CommandPublisherTest.res +0 -1
  208. package/tests/util/CsvStreamTest.res +3 -3
  209. package/tests/util/LruTest.res +84 -56
@@ -191,8 +191,7 @@ let registerEventCollectorContext = (~componentName: string, ~context: eventColl
191
191
  // package specifier.
192
192
  // User-declared extensions will eventually need to propagate their own URLs
193
193
  // via createExtensions; this scope only covers the built-in Plugin EP + Connect.
194
- let adminPluginExtensionPointSpecModule =
195
- "@reventlessdev/reventless-infra/src/types/PluginExtensionPointSpec.res.mjs"
194
+ let adminPluginExtensionPointSpecModule = "@reventlessdev/reventless-infra/src/types/PluginExtensionPointSpec.res.mjs"
196
195
  let adminPluginExtensionPointMappingsModule = PluginExtensionPoint_Plugin.moduleUrl
197
196
  // Runtime-safe mapping module (not the `_Builder` variant, which the Lambda layer
198
197
  // strips because it pulls Pulumi via `include Extension_Builder.Make(...)`).
@@ -271,64 +270,63 @@ let createExtensions = (
271
270
  })
272
271
 
273
272
  // For each EP group: merge mappings, build Extension component.
274
- let triples = groups
275
- ->Dict.toArray
276
- ->Array.map(((_epName, blueprints)) => {
277
- // Use the first blueprint's Spec as the canonical type.
278
- let module(First: ReventlessInfra.Extension.Blueprint) = blueprints->Array.getUnsafe(0)
279
-
280
- // Merge all mappings arrays. Blueprints for the same EP have the same Spec
281
- // at runtime — use Obj.magic to unify the existential Mapping types.
282
- let allMappings: array<module(First.Mapping)> =
283
- blueprints->Array.flatMap(bp => {
273
+ let triples =
274
+ groups
275
+ ->Dict.toArray
276
+ ->Array.map(((_epName, blueprints)) => {
277
+ // Use the first blueprint's Spec as the canonical type.
278
+ let module(First: ReventlessInfra.Extension.Blueprint) = blueprints->Array.getUnsafe(0)
279
+
280
+ // Merge all mappings arrays. Blueprints for the same EP have the same Spec
281
+ // at runtime — use Obj.magic to unify the existential Mapping types.
282
+ let allMappings: array<module(First.Mapping)> = blueprints->Array.flatMap(bp => {
284
283
  let module(BP: ReventlessInfra.Extension.Blueprint) = bp
285
284
  (BP.mappings: array<module(BP.Mapping)>)->Obj.magic
286
285
  })
287
286
 
288
- // Build the Extension component with pluginName as the extension name.
289
- module Spec = First.Spec
290
- module Mappings: Extension.Mappings with module Spec := Spec = {
291
- module type Mapping = ReventlessInfra.ExtensionMapping.T
292
- with module ExtensionPoint := Spec
293
- let name = pluginName
294
- let moduleUrl = First.moduleUrl
295
- let mappings: array<module(Mapping)> = allMappings->Obj.magic
296
- }
297
- module ExtensionMaker = Extension_Builder.Make(Spec, Mappings)
287
+ // Build the Extension component with pluginName as the extension name.
288
+ module Spec = First.Spec
289
+ module Mappings: Extension.Mappings with module Spec := Spec = {
290
+ module type Mapping = ReventlessInfra.ExtensionMapping.T with module ExtensionPoint := Spec
291
+ let name = pluginName
292
+ let moduleUrl = First.moduleUrl
293
+ let mappings: array<module(Mapping)> = allMappings->Obj.magic
294
+ }
295
+ module ExtensionMaker = Extension_Builder.Make(Spec, Mappings)
298
296
 
299
- let extension = ExtensionMaker.make(
300
- ~publishToPluginExtensionPoint,
301
- ~publishToAggregates,
302
- ~readModelNamesForSourceName,
303
- ~publishToReadModels,
304
- ~queryEngine,
305
- ~opts=Some(opts),
306
- )
307
- let ops: Pulumi.Output.t<Extension.operations> =
308
- ExtensionMaker.operations(extension)->Obj.magic
309
- let registryInfo: extensionRegistryInfo = {
310
- // EP spec module URL (e.g. OrderingSpec/.../Orders_ExtensionPoint.res.mjs)
311
- specModule: Spec.moduleUrl,
312
- // User extension file URL — the .res.mjs declaring `module Mapping`.
313
- // The bundled Plugin EventCollector entry point dynamic-imports this to
314
- // pick up mapIncomingEvent / mapOutgoingEvent. Multi-blueprint merges
315
- // still surface one path here so the runtime has one known module to
316
- // import; the entry point regroups by extensionPointName.
317
- mappingsModule: First.moduleUrl,
318
- // Delegate spec URL (aggregate / slice the extension delegates to).
319
- // The entry point dynamic-imports this to reconstruct
320
- // `Mapping.Delegate` before handing the full mapping to ExtensionMapping.Make.
321
- delegateModule: First.delegateModuleUrl,
322
- }
323
- (
324
- ExtensionMaker.outputs(extension),
325
- ops->Pulumi.Output.apply(({outgoingJsonEventsHandler, incomingJsonEventsHandler}) => {
326
- incoming: incomingJsonEventsHandler,
327
- outgoing: outgoingJsonEventsHandler,
328
- }),
329
- registryInfo,
330
- )
331
- })
297
+ let extension = ExtensionMaker.make(
298
+ ~publishToPluginExtensionPoint,
299
+ ~publishToAggregates,
300
+ ~readModelNamesForSourceName,
301
+ ~publishToReadModels,
302
+ ~queryEngine,
303
+ ~opts=Some(opts),
304
+ )
305
+ let ops: Pulumi.Output.t<Extension.operations> =
306
+ ExtensionMaker.operations(extension)->Obj.magic
307
+ let registryInfo: extensionRegistryInfo = {
308
+ // EP spec module URL (e.g. OrderingSpec/.../Orders_ExtensionPoint.res.mjs)
309
+ specModule: Spec.moduleUrl,
310
+ // User extension file URL — the .res.mjs declaring `module Mapping`.
311
+ // The bundled Plugin EventCollector entry point dynamic-imports this to
312
+ // pick up mapIncomingEvent / mapOutgoingEvent. Multi-blueprint merges
313
+ // still surface one path here so the runtime has one known module to
314
+ // import; the entry point regroups by extensionPointName.
315
+ mappingsModule: First.moduleUrl,
316
+ // Delegate spec URL (aggregate / slice the extension delegates to).
317
+ // The entry point dynamic-imports this to reconstruct
318
+ // `Mapping.Delegate` before handing the full mapping to ExtensionMapping.Make.
319
+ delegateModule: First.delegateModuleUrl,
320
+ }
321
+ (
322
+ ExtensionMaker.outputs(extension),
323
+ ops->Pulumi.Output.apply(({outgoingJsonEventsHandler, incomingJsonEventsHandler}) => {
324
+ incoming: incomingJsonEventsHandler,
325
+ outgoing: outgoingJsonEventsHandler,
326
+ }),
327
+ registryInfo,
328
+ )
329
+ })
332
330
  let outputs = triples->Array.map(((o, _, _)) => o)
333
331
  let handlers = triples->Array.map(((_, h, _)) => h)
334
332
  let registryInfos = triples->Array.map(((_, _, r)) => r)
@@ -424,18 +422,20 @@ let createTasks = (
424
422
  ) => {
425
423
  tasksOutputs :=
426
424
  tasks->Array.map((module(SpecificTask: ReventlessInfra.Task.T)) =>
427
- SpecificTask.outputs(SpecificTask.make(
428
- ~queryBucketName=(~taskName, ~bucketName="Bucket") =>
429
- ResourceQueryRuntime.bucketNameOfTaskExn(tasksOutputs.contents, ~taskName, ~bucketName),
430
- ~scheduler,
431
- ~schedulerRoleUrn,
432
- ~publishToAggregates,
433
- ~queryEngine,
434
- ~resourceNaming,
435
- ~allAggregates=aggregatesOutputs,
436
- ~runtime=?componentRuntime->Dict.get(SpecificTask.Spec.name),
437
- ~opts=Some(opts),
438
- ))
425
+ SpecificTask.outputs(
426
+ SpecificTask.make(
427
+ ~queryBucketName=(~taskName, ~bucketName="Bucket") =>
428
+ ResourceQueryRuntime.bucketNameOfTaskExn(tasksOutputs.contents, ~taskName, ~bucketName),
429
+ ~scheduler,
430
+ ~schedulerRoleUrn,
431
+ ~publishToAggregates,
432
+ ~queryEngine,
433
+ ~resourceNaming,
434
+ ~allAggregates=aggregatesOutputs,
435
+ ~runtime=?componentRuntime->Dict.get(SpecificTask.Spec.name),
436
+ ~opts=Some(opts),
437
+ ),
438
+ )
439
439
  )
440
440
  // Every task is constructed, so every side-effect handler has registered.
441
441
  finishTasks()
@@ -454,7 +454,12 @@ module MakeEventCollectorHelper = (
454
454
  EventCollectorChannel,
455
455
  )
456
456
  let make = (~name, ~eventTopics, ~opts) => {
457
- let eventCollector = PluginEventCollector.make(~name, ~eventTopics, ~owner={kind: ComponentType.Plugin, name}, ~opts)
457
+ let eventCollector = PluginEventCollector.make(
458
+ ~name,
459
+ ~eventTopics,
460
+ ~owner={kind: ComponentType.Plugin, name},
461
+ ~opts,
462
+ )
458
463
  let eventCollectorOutputs = eventCollector->Component.outputs
459
464
  // pluginDefinition.eventCollector must identify the EC's inbound queue
460
465
  // ARN — admin's `manageSubscriptions` uses it as the subscription target
@@ -491,7 +496,9 @@ module MakeEventCollectorHelper = (
491
496
  // eventCollectorContext (uiFragmentsJson) so the AWS adapter ships it as a
492
497
  // uiFragments.json asset for the bundled Connect extension's cold start.
493
498
  ~uiFragments: option<Reventless.Plugin.uiFragmentManifest>=None,
494
- ~connectPluginExtensionIncomingEventHandler: option<Pulumi.Output.t<Pulumi.Output.t<Plugin_Callback.jsonEventsHandler>>>=?,
499
+ ~connectPluginExtensionIncomingEventHandler: option<
500
+ Pulumi.Output.t<Pulumi.Output.t<Plugin_Callback.jsonEventsHandler>>,
501
+ >=?,
495
502
  ~extensionsHandlers,
496
503
  ~extensionPointsHandlers,
497
504
  ~connectPluginExtensionOutputs: option<Pulumi.Output.t<Extension.outputs>>=?,
@@ -534,14 +541,16 @@ module MakeEventCollectorHelper = (
534
541
  })
535
542
 
536
543
  // Resolve ConnectPluginExtension data (or provide defaults for no-Core path)
537
- let connectExtData =
538
- switch (connectPluginExtensionIncomingEventHandler, connectPluginExtensionOutputs) {
539
- | (Some(handler), Some(outputs)) =>
540
- (handler->Pulumi.Output.unwrap, outputs)
541
- ->Pulumi.Output.all2
542
- ->Pulumi.Output.apply(((h, o)) => Some((h, o)))
543
- | _ => Pulumi.Output.make(None)
544
- }
544
+ let connectExtData = switch (
545
+ connectPluginExtensionIncomingEventHandler,
546
+ connectPluginExtensionOutputs,
547
+ ) {
548
+ | (Some(handler), Some(outputs)) =>
549
+ (handler->Pulumi.Output.unwrap, outputs)
550
+ ->Pulumi.Output.all2
551
+ ->Pulumi.Output.apply(((h, o)) => Some((h, o)))
552
+ | _ => Pulumi.Output.make(None)
553
+ }
545
554
 
546
555
  (
547
556
  pluginDefinition,
@@ -603,8 +612,7 @@ module MakeEventCollectorHelper = (
603
612
  // HANDLER_CONFIG. AWS reads this in forPluginEventCollector; in-memory
604
613
  // adapters ignore it and stay on the Output-bound Callback above.
605
614
  let ecResource = eventCollector->Component.toPulumiResource
606
- let ecName =
607
- ecResource.name->ComponentType.nameOpt(EventCollector.componentType)
615
+ let ecName = ecResource.name->ComponentType.nameOpt(EventCollector.componentType)
608
616
  let pluginDefinitionJson =
609
617
  pluginDefinition
610
618
  ->Reventless.Util_Sury.toJson(Reventless.Plugin.pluginDefinitionSchema)
@@ -672,7 +680,11 @@ module MakeEventCollectorHelper = (
672
680
  // already supplied by the caller.
673
681
  switch mergedAggregateUrls->Dict.get(ReventlessCore.PluginSpec.name) {
674
682
  | Some(_) => ()
675
- | None => mergedAggregateUrls->Dict.set(ReventlessCore.PluginSpec.name, pluginExtensionPointCmdTopicUrl)
683
+ | None =>
684
+ mergedAggregateUrls->Dict.set(
685
+ ReventlessCore.PluginSpec.name,
686
+ pluginExtensionPointCmdTopicUrl,
687
+ )
676
688
  }
677
689
  | None => ()
678
690
  }
@@ -685,13 +697,13 @@ module MakeEventCollectorHelper = (
685
697
  ) {
686
698
  extensionPointsOutputs->Array.mapWithIndex((output, i) => {
687
699
  let info = extensionPointRegistryInfos->Array.getUnsafe(i)
688
- let eventTopicArn =
689
- output.eventTopic->Pulumi.Output.flatMap(({resources}) =>
700
+ let eventTopicArn = output.eventTopic->Pulumi.Output.flatMap(
701
+ ({resources}) =>
690
702
  switch resources->Array.get(0) {
691
703
  | Some(r) => r.id
692
704
  | None => Pulumi.Output.make("")
693
- }
694
- )
705
+ },
706
+ )
695
707
  {
696
708
  specModule: info.specModule,
697
709
  mappingsModule: info.mappingsModule,
@@ -731,7 +743,6 @@ module MakeEventCollectorHelper = (
731
743
  }
732
744
  }
733
745
 
734
-
735
746
  // ---------------------------------------------------------------------------
736
747
  // Shared schema type and plugin-built hook — re-exported from Plugin_Callbacks
737
748
  // (runtime-safe, no Pulumi imports) for backward compatibility.
@@ -800,11 +811,13 @@ let clearOnPluginDeployed = () => {
800
811
  // Fired synchronously at graph-construction time (the value is concrete and a
801
812
  // resource cannot be created inside a Pulumi.Output.apply).
802
813
  // ---------------------------------------------------------------------------
803
- let offloadHook: ref<option<(~store: string, ~bytes: string) => Reventless.Offload.offloadedRef>> = ref(
804
- None,
805
- )
814
+ let offloadHook: ref<
815
+ option<(~store: string, ~bytes: string) => Reventless.Offload.offloadedRef>,
816
+ > = ref(None)
806
817
 
807
- let registerOffload = (hook: (~store: string, ~bytes: string) => Reventless.Offload.offloadedRef) => {
818
+ let registerOffload = (
819
+ hook: (~store: string, ~bytes: string) => Reventless.Offload.offloadedRef,
820
+ ) => {
808
821
  offloadHook.contents = Some(hook)
809
822
  }
810
823
 
@@ -820,7 +833,9 @@ One implementation for both construction sites — `Plugin_Builder`'s deploy-tim
820
833
  definition and the local platform's synthetic one — so a provider that offloads
821
834
  cannot end up offloading through one path and inlining through the other.
822
835
  */
823
- let offloadPayload = (value: 'a, ~schema: S.t<'a>, ~store: string): Reventless.Offload.payload<'a> =>
836
+ let offloadPayload = (value: 'a, ~schema: S.t<'a>, ~store: string): Reventless.Offload.payload<
837
+ 'a,
838
+ > =>
824
839
  switch offloadHook.contents {
825
840
  | Some(hook) =>
826
841
  Reventless.Offload.Offloaded(
@@ -1011,7 +1026,11 @@ type platformHooks = {
1011
1026
  // subscription (see Plugin_EventQuerySchema).
1012
1027
  eventQueryResolverHook?: eventQueryRegistrationParams => unit,
1013
1028
  // ── AppSync resolver creation (AWS) ───────────────────────────────────
1014
- preResolversSchemaHook?: (~name: string, ~version: string, Reventless.Plugin.apiSchemaFragment) => Pulumi.Output.t<unit>,
1029
+ preResolversSchemaHook?: (
1030
+ ~name: string,
1031
+ ~version: string,
1032
+ Reventless.Plugin.apiSchemaFragment,
1033
+ ) => Pulumi.Output.t<unit>,
1015
1034
  // Admin equivalent of preResolversSchemaHook. Set by AWS platforms to push
1016
1035
  // the admin SDL to the Platform (split mode) or Domain (unified mode) API.
1017
1036
  // Platform_Admin.construct invokes this with a barrier that resolves once the
@@ -1107,8 +1126,10 @@ let registerAdminAggregateMutations = (
1107
1126
  ()
1108
1127
  } else {
1109
1128
  let constructorNames = Reventless.DcbTag.extractAllVariantNames(M.Spec.commandSchema)
1110
- let filteredConstructorNames =
1111
- ApiNoApiHelpers.filterNoApiVariants(constructorNames, commandSchema)
1129
+ let filteredConstructorNames = ApiNoApiHelpers.filterNoApiVariants(
1130
+ constructorNames,
1131
+ commandSchema,
1132
+ )
1112
1133
  let fieldNames =
1113
1134
  filteredConstructorNames->Array.map(cname =>
1114
1135
  Api_Naming.adminField(~name=M.Spec.name ++ "_" ++ cname)
@@ -1154,19 +1175,23 @@ let taskFieldUnion = (tasks: dict<Task.outputs>): array<string> => {
1154
1175
  // Pulumi.Output.t values — we only need presence, not actual string content.
1155
1176
  // ReScript optional fields must be set to the inner type (not option<_>) in
1156
1177
  // record literals, so we use a switch to conditionally include them.
1157
- let resolved: ReventlessInterop.Task.resolvedOutputs =
1158
- switch (taskOutput.bucketNames, taskOutput.sideEffectSources) {
1159
- | (None, None) => {name: taskOutput.name}
1160
- | (Some(_), None) => {name: taskOutput.name, bucketNames: Dict.make()}
1161
- | (None, Some(src)) => {name: taskOutput.name, sideEffectSources: src}
1162
- | (Some(_), Some(src)) => {
1163
- name: taskOutput.name,
1164
- bucketNames: Dict.make(),
1165
- sideEffectSources: src,
1166
- }
1178
+ let resolved: ReventlessInterop.Task.resolvedOutputs = switch (
1179
+ taskOutput.bucketNames,
1180
+ taskOutput.sideEffectSources,
1181
+ ) {
1182
+ | (None, None) => {name: taskOutput.name}
1183
+ | (Some(_), None) => {name: taskOutput.name, bucketNames: Dict.make()}
1184
+ | (None, Some(src)) => {name: taskOutput.name, sideEffectSources: src}
1185
+ | (Some(_), Some(src)) => {
1186
+ name: taskOutput.name,
1187
+ bucketNames: Dict.make(),
1188
+ sideEffectSources: src,
1167
1189
  }
1168
- ReventlessInterop.ExportMeta.fieldNamesOf(resolved, ReventlessInterop.Task.resolvedOutputsSchema)
1169
- ->Array.reduce(acc, SSet.add)
1190
+ }
1191
+ ReventlessInterop.ExportMeta.fieldNamesOf(
1192
+ resolved,
1193
+ ReventlessInterop.Task.resolvedOutputsSchema,
1194
+ )->Array.reduce(acc, SSet.add)
1170
1195
  })
1171
1196
  ->SSet.toArray
1172
1197
  }
@@ -1202,6 +1227,7 @@ let toInteropMeta = (outputs: builderOutputs): ReventlessInterop.ExportMeta.t =>
1202
1227
  // point module and export the result as `let _interopMeta = getInteropMeta()`.
1203
1228
  let getInteropMeta = (): Pulumi.Output.t<JSON.t> => {
1204
1229
  let v = interopMetaOutput.contents
1230
+
1205
1231
  // Use raw null check to avoid option wrapping of the Proxy value.
1206
1232
  if %raw(`v === null`) {
1207
1233
  JsError.throwWithMessage("getInteropMeta() called before Plugin_Builder.construct()")
@@ -1218,12 +1244,14 @@ let exportDeploymentMetadata = () => {
1218
1244
  let metadata =
1219
1245
  [
1220
1246
  ("environment", Pulumi.Pulumi.getStackName()),
1221
- ("region", Pulumi.Config.make(Some("aws"))->Pulumi.Config.get("region")->Option.getOr("unknown")),
1247
+ (
1248
+ "region",
1249
+ Pulumi.Config.make(Some("aws"))->Pulumi.Config.get("region")->Option.getOr("unknown"),
1250
+ ),
1222
1251
  ("timestamp", Date.make()->Date.toISOString),
1223
1252
  ("gitSha", NodeProcess.env->Dict.get("GITHUB_SHA")->Option.getOr("unknown")),
1224
1253
  ("actor", NodeProcess.env->Dict.get("GITHUB_ACTOR")->Option.getOr("unknown")),
1225
- ]
1226
- ->Dict.fromArray
1254
+ ]->Dict.fromArray
1227
1255
  Pulumi.Pulumi.export(
1228
1256
  "deploymentMetadata",
1229
1257
  metadata->Dict.mapValues(JSON.Encode.string)->JSON.Encode.object->Pulumi.Output.make,
@@ -1248,10 +1276,7 @@ let serializePlainDictExport = (
1248
1276
  ->Array.map(((name, outputs)) =>
1249
1277
  outputs
1250
1278
  ->toResolved
1251
- ->Pulumi.Output.apply(resolved => (
1252
- name,
1253
- resolved->Reventless.Util_Sury.toJson(schema),
1254
- ))
1279
+ ->Pulumi.Output.apply(resolved => (name, resolved->Reventless.Util_Sury.toJson(schema)))
1255
1280
  )
1256
1281
  ->Pulumi.Output.all
1257
1282
  ->Pulumi.Output.apply(pairs => pairs->Dict.fromArray->JSON.Encode.object)
@@ -1267,10 +1292,7 @@ let serializeDictExport = (
1267
1292
  ->Array.map(((name, outputs)) =>
1268
1293
  outputs
1269
1294
  ->toResolved
1270
- ->Pulumi.Output.apply(resolved => (
1271
- name,
1272
- resolved->Reventless.Util_Sury.toJson(schema),
1273
- ))
1295
+ ->Pulumi.Output.apply(resolved => (name, resolved->Reventless.Util_Sury.toJson(schema)))
1274
1296
  )
1275
1297
  ->Pulumi.Output.all
1276
1298
  ->Pulumi.Output.apply(pairs => pairs->Dict.fromArray->JSON.Encode.object)
@@ -1284,8 +1306,9 @@ let serializeTasksOutputs = (pluginOutputs: Plugin.outputs): Pulumi.Output.t<JSO
1284
1306
  ->Array.map(task =>
1285
1307
  task
1286
1308
  ->Task.toResolvedOutputs
1287
- ->Pulumi.Output.apply(resolved =>
1288
- resolved->Reventless.Util_Sury.toJson(ReventlessInterop.Task.resolvedOutputsSchema)
1309
+ ->Pulumi.Output.apply(
1310
+ resolved =>
1311
+ resolved->Reventless.Util_Sury.toJson(ReventlessInterop.Task.resolvedOutputsSchema),
1289
1312
  )
1290
1313
  )
1291
1314
  ->Pulumi.Output.all
@@ -1303,20 +1326,21 @@ let serializeEventMappersOutputs = (pluginOutputs: Plugin.outputs): Pulumi.Outpu
1303
1326
  aggregates
1304
1327
  ->Dict.valuesToArray
1305
1328
  ->Array.map((agg: Aggregate.outputs) =>
1306
- agg.eventMapper->Pulumi.Output.flatMap(em =>
1307
- switch em {
1308
- | Some(em) =>
1309
- em
1310
- ->EventMapper.toResolvedOutputs
1311
- ->Pulumi.Output.apply(resolved =>
1312
- Some(
1313
- resolved->Reventless.Util_Sury.toJson(
1314
- ReventlessInterop.EventMapper.resolvedOutputsSchema,
1329
+ agg.eventMapper->Pulumi.Output.flatMap(
1330
+ em =>
1331
+ switch em {
1332
+ | Some(em) =>
1333
+ em
1334
+ ->EventMapper.toResolvedOutputs
1335
+ ->Pulumi.Output.apply(
1336
+ resolved => Some(
1337
+ resolved->Reventless.Util_Sury.toJson(
1338
+ ReventlessInterop.EventMapper.resolvedOutputsSchema,
1339
+ ),
1315
1340
  ),
1316
1341
  )
1317
- )
1318
- | None => Pulumi.Output.make(None)
1319
- }
1342
+ | None => Pulumi.Output.make(None)
1343
+ },
1320
1344
  )
1321
1345
  )
1322
1346
  ->Pulumi.Output.all
@@ -1348,12 +1372,14 @@ let exportPlatformOutputs = (
1348
1372
  ->Array.map(ep =>
1349
1373
  ep
1350
1374
  ->ExtensionPoint.toResolvedOutputs
1351
- ->Pulumi.Output.apply(resolved => (
1352
- ep.name,
1353
- resolved->Reventless.Util_Sury.toJson(
1354
- ReventlessInterop.ExtensionPoint.resolvedOutputsSchema,
1375
+ ->Pulumi.Output.apply(
1376
+ resolved => (
1377
+ ep.name,
1378
+ resolved->Reventless.Util_Sury.toJson(
1379
+ ReventlessInterop.ExtensionPoint.resolvedOutputsSchema,
1380
+ ),
1355
1381
  ),
1356
- ))
1382
+ )
1357
1383
  )
1358
1384
  ->Pulumi.Output.all
1359
1385
  ->Pulumi.Output.apply(pairs => pairs->Dict.fromArray->JSON.Encode.object)
@@ -1392,9 +1418,7 @@ let exportPlatformOutputs = (
1392
1418
  dcbOutputs
1393
1419
  ->DcbEventLog.toResolvedOutputs
1394
1420
  ->Pulumi.Output.apply(resolved =>
1395
- resolved->Reventless.Util_Sury.toJson(
1396
- ReventlessInterop.DcbEventLog.resolvedOutputsSchema,
1397
- )
1421
+ resolved->Reventless.Util_Sury.toJson(ReventlessInterop.DcbEventLog.resolvedOutputsSchema)
1398
1422
  ),
1399
1423
  )
1400
1424
  | None => ()
@@ -1545,9 +1569,7 @@ let exportPluginOutputs = (pluginOutputs: Plugin.outputs) => {
1545
1569
  dcbOutputs
1546
1570
  ->DcbEventLog.toResolvedOutputs
1547
1571
  ->Pulumi.Output.apply(resolved =>
1548
- resolved->Reventless.Util_Sury.toJson(
1549
- ReventlessInterop.DcbEventLog.resolvedOutputsSchema,
1550
- )
1572
+ resolved->Reventless.Util_Sury.toJson(ReventlessInterop.DcbEventLog.resolvedOutputsSchema)
1551
1573
  )
1552
1574
  | None => Pulumi.Output.make(Obj.magic(JSON.Encode.null))
1553
1575
  }
@@ -1573,29 +1595,30 @@ let exportPluginOutputs = (pluginOutputs: Plugin.outputs) => {
1573
1595
  ->Dict.get("GITHUB_SHA")
1574
1596
  ->Option.orElse(NodeProcess.env->Dict.get("CI_COMMIT_SHA"))
1575
1597
  ->Option.getOr(Date.make()->Date.toISOString)
1576
- let schemaFor = name =>
1577
- componentSchemaRegistry->Dict.get(name)->Option.getOr({})
1598
+ let schemaFor = name => componentSchemaRegistry->Dict.get(name)->Option.getOr({})
1578
1599
  let resolveAggregates = pluginOutputs.aggregates->Pulumi.Output.flatMap(aggs =>
1579
1600
  aggs
1580
1601
  ->Dict.toArray
1581
1602
  ->Array.map(((name, outputs)) =>
1582
1603
  outputs
1583
1604
  ->Aggregate.toResolvedOutputs
1584
- ->Pulumi.Output.apply((resolved: ReventlessInterop.Aggregate.resolvedOutputs) => {
1585
- let component: pluginDeployedComponent = {
1586
- name,
1587
- kind: "Aggregate",
1588
- schema: schemaFor(name),
1589
- resources: [],
1590
- subComponents: [
1591
- {role: "commandGenerator", resources: resolved.commandGenerator.resources},
1592
- {role: "commandTopic", resources: resolved.commandTopic.resources},
1593
- {role: "eventLog", resources: resolved.eventLog.resources},
1594
- {role: "eventTopic", resources: resolved.eventLog.eventTopic.resources},
1595
- ],
1596
- }
1597
- component
1598
- })
1605
+ ->Pulumi.Output.apply(
1606
+ (resolved: ReventlessInterop.Aggregate.resolvedOutputs) => {
1607
+ let component: pluginDeployedComponent = {
1608
+ name,
1609
+ kind: "Aggregate",
1610
+ schema: schemaFor(name),
1611
+ resources: [],
1612
+ subComponents: [
1613
+ {role: "commandGenerator", resources: resolved.commandGenerator.resources},
1614
+ {role: "commandTopic", resources: resolved.commandTopic.resources},
1615
+ {role: "eventLog", resources: resolved.eventLog.resources},
1616
+ {role: "eventTopic", resources: resolved.eventLog.eventTopic.resources},
1617
+ ],
1618
+ }
1619
+ component
1620
+ },
1621
+ )
1599
1622
  )
1600
1623
  ->Pulumi.Output.all
1601
1624
  )
@@ -1606,16 +1629,18 @@ let exportPluginOutputs = (pluginOutputs: Plugin.outputs) => {
1606
1629
  ->Array.map(((name, outputs)) =>
1607
1630
  outputs
1608
1631
  ->ReadModel.toResolvedOutputs
1609
- ->Pulumi.Output.apply((resolved: ReventlessInterop.ReadModel.resolvedOutputs) => {
1610
- let component: pluginDeployedComponent = {
1611
- name,
1612
- kind: "ReadModel",
1613
- schema: schemaFor(name),
1614
- resources: [],
1615
- subComponents: [{role: "queryDb", resources: resolved.queryDb.resources}],
1616
- }
1617
- component
1618
- })
1632
+ ->Pulumi.Output.apply(
1633
+ (resolved: ReventlessInterop.ReadModel.resolvedOutputs) => {
1634
+ let component: pluginDeployedComponent = {
1635
+ name,
1636
+ kind: "ReadModel",
1637
+ schema: schemaFor(name),
1638
+ resources: [],
1639
+ subComponents: [{role: "queryDb", resources: resolved.queryDb.resources}],
1640
+ }
1641
+ component
1642
+ },
1643
+ )
1619
1644
  )
1620
1645
  ->Pulumi.Output.all
1621
1646
  )
@@ -1626,19 +1651,21 @@ let exportPluginOutputs = (pluginOutputs: Plugin.outputs) => {
1626
1651
  ->Array.map(((name, outputs)) =>
1627
1652
  outputs
1628
1653
  ->ExtensionPoint.toResolvedOutputs
1629
- ->Pulumi.Output.apply((resolved: ReventlessInterop.ExtensionPoint.resolvedOutputs) => {
1630
- let component: pluginDeployedComponent = {
1631
- name,
1632
- kind: "ExtensionPoint",
1633
- schema: schemaFor(name),
1634
- resources: [],
1635
- subComponents: [
1636
- {role: "commandTopic", resources: resolved.commandTopic.resources},
1637
- {role: "eventTopic", resources: resolved.eventTopic.resources},
1638
- ],
1639
- }
1640
- component
1641
- })
1654
+ ->Pulumi.Output.apply(
1655
+ (resolved: ReventlessInterop.ExtensionPoint.resolvedOutputs) => {
1656
+ let component: pluginDeployedComponent = {
1657
+ name,
1658
+ kind: "ExtensionPoint",
1659
+ schema: schemaFor(name),
1660
+ resources: [],
1661
+ subComponents: [
1662
+ {role: "commandTopic", resources: resolved.commandTopic.resources},
1663
+ {role: "eventTopic", resources: resolved.eventTopic.resources},
1664
+ ],
1665
+ }
1666
+ component
1667
+ },
1668
+ )
1642
1669
  )
1643
1670
  ->Pulumi.Output.all
1644
1671
  )
@@ -1649,16 +1676,18 @@ let exportPluginOutputs = (pluginOutputs: Plugin.outputs) => {
1649
1676
  ->Array.map(((name, outputs)) =>
1650
1677
  outputs
1651
1678
  ->StateChangeSlice.toResolvedOutputs
1652
- ->Pulumi.Output.apply((resolved: ReventlessInterop.StateChangeSlice.resolvedOutputs) => {
1653
- let component: pluginDeployedComponent = {
1654
- name,
1655
- kind: "StateChangeSlice",
1656
- schema: schemaFor(name),
1657
- resources: resolved.resources,
1658
- subComponents: [],
1659
- }
1660
- component
1661
- })
1679
+ ->Pulumi.Output.apply(
1680
+ (resolved: ReventlessInterop.StateChangeSlice.resolvedOutputs) => {
1681
+ let component: pluginDeployedComponent = {
1682
+ name,
1683
+ kind: "StateChangeSlice",
1684
+ schema: schemaFor(name),
1685
+ resources: resolved.resources,
1686
+ subComponents: [],
1687
+ }
1688
+ component
1689
+ },
1690
+ )
1662
1691
  )
1663
1692
  ->Pulumi.Output.all
1664
1693
  )
@@ -1669,16 +1698,18 @@ let exportPluginOutputs = (pluginOutputs: Plugin.outputs) => {
1669
1698
  ->Array.map(((name, outputs)) =>
1670
1699
  outputs
1671
1700
  ->StateViewSlice.toResolvedOutputs
1672
- ->Pulumi.Output.apply((resolved: ReventlessInterop.StateViewSlice.resolvedOutputs) => {
1673
- let component: pluginDeployedComponent = {
1674
- name,
1675
- kind: "StateViewSlice",
1676
- schema: schemaFor(name),
1677
- resources: resolved.resources,
1678
- subComponents: [{role: "queryDb", resources: resolved.queryDb.resources}],
1679
- }
1680
- component
1681
- })
1701
+ ->Pulumi.Output.apply(
1702
+ (resolved: ReventlessInterop.StateViewSlice.resolvedOutputs) => {
1703
+ let component: pluginDeployedComponent = {
1704
+ name,
1705
+ kind: "StateViewSlice",
1706
+ schema: schemaFor(name),
1707
+ resources: resolved.resources,
1708
+ subComponents: [{role: "queryDb", resources: resolved.queryDb.resources}],
1709
+ }
1710
+ component
1711
+ },
1712
+ )
1682
1713
  )
1683
1714
  ->Pulumi.Output.all
1684
1715
  )
@@ -1689,16 +1720,18 @@ let exportPluginOutputs = (pluginOutputs: Plugin.outputs) => {
1689
1720
  ->Array.map(((name, outputs)) =>
1690
1721
  outputs
1691
1722
  ->AutomationSlice.toResolvedOutputs
1692
- ->Pulumi.Output.apply((resolved: ReventlessInterop.AutomationSlice.resolvedOutputs) => {
1693
- let component: pluginDeployedComponent = {
1694
- name,
1695
- kind: "AutomationSlice",
1696
- schema: schemaFor(name),
1697
- resources: resolved.resources,
1698
- subComponents: [{role: "queryDb", resources: resolved.queryDb.resources}],
1699
- }
1700
- component
1701
- })
1723
+ ->Pulumi.Output.apply(
1724
+ (resolved: ReventlessInterop.AutomationSlice.resolvedOutputs) => {
1725
+ let component: pluginDeployedComponent = {
1726
+ name,
1727
+ kind: "AutomationSlice",
1728
+ schema: schemaFor(name),
1729
+ resources: resolved.resources,
1730
+ subComponents: [{role: "queryDb", resources: resolved.queryDb.resources}],
1731
+ }
1732
+ component
1733
+ },
1734
+ )
1702
1735
  )
1703
1736
  ->Pulumi.Output.all
1704
1737
  )
@@ -1775,21 +1808,22 @@ let exportPluginOutputs = (pluginOutputs: Plugin.outputs) => {
1775
1808
  let pluginVersion = id->String.split("@")->Array.getUnsafe(1)
1776
1809
  exts
1777
1810
  ->Dict.valuesToArray
1778
- ->Array.map((ext: ReventlessInfra.Extension.outputs) => {
1779
- // Derive provider plugin name from the extension point name
1780
- // (e.g. "Catalog.Products" → "Catalog").
1781
- let providerPlugin =
1782
- ext.extensionPointName->String.split(".")->Array.getUnsafe(0)
1783
- let wiring: extensionWiring = {
1784
- extensionName: ext.name,
1785
- extensionPointName: ext.extensionPointName,
1786
- providerPlugin,
1787
- providerVersion: "",
1788
- subscriberPlugin: pluginName,
1789
- subscriberVersion: pluginVersion,
1790
- }
1791
- wiring
1792
- })
1811
+ ->Array.map(
1812
+ (ext: ReventlessInfra.Extension.outputs) => {
1813
+ // Derive provider plugin name from the extension point name
1814
+ // (e.g. "Catalog.Products" → "Catalog").
1815
+ let providerPlugin = ext.extensionPointName->String.split(".")->Array.getUnsafe(0)
1816
+ let wiring: extensionWiring = {
1817
+ extensionName: ext.name,
1818
+ extensionPointName: ext.extensionPointName,
1819
+ providerPlugin,
1820
+ providerVersion: "",
1821
+ subscriberPlugin: pluginName,
1822
+ subscriberVersion: pluginVersion,
1823
+ }
1824
+ wiring
1825
+ },
1826
+ )
1793
1827
  })
1794
1828
  )
1795
1829
 
@@ -1826,10 +1860,10 @@ let exportPluginOutputs = (pluginOutputs: Plugin.outputs) => {
1826
1860
  deployedAt: Date.make()->Date.toISOString,
1827
1861
  actor,
1828
1862
  deploymentId,
1829
- kind: ?meta->Option.flatMap(m => m.kind),
1830
- displayName: ?meta->Option.flatMap(m => m.displayName),
1831
- vendor: ?meta->Option.flatMap(m => m.vendor),
1832
- architectureType: ?meta->Option.flatMap(m => m.architectureType),
1863
+ kind: ?(meta->Option.flatMap(m => m.kind)),
1864
+ displayName: ?(meta->Option.flatMap(m => m.displayName)),
1865
+ vendor: ?(meta->Option.flatMap(m => m.vendor)),
1866
+ architectureType: ?(meta->Option.flatMap(m => m.architectureType)),
1833
1867
  components: Array.flat([aggs, rms, eps, scs, svs, autos, ots, its, dcb]),
1834
1868
  extensionWirings: wirings,
1835
1869
  }