@reventlessdev/reventless-core 3.0.0-alpha.134
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 +1355 -0
- package/LICENSE +202 -0
- package/README.md +173 -0
- package/__mocks__/emptyModule.js +2 -0
- package/jest.setup.cjs +5 -0
- package/package.json +73 -0
- package/rescript.json +41 -0
- package/scripts/deploy.sh +6 -0
- package/scripts/post-deploy.sh +5 -0
- package/scripts/pre-deploy.sh +18 -0
- package/scripts/pulumi-up.sh +30 -0
- package/src/Behavior.res +18 -0
- package/src/Behavior.res.mjs +2 -0
- package/src/ComponentType.res +125 -0
- package/src/ComponentType.res.mjs +199 -0
- package/src/Env.res +5 -0
- package/src/Env.res.mjs +2 -0
- package/src/Mapper.res +36 -0
- package/src/Mapper.res.mjs +18 -0
- package/src/Mapper1toN.res +107 -0
- package/src/Mapper1toN.res.mjs +2 -0
- package/src/MapperNto1.res +78 -0
- package/src/MapperNto1.res.mjs +35 -0
- package/src/Message.res +353 -0
- package/src/Message.res.mjs +418 -0
- package/src/PluginRuntimeOperations.res +15 -0
- package/src/PluginRuntimeOperations.res.mjs +2 -0
- package/src/Projection.res +447 -0
- package/src/Projection.res.mjs +712 -0
- package/src/ProjectionMapper.res +44 -0
- package/src/ProjectionMapper.res.mjs +51 -0
- package/src/RequestContext.res +42 -0
- package/src/RequestContext.res.mjs +39 -0
- package/src/adapter/Adapter.res +178 -0
- package/src/adapter/Adapter.res.mjs +201 -0
- package/src/adapter/AdapterDeploytime.res +56 -0
- package/src/adapter/AdapterDeploytime.res.mjs +42 -0
- package/src/adapter/Auth/Auth_Adapter.res +42 -0
- package/src/adapter/Auth/Auth_Adapter.res.mjs +2 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder.res +22 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder.res.mjs +2 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Common.res +259 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Common.res.mjs +190 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res +92 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res.mjs +59 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate.res +52 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate.res.mjs +49 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single.res +64 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single.res.mjs +59 -0
- package/src/adapter/Runtime/EventCollectorRuntime_Builder.res +11 -0
- package/src/adapter/Runtime/EventCollectorRuntime_Builder.res.mjs +2 -0
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_PerEventCollector.res +46 -0
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_PerEventCollector.res.mjs +40 -0
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_Single.res +204 -0
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_Single.res.mjs +150 -0
- package/src/adapter/Runtime/ExtensionPointRuntime_Builder.res +18 -0
- package/src/adapter/Runtime/ExtensionPointRuntime_Builder.res.mjs +2 -0
- package/src/adapter/Runtime/ExtensionPointRuntime_Builder_PerExtensionPoint.res +36 -0
- package/src/adapter/Runtime/ExtensionPointRuntime_Builder_PerExtensionPoint.res.mjs +28 -0
- package/src/adapter/Runtime/PluginRuntime_Builder.res +23 -0
- package/src/adapter/Runtime/PluginRuntime_Builder.res.mjs +2 -0
- package/src/adapter/Runtime/PluginRuntime_Builder_Micro.res +97 -0
- package/src/adapter/Runtime/PluginRuntime_Builder_Micro.res.mjs +62 -0
- package/src/adapter/Runtime/PluginRuntime_Builder_Single.res +89 -0
- package/src/adapter/Runtime/PluginRuntime_Builder_Single.res.mjs +62 -0
- package/src/adapter/Runtime/Runtime.res +106 -0
- package/src/adapter/Runtime/Runtime.res.mjs +22 -0
- package/src/adapter/Runtime/TaskRuntime_Builder.res +32 -0
- package/src/adapter/Runtime/TaskRuntime_Builder.res.mjs +2 -0
- package/src/adapter/Runtime/TaskRuntime_Builder_PerBucket.res +42 -0
- package/src/adapter/Runtime/TaskRuntime_Builder_PerBucket.res.mjs +29 -0
- package/src/admin/AdminApi.res +88 -0
- package/src/admin/AdminApi.res.mjs +89 -0
- package/src/admin/Admin_Callback.res +27 -0
- package/src/admin/Admin_Callback.res.mjs +20 -0
- package/src/admin/Platform_Admin.res +402 -0
- package/src/admin/Platform_Admin.res.mjs +250 -0
- package/src/admin/Platform_Admin_Structure.res +125 -0
- package/src/admin/Platform_Admin_Structure.res.mjs +182 -0
- package/src/admin/Platform_ComponentDefinitionsApi.res +160 -0
- package/src/admin/Platform_ComponentDefinitionsApi.res.mjs +299 -0
- package/src/admin/Platform_UIFragmentsApi.res +55 -0
- package/src/admin/Platform_UIFragmentsApi.res.mjs +124 -0
- package/src/admin/UIFragmentRegistryProjection.res +43 -0
- package/src/admin/UIFragmentRegistryProjection.res.mjs +81 -0
- package/src/admin/UIFragmentRegistryReadModelSpec.res +13 -0
- package/src/admin/UIFragmentRegistryReadModelSpec.res.mjs +40 -0
- package/src/components/Aggregate/Aggregate.res +96 -0
- package/src/components/Aggregate/Aggregate.res.mjs +82 -0
- package/src/components/Aggregate/Aggregate_Builder.res +175 -0
- package/src/components/Aggregate/Aggregate_Builder.res.mjs +119 -0
- package/src/components/Aggregate/Aggregate_Callback.res +273 -0
- package/src/components/Aggregate/Aggregate_Callback.res.mjs +208 -0
- package/src/components/Api/ApiAllowedStatesHelpers.res +19 -0
- package/src/components/Api/ApiAllowedStatesHelpers.res.mjs +16 -0
- package/src/components/Api/ApiNoApiHelpers.res +13 -0
- package/src/components/Api/ApiNoApiHelpers.res.mjs +29 -0
- package/src/components/Api/Api_Builder.res +40 -0
- package/src/components/Api/Api_Builder.res.mjs +33 -0
- package/src/components/Api/Api_Naming.res +92 -0
- package/src/components/Api/Api_Naming.res.mjs +103 -0
- package/src/components/Api/Api_Operations.res +13 -0
- package/src/components/Api/Api_Operations.res.mjs +12 -0
- package/src/components/Api/GraphQL_FragmentGenerator.res +612 -0
- package/src/components/Api/GraphQL_FragmentGenerator.res.mjs +503 -0
- package/src/components/Api/GraphQL_SchemaInspector.res +156 -0
- package/src/components/Api/GraphQL_SchemaInspector.res.mjs +123 -0
- package/src/components/Api/GraphQL_Stitcher.res +271 -0
- package/src/components/Api/GraphQL_Stitcher.res.mjs +229 -0
- package/src/components/Api/MCP_SchemaGenerator.res +185 -0
- package/src/components/Api/MCP_SchemaGenerator.res.mjs +146 -0
- package/src/components/Api/SchemaType.res +126 -0
- package/src/components/Api/SchemaType.res.mjs +143 -0
- package/src/components/Api/SuryToJsonSchema.res +142 -0
- package/src/components/Api/SuryToJsonSchema.res.mjs +210 -0
- package/src/components/AutomationSlice/AutomationSlice.res +39 -0
- package/src/components/AutomationSlice/AutomationSlice.res.mjs +24 -0
- package/src/components/AutomationSlice/AutomationSlice_Builder.res +207 -0
- package/src/components/AutomationSlice/AutomationSlice_Builder.res.mjs +123 -0
- package/src/components/AutomationSlice/AutomationSlice_Callback.res +212 -0
- package/src/components/AutomationSlice/AutomationSlice_Callback.res.mjs +189 -0
- package/src/components/Builder_Helpers.res +196 -0
- package/src/components/Builder_Helpers.res.mjs +142 -0
- package/src/components/Cloner.res +84 -0
- package/src/components/Cloner.res.mjs +88 -0
- package/src/components/CommandGenerator/CommandGenerator.res +54 -0
- package/src/components/CommandGenerator/CommandGenerator.res.mjs +15 -0
- package/src/components/CommandGenerator/CommandGenerator_Adapter.res +22 -0
- package/src/components/CommandGenerator/CommandGenerator_Adapter.res.mjs +2 -0
- package/src/components/CommandGenerator/CommandGenerator_Builder.res +70 -0
- package/src/components/CommandGenerator/CommandGenerator_Builder.res.mjs +68 -0
- package/src/components/CommandGenerator/CommandGenerator_Callback.res +191 -0
- package/src/components/CommandGenerator/CommandGenerator_Callback.res.mjs +161 -0
- package/src/components/CommandTopic/CommandTopic.res +79 -0
- package/src/components/CommandTopic/CommandTopic.res.mjs +68 -0
- package/src/components/CommandTopic/CommandTopic_Adapter.res +53 -0
- package/src/components/CommandTopic/CommandTopic_Adapter.res.mjs +2 -0
- package/src/components/CommandTopic/CommandTopic_Builder.res +146 -0
- package/src/components/CommandTopic/CommandTopic_Builder.res.mjs +127 -0
- package/src/components/CommandTopic/CommandTopic_Callback.res +38 -0
- package/src/components/CommandTopic/CommandTopic_Callback.res.mjs +49 -0
- package/src/components/CommandTopic/CommandTopic_Helpers.res +176 -0
- package/src/components/CommandTopic/CommandTopic_Helpers.res.mjs +195 -0
- package/src/components/CommandTopic/CommandTopic_Operations.res +40 -0
- package/src/components/CommandTopic/CommandTopic_Operations.res.mjs +49 -0
- package/src/components/Component.res +1 -0
- package/src/components/Component.res.mjs +34 -0
- package/src/components/Component.resi +1 -0
- package/src/components/Counter/Counter.res +47 -0
- package/src/components/Counter/Counter.res.mjs +55 -0
- package/src/components/Counter/Counter_Adapter.res +18 -0
- package/src/components/Counter/Counter_Adapter.res.mjs +2 -0
- package/src/components/Counter/Counter_Builder.res +142 -0
- package/src/components/Counter/Counter_Builder.res.mjs +112 -0
- package/src/components/Counter/Counter_Callback.res +94 -0
- package/src/components/Counter/Counter_Callback.res.mjs +70 -0
- package/src/components/Counter/Counter_Operations.res +70 -0
- package/src/components/Counter/Counter_Operations.res.mjs +91 -0
- package/src/components/Dcb/Dcb_Builder.res +971 -0
- package/src/components/Dcb/Dcb_Builder.res.mjs +572 -0
- package/src/components/DcbEventLog/DcbEventLog.res +43 -0
- package/src/components/DcbEventLog/DcbEventLog.res.mjs +24 -0
- package/src/components/DcbEventLog/DcbEventLog_Adapter.res +57 -0
- package/src/components/DcbEventLog/DcbEventLog_Adapter.res.mjs +2 -0
- package/src/components/DcbEventLog/DcbEventLog_Builder.res +72 -0
- package/src/components/DcbEventLog/DcbEventLog_Builder.res.mjs +67 -0
- package/src/components/DcbEventLog/DcbEventLog_Operations.res +160 -0
- package/src/components/DcbEventLog/DcbEventLog_Operations.res.mjs +121 -0
- package/src/components/EventCollector/EventCollector.res +34 -0
- package/src/components/EventCollector/EventCollector.res.mjs +9 -0
- package/src/components/EventCollector/EventCollector_Adapter.res +45 -0
- package/src/components/EventCollector/EventCollector_Adapter.res.mjs +2 -0
- package/src/components/EventCollector/EventCollector_Builder.res +91 -0
- package/src/components/EventCollector/EventCollector_Builder.res.mjs +64 -0
- package/src/components/EventLog/EventLog.res +27 -0
- package/src/components/EventLog/EventLog.res.mjs +13 -0
- package/src/components/EventLog/EventLog_Adapter.res +15 -0
- package/src/components/EventLog/EventLog_Adapter.res.mjs +2 -0
- package/src/components/EventLog/EventLog_Builder.res +65 -0
- package/src/components/EventLog/EventLog_Builder.res.mjs +57 -0
- package/src/components/EventLog/EventLog_Operations.res +209 -0
- package/src/components/EventLog/EventLog_Operations.res.mjs +202 -0
- package/src/components/EventLog/EventPublish_Callback.res +29 -0
- package/src/components/EventLog/EventPublish_Callback.res.mjs +32 -0
- package/src/components/EventMapper/EventMapper.res +72 -0
- package/src/components/EventMapper/EventMapper.res.mjs +54 -0
- package/src/components/EventMapper/EventMapper_Builder.res +128 -0
- package/src/components/EventMapper/EventMapper_Builder.res.mjs +81 -0
- package/src/components/EventMapper/EventMapper_Callback.res +323 -0
- package/src/components/EventMapper/EventMapper_Callback.res.mjs +231 -0
- package/src/components/EventTopic/EventTopic.res +69 -0
- package/src/components/EventTopic/EventTopic.res.mjs +50 -0
- package/src/components/EventTopic/EventTopic_Adapter.res +15 -0
- package/src/components/EventTopic/EventTopic_Adapter.res.mjs +2 -0
- package/src/components/EventTopic/EventTopic_Builder.res +53 -0
- package/src/components/EventTopic/EventTopic_Builder.res.mjs +46 -0
- package/src/components/EventTopic/EventTopic_Operations.res +37 -0
- package/src/components/EventTopic/EventTopic_Operations.res.mjs +39 -0
- package/src/components/Extension/Extension.res +32 -0
- package/src/components/Extension/Extension.res.mjs +9 -0
- package/src/components/Extension/Extension_Builder.res +82 -0
- package/src/components/Extension/Extension_Builder.res.mjs +57 -0
- package/src/components/Extension/Extension_Operations.res +203 -0
- package/src/components/Extension/Extension_Operations.res.mjs +154 -0
- package/src/components/ExtensionPoint/ExtensionPoint.res +49 -0
- package/src/components/ExtensionPoint/ExtensionPoint.res.mjs +25 -0
- package/src/components/ExtensionPoint/ExtensionPoint_Builder.res +163 -0
- package/src/components/ExtensionPoint/ExtensionPoint_Builder.res.mjs +113 -0
- package/src/components/ExtensionPoint/ExtensionPoint_Callback.res +110 -0
- package/src/components/ExtensionPoint/ExtensionPoint_Callback.res.mjs +76 -0
- package/src/components/ExtensionPoint/ExtensionPoint_Operations.res +146 -0
- package/src/components/ExtensionPoint/ExtensionPoint_Operations.res.mjs +122 -0
- package/src/components/Heartbeat/Heartbeat.res +25 -0
- package/src/components/Heartbeat/Heartbeat.res.mjs +9 -0
- package/src/components/Heartbeat/Heartbeat_Adapter.res +14 -0
- package/src/components/Heartbeat/Heartbeat_Adapter.res.mjs +2 -0
- package/src/components/Heartbeat/Heartbeat_Builder.res +43 -0
- package/src/components/Heartbeat/Heartbeat_Builder.res.mjs +47 -0
- package/src/components/Heartbeat/Heartbeat_Callback.res +32 -0
- package/src/components/Heartbeat/Heartbeat_Callback.res.mjs +40 -0
- package/src/components/InboundTranslationSlice/InboundTranslationSlice.res +34 -0
- package/src/components/InboundTranslationSlice/InboundTranslationSlice.res.mjs +24 -0
- package/src/components/InboundTranslationSlice/InboundTranslationSlice_Builder.res +98 -0
- package/src/components/InboundTranslationSlice/InboundTranslationSlice_Builder.res.mjs +87 -0
- package/src/components/InboundTranslationSlice/InboundTranslationSlice_Callback.res +191 -0
- package/src/components/InboundTranslationSlice/InboundTranslationSlice_Callback.res.mjs +175 -0
- package/src/components/OutboundTranslationSlice/OutboundTranslationSlice.res +35 -0
- package/src/components/OutboundTranslationSlice/OutboundTranslationSlice.res.mjs +24 -0
- package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Builder.res +181 -0
- package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Builder.res.mjs +137 -0
- package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Callback.res +173 -0
- package/src/components/OutboundTranslationSlice/OutboundTranslationSlice_Callback.res.mjs +173 -0
- package/src/components/QueryDb/QueryDb.res +74 -0
- package/src/components/QueryDb/QueryDb.res.mjs +37 -0
- package/src/components/QueryDb/QueryDb_Adapter.res +78 -0
- package/src/components/QueryDb/QueryDb_Adapter.res.mjs +17 -0
- package/src/components/QueryDb/QueryDb_Builder.res +76 -0
- package/src/components/QueryDb/QueryDb_Builder.res.mjs +53 -0
- package/src/components/QueryDb/QueryDb_Callback.res +18 -0
- package/src/components/QueryDb/QueryDb_Callback.res.mjs +21 -0
- package/src/components/QueryDb/QueryDb_Operations.res +116 -0
- package/src/components/QueryDb/QueryDb_Operations.res.mjs +165 -0
- package/src/components/ReadModel/ReadModel.res +42 -0
- package/src/components/ReadModel/ReadModel.res.mjs +27 -0
- package/src/components/ReadModel/ReadModel_Builder.res +155 -0
- package/src/components/ReadModel/ReadModel_Builder.res.mjs +101 -0
- package/src/components/ReadModel/ReadModel_Callback.res +48 -0
- package/src/components/ReadModel/ReadModel_Callback.res.mjs +48 -0
- package/src/components/Scheduler/Scheduler.res +13 -0
- package/src/components/Scheduler/Scheduler.res.mjs +9 -0
- package/src/components/Scheduler/Scheduler_Adapter.res +13 -0
- package/src/components/Scheduler/Scheduler_Adapter.res.mjs +2 -0
- package/src/components/Scheduler/Scheduler_Builder.res +19 -0
- package/src/components/Scheduler/Scheduler_Builder.res.mjs +29 -0
- package/src/components/SideEffectHandler/SideEffectHandler.res +30 -0
- package/src/components/SideEffectHandler/SideEffectHandler.res.mjs +12 -0
- package/src/components/SideEffectHandler/SideEffectHandler_Builder.res +117 -0
- package/src/components/SideEffectHandler/SideEffectHandler_Builder.res.mjs +64 -0
- package/src/components/SideEffectHandler/SideEffectHandler_Callback.res +116 -0
- package/src/components/SideEffectHandler/SideEffectHandler_Callback.res.mjs +95 -0
- package/src/components/StateChangeSlice/StateChangeSlice.res +38 -0
- package/src/components/StateChangeSlice/StateChangeSlice.res.mjs +17 -0
- package/src/components/StateChangeSlice/StateChangeSlice_Builder.res +91 -0
- package/src/components/StateChangeSlice/StateChangeSlice_Builder.res.mjs +81 -0
- package/src/components/StateChangeSlice/StateChangeSlice_Callback.res +412 -0
- package/src/components/StateChangeSlice/StateChangeSlice_Callback.res.mjs +299 -0
- package/src/components/StateTopic.res +91 -0
- package/src/components/StateTopic.res.mjs +41 -0
- package/src/components/StateViewSlice/StateViewSlice.res +33 -0
- package/src/components/StateViewSlice/StateViewSlice.res.mjs +24 -0
- package/src/components/StateViewSlice/StateViewSlice_Builder.res +176 -0
- package/src/components/StateViewSlice/StateViewSlice_Builder.res.mjs +134 -0
- package/src/components/StateViewSlice/StateViewSlice_Callback.res +64 -0
- package/src/components/StateViewSlice/StateViewSlice_Callback.res.mjs +56 -0
- package/src/components/Task/Task.res +81 -0
- package/src/components/Task/Task.res.mjs +51 -0
- package/src/components/Task/Task_Adapter.res +31 -0
- package/src/components/Task/Task_Adapter.res.mjs +2 -0
- package/src/components/Task/Task_Builder.res +223 -0
- package/src/components/Task/Task_Builder.res.mjs +115 -0
- package/src/plugin/api/PluginBaseFragment.res +104 -0
- package/src/plugin/api/PluginBaseFragment.res.mjs +64 -0
- package/src/plugin/component/Plugin.res +100 -0
- package/src/plugin/component/Plugin.res.mjs +61 -0
- package/src/plugin/component/Plugin_Builder.res +1017 -0
- package/src/plugin/component/Plugin_Builder.res.mjs +608 -0
- package/src/plugin/component/Plugin_BuiltHook.res +141 -0
- package/src/plugin/component/Plugin_BuiltHook.res.mjs +39 -0
- package/src/plugin/component/Plugin_Callback.res +98 -0
- package/src/plugin/component/Plugin_Callback.res.mjs +55 -0
- package/src/plugin/component/Plugin_Helpers.res +1730 -0
- package/src/plugin/component/Plugin_Helpers.res.mjs +1010 -0
- package/src/plugin/component/Plugin_ResolverError.res +27 -0
- package/src/plugin/component/Plugin_ResolverError.res.mjs +21 -0
- package/src/plugin/component/Plugin_Structure.res +570 -0
- package/src/plugin/component/Plugin_Structure.res.mjs +458 -0
- package/src/plugin/component/Plugin_SubscriptionSchema.res +103 -0
- package/src/plugin/component/Plugin_SubscriptionSchema.res.mjs +71 -0
- package/src/plugin/component/SchemaWalker.res +164 -0
- package/src/plugin/component/SchemaWalker.res.mjs +183 -0
- package/src/plugin/connect/PluginConnectExtension_Builder.res +14 -0
- package/src/plugin/connect/PluginConnectExtension_Builder.res.mjs +36 -0
- package/src/plugin/connect/PluginConnectExtension_Mapping.res +76 -0
- package/src/plugin/connect/PluginConnectExtension_Mapping.res.mjs +89 -0
- package/src/plugin/connect/PluginExtensionPoint_Builder.res +39 -0
- package/src/plugin/connect/PluginExtensionPoint_Builder.res.mjs +33 -0
- package/src/plugin/connect/PluginExtensionPoint_Plugin.res +231 -0
- package/src/plugin/connect/PluginExtensionPoint_Plugin.res.mjs +353 -0
- package/src/plugin/lifecycle/PluginBehavior.res +250 -0
- package/src/plugin/lifecycle/PluginBehavior.res.mjs +391 -0
- package/src/plugin/lifecycle/PluginSpec.res +84 -0
- package/src/plugin/lifecycle/PluginSpec.res.mjs +148 -0
- package/src/plugin/lifecycle/PluginsProjection.res +154 -0
- package/src/plugin/lifecycle/PluginsProjection.res.mjs +230 -0
- package/src/plugin/lifecycle/PluginsReadModelSpec.res +66 -0
- package/src/plugin/lifecycle/PluginsReadModelSpec.res.mjs +58 -0
- package/src/util/AWS.res +7 -0
- package/src/util/AWS.res.mjs +20 -0
- package/src/util/CSV.res +27 -0
- package/src/util/CSV.res.mjs +56 -0
- package/src/util/CommandPublisher.res +133 -0
- package/src/util/CommandPublisher.res.mjs +161 -0
- package/src/util/CsvStream.res +39 -0
- package/src/util/CsvStream.res.mjs +42 -0
- package/src/util/EffectLogger.res +178 -0
- package/src/util/EffectLogger.res.mjs +171 -0
- package/src/util/FTP.res +69 -0
- package/src/util/FTP.res.mjs +101 -0
- package/src/util/FTPHandler.res +142 -0
- package/src/util/FTPHandler.res.mjs +136 -0
- package/src/util/Hash.res +1 -0
- package/src/util/Hash.res.mjs +10 -0
- package/src/util/Interstack.res +74 -0
- package/src/util/Interstack.res.mjs +126 -0
- package/src/util/Interstack.resi +25 -0
- package/src/util/LogFormat.res +222 -0
- package/src/util/LogFormat.res.mjs +257 -0
- package/src/util/Logger.res +196 -0
- package/src/util/Logger.res.mjs +238 -0
- package/src/util/Lru.res +51 -0
- package/src/util/Lru.res.mjs +59 -0
- package/src/util/Lru.resi +32 -0
- package/src/util/Metrics.res +32 -0
- package/src/util/Metrics.res.mjs +42 -0
- package/src/util/OutputFailsafeDeploytime.res +16 -0
- package/src/util/OutputFailsafeDeploytime.res.mjs +20 -0
- package/src/util/OutputFailsafeRuntime.res +6 -0
- package/src/util/OutputFailsafeRuntime.res.mjs +15 -0
- package/src/util/OutputLogger.res +9 -0
- package/src/util/OutputLogger.res.mjs +19 -0
- package/src/util/ResourceQuery.res +14 -0
- package/src/util/ResourceQuery.res.mjs +17 -0
- package/src/util/ResourceQueryRuntime.res +17 -0
- package/src/util/ResourceQueryRuntime.res.mjs +18 -0
- package/src/util/ScheduleOps.res +124 -0
- package/src/util/ScheduleOps.res.mjs +132 -0
- package/src/util/Util.res +12 -0
- package/src/util/Util.res.mjs +42 -0
- package/src/util/Util_Adapter.res +97 -0
- package/src/util/Util_Adapter.res.mjs +82 -0
- package/src/util/Util_AdapterRuntime.res +39 -0
- package/src/util/Util_AdapterRuntime.res.mjs +42 -0
- package/src/util/Util_Array.res +2 -0
- package/src/util/Util_Array.res.mjs +12 -0
- package/src/util/Util_Error.res +16 -0
- package/src/util/Util_Error.res.mjs +19 -0
- package/src/util/Util_Promise.res +67 -0
- package/src/util/Util_Promise.res.mjs +105 -0
- package/src/util/Util_Pulumi.res +35 -0
- package/src/util/Util_Pulumi.res.mjs +55 -0
- package/src/util/Util_Pulumi.resi +21 -0
- package/src/util/Util_QueryDb.res +14 -0
- package/src/util/Util_QueryDb.res.mjs +21 -0
- package/src/util/Util_QueryDbRuntime.res +11 -0
- package/src/util/Util_QueryDbRuntime.res.mjs +19 -0
- package/src/util/Util_ReadModel.res +2 -0
- package/src/util/Util_ReadModel.res.mjs +10 -0
- package/src/util/Util_StackRefs.res +24 -0
- package/src/util/Util_StackRefs.res.mjs +39 -0
- package/src/util/Validation.res +75 -0
- package/src/util/Validation.res.mjs +181 -0
- package/tests/.gitkeep +0 -0
- package/tests/IdentityTest.res +155 -0
- package/tests/IdentityTest.res.mjs +174 -0
- package/tests/admin/Platform_ComponentDefinitionsApiTest.res +237 -0
- package/tests/admin/Platform_ComponentDefinitionsApiTest.res.mjs +298 -0
- package/tests/admin/Platform_UIFragmentsApiTest.res +96 -0
- package/tests/admin/Platform_UIFragmentsApiTest.res.mjs +101 -0
- package/tests/aggregate/AggregateCallbackTest.res +81 -0
- package/tests/aggregate/AggregateCallbackTest.res.mjs +140 -0
- package/tests/aggregate/AggregateCausationTest.res +49 -0
- package/tests/aggregate/AggregateCausationTest.res.mjs +44 -0
- package/tests/aggregate/AggregateConflictTest.res +212 -0
- package/tests/aggregate/AggregateConflictTest.res.mjs +363 -0
- package/tests/aggregate/AggregateFixtures.res +177 -0
- package/tests/aggregate/AggregateFixtures.res.mjs +285 -0
- package/tests/aggregate/AggregateRejectionTest.res +139 -0
- package/tests/aggregate/AggregateRejectionTest.res.mjs +163 -0
- package/tests/api/ApiNoApiTest.res +62 -0
- package/tests/api/ApiNoApiTest.res.mjs +90 -0
- package/tests/api/GraphQL_StitcherTest.res +107 -0
- package/tests/api/GraphQL_StitcherTest.res.mjs +99 -0
- package/tests/api/SimpleTest.res +7 -0
- package/tests/api/SimpleTest.res.mjs +10 -0
- package/tests/api/SuryToJsonSchemaTest.res +405 -0
- package/tests/api/SuryToJsonSchemaTest.res.mjs +623 -0
- package/tests/commandgenerator/CommandGeneratorCallbackTest.res +128 -0
- package/tests/commandgenerator/CommandGeneratorCallbackTest.res.mjs +160 -0
- package/tests/commandgenerator/CommandGeneratorFixtures.res +139 -0
- package/tests/commandgenerator/CommandGeneratorFixtures.res.mjs +197 -0
- package/tests/commandtopic/CommandTopicCallbackFixtures.res +87 -0
- package/tests/commandtopic/CommandTopicCallbackFixtures.res.mjs +152 -0
- package/tests/commandtopic/CommandTopicCallbackTest.res +66 -0
- package/tests/commandtopic/CommandTopicCallbackTest.res.mjs +106 -0
- package/tests/commandtopic/CommandTopicHelpersRejectionTest.res +83 -0
- package/tests/commandtopic/CommandTopicHelpersRejectionTest.res.mjs +109 -0
- package/tests/counter/CounterCallbackTest.res +83 -0
- package/tests/counter/CounterCallbackTest.res.mjs +140 -0
- package/tests/counter/CounterFixtures.res +57 -0
- package/tests/counter/CounterFixtures.res.mjs +67 -0
- package/tests/dcb/DcbDecodeTest.res +122 -0
- package/tests/dcb/DcbDecodeTest.res.mjs +194 -0
- package/tests/dcb/DcbEventLogOperationsTest.res +195 -0
- package/tests/dcb/DcbEventLogOperationsTest.res.mjs +268 -0
- package/tests/dcb/DcbFixtures.res +422 -0
- package/tests/dcb/DcbFixtures.res.mjs +534 -0
- package/tests/dcb/DcbScopeInferenceTest.res +242 -0
- package/tests/dcb/DcbScopeInferenceTest.res.mjs +480 -0
- package/tests/dcb/DcbStateChangeSliceTest.res +362 -0
- package/tests/dcb/DcbStateChangeSliceTest.res.mjs +546 -0
- package/tests/dcb/DcbTagTest.res +978 -0
- package/tests/dcb/DcbTagTest.res.mjs +867 -0
- package/tests/dcb/DcbValidationTest.res +349 -0
- package/tests/dcb/DcbValidationTest.res.mjs +476 -0
- package/tests/eventlog/EventLogFixtures.res +113 -0
- package/tests/eventlog/EventLogFixtures.res.mjs +166 -0
- package/tests/eventlog/EventLogOperationsTest.res +96 -0
- package/tests/eventlog/EventLogOperationsTest.res.mjs +192 -0
- package/tests/eventlog/EventLogRetryTest.res +121 -0
- package/tests/eventlog/EventLogRetryTest.res.mjs +171 -0
- package/tests/eventmapper/EventMapperCallbackTest.res +134 -0
- package/tests/eventmapper/EventMapperCallbackTest.res.mjs +141 -0
- package/tests/eventmapper/EventMapperFixtures.res +255 -0
- package/tests/eventmapper/EventMapperFixtures.res.mjs +440 -0
- package/tests/eventmapper/EventMapperTest.res +53 -0
- package/tests/eventmapper/EventMapperTest.res.mjs +83 -0
- package/tests/eventtopic/EventTopicFixtures.res +36 -0
- package/tests/eventtopic/EventTopicFixtures.res.mjs +65 -0
- package/tests/eventtopic/EventTopicOperationsTest.res +48 -0
- package/tests/eventtopic/EventTopicOperationsTest.res.mjs +71 -0
- package/tests/extensionpoint/ExtensionPointCallbackTest.res +84 -0
- package/tests/extensionpoint/ExtensionPointCallbackTest.res.mjs +94 -0
- package/tests/extensionpoint/ExtensionPointFixtures.res +173 -0
- package/tests/extensionpoint/ExtensionPointFixtures.res.mjs +205 -0
- package/tests/extensionpoint/ExtensionPointOperationsTest.res +261 -0
- package/tests/extensionpoint/ExtensionPointOperationsTest.res.mjs +304 -0
- package/tests/ftp/FTPTest.res +64 -0
- package/tests/ftp/FTPTest.res.mjs +88 -0
- package/tests/logger/LogFormatTest.res +348 -0
- package/tests/logger/LogFormatTest.res.mjs +309 -0
- package/tests/message/MessageTest.res +95 -0
- package/tests/message/MessageTest.res.mjs +93 -0
- package/tests/message/MetaEnvelopeTest.res +200 -0
- package/tests/message/MetaEnvelopeTest.res.mjs +188 -0
- package/tests/plugin/ManifestVisibilityTest.res +137 -0
- package/tests/plugin/ManifestVisibilityTest.res.mjs +205 -0
- package/tests/plugin/PluginSpecExperiment.res +13 -0
- package/tests/plugin/PluginSpecExperiment.res.mjs +31 -0
- package/tests/plugin/PluginStructureTest.res +298 -0
- package/tests/plugin/PluginStructureTest.res.mjs +388 -0
- package/tests/plugin/PluginVersionTest.res +34 -0
- package/tests/plugin/PluginVersionTest.res.mjs +30 -0
- package/tests/plugin/SchemaWalkerTest.res +115 -0
- package/tests/plugin/SchemaWalkerTest.res.mjs +160 -0
- package/tests/plugin/StateChangeSlice/PsPlaceOrder.res +24 -0
- package/tests/plugin/StateChangeSlice/PsPlaceOrder.res.mjs +62 -0
- package/tests/plugin/StateChangeSlice/PsShipOrder.res +29 -0
- package/tests/plugin/StateChangeSlice/PsShipOrder.res.mjs +69 -0
- package/tests/plugin/StateViewSlice/PsAnnotatedView.res +24 -0
- package/tests/plugin/StateViewSlice/PsAnnotatedView.res.mjs +94 -0
- package/tests/plugin/StateViewSlice/PsAvailableProductsView.res +18 -0
- package/tests/plugin/StateViewSlice/PsAvailableProductsView.res.mjs +69 -0
- package/tests/plugin/StateViewSlice/PsCustomersView.res +22 -0
- package/tests/plugin/StateViewSlice/PsCustomersView.res.mjs +69 -0
- package/tests/plugin/StateViewSlice/PsOrdersView.res +20 -0
- package/tests/plugin/StateViewSlice/PsOrdersView.res.mjs +81 -0
- package/tests/poc/StructuralSubtypingPoc.res +211 -0
- package/tests/poc/StructuralSubtypingPoc.res.mjs +61 -0
- package/tests/querydb/QueryDbFixtures.res +65 -0
- package/tests/querydb/QueryDbFixtures.res.mjs +135 -0
- package/tests/querydb/QueryDbOperationsTest.res +94 -0
- package/tests/querydb/QueryDbOperationsTest.res.mjs +168 -0
- package/tests/sideeffecthandler/SideEffectHandlerCallbackTest.res +56 -0
- package/tests/sideeffecthandler/SideEffectHandlerCallbackTest.res.mjs +77 -0
- package/tests/sideeffecthandler/SideEffectHandlerFixtures.res +96 -0
- package/tests/sideeffecthandler/SideEffectHandlerFixtures.res.mjs +139 -0
- package/tests/util/CsvStreamTest.res +54 -0
- package/tests/util/CsvStreamTest.res.mjs +51 -0
- package/tests/util/LruTest.res +73 -0
- package/tests/util/LruTest.res.mjs +105 -0
- package/tests/util/MetricsTest.res +36 -0
- package/tests/util/MetricsTest.res.mjs +53 -0
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as S from "sury/src/S.res.mjs";
|
|
4
|
+
import * as Stdlib_JSON from "@rescript/runtime/lib/es6/Stdlib_JSON.js";
|
|
5
|
+
import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
|
|
6
|
+
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
7
|
+
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
8
|
+
import * as Effect from "effect/Effect";
|
|
9
|
+
import * as Pulumi from "@pulumi/pulumi";
|
|
10
|
+
import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
|
|
11
|
+
import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
|
|
12
|
+
import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
|
|
13
|
+
import * as Logger$ReventlessCore from "../../util/Logger.res.mjs";
|
|
14
|
+
import * as Component$ReventlessCore from "../Component.res.mjs";
|
|
15
|
+
import * as DcbValidation$Reventless from "@reventlessdev/reventless-spec/src/components/DcbValidation.res.mjs";
|
|
16
|
+
import * as Api_Naming$ReventlessCore from "../Api/Api_Naming.res.mjs";
|
|
17
|
+
import * as DcbScopeInference$Reventless from "@reventlessdev/reventless-spec/src/components/DcbScopeInference.res.mjs";
|
|
18
|
+
import * as Plugin_Helpers$ReventlessCore from "../../plugin/component/Plugin_Helpers.res.mjs";
|
|
19
|
+
import * as ApiNoApiHelpers$ReventlessCore from "../Api/ApiNoApiHelpers.res.mjs";
|
|
20
|
+
import * as Plugin_Structure$ReventlessCore from "../../plugin/component/Plugin_Structure.res.mjs";
|
|
21
|
+
import * as DcbEventLog_Builder$ReventlessCore from "../DcbEventLog/DcbEventLog_Builder.res.mjs";
|
|
22
|
+
import * as CommandTopic_Builder$ReventlessCore from "../CommandTopic/CommandTopic_Builder.res.mjs";
|
|
23
|
+
import * as AutomationSlice_Callback$ReventlessCore from "../AutomationSlice/AutomationSlice_Callback.res.mjs";
|
|
24
|
+
import * as CommandGenerator_Callback$ReventlessCore from "../CommandGenerator/CommandGenerator_Callback.res.mjs";
|
|
25
|
+
import * as InboundTranslationSlice_Callback$ReventlessCore from "../InboundTranslationSlice/InboundTranslationSlice_Callback.res.mjs";
|
|
26
|
+
import * as OutboundTranslationSlice_Callback$ReventlessCore from "../OutboundTranslationSlice/OutboundTranslationSlice_Callback.res.mjs";
|
|
27
|
+
|
|
28
|
+
let log = Logger$ReventlessCore.fromEnv();
|
|
29
|
+
|
|
30
|
+
let toRelativePath = (function toRelativePath(moduleUrl) {
|
|
31
|
+
try {
|
|
32
|
+
const fs = process.getBuiltinModule('node:fs');
|
|
33
|
+
const path = process.getBuiltinModule('node:path');
|
|
34
|
+
const { fileURLToPath } = process.getBuiltinModule('node:url');
|
|
35
|
+
const builderReal = fs.realpathSync(fileURLToPath(import.meta.url));
|
|
36
|
+
const sliceReal = fs.realpathSync(fileURLToPath(moduleUrl));
|
|
37
|
+
let dir = path.dirname(builderReal);
|
|
38
|
+
while (dir !== path.dirname(dir)) {
|
|
39
|
+
if (fs.existsSync(path.join(dir, 'lerna.json'))) break;
|
|
40
|
+
dir = path.dirname(dir);
|
|
41
|
+
}
|
|
42
|
+
return path.relative(dir, sliceReal).replace(/\.mjs$/, '.res');
|
|
43
|
+
} catch(e) {
|
|
44
|
+
return moduleUrl.replace('file://', '');
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
let emptyResult_stateChangeSlicesOutputs = {};
|
|
49
|
+
|
|
50
|
+
let emptyResult_stateViewSlicesOutputs = {};
|
|
51
|
+
|
|
52
|
+
let emptyResult_automationSlicesOutputs = {};
|
|
53
|
+
|
|
54
|
+
let emptyResult_outboundTranslationSlicesOutputs = {};
|
|
55
|
+
|
|
56
|
+
let emptyResult_inboundTranslationSlicesOutputs = {};
|
|
57
|
+
|
|
58
|
+
let emptyResult_mutationEntries = [];
|
|
59
|
+
|
|
60
|
+
let emptyResult_queryEntries = [];
|
|
61
|
+
|
|
62
|
+
let emptyResult_eventLogEntries = [];
|
|
63
|
+
|
|
64
|
+
let emptyResult = {
|
|
65
|
+
dcbEventLogOutputs: undefined,
|
|
66
|
+
stateChangeSlicesOutputs: emptyResult_stateChangeSlicesOutputs,
|
|
67
|
+
stateViewSlicesOutputs: emptyResult_stateViewSlicesOutputs,
|
|
68
|
+
automationSlicesOutputs: emptyResult_automationSlicesOutputs,
|
|
69
|
+
outboundTranslationSlicesOutputs: emptyResult_outboundTranslationSlicesOutputs,
|
|
70
|
+
inboundTranslationSlicesOutputs: emptyResult_inboundTranslationSlicesOutputs,
|
|
71
|
+
dcbRuntimeSetup: undefined,
|
|
72
|
+
dcbPublishJsons: undefined,
|
|
73
|
+
dcbCommandTopicQueueUrl: undefined,
|
|
74
|
+
mutationEntries: emptyResult_mutationEntries,
|
|
75
|
+
queryEntries: emptyResult_queryEntries,
|
|
76
|
+
eventLogEntries: emptyResult_eventLogEntries
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
function Make(DcbEventLogStorage) {
|
|
80
|
+
return DcbEventTopicPublisher => (DcbCommandTopicChannel => (DcbCommandTopicChannelAsync => (RuntimeBuilder => (HooksConfig => {
|
|
81
|
+
let construct = (name, childName, environmentOpt, platformNameOpt, aggregateEventTopicsOpt, stateChangeSlices, stateViewSlices, automationSlices, outboundTranslationSlices, inboundTranslationSlices, pluginStructure, opts) => {
|
|
82
|
+
let environment = environmentOpt !== undefined ? environmentOpt : "";
|
|
83
|
+
let platformName = platformNameOpt !== undefined ? platformNameOpt : "";
|
|
84
|
+
let aggregateEventTopics = aggregateEventTopicsOpt !== undefined ? aggregateEventTopicsOpt : ({});
|
|
85
|
+
let hasDcb = stateChangeSlices.length !== 0;
|
|
86
|
+
if (!hasDcb) {
|
|
87
|
+
return emptyResult;
|
|
88
|
+
}
|
|
89
|
+
let syncSlices = stateChangeSlices.filter(M => !M.isAsync);
|
|
90
|
+
let asyncSlices = stateChangeSlices.filter(M => M.isAsync);
|
|
91
|
+
let produced = stateChangeSlices.map(Sc => [
|
|
92
|
+
Sc.Spec.name,
|
|
93
|
+
Sc.Spec.eventSchema
|
|
94
|
+
]);
|
|
95
|
+
let producedNamed = stateChangeSlices.map(Sc => [
|
|
96
|
+
Sc.Spec.name,
|
|
97
|
+
toRelativePath(Sc.Spec.moduleUrl),
|
|
98
|
+
Sc.Spec.eventSchema
|
|
99
|
+
]);
|
|
100
|
+
let consumed = stateChangeSlices.map(Sc => [
|
|
101
|
+
Sc.Spec.name,
|
|
102
|
+
Sc.Spec.consumedEventSchema
|
|
103
|
+
]).concat(stateViewSlices.map(V => [
|
|
104
|
+
V.Spec.name,
|
|
105
|
+
V.Spec.consumedEventSchema
|
|
106
|
+
])).concat(automationSlices.flatMap(A => A.Automation.mappings.map(M => [
|
|
107
|
+
A.Spec.name,
|
|
108
|
+
M.sourceEventSchema
|
|
109
|
+
]))).concat(outboundTranslationSlices.map(O => [
|
|
110
|
+
O.Spec.name,
|
|
111
|
+
O.Spec.consumedEventSchema
|
|
112
|
+
]));
|
|
113
|
+
let errors = DcbValidation$Reventless.validateProducedAndConsumed(produced, consumed);
|
|
114
|
+
if (errors.TAG !== "Ok") {
|
|
115
|
+
errors._0.forEach(err => log.error("Dcb_Builder", undefined, `DCB validation error (` + err.sliceName + `): ` + err.message));
|
|
116
|
+
}
|
|
117
|
+
let producedSchemas = produced.map(param => param[1]);
|
|
118
|
+
let arr = producedSchemas.flatMap(DcbTag$Reventless.extractTaggedFields);
|
|
119
|
+
let seen = new Set();
|
|
120
|
+
let indexes = arr.filter(f => {
|
|
121
|
+
if (seen.has(f)) {
|
|
122
|
+
return false;
|
|
123
|
+
} else {
|
|
124
|
+
seen.add(f);
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
}).map(tagKey => `tag_` + tagKey);
|
|
128
|
+
let indexes$1 = indexes.length > 1 ? indexes.concat(["tag_composite"]) : indexes;
|
|
129
|
+
let partitionTag = DcbTag$Reventless.derivePartitionTag(producedNamed);
|
|
130
|
+
let arr$1 = producedSchemas.flatMap(DcbTag$Reventless.extractCrossPartitionTagKeys);
|
|
131
|
+
let seen$1 = new Set();
|
|
132
|
+
let crossPartitionTagKeys = arr$1.filter(f => {
|
|
133
|
+
if (seen$1.has(f)) {
|
|
134
|
+
return false;
|
|
135
|
+
} else {
|
|
136
|
+
seen$1.add(f);
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
DcbValidation$Reventless.validateCrossPartitionScope(produced).forEach(err => log.error("Dcb_Builder", undefined, `DCB cross-partition scope error (` + err.sliceName + `): ` + err.message));
|
|
141
|
+
let tagKeysByEventType = DcbTag$Reventless.mergeTagKeysByEventType(producedSchemas.map(DcbTag$Reventless.extractTagKeysByEventType));
|
|
142
|
+
DcbValidation$Reventless.validateCompositeReads(stateChangeSlices.map(Sc => [
|
|
143
|
+
Sc.Spec.name,
|
|
144
|
+
Sc.Spec.commandSchema,
|
|
145
|
+
Sc.Spec.consumedEventSchema
|
|
146
|
+
]), tagKeysByEventType).forEach(w => log.warn("Dcb_Builder", undefined, `DCB composite-read warning (` + w.sliceName + `): ` + w.message));
|
|
147
|
+
let inferenceShapes = stateChangeSlices.map(Sc => DcbTag$Reventless.sliceShapeFromSchemas(Sc.Spec.name, Sc.Spec.commandSchema, Sc.Spec.consumedEventSchema, Sc.Spec.eventSchema));
|
|
148
|
+
let inferred = DcbScopeInference$Reventless.infer(inferenceShapes);
|
|
149
|
+
if (Primitive_object.notequal(inferred.crossPartitionTagKeys, crossPartitionTagKeys)) {
|
|
150
|
+
log.info("Dcb_Builder", undefined, `DCB scope-inference diff: crossPartitionTagKeys annotated=[` + crossPartitionTagKeys.join(", ") + `] inferred=[` + inferred.crossPartitionTagKeys.join(", ") + `]`);
|
|
151
|
+
}
|
|
152
|
+
Object.entries(inferred.tagKeysByEventType).forEach(param => {
|
|
153
|
+
let inferredKeys = param[1];
|
|
154
|
+
let eventType = param[0];
|
|
155
|
+
let annotatedKeys = Stdlib_Option.getOr(tagKeysByEventType[eventType], []);
|
|
156
|
+
let dropped = annotatedKeys.filter(k => !inferredKeys.includes(k));
|
|
157
|
+
if (dropped.length !== 0) {
|
|
158
|
+
return log.info("Dcb_Builder", undefined, `DCB scope-inference diff: ` + eventType + ` indexes [` + inferredKeys.join(", ") + `] (inferred) vs [` + annotatedKeys.join(", ") + `] (annotated) — payload now: [` + dropped.join(", ") + `]`);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
inferred.ambiguities.forEach(param => log.warn("Dcb_Builder", undefined, `DCB scope-inference ambiguity (` + param[0] + `): ` + param[1]));
|
|
162
|
+
let scopeAnnotations = stateChangeSlices.map(Sc => [
|
|
163
|
+
Sc.Spec.name,
|
|
164
|
+
DcbTag$Reventless.extractCrossPartitionTagKeys(Sc.Spec.eventSchema)
|
|
165
|
+
]);
|
|
166
|
+
let scopeIssues = DcbValidation$Reventless.validateScopeVsInference(scopeAnnotations, inferred);
|
|
167
|
+
scopeIssues.contradictions.forEach(e => log.warn("Dcb_Builder", undefined, `DCB scope contradiction (` + e.sliceName + `): ` + e.message));
|
|
168
|
+
scopeIssues.redundancies.forEach(e => log.info("Dcb_Builder", undefined, `DCB scope (` + e.sliceName + `): ` + e.message));
|
|
169
|
+
let useInferred = inferred.ambiguities.length === 0;
|
|
170
|
+
let effectiveCrossPartitionTagKeys = useInferred ? inferred.crossPartitionTagKeys : crossPartitionTagKeys;
|
|
171
|
+
let effectiveTagKeysByEventType = useInferred ? inferred.tagKeysByEventType : tagKeysByEventType;
|
|
172
|
+
let DcbEventLog = DcbEventLog_Builder$ReventlessCore.Make(DcbEventLogStorage)(DcbEventTopicPublisher);
|
|
173
|
+
let dcbEventLog = DcbEventLog.make(name, indexes$1, partitionTag, effectiveCrossPartitionTagKeys, opts);
|
|
174
|
+
Stdlib_Option.forEach(HooksConfig.hooks.onDcbEventLogCreated, hook => hook(dcbEventLog));
|
|
175
|
+
let DcbCommandTopic = CommandTopic_Builder$ReventlessCore.Make({
|
|
176
|
+
Id: Id$Reventless.$$String,
|
|
177
|
+
name: childName,
|
|
178
|
+
commandSchema: S.json
|
|
179
|
+
})(DcbCommandTopicChannel);
|
|
180
|
+
let dcbCommandTopic = DcbCommandTopic.make(name + `Dcb`, opts);
|
|
181
|
+
Stdlib_Option.forEach(HooksConfig.hooks.onDcbCommandTopicCreated, hook => hook(dcbCommandTopic));
|
|
182
|
+
let publishJsons = Component$ReventlessCore.operations(dcbCommandTopic).apply(ops => ops.publishJsons);
|
|
183
|
+
let name$1 = childName + "Async";
|
|
184
|
+
let DcbAsyncCommandTopic = CommandTopic_Builder$ReventlessCore.Make({
|
|
185
|
+
Id: Id$Reventless.$$String,
|
|
186
|
+
name: name$1,
|
|
187
|
+
commandSchema: S.json
|
|
188
|
+
})(DcbCommandTopicChannelAsync);
|
|
189
|
+
let asyncDcbCommandTopicOpt;
|
|
190
|
+
if (asyncSlices.length !== 0) {
|
|
191
|
+
let t = DcbAsyncCommandTopic.make(name + `DcbAsync`, opts);
|
|
192
|
+
Stdlib_Option.forEach(HooksConfig.hooks.onDcbCommandTopicCreated, hook => hook(t));
|
|
193
|
+
asyncDcbCommandTopicOpt = Primitive_option.some(t);
|
|
194
|
+
} else {
|
|
195
|
+
asyncDcbCommandTopicOpt = undefined;
|
|
196
|
+
}
|
|
197
|
+
let stateChangeSlicesOutputs = Object.fromEntries(syncSlices.map(StateChangeSlice => {
|
|
198
|
+
let ch = StateChangeSlice.make(dcbEventLog, publishJsons, effectiveTagKeysByEventType, effectiveCrossPartitionTagKeys, opts);
|
|
199
|
+
return [
|
|
200
|
+
StateChangeSlice.Spec.name,
|
|
201
|
+
Component$ReventlessCore.outputs(ch)
|
|
202
|
+
];
|
|
203
|
+
}));
|
|
204
|
+
let asyncStateChangeSlicesOutputs;
|
|
205
|
+
if (asyncDcbCommandTopicOpt !== undefined) {
|
|
206
|
+
let asyncPublishJsons = Component$ReventlessCore.operations(Primitive_option.valFromOption(asyncDcbCommandTopicOpt)).apply(ops => ops.publishJsons);
|
|
207
|
+
asyncStateChangeSlicesOutputs = Object.fromEntries(asyncSlices.map(StateChangeSlice => {
|
|
208
|
+
let ch = StateChangeSlice.make(dcbEventLog, asyncPublishJsons, effectiveTagKeysByEventType, effectiveCrossPartitionTagKeys, opts);
|
|
209
|
+
return [
|
|
210
|
+
StateChangeSlice.Spec.name,
|
|
211
|
+
Component$ReventlessCore.outputs(ch)
|
|
212
|
+
];
|
|
213
|
+
}));
|
|
214
|
+
} else {
|
|
215
|
+
asyncStateChangeSlicesOutputs = {};
|
|
216
|
+
}
|
|
217
|
+
let registerResolver = HooksConfig.hooks.mutationResolverHook;
|
|
218
|
+
if (registerResolver !== undefined) {
|
|
219
|
+
syncSlices.forEach(S => {
|
|
220
|
+
let commandSchema = S.Spec.commandSchema;
|
|
221
|
+
if (!ApiNoApiHelpers$ReventlessCore.isNoApi(commandSchema)) {
|
|
222
|
+
return registerResolver("Dcb", [Api_Naming$ReventlessCore.sliceMutationField(name, S.Spec.name)], commandSchema, S.Spec.commandAuthorization);
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
asyncSlices.forEach(S => {
|
|
226
|
+
let commandSchema = S.Spec.commandSchema;
|
|
227
|
+
if (!ApiNoApiHelpers$ReventlessCore.isNoApi(commandSchema)) {
|
|
228
|
+
return registerResolver("Dcb", [Api_Naming$ReventlessCore.sliceMutationField(name, S.Spec.name)], commandSchema, S.Spec.commandAuthorization);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
let bindHandler = HooksConfig.hooks.mutationBindHook;
|
|
233
|
+
if (bindHandler !== undefined) {
|
|
234
|
+
Component$ReventlessCore.operations(dcbCommandTopic).apply(ops => {
|
|
235
|
+
syncSlices.forEach(S => {
|
|
236
|
+
let commandSchema = S.Spec.commandSchema;
|
|
237
|
+
if (ApiNoApiHelpers$ReventlessCore.isNoApi(commandSchema)) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
let fieldName = Api_Naming$ReventlessCore.sliceMutationField(name, S.Spec.name);
|
|
241
|
+
let generateCommand = CommandGenerator_Callback$ReventlessCore.makeGenerateCommand(ops.publishJsons, ops.publishJsonsAndWait, S.Spec.name, S.Spec.commandSchema, "StateChangeSlice", false);
|
|
242
|
+
bindHandler(fieldName, generateCommand);
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
if (asyncDcbCommandTopicOpt !== undefined) {
|
|
246
|
+
Component$ReventlessCore.operations(Primitive_option.valFromOption(asyncDcbCommandTopicOpt)).apply(asyncOps => {
|
|
247
|
+
asyncSlices.forEach(S => {
|
|
248
|
+
let commandSchema = S.Spec.commandSchema;
|
|
249
|
+
if (ApiNoApiHelpers$ReventlessCore.isNoApi(commandSchema)) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
let fieldName = Api_Naming$ReventlessCore.sliceMutationField(name, S.Spec.name);
|
|
253
|
+
let generateCommand = CommandGenerator_Callback$ReventlessCore.makeGenerateCommand(asyncOps.publishJsons, asyncOps.publishJsonsAndWait, S.Spec.name, S.Spec.commandSchema, "StateChangeSlice", false);
|
|
254
|
+
bindHandler(fieldName, generateCommand);
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
stateViewSlices.forEach(V => {
|
|
260
|
+
let qn = Api_Naming$ReventlessCore.queryFieldNamesForStateView(name, V.Spec.name, undefined);
|
|
261
|
+
let match = Plugin_Structure$ReventlessCore.labelFieldsFromStateSchema(V.Spec.name, V.Spec.stateSchema);
|
|
262
|
+
let newrecord = {...qn};
|
|
263
|
+
newrecord.labelField = match[0];
|
|
264
|
+
newrecord.connectionFilterTypeName = qn.returnTypeName + "Filter";
|
|
265
|
+
let match$1 = V.Spec.subIdConfig;
|
|
266
|
+
let qn$1;
|
|
267
|
+
if (match$1 !== undefined) {
|
|
268
|
+
let newrecord$1 = {...newrecord};
|
|
269
|
+
newrecord$1.itemsFilterTypeName = newrecord.returnTypeName + "ItemsFilter";
|
|
270
|
+
newrecord$1.itemsFieldName = newrecord.singleFieldName + "Items";
|
|
271
|
+
qn$1 = newrecord$1;
|
|
272
|
+
} else {
|
|
273
|
+
qn$1 = newrecord;
|
|
274
|
+
}
|
|
275
|
+
Plugin_Helpers$ReventlessCore.queryFieldNamesRegistry[V.Spec.name] = qn$1;
|
|
276
|
+
Plugin_Helpers$ReventlessCore.stateSchemaRegistry[V.Spec.name] = V.Spec.stateSchema;
|
|
277
|
+
});
|
|
278
|
+
automationSlices.forEach(A => {
|
|
279
|
+
let qn = Api_Naming$ReventlessCore.queryFieldNamesForSliceQueryDb(name, A.queryDbName, undefined);
|
|
280
|
+
Plugin_Helpers$ReventlessCore.queryFieldNamesRegistry[A.queryDbName] = qn;
|
|
281
|
+
});
|
|
282
|
+
outboundTranslationSlices.forEach(O => {
|
|
283
|
+
let qn = Api_Naming$ReventlessCore.queryFieldNamesForSliceQueryDb(name, O.queryDbName, undefined);
|
|
284
|
+
Plugin_Helpers$ReventlessCore.queryFieldNamesRegistry[O.queryDbName] = qn;
|
|
285
|
+
});
|
|
286
|
+
inboundTranslationSlices.forEach(I => {
|
|
287
|
+
let qn = Api_Naming$ReventlessCore.queryFieldNamesForSliceQueryDb(name, I.queryDbName, undefined);
|
|
288
|
+
Plugin_Helpers$ReventlessCore.queryFieldNamesRegistry[I.queryDbName] = qn;
|
|
289
|
+
});
|
|
290
|
+
let stateViewSlicesOutputs = Object.fromEntries(stateViewSlices.map(StateViewSlice => {
|
|
291
|
+
let sv = StateViewSlice.make(dcbEventLog, opts);
|
|
292
|
+
return [
|
|
293
|
+
StateViewSlice.Spec.name,
|
|
294
|
+
Component$ReventlessCore.outputs(sv)
|
|
295
|
+
];
|
|
296
|
+
}));
|
|
297
|
+
let allEventTopics = Object.assign({}, aggregateEventTopics);
|
|
298
|
+
allEventTopics[name + "DcbEventLog"] = Component$ReventlessCore.outputs(dcbEventLog).eventTopic;
|
|
299
|
+
let automationSlicesOutputs = Object.fromEntries(automationSlices.map(AutoSlice => {
|
|
300
|
+
let context_sliceName = AutoSlice.Spec.name;
|
|
301
|
+
let context = {
|
|
302
|
+
environment: environment,
|
|
303
|
+
platformName: platformName,
|
|
304
|
+
pluginName: name,
|
|
305
|
+
sliceName: context_sliceName
|
|
306
|
+
};
|
|
307
|
+
let as_ = AutoSlice.make(allEventTopics, publishJsons, context, opts);
|
|
308
|
+
return [
|
|
309
|
+
AutoSlice.Spec.name,
|
|
310
|
+
Component$ReventlessCore.outputs(as_)
|
|
311
|
+
];
|
|
312
|
+
}));
|
|
313
|
+
let outboundTranslationSlicesOutputs = Object.fromEntries(outboundTranslationSlices.map(OTS => {
|
|
314
|
+
let ots = OTS.make(dcbEventLog, publishJsons, opts);
|
|
315
|
+
return [
|
|
316
|
+
OTS.Spec.name,
|
|
317
|
+
Component$ReventlessCore.outputs(ots)
|
|
318
|
+
];
|
|
319
|
+
}));
|
|
320
|
+
let inboundTranslationSliceData = inboundTranslationSlices.map(ITS => {
|
|
321
|
+
let its = ITS.make(publishJsons, opts);
|
|
322
|
+
let fieldName = Api_Naming$ReventlessCore.sliceMutationField(name, ITS.Spec.name);
|
|
323
|
+
let registerResolver = HooksConfig.hooks.inboundMutationResolverHook;
|
|
324
|
+
if (registerResolver !== undefined) {
|
|
325
|
+
registerResolver(fieldName, ITS.Spec.externalInputSchema);
|
|
326
|
+
}
|
|
327
|
+
let bindReceive = HooksConfig.hooks.inboundMutationBindReceiveHook;
|
|
328
|
+
if (bindReceive !== undefined) {
|
|
329
|
+
Component$ReventlessCore.operations(its).apply(ops => bindReceive(fieldName, ops.receive));
|
|
330
|
+
}
|
|
331
|
+
return [
|
|
332
|
+
ITS.Spec.name,
|
|
333
|
+
fieldName,
|
|
334
|
+
its,
|
|
335
|
+
ITS.Spec.externalInputSchema
|
|
336
|
+
];
|
|
337
|
+
});
|
|
338
|
+
let inboundTranslationSlicesOutputs = Object.fromEntries(inboundTranslationSliceData.map(param => [
|
|
339
|
+
param[0],
|
|
340
|
+
Component$ReventlessCore.outputs(param[2])
|
|
341
|
+
]));
|
|
342
|
+
let inboundReceiversOutput = Pulumi.all(inboundTranslationSliceData.map(param => {
|
|
343
|
+
let fieldName = param[1];
|
|
344
|
+
return Component$ReventlessCore.operations(param[2]).apply(ops => [
|
|
345
|
+
fieldName,
|
|
346
|
+
ops.receive
|
|
347
|
+
]);
|
|
348
|
+
})).apply(pairs => Object.fromEntries(pairs));
|
|
349
|
+
let dcbHandlerBase = DcbCommandTopic.makeFilteringHandler(dcbCommandTopic);
|
|
350
|
+
let dcbGenerateCommandOutput = Component$ReventlessCore.operations(dcbCommandTopic).apply(ops => CommandGenerator_Callback$ReventlessCore.makeGenerateCommand(ops.publishJsons, ops.publishJsonsAndWait, name, S.json, "StateChangeSlice", false));
|
|
351
|
+
let dcbHandler = Pulumi.all([
|
|
352
|
+
dcbHandlerBase,
|
|
353
|
+
inboundReceiversOutput,
|
|
354
|
+
dcbGenerateCommandOutput
|
|
355
|
+
]).apply(param => {
|
|
356
|
+
let generateCommand = param[2];
|
|
357
|
+
let receivers = param[1];
|
|
358
|
+
let baseHandler = param[0];
|
|
359
|
+
return (event, ctx) => {
|
|
360
|
+
let match = event["__inboundTranslation"];
|
|
361
|
+
if (match !== undefined) {
|
|
362
|
+
let fieldName = Stdlib_Option.getOr(Stdlib_Option.flatMap(event["fieldName"], Stdlib_JSON.Decode.string), "");
|
|
363
|
+
let args = Stdlib_Option.getOr(event["arguments"], null);
|
|
364
|
+
let receiveFn = receivers[fieldName];
|
|
365
|
+
if (receiveFn !== undefined) {
|
|
366
|
+
return Effect.promise(async () => {
|
|
367
|
+
let result = await receiveFn(args);
|
|
368
|
+
if (result.TAG === "Ok") {
|
|
369
|
+
return result._0.map(prim => prim);
|
|
370
|
+
} else {
|
|
371
|
+
return result._0;
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
} else {
|
|
375
|
+
return baseHandler(event, ctx);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
let match$1 = event["command"];
|
|
379
|
+
let match$2 = event["arguments"];
|
|
380
|
+
if (typeof match$1 === "string" && match$2 !== undefined) {
|
|
381
|
+
return Effect.map(generateCommand(event), msgId => msgId);
|
|
382
|
+
} else {
|
|
383
|
+
return baseHandler(event, ctx);
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
});
|
|
387
|
+
let dcbResources = Object.values(stateChangeSlicesOutputs).flatMap(outputs => outputs.resources).concat(Object.values(inboundTranslationSlicesOutputs).flatMap(outputs => outputs.resources));
|
|
388
|
+
let asyncDcbResources = Object.values(asyncStateChangeSlicesOutputs).flatMap(outputs => outputs.resources);
|
|
389
|
+
let inboundFieldNames = inboundTranslationSliceData.map(param => param[1]);
|
|
390
|
+
let inboundSchemas = inboundTranslationSliceData.map(param => param[3]);
|
|
391
|
+
let dcbMutationData = Stdlib_Array.filterMap(stateChangeSlices, S => {
|
|
392
|
+
let commandSchema = S.Spec.commandSchema;
|
|
393
|
+
if (ApiNoApiHelpers$ReventlessCore.isNoApi(commandSchema)) {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
let fieldName = Api_Naming$ReventlessCore.sliceMutationField(name, S.Spec.name);
|
|
397
|
+
let constructorNames = DcbTag$Reventless.extractAllVariantNames(S.Spec.commandSchema);
|
|
398
|
+
let tag = Stdlib_Option.getOr(constructorNames[0], S.Spec.name);
|
|
399
|
+
return [
|
|
400
|
+
fieldName,
|
|
401
|
+
tag
|
|
402
|
+
];
|
|
403
|
+
});
|
|
404
|
+
let dcbFieldNames = dcbMutationData.map(param => param[0]);
|
|
405
|
+
let dcbTags = dcbMutationData.map(param => param[1]);
|
|
406
|
+
let dcbConnectFn = runtime => {
|
|
407
|
+
DcbCommandTopic.connect(runtime, dcbResources, dcbCommandTopic);
|
|
408
|
+
if (inboundFieldNames.length !== 0) {
|
|
409
|
+
let hook = HooksConfig.hooks.inboundAppSyncResolverHook;
|
|
410
|
+
if (hook !== undefined) {
|
|
411
|
+
hook({
|
|
412
|
+
runtime: runtime,
|
|
413
|
+
fieldNames: inboundFieldNames,
|
|
414
|
+
externalInputSchemas: inboundSchemas,
|
|
415
|
+
opts: opts
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
if (dcbFieldNames.length === 0) {
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
let hook$1 = HooksConfig.hooks.dcbAppSyncResolverHook;
|
|
423
|
+
if (hook$1 !== undefined) {
|
|
424
|
+
return hook$1({
|
|
425
|
+
runtime: runtime,
|
|
426
|
+
fieldNames: dcbFieldNames,
|
|
427
|
+
tags: dcbTags,
|
|
428
|
+
opts: opts
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
};
|
|
432
|
+
Stdlib_Option.forEach(HooksConfig.hooks.onDcbSlicesCreated, hook => hook(dcbEventLog));
|
|
433
|
+
let dcbRuntimeSetup = () => {
|
|
434
|
+
RuntimeBuilder.forDcbCommandTopic(dcbHandler, dcbConnectFn, undefined, undefined, dcbCommandTopic);
|
|
435
|
+
Stdlib_Option.forEach(asyncDcbCommandTopicOpt, asyncDcbCommandTopic => {
|
|
436
|
+
let asyncDcbHandler = DcbAsyncCommandTopic.makeFilteringHandler(asyncDcbCommandTopic);
|
|
437
|
+
let asyncDcbConnectFn = runtime => DcbAsyncCommandTopic.connect(runtime, asyncDcbResources, asyncDcbCommandTopic);
|
|
438
|
+
RuntimeBuilder.forDcbCommandTopic(asyncDcbHandler, asyncDcbConnectFn, undefined, undefined, asyncDcbCommandTopic);
|
|
439
|
+
});
|
|
440
|
+
};
|
|
441
|
+
let permissionForFirstConstructor = (commandSchema, commandAuthorization) => {
|
|
442
|
+
let names = DcbTag$Reventless.extractAllVariantNames(commandSchema);
|
|
443
|
+
let first = names[0];
|
|
444
|
+
if (first === undefined) {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
let hasPayload = DcbTag$Reventless.isVariantPayloadBearing(commandSchema, first);
|
|
448
|
+
let syntheticCmd = hasPayload ? ({
|
|
449
|
+
TAG: first
|
|
450
|
+
}) : first;
|
|
451
|
+
return commandAuthorization(syntheticCmd);
|
|
452
|
+
};
|
|
453
|
+
let mutationEntriesFromSlices = Stdlib_Array.filterMap(stateChangeSlices, S => {
|
|
454
|
+
let commandSchema = S.Spec.commandSchema;
|
|
455
|
+
if (ApiNoApiHelpers$ReventlessCore.isNoApi(commandSchema)) {
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
let sliceDef = Stdlib_Option.flatMap(pluginStructure, s => s.stateChangeSlices.find(d => d.name === S.Spec.name));
|
|
459
|
+
let fieldName = Api_Naming$ReventlessCore.sliceMutationField(name, S.Spec.name);
|
|
460
|
+
let fieldPermissions = {};
|
|
461
|
+
let rule = permissionForFirstConstructor(commandSchema, S.Spec.commandAuthorization);
|
|
462
|
+
if (rule !== undefined) {
|
|
463
|
+
fieldPermissions[fieldName] = rule;
|
|
464
|
+
}
|
|
465
|
+
return {
|
|
466
|
+
fieldNames: [fieldName],
|
|
467
|
+
commandSchema: commandSchema,
|
|
468
|
+
fieldPermissions: fieldPermissions,
|
|
469
|
+
linkedViews: Stdlib_Option.map(sliceDef, d => d.linkedViews),
|
|
470
|
+
consistencyRead: Stdlib_Option.flatMap(sliceDef, d => d.consistencyRead)
|
|
471
|
+
};
|
|
472
|
+
});
|
|
473
|
+
let mutationEntriesFromInboundSlices = inboundTranslationSlices.map(ITS => {
|
|
474
|
+
let fieldName = Api_Naming$ReventlessCore.sliceMutationField(name, ITS.Spec.name);
|
|
475
|
+
let fieldPermissions = {};
|
|
476
|
+
let rule = permissionForFirstConstructor(ITS.Spec.commandSchema, ITS.Spec.commandAuthorization);
|
|
477
|
+
if (rule !== undefined) {
|
|
478
|
+
fieldPermissions[fieldName] = rule;
|
|
479
|
+
}
|
|
480
|
+
return {
|
|
481
|
+
fieldNames: [fieldName],
|
|
482
|
+
commandSchema: ITS.Spec.externalInputSchema,
|
|
483
|
+
fieldPermissions: fieldPermissions
|
|
484
|
+
};
|
|
485
|
+
});
|
|
486
|
+
let stateViewEntries = stateViewSlices.map(V => {
|
|
487
|
+
let qn = Api_Naming$ReventlessCore.queryFieldNamesForStateView(name, V.Spec.name, undefined);
|
|
488
|
+
let subIdField = Stdlib_Option.map(V.Spec.subIdConfig, c => c.subIdField);
|
|
489
|
+
let indexes = V.Spec.config.indexes;
|
|
490
|
+
let indexQueries = indexes.length !== 0 ? indexes : undefined;
|
|
491
|
+
return {
|
|
492
|
+
singleFieldName: qn.singleFieldName,
|
|
493
|
+
listFieldName: qn.listFieldName,
|
|
494
|
+
returnTypeName: qn.returnTypeName,
|
|
495
|
+
stateSchema: V.Spec.stateSchema,
|
|
496
|
+
authorization: undefined,
|
|
497
|
+
permission: V.Spec.authorization,
|
|
498
|
+
includeIdParam: qn.includeIdParam,
|
|
499
|
+
connectionSpec: true,
|
|
500
|
+
subIdField: subIdField,
|
|
501
|
+
indexQueries: indexQueries
|
|
502
|
+
};
|
|
503
|
+
});
|
|
504
|
+
let automationEntries = automationSlices.map(A => {
|
|
505
|
+
let qn = Api_Naming$ReventlessCore.queryFieldNamesForSliceQueryDb(name, A.queryDbName, undefined);
|
|
506
|
+
return {
|
|
507
|
+
singleFieldName: qn.singleFieldName,
|
|
508
|
+
listFieldName: qn.listFieldName,
|
|
509
|
+
returnTypeName: qn.returnTypeName,
|
|
510
|
+
stateSchema: AutomationSlice_Callback$ReventlessCore.todoRowSchema,
|
|
511
|
+
authorization: undefined,
|
|
512
|
+
connectionSpec: true
|
|
513
|
+
};
|
|
514
|
+
});
|
|
515
|
+
let outboundEntries = outboundTranslationSlices.map(O => {
|
|
516
|
+
let qn = Api_Naming$ReventlessCore.queryFieldNamesForSliceQueryDb(name, O.queryDbName, undefined);
|
|
517
|
+
return {
|
|
518
|
+
singleFieldName: qn.singleFieldName,
|
|
519
|
+
listFieldName: qn.listFieldName,
|
|
520
|
+
returnTypeName: qn.returnTypeName,
|
|
521
|
+
stateSchema: OutboundTranslationSlice_Callback$ReventlessCore.todoRowSchema,
|
|
522
|
+
authorization: undefined,
|
|
523
|
+
connectionSpec: true
|
|
524
|
+
};
|
|
525
|
+
});
|
|
526
|
+
let inboundEntries = inboundTranslationSlices.map(I => {
|
|
527
|
+
let qn = Api_Naming$ReventlessCore.queryFieldNamesForSliceQueryDb(name, I.queryDbName, undefined);
|
|
528
|
+
return {
|
|
529
|
+
singleFieldName: qn.singleFieldName,
|
|
530
|
+
listFieldName: qn.listFieldName,
|
|
531
|
+
returnTypeName: qn.returnTypeName,
|
|
532
|
+
stateSchema: InboundTranslationSlice_Callback$ReventlessCore.auditRowSchema,
|
|
533
|
+
authorization: undefined,
|
|
534
|
+
connectionSpec: true
|
|
535
|
+
};
|
|
536
|
+
});
|
|
537
|
+
let allProducedSchemas = stateChangeSlices.map(Sc => Sc.Spec.eventSchema);
|
|
538
|
+
let outputs = Component$ReventlessCore.outputs(dcbCommandTopic);
|
|
539
|
+
let r = outputs.resources[0];
|
|
540
|
+
let dcbCommandTopicQueueUrl = r !== undefined ? r.id : undefined;
|
|
541
|
+
return {
|
|
542
|
+
dcbEventLogOutputs: Component$ReventlessCore.outputs(dcbEventLog),
|
|
543
|
+
stateChangeSlicesOutputs: Object.fromEntries(Object.entries(stateChangeSlicesOutputs).concat(Object.entries(asyncStateChangeSlicesOutputs))),
|
|
544
|
+
stateViewSlicesOutputs: stateViewSlicesOutputs,
|
|
545
|
+
automationSlicesOutputs: automationSlicesOutputs,
|
|
546
|
+
outboundTranslationSlicesOutputs: outboundTranslationSlicesOutputs,
|
|
547
|
+
inboundTranslationSlicesOutputs: inboundTranslationSlicesOutputs,
|
|
548
|
+
dcbRuntimeSetup: dcbRuntimeSetup,
|
|
549
|
+
dcbPublishJsons: publishJsons,
|
|
550
|
+
dcbCommandTopicQueueUrl: dcbCommandTopicQueueUrl,
|
|
551
|
+
mutationEntries: mutationEntriesFromSlices.concat(mutationEntriesFromInboundSlices),
|
|
552
|
+
queryEntries: stateViewEntries.concat(automationEntries).concat(outboundEntries).concat(inboundEntries),
|
|
553
|
+
eventLogEntries: allProducedSchemas.length !== 0 ? [{
|
|
554
|
+
busKey: name + "DcbEventLog",
|
|
555
|
+
displayName: name,
|
|
556
|
+
eventSchema: allProducedSchemas[0]
|
|
557
|
+
}] : []
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
return {
|
|
561
|
+
construct: construct
|
|
562
|
+
};
|
|
563
|
+
}))));
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
export {
|
|
567
|
+
log,
|
|
568
|
+
toRelativePath,
|
|
569
|
+
emptyResult,
|
|
570
|
+
Make,
|
|
571
|
+
}
|
|
572
|
+
/* log Not a pure module */
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
let componentType = ComponentType.DcbEventLog
|
|
2
|
+
|
|
3
|
+
type outputs = ReventlessInfra.DcbEventLog.outputs
|
|
4
|
+
|
|
5
|
+
type t = ReventlessInfra.DcbEventLog.t
|
|
6
|
+
|
|
7
|
+
type rawEvent = ReventlessInfra.DcbEventLog.rawEvent
|
|
8
|
+
type rawSequencedEvent = ReventlessInfra.DcbEventLog.rawSequencedEvent
|
|
9
|
+
type readResult = ReventlessInfra.DcbEventLog.readResult
|
|
10
|
+
type read = ReventlessInfra.DcbEventLog.read
|
|
11
|
+
type append = ReventlessInfra.DcbEventLog.append
|
|
12
|
+
type readStream = ReventlessInfra.DcbEventLog.readStream
|
|
13
|
+
type appendStream = ReventlessInfra.DcbEventLog.appendStream
|
|
14
|
+
type operations = ReventlessInfra.DcbEventLog.operations
|
|
15
|
+
type component = ReventlessInfra.DcbEventLog.component
|
|
16
|
+
|
|
17
|
+
let toResolvedOutputs = (
|
|
18
|
+
outputs: outputs,
|
|
19
|
+
): Pulumi.Output.t<ReventlessInterop.DcbEventLog.resolvedOutputs> =>
|
|
20
|
+
(
|
|
21
|
+
outputs.resources->Adapter.resourcesToInterop,
|
|
22
|
+
outputs.eventTopic.resources->Adapter.resourcesToInterop,
|
|
23
|
+
)
|
|
24
|
+
->Pulumi.Output.all2
|
|
25
|
+
->Pulumi.Output.apply(((resources, eventTopicResources)) => {
|
|
26
|
+
let resolved: ReventlessInterop.DcbEventLog.resolvedOutputs = {
|
|
27
|
+
resources: resources,
|
|
28
|
+
eventTopic: {resources: eventTopicResources},
|
|
29
|
+
}
|
|
30
|
+
resolved
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
module type T = {
|
|
34
|
+
type component = component
|
|
35
|
+
|
|
36
|
+
let make: (
|
|
37
|
+
~name: string,
|
|
38
|
+
~indexes: array<string>=?,
|
|
39
|
+
~partitionTag: Reventless.DcbTag.derivedPartitionTag,
|
|
40
|
+
~crossPartitionTagKeys: array<string>=?,
|
|
41
|
+
~opts: Pulumi.ComponentResource.options=?,
|
|
42
|
+
) => component
|
|
43
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Pulumi from "@pulumi/pulumi";
|
|
4
|
+
import * as Adapter$ReventlessCore from "../../adapter/Adapter.res.mjs";
|
|
5
|
+
|
|
6
|
+
function toResolvedOutputs(outputs) {
|
|
7
|
+
return Pulumi.all([
|
|
8
|
+
Adapter$ReventlessCore.resourcesToInterop(outputs.resources),
|
|
9
|
+
Adapter$ReventlessCore.resourcesToInterop(outputs.eventTopic.resources)
|
|
10
|
+
]).apply(param => ({
|
|
11
|
+
resources: param[0],
|
|
12
|
+
eventTopic: {
|
|
13
|
+
resources: param[1]
|
|
14
|
+
}
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let componentType = "DcbEventLog";
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
componentType,
|
|
22
|
+
toResolvedOutputs,
|
|
23
|
+
}
|
|
24
|
+
/* @pulumi/pulumi Not a pure module */
|