@reventlessdev/reventless-core 3.0.0-alpha.260 → 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.
- package/CHANGELOG.md +8 -0
- package/package.json +9 -9
- package/src/Behavior.res +1 -4
- package/src/Message.res +17 -14
- package/src/Projection.res +51 -25
- package/src/RequestContext.res +8 -9
- package/src/ResourceAttribution.res +28 -14
- package/src/adapter/Adapter.res +48 -4
- package/src/adapter/EventLogProvisioning/EventLogProvisioning.res +5 -5
- package/src/adapter/Messaging/Messaging_Log_Backend.res +10 -7
- package/src/adapter/Messaging/Messaging_Log_Backend.res.mjs +2 -4
- package/src/adapter/Monitoring/Monitoring.res +16 -17
- package/src/adapter/QueryInterception/QueryInterception.res +0 -1
- package/src/adapter/Runtime/AggregateRuntime_Builder_Common.res +12 -5
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_Single.res +11 -7
- package/src/adapter/Runtime/PluginRuntime_Builder_Micro.res +1 -7
- package/src/adapter/Runtime/PluginRuntime_Builder_Single.res +1 -7
- package/src/adapter/RuntimeExtension/RuntimeExtension.res +0 -1
- package/src/admin/Platform_Admin.res +17 -6
- package/src/admin/Platform_AdminApi.res +14 -9
- package/src/admin/Platform_Admin_Callback.res +1 -1
- package/src/admin/Platform_BakedManifest.res +34 -34
- package/src/admin/Platform_ComponentDefinitionsApi.res +9 -21
- package/src/admin/Platform_PluginStructuresApi.res +15 -12
- package/src/admin/UiFragmentRegistry/StateChange/UiFragmentRegistry.res +1 -1
- package/src/components/Aggregate/Aggregate.res +13 -12
- package/src/components/Aggregate/Aggregate_Builder.res +22 -21
- package/src/components/Aggregate/Aggregate_Callback.res +91 -86
- package/src/components/Api/ApiNoApiHelpers.res +1 -3
- package/src/components/Api/Api_Ids.res +0 -1
- package/src/components/Api/Api_Naming.res +41 -18
- package/src/components/Api/GraphQL_FragmentGenerator.res +38 -51
- package/src/components/Api/GraphQL_SchemaInspector.res +5 -3
- package/src/components/Api/GraphQL_Stitcher.res +9 -10
- package/src/components/Api/MCP_SchemaGenerator.res +8 -12
- package/src/components/Api/OwnerScopeDiagnostics.res +1 -2
- package/src/components/Api/QueryDbListQuery.res +13 -6
- package/src/components/Api/SchemaType.res +28 -23
- package/src/components/Api/SuryToJsonSchema.res +9 -10
- package/src/components/AutomationSlice/AutomationSlice.res +4 -4
- package/src/components/AutomationSlice/AutomationSlice_Builder.res +15 -14
- package/src/components/AutomationSlice/AutomationSlice_Callback.res +3 -3
- package/src/components/Builder_Helpers.res +12 -23
- package/src/components/CommandGenerator/CommandGenerator.res +6 -1
- package/src/components/CommandGenerator/CommandGenerator_Builder.res +29 -21
- package/src/components/CommandGenerator/CommandGenerator_Callback.res +17 -21
- package/src/components/CommandTopic/CommandTopic.res +3 -3
- package/src/components/CommandTopic/CommandTopic_Builder.res +10 -10
- package/src/components/CommandTopic/CommandTopic_Callback.res +1 -4
- package/src/components/CommandTopic/CommandTopic_Helpers.res +1 -2
- package/src/components/Counter/Counter_Builder.res +1 -6
- package/src/components/Counter/Counter_Callback.res +3 -3
- package/src/components/Dcb/Dcb_Builder.res +970 -956
- package/src/components/DcbEventLog/DcbEventLog.res +4 -4
- package/src/components/DcbEventLog/DcbEventLog_Builder.res +0 -1
- package/src/components/DcbEventLog/DcbEventLog_Operations.res +17 -18
- package/src/components/EventCollector/EventCollector_Builder.res +2 -1
- package/src/components/EventLog/EventLog.res +5 -1
- package/src/components/EventLog/EventLog_Operations.res +12 -8
- package/src/components/EventMapper/EventMapper.res +8 -10
- package/src/components/EventMapper/EventMapper_Builder.res +4 -1
- package/src/components/EventMapper/EventMapper_Callback.res +46 -31
- package/src/components/EventTopic/EventTopic.res +3 -3
- package/src/components/EventTopic/EventTopic_Builder.res +1 -1
- package/src/components/Extension/Extension.res +4 -1
- package/src/components/Extension/Extension_Operations.res +11 -3
- package/src/components/ExtensionPoint/ExtensionPoint.res +3 -3
- package/src/components/ExtensionPoint/ExtensionPoint_Builder.res +9 -10
- package/src/components/ExtensionPoint/ExtensionPoint_Callback.res +2 -6
- package/src/components/ExtensionPoint/ExtensionPoint_Operations.res +13 -5
- package/src/components/Heartbeat/Heartbeat_Callback.res +3 -3
- package/src/components/InboundTranslationSlice/InboundTranslationSlice.res +4 -4
- package/src/components/InboundTranslationSlice/InboundTranslationSlice_Builder.res +7 -10
- package/src/components/OutboundTranslationSlice/OutboundTranslationSlice.res +4 -4
- package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Builder.res +15 -14
- package/src/components/QueryDb/QueryDb_Adapter.res +1 -3
- package/src/components/QueryDb/QueryDb_Operations.res +10 -10
- package/src/components/ReadModel/ReadModel.res +3 -3
- package/src/components/ReadModel/ReadModel_Builder.res +1 -2
- package/src/components/ReadModel/ReadModel_Callback.res +2 -1
- package/src/components/SideEffectHandler/SideEffectHandler_Callback.res +5 -2
- package/src/components/StateChangeSlice/StateChangeSlice.res +3 -3
- package/src/components/StateChangeSlice/StateChangeSlice_Builder.res +23 -4
- package/src/components/StateChangeSlice/StateChangeSlice_Callback.res +22 -6
- package/src/components/StateTopic.res +1 -3
- package/src/components/StateViewSlice/StateViewSlice.res +4 -4
- package/src/components/StateViewSlice/StateViewSlice_Builder.res +79 -68
- package/src/components/StateViewSlice/StateViewSlice_Callback.res +3 -1
- package/src/components/Task/Task.res +3 -3
- package/src/components/Task/Task_Adapter.res +4 -1
- package/src/components/Task/Task_Builder.res +24 -21
- package/src/plugin/api/PluginBaseFragment.res +9 -3
- package/src/plugin/component/Capability_Inference.res +8 -10
- package/src/plugin/component/Plugin.res +6 -6
- package/src/plugin/component/Plugin_Builder.res +54 -50
- package/src/plugin/component/Plugin_Callback.res +10 -6
- package/src/plugin/component/Plugin_Helpers.res +264 -230
- package/src/plugin/component/Plugin_Structure.res +370 -324
- package/src/plugin/component/Plugin_SubscriptionSchema.res +8 -6
- package/src/plugin/component/SchemaWalker.res +11 -12
- package/src/plugin/connect/PluginConnectExtension_Mapping.res +45 -50
- package/src/plugin/lifecycle/PluginBehavior.res +3 -4
- package/src/plugin/lifecycle/PluginSpec.res +1 -2
- package/src/plugin/lifecycle/PluginsProjection.res +16 -5
- package/src/plugin/lifecycle/PluginsReadModelSpec.res +0 -2
- package/src/util/CommandPublisher.res +9 -2
- package/src/util/CsvStream.res +3 -3
- package/src/util/Interstack.res +7 -15
- package/src/util/Interstack.resi +3 -3
- package/src/util/LogFormat.res +5 -9
- package/src/util/Logger.res +1 -2
- package/src/util/Lru.res +2 -1
- package/src/util/Lru.resi +2 -3
- package/src/util/ScheduleOps.res +24 -27
- package/src/util/StorePrefixCollision.res +6 -9
- package/src/util/Util_Promise.res +4 -1
- package/src/util/Util_Promise.res.mjs +1 -1
- package/tests/IdentityTest.res +166 -113
- package/tests/ResourceAttributionTest.res +28 -25
- package/tests/StorePrefixCollisionTest.res +2 -1
- package/tests/TaskBucketNamingTest.res +3 -2
- package/tests/adapter/EventLogProvisioningTest.res +51 -48
- package/tests/adapter/MonitoringTest.res +81 -38
- package/tests/adapter/QueryInterceptionTest.res +2 -2
- package/tests/adapter/RefusalVocabularyTest.res +31 -23
- package/tests/adapter/RuntimeExtensionHookReachTest.res +9 -8
- package/tests/adapter/RuntimeExtensionTest.res +5 -3
- package/tests/admin/AdminApiSchemaDriftTest.res +22 -16
- package/tests/admin/Platform_Admin_StructureTest.res +10 -11
- package/tests/admin/Platform_BakedManifestTest.res +31 -35
- package/tests/admin/Platform_ComponentDefinitionsApiTest.res +18 -15
- package/tests/admin/Platform_PluginStructuresApiTest.res +5 -3
- package/tests/admin/Platform_UIFragmentsApiTest.res +6 -3
- package/tests/aggregate/AggregateCacheTest.res +10 -12
- package/tests/aggregate/AggregateCallbackTest.res +75 -46
- package/tests/aggregate/AggregateCausationTest.res +19 -20
- package/tests/aggregate/AggregateConflictTest.res +41 -19
- package/tests/aggregate/AggregateFixtures.res +15 -5
- package/tests/aggregate/AggregateRejectionTest.res +97 -80
- package/tests/aggregate/AggregateSnapshotTest.res +44 -16
- package/tests/api/Api_IdsTest.res +10 -4
- package/tests/api/BrandedMarkerCompositionTest.res +48 -36
- package/tests/api/GeolocationSemanticTest.res +3 -3
- package/tests/api/GraphQL_FragmentGeneratorTest.res +66 -54
- package/tests/api/OwnerScopeDiagnosticsTest.res +31 -27
- package/tests/api/StorageRefFieldsTest.res +30 -18
- package/tests/api/SuryToJsonSchemaTest.res +1315 -1014
- package/tests/api/TaggedUnionSchemaTest.res +17 -24
- package/tests/commandgenerator/CommandGeneratorCallbackTest.res +235 -179
- package/tests/commandgenerator/CommandGeneratorFixtures.res +8 -13
- package/tests/commandgenerator/OwnerStampingTest.res +91 -76
- package/tests/commandtopic/CommandOutcomeHookTest.res +198 -155
- package/tests/commandtopic/CommandTopicCallbackFixtures.res +5 -4
- package/tests/commandtopic/CommandTopicCallbackTest.res +61 -43
- package/tests/commandtopic/CommandTopicHelpersRejectionTest.res +70 -55
- package/tests/counter/CounterCallbackTest.res +40 -34
- package/tests/counter/CounterFixtures.res +4 -4
- package/tests/dcb/DcbDecodeTest.res +115 -84
- package/tests/dcb/DcbEventLogOperationsTest.res +194 -143
- package/tests/dcb/DcbEventLogSchemaTest.res +13 -13
- package/tests/dcb/DcbFixtures.res +4 -5
- package/tests/dcb/DcbScopeInferenceTest.res +173 -114
- package/tests/dcb/DcbStateChangeSliceTest.res +391 -262
- package/tests/dcb/DcbTagTest.res +22 -11
- package/tests/dcb/DcbValidationTest.res +288 -218
- package/tests/eventlog/EventLogFixtures.res +4 -4
- package/tests/eventlog/EventLogOperationsTest.res +102 -67
- package/tests/eventlog/EventLogRetryTest.res +104 -65
- package/tests/eventmapper/EventMapperCallbackTest.res +118 -83
- package/tests/eventmapper/EventMapperFixtures.res +15 -23
- package/tests/eventmapper/EventMapperTest.res +54 -38
- package/tests/eventtopic/EventTopicFixtures.res +3 -4
- package/tests/eventtopic/EventTopicOperationsTest.res +41 -29
- package/tests/extensionpoint/ExtensionPointCallbackTest.res +58 -45
- package/tests/extensionpoint/ExtensionPointFixtures.res +16 -20
- package/tests/extensionpoint/ExtensionPointOperationsTest.res +70 -49
- package/tests/extensionpoint/PluginDisconnectScheduleTest.res +2 -1
- package/tests/logger/LogFormatTest.res +104 -82
- package/tests/logger/LoggerLazyTest.res +21 -12
- package/tests/message/MessageTest.res +96 -93
- package/tests/message/MetaEnvelopeTest.res +26 -30
- package/tests/plugin/HeartbeatDisconnectGraceTest.res +31 -25
- package/tests/plugin/ManifestVisibilityTest.res +20 -12
- package/tests/plugin/PluginDefinitionScalars.res +1 -2
- package/tests/plugin/PluginLifecycleCorpusTest.res +15 -12
- package/tests/plugin/PluginSpecExperiment.res +0 -1
- package/tests/plugin/PluginStructureTest.res +1529 -1045
- package/tests/plugin/Plugin_EventQuerySchemaTest.res +21 -10
- package/tests/plugin/SchemaWalkerTest.res +116 -70
- package/tests/plugin/StateChange/PsReserveStock.res +4 -4
- package/tests/plugin/StateView/PsAnnotatedView.res +4 -4
- package/tests/plugin/StateView/PsCustomersView.res +4 -4
- package/tests/plugin/StateView/PsShipmentsView.res +3 -2
- package/tests/projection/LifecycleTrailTest.res +1 -4
- package/tests/projection/ProjectionOptimizeTest.res +13 -9
- package/tests/querydb/QueryDbFixtures.res +0 -1
- package/tests/querydb/QueryDbOperationsTest.res +99 -64
- package/tests/querydb/TaggedUnionStampTest.res +10 -8
- package/tests/sideeffecthandler/SideEffectHandlerCallbackTest.res +50 -35
- package/tests/sideeffecthandler/SideEffectHandlerFixtures.res +4 -10
- package/tests/util/CommandPublisherTest.res +0 -1
- package/tests/util/CsvStreamTest.res +3 -3
- 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 =
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
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
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
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
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
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(
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
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(
|
|
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<
|
|
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
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
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 =>
|
|
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
|
-
|
|
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<
|
|
804
|
-
|
|
805
|
-
)
|
|
814
|
+
let offloadHook: ref<
|
|
815
|
+
option<(~store: string, ~bytes: string) => Reventless.Offload.offloadedRef>,
|
|
816
|
+
> = ref(None)
|
|
806
817
|
|
|
807
|
-
let registerOffload = (
|
|
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<
|
|
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?: (
|
|
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
|
-
|
|
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
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
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
|
-
|
|
1169
|
-
|
|
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
|
-
(
|
|
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(
|
|
1288
|
-
resolved
|
|
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(
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
em
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
resolved
|
|
1314
|
-
|
|
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
|
-
|
|
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(
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
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(
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
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(
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
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(
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
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(
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
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(
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
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(
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
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(
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
ext.extensionPointName->String.split(".")->Array.getUnsafe(0)
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
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
|
}
|