@reventlessdev/reventless-aws 3.0.0-alpha.167
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 +1564 -0
- package/README.md +62 -0
- package/__mocks__/emptyModule.js +1 -0
- package/all-licenses.csv +565 -0
- package/docker-compose.dynamodb-local.yml +12 -0
- package/jest.setup.cjs +5 -0
- package/licenses-analysis.ods +0 -0
- package/package.json +73 -0
- package/rescript.json +39 -0
- package/reventless-licenses-analysis.xls +0 -0
- package/scripts/run-integration-tests.sh +43 -0
- package/src/Platform.res +1940 -0
- package/src/Platform.res.mjs +2281 -0
- package/src/Platform_Casts.res +106 -0
- package/src/Platform_Casts.res.mjs +13 -0
- package/src/Platform_Stack.res +153 -0
- package/src/Platform_Stack.res.mjs +121 -0
- package/src/Types.res +39 -0
- package/src/Types.res.mjs +21 -0
- package/src/adapter/AWS.res +96 -0
- package/src/adapter/AWS.res.mjs +186 -0
- package/src/adapter/AWS_Tags.res +16 -0
- package/src/adapter/AWS_Tags.res.mjs +48 -0
- package/src/adapter/Adapter_Helpers.res +19 -0
- package/src/adapter/Adapter_Helpers.res.mjs +37 -0
- package/src/adapter/Api/AppSync_EventsApi.res +172 -0
- package/src/adapter/Api/AppSync_EventsApi.res.mjs +96 -0
- package/src/adapter/Api/AppSync_Resolver_Native.res +93 -0
- package/src/adapter/Api/AppSync_Resolver_Native.res.mjs +67 -0
- package/src/adapter/Api/AppSync_Resolver_Retrying.res +653 -0
- package/src/adapter/Api/AppSync_Resolver_Retrying.res.mjs +462 -0
- package/src/adapter/Api/CommandSubscriptionResolvers_AppSync.res +29 -0
- package/src/adapter/Api/CommandSubscriptionResolvers_AppSync.res.mjs +15 -0
- package/src/adapter/Api/Platform_ComponentDefinitions_Lambda.res +238 -0
- package/src/adapter/Api/Platform_ComponentDefinitions_Lambda.res.mjs +179 -0
- package/src/adapter/Api/Platform_UIFragments_Lambda.res +229 -0
- package/src/adapter/Api/Platform_UIFragments_Lambda.res.mjs +245 -0
- package/src/adapter/Auth/Auth_Cognito.res +209 -0
- package/src/adapter/Auth/Auth_Cognito.res.mjs +135 -0
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers.res +2 -0
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers.res.mjs +12 -0
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers_AppSync.res +251 -0
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers_AppSync.res.mjs +126 -0
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers_AppSync_NoOp.res +20 -0
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers_AppSync_NoOp.res.mjs +23 -0
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers_AppSync_Runtime.res +1 -0
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers_AppSync_Runtime.res.mjs +11 -0
- package/src/adapter/CommandGenerator/InboundTranslationResolvers_AppSync.res +95 -0
- package/src/adapter/CommandGenerator/InboundTranslationResolvers_AppSync.res.mjs +50 -0
- package/src/adapter/CommandTopic/CommandTopicChannel.res +6 -0
- package/src/adapter/CommandTopic/CommandTopicChannel.res.mjs +21 -0
- package/src/adapter/CommandTopic/CommandTopicChannel_Helpers.res +196 -0
- package/src/adapter/CommandTopic/CommandTopicChannel_Helpers.res.mjs +145 -0
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS.res +91 -0
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS.res.mjs +74 -0
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Async.res +69 -0
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Async.res.mjs +62 -0
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_FIFO.res +60 -0
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_FIFO.res.mjs +56 -0
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Runtime.res +73 -0
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Runtime.res.mjs +65 -0
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Sync.res +88 -0
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Sync.res.mjs +76 -0
- package/src/adapter/CommandTopic/CommandTopicRemoteChannel.res +1 -0
- package/src/adapter/CommandTopic/CommandTopicRemoteChannel.res.mjs +9 -0
- package/src/adapter/CommandTopic/CommandTopicRemoteChannel_SQS.res +7 -0
- package/src/adapter/CommandTopic/CommandTopicRemoteChannel_SQS.res.mjs +17 -0
- package/src/adapter/Counter/CounterHandler_DynamoDbStream.res +103 -0
- package/src/adapter/Counter/CounterHandler_DynamoDbStream.res.mjs +68 -0
- package/src/adapter/Counter/CounterHandler_DynamoDbStream_Runtime.res +107 -0
- package/src/adapter/Counter/CounterHandler_DynamoDbStream_Runtime.res.mjs +145 -0
- package/src/adapter/DcbEventLog/DcbEventLogStorage.res +1 -0
- package/src/adapter/DcbEventLog/DcbEventLogStorage.res.mjs +9 -0
- package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb.res +84 -0
- package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb.res.mjs +52 -0
- package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb_Runtime.res +1436 -0
- package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb_Runtime.res.mjs +1143 -0
- package/src/adapter/EventCollector/EventCollectorChannel.res +6 -0
- package/src/adapter/EventCollector/EventCollectorChannel.res.mjs +21 -0
- package/src/adapter/EventCollector/EventCollectorChannel_DynamoDbStream.res +63 -0
- package/src/adapter/EventCollector/EventCollectorChannel_DynamoDbStream.res.mjs +56 -0
- package/src/adapter/EventCollector/EventCollectorChannel_DynamoDbStream_Runtime.res +20 -0
- package/src/adapter/EventCollector/EventCollectorChannel_DynamoDbStream_Runtime.res.mjs +32 -0
- package/src/adapter/EventCollector/EventCollectorChannel_Helpers.res +266 -0
- package/src/adapter/EventCollector/EventCollectorChannel_Helpers.res.mjs +166 -0
- package/src/adapter/EventCollector/EventCollectorChannel_SQS.res +81 -0
- package/src/adapter/EventCollector/EventCollectorChannel_SQS.res.mjs +54 -0
- package/src/adapter/EventCollector/EventCollectorChannel_SQS_FIFO.res +59 -0
- package/src/adapter/EventCollector/EventCollectorChannel_SQS_FIFO.res.mjs +45 -0
- package/src/adapter/EventCollector/EventCollectorChannel_SQS_Runtime.res +91 -0
- package/src/adapter/EventCollector/EventCollectorChannel_SQS_Runtime.res.mjs +89 -0
- package/src/adapter/EventLog/EventLogStorage.res +3 -0
- package/src/adapter/EventLog/EventLogStorage.res.mjs +15 -0
- package/src/adapter/EventLog/EventLogStorage_DynamoDb.res +25 -0
- package/src/adapter/EventLog/EventLogStorage_DynamoDb.res.mjs +34 -0
- package/src/adapter/EventLog/EventLogStorage_DynamoDbStream.res +26 -0
- package/src/adapter/EventLog/EventLogStorage_DynamoDbStream.res.mjs +35 -0
- package/src/adapter/EventLog/EventLogStorage_DynamoDb_Runtime.res +121 -0
- package/src/adapter/EventLog/EventLogStorage_DynamoDb_Runtime.res.mjs +137 -0
- package/src/adapter/EventLogSubscription/EventLogSubscription_AppSync.res +265 -0
- package/src/adapter/EventLogSubscription/EventLogSubscription_AppSync.res.mjs +185 -0
- package/src/adapter/EventTopic/EventTopicPublisher.res +6 -0
- package/src/adapter/EventTopic/EventTopicPublisher.res.mjs +21 -0
- package/src/adapter/EventTopic/EventTopicPublisher_DynamoDbStream.res +25 -0
- package/src/adapter/EventTopic/EventTopicPublisher_DynamoDbStream.res.mjs +28 -0
- package/src/adapter/EventTopic/EventTopicPublisher_SNS.res +40 -0
- package/src/adapter/EventTopic/EventTopicPublisher_SNS.res.mjs +39 -0
- package/src/adapter/EventTopic/EventTopicPublisher_SNS_FIFO.res +39 -0
- package/src/adapter/EventTopic/EventTopicPublisher_SNS_FIFO.res.mjs +38 -0
- package/src/adapter/EventTopic/EventTopicPublisher_SNS_Runtime.res +5 -0
- package/src/adapter/EventTopic/EventTopicPublisher_SNS_Runtime.res.mjs +18 -0
- package/src/adapter/Mcp/MCP_Lambda.res +502 -0
- package/src/adapter/Mcp/MCP_Lambda.res.mjs +289 -0
- package/src/adapter/QueryDb/NodeResolver_AppSync.res +71 -0
- package/src/adapter/QueryDb/NodeResolver_AppSync.res.mjs +44 -0
- package/src/adapter/QueryDb/QueryDbResolvers.res +2 -0
- package/src/adapter/QueryDb/QueryDbResolvers.res.mjs +12 -0
- package/src/adapter/QueryDb/QueryDbResolvers_AppSync.res +434 -0
- package/src/adapter/QueryDb/QueryDbResolvers_AppSync.res.mjs +243 -0
- package/src/adapter/QueryDb/QueryDbResolvers_AppSync_NoOp.res +21 -0
- package/src/adapter/QueryDb/QueryDbResolvers_AppSync_NoOp.res.mjs +14 -0
- package/src/adapter/QueryDb/QueryDbResolvers_NoOp.res +21 -0
- package/src/adapter/QueryDb/QueryDbResolvers_NoOp.res.mjs +14 -0
- package/src/adapter/QueryDb/QueryDbStorage.res +5 -0
- package/src/adapter/QueryDb/QueryDbStorage.res.mjs +18 -0
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDb.res +115 -0
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDb.res.mjs +100 -0
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDbStream.res +52 -0
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDbStream.res.mjs +38 -0
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDb_Runtime.res +271 -0
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDb_Runtime.res.mjs +306 -0
- package/src/adapter/QueryDb/QueryInterceptor_Lambda.res +20 -0
- package/src/adapter/QueryDb/QueryInterceptor_Lambda.res.mjs +22 -0
- package/src/adapter/QueryEngine/QueryEngine.res +3 -0
- package/src/adapter/QueryEngine/QueryEngine.res.mjs +12 -0
- package/src/adapter/QueryEngine/QueryEngine_DynamoDb.res +184 -0
- package/src/adapter/QueryEngine/QueryEngine_DynamoDb.res.mjs +221 -0
- package/src/adapter/Runtime/AdminEventCollectorEntryPoint.mjs +879 -0
- package/src/adapter/Runtime/AggregateEntryPoint.mjs +313 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res +327 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res.mjs +239 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro_Async.res +331 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro_Async.res.mjs +240 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate.res +247 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate.res.mjs +185 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate_Async.res +244 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate_Async.res.mjs +185 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single.res +347 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single.res.mjs +244 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single_Async.res +285 -0
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single_Async.res.mjs +212 -0
- package/src/adapter/Runtime/AutomationSliceEntryPoint.mjs +124 -0
- package/src/adapter/Runtime/AutomationSliceRuntime_Builder_Single.res +187 -0
- package/src/adapter/Runtime/AutomationSliceRuntime_Builder_Single.res.mjs +147 -0
- package/src/adapter/Runtime/CounterEntryPoint.mjs +91 -0
- package/src/adapter/Runtime/DcbCommandTopicEntryPoint.mjs +265 -0
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_PerEventCollector.res +122 -0
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_PerEventCollector.res.mjs +89 -0
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_Single.res +193 -0
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_Single.res.mjs +137 -0
- package/src/adapter/Runtime/EventMapperEntryPoint.mjs +97 -0
- package/src/adapter/Runtime/ExtensionPointEntryPoint.mjs +101 -0
- package/src/adapter/Runtime/ExtensionPointRuntime_Builder_PerExtensionPoint.res +83 -0
- package/src/adapter/Runtime/ExtensionPointRuntime_Builder_PerExtensionPoint.res.mjs +59 -0
- package/src/adapter/Runtime/HandlerFactoryHelpers.mjs +142 -0
- package/src/adapter/Runtime/HeartbeatEntryPoint.mjs +38 -0
- package/src/adapter/Runtime/PluginExtensionPointEntryPoint.mjs +137 -0
- package/src/adapter/Runtime/ReadModelEntryPoint.mjs +143 -0
- package/src/adapter/Runtime/RuntimeEnvironment.res +1 -0
- package/src/adapter/Runtime/RuntimeEnvironment.res.mjs +9 -0
- package/src/adapter/Runtime/RuntimeEnvironment_Lambda.res +254 -0
- package/src/adapter/Runtime/RuntimeEnvironment_Lambda.res.mjs +169 -0
- package/src/adapter/Runtime/SideEffectEntryPoint.mjs +81 -0
- package/src/adapter/Runtime/SideEffectHandlerRuntime_Builder_Single.res +178 -0
- package/src/adapter/Runtime/SideEffectHandlerRuntime_Builder_Single.res.mjs +129 -0
- package/src/adapter/Runtime/StateChangeSliceRuntime_Builder_Single.res +166 -0
- package/src/adapter/Runtime/StateChangeSliceRuntime_Builder_Single.res.mjs +87 -0
- package/src/adapter/Runtime/StateViewSliceEntryPoint.mjs +136 -0
- package/src/adapter/Runtime/StateViewSliceRuntime_Builder_Single.res +344 -0
- package/src/adapter/Runtime/StateViewSliceRuntime_Builder_Single.res.mjs +242 -0
- package/src/adapter/Runtime/TaskBucketEntryPoint.mjs +150 -0
- package/src/adapter/Runtime/TaskRuntime_Builder_PerBucket.res +123 -0
- package/src/adapter/Runtime/TaskRuntime_Builder_PerBucket.res.mjs +74 -0
- package/src/adapter/ScheduledPublisher/ScheduledPublisher.res +2 -0
- package/src/adapter/ScheduledPublisher/ScheduledPublisher.res.mjs +12 -0
- package/src/adapter/ScheduledPublisher/ScheduledPublisher_CloudWatchEvents.res +54 -0
- package/src/adapter/ScheduledPublisher/ScheduledPublisher_CloudWatchEvents.res.mjs +41 -0
- package/src/adapter/ScheduledPublisher/ScheduledPublisher_CloudWatchEvents_Runtime.res +97 -0
- package/src/adapter/ScheduledPublisher/ScheduledPublisher_CloudWatchEvents_Runtime.res.mjs +85 -0
- package/src/adapter/StateTopic/StateTopic_AppSync.res +418 -0
- package/src/adapter/StateTopic/StateTopic_AppSync.res.mjs +295 -0
- package/src/adapter/Task/TaskBucket.res +1 -0
- package/src/adapter/Task/TaskBucket.res.mjs +9 -0
- package/src/adapter/Task/TaskBucket_S3.res +157 -0
- package/src/adapter/Task/TaskBucket_S3.res.mjs +108 -0
- package/src/adapter/Task/TaskBucket_S3_Runtime.res +11 -0
- package/src/adapter/Task/TaskBucket_S3_Runtime.res.mjs +15 -0
- package/src/components/Aggregate_Builder.res +1 -0
- package/src/components/Aggregate_Builder.res.mjs +25 -0
- package/src/components/Aggregate_Builder_Micro.res +63 -0
- package/src/components/Aggregate_Builder_Micro.res.mjs +80 -0
- package/src/components/Aggregate_Builder_NoResolver.res +61 -0
- package/src/components/Aggregate_Builder_NoResolver.res.mjs +80 -0
- package/src/components/Aggregate_Builder_PerAggregate.res +57 -0
- package/src/components/Aggregate_Builder_PerAggregate.res.mjs +80 -0
- package/src/components/Aggregate_Builder_Single.res +59 -0
- package/src/components/Aggregate_Builder_Single.res.mjs +80 -0
- package/src/components/Aggregate_Builder_Single_Async.res +59 -0
- package/src/components/Aggregate_Builder_Single_Async.res.mjs +80 -0
- package/src/components/Api/AppSync_Adapter.res +500 -0
- package/src/components/Api/AppSync_Adapter.res.mjs +396 -0
- package/src/components/AutomationSlice_Builder.res +52 -0
- package/src/components/AutomationSlice_Builder.res.mjs +72 -0
- package/src/components/AutomationSlice_Builder_Bundled.res.mjs +70 -0
- package/src/components/Counter_Builder.res +10 -0
- package/src/components/Counter_Builder.res.mjs +16 -0
- package/src/components/DataCleaner.res +170 -0
- package/src/components/DataCleaner.res.mjs +2 -0
- package/src/components/DcbEventLog_Builder.res +8 -0
- package/src/components/DcbEventLog_Builder.res.mjs +14 -0
- package/src/components/ExtensionPoint_Builder.res +16 -0
- package/src/components/ExtensionPoint_Builder.res.mjs +37 -0
- package/src/components/ForeignReadModel_Builder.res +19 -0
- package/src/components/ForeignReadModel_Builder.res.mjs +48 -0
- package/src/components/InboundTranslationSlice_Builder.res +25 -0
- package/src/components/InboundTranslationSlice_Builder.res.mjs +31 -0
- package/src/components/OutboundTranslationSlice_Builder.res +60 -0
- package/src/components/OutboundTranslationSlice_Builder.res.mjs +76 -0
- package/src/components/OutboundTranslationSlice_Builder_Bundled.res.mjs +75 -0
- package/src/components/Plugin.res +29 -0
- package/src/components/Plugin.res.mjs +63 -0
- package/src/components/ReadModel_Builder.res +1 -0
- package/src/components/ReadModel_Builder.res.mjs +19 -0
- package/src/components/ReadModel_Builder_NoResolver.res +55 -0
- package/src/components/ReadModel_Builder_NoResolver.res.mjs +64 -0
- package/src/components/ReadModel_Builder_NoResolver_Stream.res +60 -0
- package/src/components/ReadModel_Builder_NoResolver_Stream.res.mjs +64 -0
- package/src/components/ReadModel_Builder_PerReadModel.res +53 -0
- package/src/components/ReadModel_Builder_PerReadModel.res.mjs +66 -0
- package/src/components/ReadModel_Builder_Single.res +52 -0
- package/src/components/ReadModel_Builder_Single.res.mjs +66 -0
- package/src/components/ReadModel_Builder_Single_Stream.res +60 -0
- package/src/components/ReadModel_Builder_Single_Stream.res.mjs +66 -0
- package/src/components/Scheduler.res +1 -0
- package/src/components/Scheduler.res.mjs +13 -0
- package/src/components/SideEffectHandler.res +1 -0
- package/src/components/SideEffectHandler.res.mjs +19 -0
- package/src/components/SideEffectHandler_PerSideEffectHandler.res +13 -0
- package/src/components/SideEffectHandler_PerSideEffectHandler.res.mjs +52 -0
- package/src/components/SideEffectHandler_Single.res +54 -0
- package/src/components/SideEffectHandler_Single.res.mjs +60 -0
- package/src/components/StateChangeSlice_Builder.res +17 -0
- package/src/components/StateChangeSlice_Builder.res.mjs +23 -0
- package/src/components/StateViewSlice_Builder.res +46 -0
- package/src/components/StateViewSlice_Builder.res.mjs +68 -0
- package/src/components/StateViewSlice_Builder_Bundled.res.mjs +69 -0
- package/src/components/StateViewSlice_Builder_Stream.res +50 -0
- package/src/components/StateViewSlice_Builder_Stream.res.mjs +68 -0
- package/src/components/Task_Builder.res +1 -0
- package/src/components/Task_Builder.res.mjs +28 -0
- package/src/components/Task_Builder_PerBucket.res +22 -0
- package/src/components/Task_Builder_PerBucket.res.mjs +63 -0
- package/src/components/Vpc.res +214 -0
- package/src/components/Vpc.res.mjs +117 -0
- package/src/components/Vpc.resi +22 -0
- package/src/errors/AppSync_Error.res +36 -0
- package/src/errors/AppSync_Error.res.mjs +38 -0
- package/src/errors/Cognito_Error.res +36 -0
- package/src/errors/Cognito_Error.res.mjs +38 -0
- package/src/errors/DynamoDb_Error.res +75 -0
- package/src/errors/DynamoDb_Error.res.mjs +86 -0
- package/src/errors/Kinesis_Error.res +36 -0
- package/src/errors/Kinesis_Error.res.mjs +38 -0
- package/src/errors/SNS_Error.res +34 -0
- package/src/errors/SNS_Error.res.mjs +38 -0
- package/src/errors/SQS_Error.res +40 -0
- package/src/errors/SQS_Error.res.mjs +41 -0
- package/src/plugin/cloner/ClonerRunner.res +1 -0
- package/src/plugin/cloner/ClonerRunner.res.mjs +9 -0
- package/src/plugin/cloner/ClonerRunner_Fargate.res +362 -0
- package/src/plugin/cloner/ClonerRunner_Fargate.res.mjs +246 -0
- package/src/plugin/cloner/ClonerRunner_Fargate_Runtime.res +42 -0
- package/src/plugin/cloner/ClonerRunner_Fargate_Runtime.res.mjs +45 -0
- package/src/plugin/heartbeat/HeartbeatRunner.res +1 -0
- package/src/plugin/heartbeat/HeartbeatRunner.res.mjs +9 -0
- package/src/plugin/heartbeat/HeartbeatRunner_CloudWatchEvents.res +96 -0
- package/src/plugin/heartbeat/HeartbeatRunner_CloudWatchEvents.res.mjs +69 -0
- package/src/plugin/runtime/PluginExtensionPointRuntime_Builder.res +115 -0
- package/src/plugin/runtime/PluginExtensionPointRuntime_Builder.res.mjs +88 -0
- package/src/plugin/runtime/PluginRuntimeOperations.res +5 -0
- package/src/plugin/runtime/PluginRuntimeOperations.res.mjs +14 -0
- package/src/plugin/runtime/PluginRuntime_Builder.res +769 -0
- package/src/plugin/runtime/PluginRuntime_Builder.res.mjs +464 -0
- package/src/plugin/runtime/Util_PluginMessage_Runtime.res +13 -0
- package/src/plugin/runtime/Util_PluginMessage_Runtime.res.mjs +19 -0
- package/src/plugin/stack/Plugin_ExtensionPoint_Builder.res +28 -0
- package/src/plugin/stack/Plugin_ExtensionPoint_Builder.res.mjs +67 -0
- package/src/plugin/stack/Plugin_Stack.res +439 -0
- package/src/plugin/stack/Plugin_Stack.res.mjs +263 -0
- package/src/util/Util.res +29 -0
- package/src/util/Util.res.mjs +93 -0
- package/src/util/Util_AppSync.res +36 -0
- package/src/util/Util_AppSync.res.mjs +35 -0
- package/src/util/Util_AppSync_Caller.res +213 -0
- package/src/util/Util_AppSync_Caller.res.mjs +170 -0
- package/src/util/Util_Bundle.res +255 -0
- package/src/util/Util_Bundle.res.mjs +179 -0
- package/src/util/Util_Cloudwatch.res +14 -0
- package/src/util/Util_Cloudwatch.res.mjs +19 -0
- package/src/util/Util_CognitoGroupUser.res +39 -0
- package/src/util/Util_CognitoGroupUser.res.mjs +32 -0
- package/src/util/Util_CognitoGroupUser_Runtime.res +65 -0
- package/src/util/Util_CognitoGroupUser_Runtime.res.mjs +50 -0
- package/src/util/Util_Cognito_Runtime.res +52 -0
- package/src/util/Util_Cognito_Runtime.res.mjs +35 -0
- package/src/util/Util_DeadLetterQueue.res +154 -0
- package/src/util/Util_DeadLetterQueue.res.mjs +158 -0
- package/src/util/Util_DynamoDb.res +210 -0
- package/src/util/Util_DynamoDb.res.mjs +218 -0
- package/src/util/Util_DynamoDbStream.res +138 -0
- package/src/util/Util_DynamoDbStream.res.mjs +134 -0
- package/src/util/Util_DynamoDbStream_Runtime.res +94 -0
- package/src/util/Util_DynamoDbStream_Runtime.res.mjs +131 -0
- package/src/util/Util_DynamoDb_Runtime.res +216 -0
- package/src/util/Util_DynamoDb_Runtime.res.mjs +257 -0
- package/src/util/Util_DynamoDb_TableManager.res +23 -0
- package/src/util/Util_DynamoDb_TableManager.res.mjs +35 -0
- package/src/util/Util_DynamoDb_TableManager.resi +3 -0
- package/src/util/Util_Env.res +5 -0
- package/src/util/Util_Env.res.mjs +2 -0
- package/src/util/Util_EventSourceMapping.res +49 -0
- package/src/util/Util_EventSourceMapping.res.mjs +32 -0
- package/src/util/Util_HostUiDomain.res +28 -0
- package/src/util/Util_HostUiDomain.res.mjs +26 -0
- package/src/util/Util_IAM_Role.res +14 -0
- package/src/util/Util_IAM_Role.res.mjs +28 -0
- package/src/util/Util_Kinesis_Runtime.res +20 -0
- package/src/util/Util_Kinesis_Runtime.res.mjs +24 -0
- package/src/util/Util_Lambda.res +39 -0
- package/src/util/Util_Lambda.res.mjs +45 -0
- package/src/util/Util_LocalConfig.res +119 -0
- package/src/util/Util_LocalConfig.res.mjs +112 -0
- package/src/util/Util_ResourceNaming.res +15 -0
- package/src/util/Util_ResourceNaming.res.mjs +26 -0
- package/src/util/Util_S3.res +17 -0
- package/src/util/Util_S3.res.mjs +30 -0
- package/src/util/Util_S3_Runtime.res +11 -0
- package/src/util/Util_S3_Runtime.res.mjs +15 -0
- package/src/util/Util_SNS.res +33 -0
- package/src/util/Util_SNS.res.mjs +50 -0
- package/src/util/Util_SNS_FIFO.res +21 -0
- package/src/util/Util_SNS_FIFO.res.mjs +27 -0
- package/src/util/Util_SNS_Runtime.res +33 -0
- package/src/util/Util_SNS_Runtime.res.mjs +27 -0
- package/src/util/Util_SQS.res +70 -0
- package/src/util/Util_SQS.res.mjs +83 -0
- package/src/util/Util_SQS_FIFO.res +16 -0
- package/src/util/Util_SQS_FIFO.res.mjs +28 -0
- package/src/util/Util_SQS_Runtime.res +169 -0
- package/src/util/Util_SQS_Runtime.res.mjs +150 -0
- package/src/util/Util_SesPolicy_Runtime.res +54 -0
- package/src/util/Util_SesPolicy_Runtime.res.mjs +55 -0
- package/src/util/Util_StaticBundle.res +124 -0
- package/src/util/Util_StaticBundle.res.mjs +132 -0
- package/src/util/Util_Vpc.res +22 -0
- package/src/util/Util_Vpc.res.mjs +27 -0
- package/tests/AppSync_AdapterTest.res +396 -0
- package/tests/AppSync_AdapterTest.res.mjs +326 -0
- package/tests/AppSync_Resolver_RetryingTest.res +59 -0
- package/tests/AppSync_Resolver_RetryingTest.res.mjs +66 -0
- package/tests/Auth_CognitoTest.res +203 -0
- package/tests/Auth_CognitoTest.res.mjs +248 -0
- package/tests/DcbEventLogStorage_DynamoDb_RuntimeTest.res +602 -0
- package/tests/DcbEventLogStorage_DynamoDb_RuntimeTest.res.mjs +742 -0
- package/tests/EventLogStorage_DynamoDb_RuntimeTest.res +57 -0
- package/tests/EventLogStorage_DynamoDb_RuntimeTest.res.mjs +68 -0
- package/tests/MCP_LambdaTest.res +101 -0
- package/tests/MCP_LambdaTest.res.mjs +56 -0
- package/tests/Util_HostUiDomainTest.res +90 -0
- package/tests/Util_HostUiDomainTest.res.mjs +50 -0
- package/tests/Util_SQS_RuntimeTest.res +46 -0
- package/tests/Util_SQS_RuntimeTest.res.mjs +45 -0
- package/tests/Util_StaticBundleTest.res +136 -0
- package/tests/Util_StaticBundleTest.res.mjs +149 -0
- package/tests/integration/DcbCommandTopicEntryPoint_IntegrationTest.res +101 -0
- package/tests/integration/DcbCommandTopicEntryPoint_IntegrationTest.res.mjs +91 -0
- package/tests/integration/DcbEventLogStorage_DynamoDb_IntegrationTest.res +315 -0
- package/tests/integration/DcbEventLogStorage_DynamoDb_IntegrationTest.res.mjs +435 -0
- package/tests/integration/DcbIntegrationHarness.res +102 -0
- package/tests/integration/DcbIntegrationHarness.res.mjs +163 -0
- package/tests/integration/EpTestSlice.res +28 -0
- package/tests/integration/EpTestSlice.res.mjs +43 -0
- package/tests/integration/EpTestSliceBehavior.res +18 -0
- package/tests/integration/EpTestSliceBehavior.res.mjs +35 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
function toString(service) {
|
|
5
|
+
switch (service) {
|
|
6
|
+
case "AppSync" :
|
|
7
|
+
return "aws:AppSync";
|
|
8
|
+
case "IAM" :
|
|
9
|
+
return "aws:IAM";
|
|
10
|
+
case "CloudwatchEventRule" :
|
|
11
|
+
return "aws:CloudwatchEventRule";
|
|
12
|
+
case "DynamoDb" :
|
|
13
|
+
return "aws:DynamoDb";
|
|
14
|
+
case "DynamoDbStream" :
|
|
15
|
+
return "aws:DynamoDbStream";
|
|
16
|
+
case "SQS" :
|
|
17
|
+
return "aws:SQS";
|
|
18
|
+
case "SQS_FIFO" :
|
|
19
|
+
return "aws:SQS_FIFO";
|
|
20
|
+
case "SNS" :
|
|
21
|
+
return "aws:SNS";
|
|
22
|
+
case "SNS_FIFO" :
|
|
23
|
+
return "aws:SNS_FIFO";
|
|
24
|
+
case "Kinesis" :
|
|
25
|
+
return "aws:Kinesis";
|
|
26
|
+
case "Lambda" :
|
|
27
|
+
return "aws:Lambda";
|
|
28
|
+
case "S3" :
|
|
29
|
+
return "aws:S3";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function toPrincipal(service) {
|
|
34
|
+
switch (service) {
|
|
35
|
+
case "AppSync" :
|
|
36
|
+
return "appsync.amazonaws.com";
|
|
37
|
+
case "IAM" :
|
|
38
|
+
return "iam.amazonaws.com";
|
|
39
|
+
case "CloudwatchEventRule" :
|
|
40
|
+
return "events.amazonaws.com";
|
|
41
|
+
case "DynamoDb" :
|
|
42
|
+
case "DynamoDbStream" :
|
|
43
|
+
return "dynamodb.amazonaws.com";
|
|
44
|
+
case "SQS" :
|
|
45
|
+
case "SQS_FIFO" :
|
|
46
|
+
return "sqs.amazonaws.com";
|
|
47
|
+
case "SNS" :
|
|
48
|
+
case "SNS_FIFO" :
|
|
49
|
+
return "sns.amazonaws.com";
|
|
50
|
+
case "Kinesis" :
|
|
51
|
+
return "kinesis.amazonaws.com";
|
|
52
|
+
case "Lambda" :
|
|
53
|
+
return "lambda.amazonaws.com";
|
|
54
|
+
case "S3" :
|
|
55
|
+
return "s3.amazonaws.com";
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let service = "aws:DynamoDb";
|
|
60
|
+
|
|
61
|
+
let principal = "dynamodb.amazonaws.com";
|
|
62
|
+
|
|
63
|
+
let DynamoDb = {
|
|
64
|
+
service: service,
|
|
65
|
+
principal: principal
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
let service$1 = "aws:DynamoDbStream";
|
|
69
|
+
|
|
70
|
+
let principal$1 = "dynamodb.amazonaws.com";
|
|
71
|
+
|
|
72
|
+
let DynamoDbStream = {
|
|
73
|
+
service: service$1,
|
|
74
|
+
principal: principal$1
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
let service$2 = "aws:Kinesis";
|
|
78
|
+
|
|
79
|
+
let principal$2 = "kinesis.amazonaws.com";
|
|
80
|
+
|
|
81
|
+
let Kinesis = {
|
|
82
|
+
service: service$2,
|
|
83
|
+
principal: principal$2
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
let service$3 = "aws:Lambda";
|
|
87
|
+
|
|
88
|
+
let principal$3 = "lambda.amazonaws.com";
|
|
89
|
+
|
|
90
|
+
let Lambda = {
|
|
91
|
+
service: service$3,
|
|
92
|
+
principal: principal$3
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
let service$4 = "aws:SNS";
|
|
96
|
+
|
|
97
|
+
let principal$4 = "sns.amazonaws.com";
|
|
98
|
+
|
|
99
|
+
let SNS = {
|
|
100
|
+
service: service$4,
|
|
101
|
+
principal: principal$4
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
let service$5 = "aws:SNS_FIFO";
|
|
105
|
+
|
|
106
|
+
let principal$5 = "sns.amazonaws.com";
|
|
107
|
+
|
|
108
|
+
let SNS_FIFO = {
|
|
109
|
+
service: service$5,
|
|
110
|
+
principal: principal$5
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
let service$6 = "aws:SQS";
|
|
114
|
+
|
|
115
|
+
let principal$6 = "sqs.amazonaws.com";
|
|
116
|
+
|
|
117
|
+
let SQS = {
|
|
118
|
+
service: service$6,
|
|
119
|
+
principal: principal$6
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
let service$7 = "aws:SQS_FIFO";
|
|
123
|
+
|
|
124
|
+
let principal$7 = "sqs.amazonaws.com";
|
|
125
|
+
|
|
126
|
+
let SQS_FIFO = {
|
|
127
|
+
service: service$7,
|
|
128
|
+
principal: principal$7
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
let service$8 = "aws:AppSync";
|
|
132
|
+
|
|
133
|
+
let principal$8 = "appsync.amazonaws.com";
|
|
134
|
+
|
|
135
|
+
let AppSync = {
|
|
136
|
+
service: service$8,
|
|
137
|
+
principal: principal$8
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
let service$9 = "aws:IAM";
|
|
141
|
+
|
|
142
|
+
let principal$9 = "iam.amazonaws.com";
|
|
143
|
+
|
|
144
|
+
let IAM = {
|
|
145
|
+
service: service$9,
|
|
146
|
+
principal: principal$9
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
let service$10 = "aws:CloudwatchEventRule";
|
|
150
|
+
|
|
151
|
+
let principal$10 = "events.amazonaws.com";
|
|
152
|
+
|
|
153
|
+
let CloudwatchEventRule = {
|
|
154
|
+
service: service$10,
|
|
155
|
+
principal: principal$10
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
let service$11 = "aws:S3";
|
|
159
|
+
|
|
160
|
+
let principal$11 = "s3.amazonaws.com";
|
|
161
|
+
|
|
162
|
+
let S3 = {
|
|
163
|
+
service: service$11,
|
|
164
|
+
principal: principal$11
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
let Tags;
|
|
168
|
+
|
|
169
|
+
export {
|
|
170
|
+
Tags,
|
|
171
|
+
toString,
|
|
172
|
+
toPrincipal,
|
|
173
|
+
DynamoDb,
|
|
174
|
+
DynamoDbStream,
|
|
175
|
+
Kinesis,
|
|
176
|
+
Lambda,
|
|
177
|
+
SNS,
|
|
178
|
+
SNS_FIFO,
|
|
179
|
+
SQS,
|
|
180
|
+
SQS_FIFO,
|
|
181
|
+
AppSync,
|
|
182
|
+
IAM,
|
|
183
|
+
CloudwatchEventRule,
|
|
184
|
+
S3,
|
|
185
|
+
}
|
|
186
|
+
/* No side effect */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
let make = (~name, componentType) => {
|
|
2
|
+
let plugin = Pulumi.Pulumi.getProjectName()
|
|
3
|
+
let kind = componentType->ReventlessCore.ComponentType.toString
|
|
4
|
+
[
|
|
5
|
+
("Name", name),
|
|
6
|
+
("Type", kind),
|
|
7
|
+
("Environment", Pulumi.Pulumi.getStackName()),
|
|
8
|
+
("Plugin", plugin),
|
|
9
|
+
("reventless:plugin", plugin),
|
|
10
|
+
("reventless:component", name),
|
|
11
|
+
("reventless:role", kind),
|
|
12
|
+
("reventless:kind", kind),
|
|
13
|
+
]
|
|
14
|
+
->Dict.fromArray
|
|
15
|
+
->Pulumi.Input.make
|
|
16
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Pulumi from "@pulumi/pulumi";
|
|
4
|
+
import * as ComponentType$ReventlessCore from "@reventlessdev/reventless-core/src/ComponentType.res.mjs";
|
|
5
|
+
|
|
6
|
+
function make(name, componentType) {
|
|
7
|
+
let plugin = Pulumi.getProject();
|
|
8
|
+
let kind = ComponentType$ReventlessCore.toString(componentType);
|
|
9
|
+
return Object.fromEntries([
|
|
10
|
+
[
|
|
11
|
+
"Name",
|
|
12
|
+
name
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"Type",
|
|
16
|
+
kind
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"Environment",
|
|
20
|
+
Pulumi.getStack()
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"Plugin",
|
|
24
|
+
plugin
|
|
25
|
+
],
|
|
26
|
+
[
|
|
27
|
+
"reventless:plugin",
|
|
28
|
+
plugin
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
"reventless:component",
|
|
32
|
+
name
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"reventless:role",
|
|
36
|
+
kind
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"reventless:kind",
|
|
40
|
+
kind
|
|
41
|
+
]
|
|
42
|
+
]);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
make,
|
|
47
|
+
}
|
|
48
|
+
/* @pulumi/pulumi Not a pure module */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
let dynamoDbStreamResources = eventTopicResources =>
|
|
2
|
+
eventTopicResources->ReventlessCore.Util.Adapter.filterSupportedResolvedResources([
|
|
3
|
+
AWS.DynamoDbStream.service,
|
|
4
|
+
])
|
|
5
|
+
let snsResources = resources =>
|
|
6
|
+
resources->ReventlessCore.Util.Adapter.filterSupportedResolvedResources([
|
|
7
|
+
AWS.SNS.service,
|
|
8
|
+
AWS.SNS_FIFO.service,
|
|
9
|
+
])
|
|
10
|
+
let sqsResources = resources =>
|
|
11
|
+
resources->ReventlessCore.Util.Adapter.filterSupportedResolvedResources([
|
|
12
|
+
AWS.SQS.service,
|
|
13
|
+
AWS.SQS_FIFO.service,
|
|
14
|
+
])
|
|
15
|
+
let dynamoDbResources = resources =>
|
|
16
|
+
resources->ReventlessCore.Util.Adapter.filterSupportedResolvedResources([
|
|
17
|
+
AWS.DynamoDb.service,
|
|
18
|
+
AWS.DynamoDbStream.service,
|
|
19
|
+
])
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as AWS$ReventlessAws from "./AWS.res.mjs";
|
|
4
|
+
import * as Util_Adapter$ReventlessCore from "@reventlessdev/reventless-core/src/util/Util_Adapter.res.mjs";
|
|
5
|
+
|
|
6
|
+
function dynamoDbStreamResources(eventTopicResources) {
|
|
7
|
+
return Util_Adapter$ReventlessCore.filterSupportedResolvedResources(eventTopicResources, [AWS$ReventlessAws.DynamoDbStream.service]);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function snsResources(resources) {
|
|
11
|
+
return Util_Adapter$ReventlessCore.filterSupportedResolvedResources(resources, [
|
|
12
|
+
AWS$ReventlessAws.SNS.service,
|
|
13
|
+
AWS$ReventlessAws.SNS_FIFO.service
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function sqsResources(resources) {
|
|
18
|
+
return Util_Adapter$ReventlessCore.filterSupportedResolvedResources(resources, [
|
|
19
|
+
AWS$ReventlessAws.SQS.service,
|
|
20
|
+
AWS$ReventlessAws.SQS_FIFO.service
|
|
21
|
+
]);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function dynamoDbResources(resources) {
|
|
25
|
+
return Util_Adapter$ReventlessCore.filterSupportedResolvedResources(resources, [
|
|
26
|
+
AWS$ReventlessAws.DynamoDb.service,
|
|
27
|
+
AWS$ReventlessAws.DynamoDbStream.service
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
dynamoDbStreamResources,
|
|
33
|
+
snsResources,
|
|
34
|
+
sqsResources,
|
|
35
|
+
dynamoDbResources,
|
|
36
|
+
}
|
|
37
|
+
/* Util_Adapter-ReventlessCore Not a pure module */
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/** AppSync_EventsApi — creates an IAM-authenticated AppSync Events (Pub/Sub) API
|
|
2
|
+
with a `default` channel namespace.
|
|
3
|
+
|
|
4
|
+
This is a companion to the AppSync GraphQL API. Sources A and B push
|
|
5
|
+
real-time events here; clients subscribe to channels such as
|
|
6
|
+
`/default/{topicRoot}/{entityKey}` — see `StateTopic_AppSync.res` for
|
|
7
|
+
channel layout.
|
|
8
|
+
|
|
9
|
+
Usage (in platform/plugin builder after the GraphQL API is created):
|
|
10
|
+
let eventsApi = AppSync_EventsApi.make(
|
|
11
|
+
~name="DomainEventsApi",
|
|
12
|
+
~cognitoUserPoolId,
|
|
13
|
+
~awsRegion,
|
|
14
|
+
~opts,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
Then pass `eventsApi` to:
|
|
18
|
+
StateTopic_AppSync.make(~eventsApi, ...)
|
|
19
|
+
EventLogSubscription_AppSync.make(~eventsApi, ...)
|
|
20
|
+
|
|
21
|
+
## Subscribe-time authorization (extension hook)
|
|
22
|
+
|
|
23
|
+
Downstream extensions (e.g. multi-tenancy) can gate WebSocket subscribes
|
|
24
|
+
by calling `registerSubscribeAuth` BEFORE platform construction:
|
|
25
|
+
|
|
26
|
+
AppSync_EventsApi.registerSubscribeAuth({
|
|
27
|
+
codeHandlers: "export function onSubscribe(ctx) { ... }",
|
|
28
|
+
dataSourceName: noneDs.name->Pulumi.Output.asInput,
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
The framework wires the namespace's `handlerConfigs.onSubscribe` to the
|
|
32
|
+
provided JS code; the extension is responsible for creating the AppSync
|
|
33
|
+
data source (typically NONE-typed) on the Events API. With no hook
|
|
34
|
+
installed, subscribe goes through the API-level auth modes only
|
|
35
|
+
(single-tenant open-core case).
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
module Api = PulumiAws.AwsNative.AppSync.Api
|
|
39
|
+
module ChannelNamespace = PulumiAws.AwsNative.AppSync.ChannelNamespace
|
|
40
|
+
|
|
41
|
+
/** Configuration for the namespace's `onSubscribe` handler. The framework
|
|
42
|
+
enforces this handler is called per subscribe attempt; the JS body decides
|
|
43
|
+
whether to allow or deny by calling `util.unauthorized()`. */
|
|
44
|
+
type subscribeAuthConfig = {
|
|
45
|
+
/** JS module body containing `export function onSubscribe(ctx) { ... }`.
|
|
46
|
+
Runs in AppSync's APPSYNC_JS runtime per subscribe attempt. */
|
|
47
|
+
codeHandlers: string,
|
|
48
|
+
/** Name of an AppSync data source on this Events API. Required by
|
|
49
|
+
CloudFormation even for `CODE` behavior — typically a NONE-typed data
|
|
50
|
+
source the extension creates separately. */
|
|
51
|
+
dataSourceName: Pulumi.Input.t<string>,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
let subscribeAuthRef: ref<option<subscribeAuthConfig>> = ref(None)
|
|
55
|
+
|
|
56
|
+
/** Install the subscribe-time auth handler. Call before platform
|
|
57
|
+
construction. Idempotent — calling twice keeps the most recent value. */
|
|
58
|
+
let registerSubscribeAuth = (config: subscribeAuthConfig) => {
|
|
59
|
+
subscribeAuthRef.contents = Some(config)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Clear any installed subscribe-auth handler (testing / hot-reload). */
|
|
63
|
+
let clearSubscribeAuth = () => {
|
|
64
|
+
subscribeAuthRef.contents = None
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
type t = {
|
|
68
|
+
/** Static Pulumi resource name (e.g. `"DomainEventsApi"`). Stable string for
|
|
69
|
+
keying per-API registries (see `StateTopic_AppSync.registry`). The
|
|
70
|
+
underlying `api.name` is `Pulumi.Output.t<string>` and unusable as a key. */
|
|
71
|
+
name: string,
|
|
72
|
+
/** Full AppSync Events API output — carry this through the stack. */
|
|
73
|
+
api: Api.t,
|
|
74
|
+
/** The `default` channel namespace created on the API. */
|
|
75
|
+
defaultNamespace: option<ChannelNamespace.t>,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Create an AppSync Events API with dual auth (Cognito + AWS_IAM) and a
|
|
79
|
+
`default` channel namespace.
|
|
80
|
+
|
|
81
|
+
`name` is the Pulumi resource name prefix (e.g. `"DomainEventsApi"`).
|
|
82
|
+
`cognitoUserPoolId` / `awsRegion` configure the Cognito User Pools auth
|
|
83
|
+
provider the browser host-shell connects/subscribes with.
|
|
84
|
+
`opts` should set `parent` to the platform component resource. */
|
|
85
|
+
let make = (
|
|
86
|
+
~name: string,
|
|
87
|
+
~cognitoUserPoolId: Pulumi.Input.t<string>,
|
|
88
|
+
~awsRegion: string,
|
|
89
|
+
~opts: Pulumi.CustomResourceOptions.t,
|
|
90
|
+
): t => {
|
|
91
|
+
let iamMode: Api.authMode = {authType: Api.awsIam->Pulumi.Input.make}
|
|
92
|
+
let iamProvider: Api.authProvider = {authType: Api.awsIam->Pulumi.Input.make}
|
|
93
|
+
|
|
94
|
+
// Cognito User Pools auth — the browser host-shell (LiveConnection /
|
|
95
|
+
// EventsClient) connects and subscribes over WebSocket with a Cognito
|
|
96
|
+
// IdToken bearer. Without a Cognito provider plus matching connection +
|
|
97
|
+
// subscribe auth modes, AppSync rejects the connection_init and the UI
|
|
98
|
+
// never receives live descriptors. Lambda publishers keep AWS_IAM (SigV4)
|
|
99
|
+
// on the publish path.
|
|
100
|
+
let cognitoMode: Api.authMode = {authType: Api.amazonCognitoUserPools->Pulumi.Input.make}
|
|
101
|
+
let cognitoProvider: Api.authProvider = {
|
|
102
|
+
authType: Api.amazonCognitoUserPools->Pulumi.Input.make,
|
|
103
|
+
cognitoConfig: (
|
|
104
|
+
{
|
|
105
|
+
awsRegion: awsRegion->Pulumi.Input.make,
|
|
106
|
+
userPoolId: cognitoUserPoolId,
|
|
107
|
+
}: Api.cognitoConfig
|
|
108
|
+
)->Pulumi.Input.make,
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
let api = Api.make(
|
|
112
|
+
~name,
|
|
113
|
+
~args={
|
|
114
|
+
eventConfig: (
|
|
115
|
+
{
|
|
116
|
+
authProviders: [
|
|
117
|
+
iamProvider->Pulumi.Input.make,
|
|
118
|
+
cognitoProvider->Pulumi.Input.make,
|
|
119
|
+
]->Pulumi.Input.make,
|
|
120
|
+
connectionAuthModes: [
|
|
121
|
+
cognitoMode->Pulumi.Input.make,
|
|
122
|
+
iamMode->Pulumi.Input.make,
|
|
123
|
+
]->Pulumi.Input.make,
|
|
124
|
+
// Publish stays IAM-only — only the SigV4-signed Lambda publishers
|
|
125
|
+
// push to channels; the browser never publishes.
|
|
126
|
+
defaultPublishAuthModes: [iamMode->Pulumi.Input.make]->Pulumi.Input.make,
|
|
127
|
+
defaultSubscribeAuthModes: [
|
|
128
|
+
cognitoMode->Pulumi.Input.make,
|
|
129
|
+
iamMode->Pulumi.Input.make,
|
|
130
|
+
]->Pulumi.Input.make,
|
|
131
|
+
}: Api.eventConfigArgs
|
|
132
|
+
)->Pulumi.Input.make,
|
|
133
|
+
},
|
|
134
|
+
~opts=Some(opts),
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
// The `default` namespace is required — channels are addressed as
|
|
138
|
+
// `/default/{topicRoot}/{entityKey}` in both Lambda publish calls and client
|
|
139
|
+
// subscriptions. If an extension has installed a subscribe-auth handler via
|
|
140
|
+
// `registerSubscribeAuth`, wire it as the namespace's `onSubscribe` handler.
|
|
141
|
+
let subscribeAuth = subscribeAuthRef.contents
|
|
142
|
+
let codeHandlersInput: option<Pulumi.Input.t<string>> =
|
|
143
|
+
subscribeAuth->Option.map(c => c.codeHandlers->Pulumi.Input.make)
|
|
144
|
+
let handlerConfigsInput: option<Pulumi.Input.t<ChannelNamespace.handlerConfigsArgs>> =
|
|
145
|
+
subscribeAuth->Option.map(c => {
|
|
146
|
+
ChannelNamespace.onSubscribe: {
|
|
147
|
+
ChannelNamespace.behavior: ChannelNamespace.handlerBehaviorCode->Pulumi.Input.make,
|
|
148
|
+
integration: {
|
|
149
|
+
ChannelNamespace.dataSourceName: c.dataSourceName,
|
|
150
|
+
}->Pulumi.Input.make,
|
|
151
|
+
}->Pulumi.Input.make,
|
|
152
|
+
}->Pulumi.Input.make)
|
|
153
|
+
let defaultNamespace = ChannelNamespace.make(
|
|
154
|
+
~name=name ++ "DefaultNS",
|
|
155
|
+
~args={
|
|
156
|
+
apiId: api.apiId->Pulumi.Output.asInput,
|
|
157
|
+
name: "default"->Pulumi.Input.make,
|
|
158
|
+
codeHandlers: ?codeHandlersInput,
|
|
159
|
+
handlerConfigs: ?handlerConfigsInput,
|
|
160
|
+
},
|
|
161
|
+
~opts=Some({...opts, parent: api->Pulumi.Resource.makeFromJs}),
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
{name, api, defaultNamespace: Some(defaultNamespace)}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** HTTP endpoint URL for use as Lambda `APPSYNC_ENDPOINT` env var.
|
|
168
|
+
Constructs `https://{dns.http}` from the raw domain name in the API output. */
|
|
169
|
+
let httpEndpoint = (eventsApi: t): Pulumi.Output.t<string> =>
|
|
170
|
+
eventsApi.api.dns->Pulumi.Output.apply(dns =>
|
|
171
|
+
"https://" ++ dns.http->Option.getOr("")
|
|
172
|
+
)
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
4
|
+
import * as AwsNative from "@pulumi/aws-native";
|
|
5
|
+
import * as AwsNative_AppSync_Api$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/AwsNative/AppSync/AwsNative_AppSync_Api.res.mjs";
|
|
6
|
+
import * as AwsNative_AppSync_ChannelNamespace$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/AwsNative/AppSync/AwsNative_AppSync_ChannelNamespace.res.mjs";
|
|
7
|
+
|
|
8
|
+
let subscribeAuthRef = {
|
|
9
|
+
contents: undefined
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
function registerSubscribeAuth(config) {
|
|
13
|
+
subscribeAuthRef.contents = config;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function clearSubscribeAuth() {
|
|
17
|
+
subscribeAuthRef.contents = undefined;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function make(name, cognitoUserPoolId, awsRegion, opts) {
|
|
21
|
+
let iamMode = {
|
|
22
|
+
authType: AwsNative_AppSync_Api$PulumiAws.awsIam
|
|
23
|
+
};
|
|
24
|
+
let iamProvider = {
|
|
25
|
+
authType: AwsNative_AppSync_Api$PulumiAws.awsIam
|
|
26
|
+
};
|
|
27
|
+
let cognitoMode = {
|
|
28
|
+
authType: AwsNative_AppSync_Api$PulumiAws.amazonCognitoUserPools
|
|
29
|
+
};
|
|
30
|
+
let cognitoProvider_cognitoConfig = {
|
|
31
|
+
awsRegion: awsRegion,
|
|
32
|
+
userPoolId: cognitoUserPoolId
|
|
33
|
+
};
|
|
34
|
+
let cognitoProvider = {
|
|
35
|
+
authType: AwsNative_AppSync_Api$PulumiAws.amazonCognitoUserPools,
|
|
36
|
+
cognitoConfig: cognitoProvider_cognitoConfig
|
|
37
|
+
};
|
|
38
|
+
let api = new (AwsNative.appsync.Api)(name, {
|
|
39
|
+
eventConfig: {
|
|
40
|
+
authProviders: [
|
|
41
|
+
iamProvider,
|
|
42
|
+
cognitoProvider
|
|
43
|
+
],
|
|
44
|
+
connectionAuthModes: [
|
|
45
|
+
cognitoMode,
|
|
46
|
+
iamMode
|
|
47
|
+
],
|
|
48
|
+
defaultPublishAuthModes: [iamMode],
|
|
49
|
+
defaultSubscribeAuthModes: [
|
|
50
|
+
cognitoMode,
|
|
51
|
+
iamMode
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}, opts);
|
|
55
|
+
let subscribeAuth = subscribeAuthRef.contents;
|
|
56
|
+
let codeHandlersInput = Stdlib_Option.map(subscribeAuth, c => c.codeHandlers);
|
|
57
|
+
let handlerConfigsInput = Stdlib_Option.map(subscribeAuth, c => ({
|
|
58
|
+
onSubscribe: {
|
|
59
|
+
behavior: AwsNative_AppSync_ChannelNamespace$PulumiAws.handlerBehaviorCode,
|
|
60
|
+
integration: {
|
|
61
|
+
dataSourceName: c.dataSourceName
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
65
|
+
let newrecord = {...opts};
|
|
66
|
+
let defaultNamespace = new (AwsNative.appsync.ChannelNamespace)(name + "DefaultNS", {
|
|
67
|
+
apiId: api.apiId,
|
|
68
|
+
name: "default",
|
|
69
|
+
codeHandlers: codeHandlersInput,
|
|
70
|
+
handlerConfigs: handlerConfigsInput
|
|
71
|
+
}, (newrecord.parent = api, newrecord));
|
|
72
|
+
return {
|
|
73
|
+
name: name,
|
|
74
|
+
api: api,
|
|
75
|
+
defaultNamespace: defaultNamespace
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function httpEndpoint(eventsApi) {
|
|
80
|
+
return eventsApi.api.dns.apply(dns => "https://" + Stdlib_Option.getOr(dns.http, ""));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
let Api;
|
|
84
|
+
|
|
85
|
+
let ChannelNamespace;
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
Api,
|
|
89
|
+
ChannelNamespace,
|
|
90
|
+
subscribeAuthRef,
|
|
91
|
+
registerSubscribeAuth,
|
|
92
|
+
clearSubscribeAuth,
|
|
93
|
+
make,
|
|
94
|
+
httpEndpoint,
|
|
95
|
+
}
|
|
96
|
+
/* @pulumi/aws-native Not a pure module */
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/** AppSync_Resolver_Native — drop-in replacement for
|
|
2
|
+
`PulumiAws.AppSync.Resolver` that uses `@pulumi/aws-native` (Cloud Control
|
|
3
|
+
API) so the CFN handler can internally wait out schema -> resolver
|
|
4
|
+
propagation. See docs/plans/appsync-resolver-aws-native.md. */
|
|
5
|
+
|
|
6
|
+
module Native = PulumiAws.AwsNative.AppSync.Resolver
|
|
7
|
+
module Functions = PulumiAws.AppSync.Resolver.Functions
|
|
8
|
+
|
|
9
|
+
type t = Native.t
|
|
10
|
+
|
|
11
|
+
let makeUnitJsResolver = (
|
|
12
|
+
~name,
|
|
13
|
+
~api: Pulumi.Output.t<PulumiAws.AppSync.GraphQLApi.t>,
|
|
14
|
+
~dataSourceName,
|
|
15
|
+
~type_,
|
|
16
|
+
~field,
|
|
17
|
+
~code,
|
|
18
|
+
~opts: option<Pulumi.CustomResourceOptions.t>=?,
|
|
19
|
+
) =>
|
|
20
|
+
Native.make(
|
|
21
|
+
~name,
|
|
22
|
+
~args={
|
|
23
|
+
apiId: api->Pulumi.Output.flatMap(a => a.id)->Pulumi.Output.asInput,
|
|
24
|
+
typeName: type_,
|
|
25
|
+
fieldName: field,
|
|
26
|
+
dataSourceName,
|
|
27
|
+
kind: "UNIT"->Pulumi.Input.make,
|
|
28
|
+
code,
|
|
29
|
+
runtime: Native.appsyncJs->Pulumi.Input.make,
|
|
30
|
+
},
|
|
31
|
+
~opts=opts,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
let makeSubscriptionResolverCode = (~filter: option<string>): string => {
|
|
35
|
+
let filterLine = switch filter {
|
|
36
|
+
| None => ""
|
|
37
|
+
| Some(f) => `\n ctx.extensions.setSubscriptionFilter(${f});`
|
|
38
|
+
}
|
|
39
|
+
`export function request(ctx) {${filterLine}
|
|
40
|
+
return { payload: null };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function response(ctx) {
|
|
44
|
+
return ctx.result;
|
|
45
|
+
}`
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
let makeSubscriptionResolver = (
|
|
49
|
+
~name,
|
|
50
|
+
~api: Pulumi.Output.t<PulumiAws.AppSync.GraphQLApi.t>,
|
|
51
|
+
~field,
|
|
52
|
+
~subscriptionFilter: option<string>=?,
|
|
53
|
+
~opts: option<Pulumi.CustomResourceOptions.t>=?,
|
|
54
|
+
) =>
|
|
55
|
+
Native.make(
|
|
56
|
+
~name,
|
|
57
|
+
~args={
|
|
58
|
+
apiId: api->Pulumi.Output.flatMap(a => a.id)->Pulumi.Output.asInput,
|
|
59
|
+
typeName: "Subscription"->Pulumi.Input.make,
|
|
60
|
+
fieldName: field->Pulumi.Input.make,
|
|
61
|
+
kind: "UNIT"->Pulumi.Input.make,
|
|
62
|
+
code: makeSubscriptionResolverCode(~filter=subscriptionFilter)->Pulumi.Input.make,
|
|
63
|
+
runtime: Native.appsyncJs->Pulumi.Input.make,
|
|
64
|
+
},
|
|
65
|
+
~opts=opts,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
let makePipelineJsResolver = (
|
|
69
|
+
~name,
|
|
70
|
+
~api: Pulumi.Output.t<PulumiAws.AppSync.GraphQLApi.t>,
|
|
71
|
+
~type_,
|
|
72
|
+
~field,
|
|
73
|
+
~code,
|
|
74
|
+
~functions: array<PulumiAws.AppSync.Function.t>,
|
|
75
|
+
~opts: option<Pulumi.CustomResourceOptions.t>=?,
|
|
76
|
+
) =>
|
|
77
|
+
Native.make(
|
|
78
|
+
~name,
|
|
79
|
+
~args={
|
|
80
|
+
apiId: api->Pulumi.Output.flatMap(a => a.id)->Pulumi.Output.asInput,
|
|
81
|
+
typeName: type_,
|
|
82
|
+
fieldName: field,
|
|
83
|
+
kind: "PIPELINE"->Pulumi.Input.make,
|
|
84
|
+
code,
|
|
85
|
+
runtime: Native.appsyncJs->Pulumi.Input.make,
|
|
86
|
+
pipelineConfig: (
|
|
87
|
+
{
|
|
88
|
+
functions: functions->Array.map(f => f.functionId->Pulumi.Output.asInput),
|
|
89
|
+
}: Native.pipelineConfig
|
|
90
|
+
)->Pulumi.Input.make,
|
|
91
|
+
},
|
|
92
|
+
~opts=opts,
|
|
93
|
+
)
|