@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,22 @@
|
|
|
1
|
+
module EventCollectorChannel = EventCollectorChannel.DynamoDbStream
|
|
2
|
+
module RuntimeEnvironment = RuntimeEnvironment.Lambda
|
|
3
|
+
module EventCollectorRuntimeBuilder = ReventlessCore.EventCollectorRuntime_Builder_PerEventCollector.Make(
|
|
4
|
+
RuntimeEnvironment,
|
|
5
|
+
EventCollectorChannel,
|
|
6
|
+
)
|
|
7
|
+
module TaskBucket = TaskBucket.S3
|
|
8
|
+
module TaskRuntimeBuilder = TaskRuntime_Builder_PerBucket
|
|
9
|
+
module SideEffectHandler = SideEffectHandler_PerSideEffectHandler
|
|
10
|
+
|
|
11
|
+
module Make = (Spec: ReventlessCore.Task.Spec): (
|
|
12
|
+
ReventlessCore.Task.T with module Spec = Spec
|
|
13
|
+
) =>
|
|
14
|
+
ReventlessCore.Task_Builder.Make(
|
|
15
|
+
Spec,
|
|
16
|
+
RuntimeEnvironment,
|
|
17
|
+
EventCollectorChannel,
|
|
18
|
+
EventCollectorRuntimeBuilder,
|
|
19
|
+
TaskRuntimeBuilder,
|
|
20
|
+
TaskBucket,
|
|
21
|
+
SideEffectHandler,
|
|
22
|
+
)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as TaskBucket_S3$ReventlessAws from "../adapter/Task/TaskBucket_S3.res.mjs";
|
|
4
|
+
import * as Task_Builder$ReventlessCore from "@reventlessdev/reventless-core/src/components/Task/Task_Builder.res.mjs";
|
|
5
|
+
import * as RuntimeEnvironment_Lambda$ReventlessAws from "../adapter/Runtime/RuntimeEnvironment_Lambda.res.mjs";
|
|
6
|
+
import * as TaskRuntime_Builder_PerBucket$ReventlessAws from "../adapter/Runtime/TaskRuntime_Builder_PerBucket.res.mjs";
|
|
7
|
+
import * as EventCollectorChannel_DynamoDbStream$ReventlessAws from "../adapter/EventCollector/EventCollectorChannel_DynamoDbStream.res.mjs";
|
|
8
|
+
import * as SideEffectHandler_PerSideEffectHandler$ReventlessAws from "./SideEffectHandler_PerSideEffectHandler.res.mjs";
|
|
9
|
+
import * as EventCollectorRuntime_Builder_PerEventCollector$ReventlessCore from "@reventlessdev/reventless-core/src/adapter/Runtime/EventCollectorRuntime_Builder_PerEventCollector.res.mjs";
|
|
10
|
+
|
|
11
|
+
let EventCollectorRuntimeBuilder = EventCollectorRuntime_Builder_PerEventCollector$ReventlessCore.Make({
|
|
12
|
+
make: RuntimeEnvironment_Lambda$ReventlessAws.make,
|
|
13
|
+
groupBySource: RuntimeEnvironment_Lambda$ReventlessAws.groupBySource,
|
|
14
|
+
extractCorrelationId: RuntimeEnvironment_Lambda$ReventlessAws.extractCorrelationId,
|
|
15
|
+
asEventHandler: prim => prim,
|
|
16
|
+
asEffectHandler: prim => prim
|
|
17
|
+
})({
|
|
18
|
+
make: EventCollectorChannel_DynamoDbStream$ReventlessAws.make,
|
|
19
|
+
connect: EventCollectorChannel_DynamoDbStream$ReventlessAws.connect
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
function Make(Spec) {
|
|
23
|
+
return Task_Builder$ReventlessCore.Make(Spec)({
|
|
24
|
+
make: RuntimeEnvironment_Lambda$ReventlessAws.make,
|
|
25
|
+
groupBySource: RuntimeEnvironment_Lambda$ReventlessAws.groupBySource,
|
|
26
|
+
extractCorrelationId: RuntimeEnvironment_Lambda$ReventlessAws.extractCorrelationId,
|
|
27
|
+
asEventHandler: prim => prim,
|
|
28
|
+
asEffectHandler: prim => prim
|
|
29
|
+
})({
|
|
30
|
+
make: EventCollectorChannel_DynamoDbStream$ReventlessAws.make,
|
|
31
|
+
connect: EventCollectorChannel_DynamoDbStream$ReventlessAws.connect
|
|
32
|
+
})(EventCollectorRuntimeBuilder)({
|
|
33
|
+
forBucketCallback: TaskRuntime_Builder_PerBucket$ReventlessAws.forBucketCallback,
|
|
34
|
+
finish: TaskRuntime_Builder_PerBucket$ReventlessAws.finish
|
|
35
|
+
})({
|
|
36
|
+
connect: TaskBucket_S3$ReventlessAws.connect,
|
|
37
|
+
makeHandler: TaskBucket_S3$ReventlessAws.makeHandler,
|
|
38
|
+
make: TaskBucket_S3$ReventlessAws.make
|
|
39
|
+
})({
|
|
40
|
+
make: SideEffectHandler_PerSideEffectHandler$ReventlessAws.make
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
let EventCollectorChannel;
|
|
45
|
+
|
|
46
|
+
let RuntimeEnvironment;
|
|
47
|
+
|
|
48
|
+
let TaskBucket;
|
|
49
|
+
|
|
50
|
+
let TaskRuntimeBuilder;
|
|
51
|
+
|
|
52
|
+
let SideEffectHandler;
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
EventCollectorChannel,
|
|
56
|
+
RuntimeEnvironment,
|
|
57
|
+
EventCollectorRuntimeBuilder,
|
|
58
|
+
TaskBucket,
|
|
59
|
+
TaskRuntimeBuilder,
|
|
60
|
+
SideEffectHandler,
|
|
61
|
+
Make,
|
|
62
|
+
}
|
|
63
|
+
/* EventCollectorRuntimeBuilder Not a pure module */
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
let componentType = ReventlessCore.ComponentType.Vpc
|
|
2
|
+
open PulumiAws.EC2
|
|
3
|
+
|
|
4
|
+
type outputs = {
|
|
5
|
+
dynamoDbEndpoint: VpcEndpoint.t,
|
|
6
|
+
eip: Eip.t,
|
|
7
|
+
internetGateway: InternetGateway.t,
|
|
8
|
+
natGateway: NatGateway.t,
|
|
9
|
+
privateSubnet: Subnet.t,
|
|
10
|
+
privateSubnetRouteTable: RouteTable.t,
|
|
11
|
+
privateSubnetRouteTableAssociation: RouteTableAssociation.t,
|
|
12
|
+
publicSubnet: Subnet.t,
|
|
13
|
+
publicSubnetRouteTable: RouteTable.t,
|
|
14
|
+
publicSubnetRouteTableAssociation: RouteTableAssociation.t,
|
|
15
|
+
s3Endpoint: VpcEndpoint.t,
|
|
16
|
+
securityGroup: SecurityGroup.t,
|
|
17
|
+
vpc: PulumiAws.EC2.Vpc.t,
|
|
18
|
+
}
|
|
19
|
+
type t = outputs
|
|
20
|
+
|
|
21
|
+
type name = string
|
|
22
|
+
type constructed
|
|
23
|
+
type construct = (t, name, option<PulumiAws.Aws.AvailabilityZone.t>) => constructed
|
|
24
|
+
|
|
25
|
+
@module("./Component") @new
|
|
26
|
+
external make: (
|
|
27
|
+
~componentType: string,
|
|
28
|
+
~name: string,
|
|
29
|
+
~construct: construct,
|
|
30
|
+
~opts: option<Pulumi.ComponentResource.options>,
|
|
31
|
+
~availabilityZone: option<PulumiAws.Aws.AvailabilityZone.t>,
|
|
32
|
+
) => t = "default"
|
|
33
|
+
|
|
34
|
+
@send
|
|
35
|
+
external registerOutputs: (t, outputs) => constructed = "registerOutputs"
|
|
36
|
+
@send external setOutputs: (t, outputs) => unit = "setOutputs"
|
|
37
|
+
let setOutputs = (outputs, self) => {
|
|
38
|
+
self->setOutputs(outputs)
|
|
39
|
+
self->registerOutputs(outputs)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let construct: construct = (self, name, availabilityZone) => {
|
|
43
|
+
let opts = {Pulumi.CustomResourceOptions.parent: self->Pulumi.Resource.makeFromJs}
|
|
44
|
+
|
|
45
|
+
let vpc = PulumiAws.EC2.Vpc.make(
|
|
46
|
+
~name=name ++ "VPC",
|
|
47
|
+
~args={cidrBlock: "172.31.0.0/16", enableDnsHostnames: true},
|
|
48
|
+
~opts,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
let securityGroup = SecurityGroup.make(
|
|
52
|
+
~name=name ++ "SecurityGroup",
|
|
53
|
+
~args={
|
|
54
|
+
open SecurityGroup
|
|
55
|
+
{
|
|
56
|
+
name: name ++ "SecurityGroup",
|
|
57
|
+
vpcId: vpc.id->Pulumi.Output.asInput,
|
|
58
|
+
ingress: [Ingress.allowAll],
|
|
59
|
+
egress: [Egress.allowAll],
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
~opts,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
let publicSubnet = Subnet.make(
|
|
66
|
+
~name=name ++ "PublicSubnet",
|
|
67
|
+
~args={
|
|
68
|
+
cidrBlock: "172.31.0.0/17",
|
|
69
|
+
vpcId: vpc.id->Pulumi.Output.asInput,
|
|
70
|
+
?availabilityZone,
|
|
71
|
+
},
|
|
72
|
+
~opts,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
let privateSubnet = Subnet.make(
|
|
76
|
+
~name=name ++ "PrivateSubnet",
|
|
77
|
+
~args={
|
|
78
|
+
cidrBlock: "172.31.128.0/17",
|
|
79
|
+
vpcId: vpc.id->Pulumi.Output.asInput,
|
|
80
|
+
?availabilityZone,
|
|
81
|
+
},
|
|
82
|
+
~opts,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
let internetGateway = InternetGateway.make(
|
|
86
|
+
~name=name ++ "InternetGateway",
|
|
87
|
+
~args={vpcId: vpc.id->Pulumi.Output.asInput},
|
|
88
|
+
~opts,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
let eip = Eip.make(
|
|
92
|
+
~name=name ++ "Eip",
|
|
93
|
+
~args={vpc: true},
|
|
94
|
+
~opts={
|
|
95
|
+
parent: self->Pulumi.Resource.makeFromJs,
|
|
96
|
+
dependsOn: [internetGateway->Pulumi.Resource.makeFromJs]->Pulumi.Input.make,
|
|
97
|
+
},
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
let natGateway = NatGateway.make(
|
|
101
|
+
~name=name ++ "NatGateway",
|
|
102
|
+
~args={
|
|
103
|
+
allocationId: eip.id->Pulumi.Output.asInput,
|
|
104
|
+
subnetId: publicSubnet.id->Pulumi.Output.asInput,
|
|
105
|
+
},
|
|
106
|
+
~opts={
|
|
107
|
+
parent: self->Pulumi.Resource.makeFromJs,
|
|
108
|
+
dependsOn: [internetGateway->Pulumi.Resource.makeFromJs]->Pulumi.Input.make,
|
|
109
|
+
},
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
let publicSubnetRouteTable = RouteTable.make(
|
|
113
|
+
~name=name ++ "PublicSubnetRouteTable",
|
|
114
|
+
~args={
|
|
115
|
+
vpcId: vpc.id->Pulumi.Output.asInput,
|
|
116
|
+
routes: [
|
|
117
|
+
RouteTable.Route.makeInternetGatewayRoute(
|
|
118
|
+
~cidrBlock="0.0.0.0/0",
|
|
119
|
+
~gatewayId=internetGateway.id->Pulumi.Output.asInput,
|
|
120
|
+
),
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
~opts,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
let privateSubnetRouteTable = RouteTable.make(
|
|
127
|
+
~name=name ++ "PrivateSubnetRouteTable",
|
|
128
|
+
~args={
|
|
129
|
+
vpcId: vpc.id->Pulumi.Output.asInput,
|
|
130
|
+
routes: [
|
|
131
|
+
RouteTable.Route.makeNatGatewayRoute(
|
|
132
|
+
~cidrBlock="0.0.0.0/0",
|
|
133
|
+
~natGatewayId=natGateway.id->Pulumi.Output.asInput,
|
|
134
|
+
),
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
~opts,
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
let publicSubnetRouteTableAssociation = RouteTableAssociation.make(
|
|
141
|
+
~name=name ++ "PublicSubnetRouteTableAssociation",
|
|
142
|
+
~args={
|
|
143
|
+
routeTableId: publicSubnetRouteTable.id->Pulumi.Output.asInput,
|
|
144
|
+
subnetId: publicSubnet.id->Pulumi.Output.asInput,
|
|
145
|
+
},
|
|
146
|
+
~opts,
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
let privateSubnetRouteTableAssociation = RouteTableAssociation.make(
|
|
150
|
+
~name=name ++ "PrivateSubnetRouteTableAssociation",
|
|
151
|
+
~args={
|
|
152
|
+
routeTableId: privateSubnetRouteTable.id->Pulumi.Output.asInput,
|
|
153
|
+
subnetId: privateSubnet.id->Pulumi.Output.asInput,
|
|
154
|
+
},
|
|
155
|
+
~opts,
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
let region = PulumiAws.Aws.getRegion()
|
|
159
|
+
let service = async serviceName => `com.amazonaws.${(await region).name}.${serviceName}`
|
|
160
|
+
|
|
161
|
+
let routeTableIds = [
|
|
162
|
+
publicSubnetRouteTable.id->Pulumi.Output.asInput,
|
|
163
|
+
privateSubnetRouteTable.id->Pulumi.Output.asInput,
|
|
164
|
+
]
|
|
165
|
+
|
|
166
|
+
let s3Endpoint = VpcEndpoint.make(
|
|
167
|
+
~name=name ++ "S3Endpoint",
|
|
168
|
+
~args={
|
|
169
|
+
serviceName: service("s3")->Pulumi.Input.ofPromise,
|
|
170
|
+
vpcId: vpc.id->Pulumi.Output.asInput,
|
|
171
|
+
routeTableIds,
|
|
172
|
+
},
|
|
173
|
+
~opts,
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
let dynamoDbEndpoint = VpcEndpoint.make(
|
|
177
|
+
~name=name ++ "DynamoDbEndpoint",
|
|
178
|
+
~args={
|
|
179
|
+
serviceName: service("dynamodb")->Pulumi.Input.ofPromise,
|
|
180
|
+
vpcId: vpc.id->Pulumi.Output.asInput,
|
|
181
|
+
routeTableIds,
|
|
182
|
+
},
|
|
183
|
+
~opts,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
self->setOutputs({
|
|
187
|
+
dynamoDbEndpoint,
|
|
188
|
+
eip,
|
|
189
|
+
internetGateway,
|
|
190
|
+
natGateway,
|
|
191
|
+
privateSubnet,
|
|
192
|
+
privateSubnetRouteTable,
|
|
193
|
+
privateSubnetRouteTableAssociation,
|
|
194
|
+
publicSubnet,
|
|
195
|
+
publicSubnetRouteTable,
|
|
196
|
+
publicSubnetRouteTableAssociation,
|
|
197
|
+
s3Endpoint,
|
|
198
|
+
securityGroup,
|
|
199
|
+
vpc,
|
|
200
|
+
})
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
let make: (
|
|
204
|
+
~name: string,
|
|
205
|
+
~availabilityZone: PulumiAws.Aws.AvailabilityZone.t=?,
|
|
206
|
+
~opts: Pulumi.ComponentResource.options=?,
|
|
207
|
+
) => t = (~name, ~availabilityZone=?, ~opts=?) =>
|
|
208
|
+
make(
|
|
209
|
+
~componentType=componentType->ReventlessCore.ComponentType.toString,
|
|
210
|
+
~name=name->ReventlessCore.ComponentType.name(componentType),
|
|
211
|
+
~construct,
|
|
212
|
+
~opts,
|
|
213
|
+
~availabilityZone,
|
|
214
|
+
)
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import Component from "./Component";
|
|
4
|
+
import * as Aws from "@pulumi/aws";
|
|
5
|
+
import * as EC2_Eip$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/EC2/EC2_Eip.res.mjs";
|
|
6
|
+
import * as EC2_Vpc$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/EC2/EC2_Vpc.res.mjs";
|
|
7
|
+
import * as EC2_Subnet$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/EC2/EC2_Subnet.res.mjs";
|
|
8
|
+
import * as EC2_NatGateway$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/EC2/EC2_NatGateway.res.mjs";
|
|
9
|
+
import * as EC2_RouteTable$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/EC2/EC2_RouteTable.res.mjs";
|
|
10
|
+
import * as EC2_VpcEndpoint$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/EC2/EC2_VpcEndpoint.res.mjs";
|
|
11
|
+
import * as EC2_SecurityGroup$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/EC2/EC2_SecurityGroup.res.mjs";
|
|
12
|
+
import * as ComponentType$ReventlessCore from "@reventlessdev/reventless-core/src/ComponentType.res.mjs";
|
|
13
|
+
import * as EC2_InternetGateway$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/EC2/EC2_InternetGateway.res.mjs";
|
|
14
|
+
import * as EC2_RouteTableAssociation$PulumiAws from "@reventlessdev/rescript-pulumi-aws/src/EC2/EC2_RouteTableAssociation.res.mjs";
|
|
15
|
+
|
|
16
|
+
function construct(self, name, availabilityZone) {
|
|
17
|
+
let opts_parent = self;
|
|
18
|
+
let opts = {
|
|
19
|
+
parent: opts_parent
|
|
20
|
+
};
|
|
21
|
+
let vpc = EC2_Vpc$PulumiAws.make(name + "VPC", {
|
|
22
|
+
cidrBlock: "172.31.0.0/16",
|
|
23
|
+
enableDnsHostnames: true
|
|
24
|
+
}, opts);
|
|
25
|
+
let securityGroup = EC2_SecurityGroup$PulumiAws.make(name + "SecurityGroup", {
|
|
26
|
+
name: name + "SecurityGroup",
|
|
27
|
+
vpcId: vpc.id,
|
|
28
|
+
ingress: [EC2_SecurityGroup$PulumiAws.Ingress.allowAll],
|
|
29
|
+
egress: [EC2_SecurityGroup$PulumiAws.Egress.allowAll]
|
|
30
|
+
}, opts);
|
|
31
|
+
let publicSubnet = EC2_Subnet$PulumiAws.make(name + "PublicSubnet", {
|
|
32
|
+
cidrBlock: "172.31.0.0/17",
|
|
33
|
+
vpcId: vpc.id,
|
|
34
|
+
availabilityZone: availabilityZone
|
|
35
|
+
}, opts);
|
|
36
|
+
let privateSubnet = EC2_Subnet$PulumiAws.make(name + "PrivateSubnet", {
|
|
37
|
+
cidrBlock: "172.31.128.0/17",
|
|
38
|
+
vpcId: vpc.id,
|
|
39
|
+
availabilityZone: availabilityZone
|
|
40
|
+
}, opts);
|
|
41
|
+
let internetGateway = EC2_InternetGateway$PulumiAws.make(name + "InternetGateway", {
|
|
42
|
+
vpcId: vpc.id
|
|
43
|
+
}, opts);
|
|
44
|
+
let eip = EC2_Eip$PulumiAws.make(name + "Eip", {
|
|
45
|
+
vpc: true
|
|
46
|
+
}, {
|
|
47
|
+
dependsOn: [internetGateway],
|
|
48
|
+
parent: self
|
|
49
|
+
});
|
|
50
|
+
let natGateway = EC2_NatGateway$PulumiAws.make(name + "NatGateway", {
|
|
51
|
+
allocationId: eip.id,
|
|
52
|
+
subnetId: publicSubnet.id
|
|
53
|
+
}, {
|
|
54
|
+
dependsOn: [internetGateway],
|
|
55
|
+
parent: self
|
|
56
|
+
});
|
|
57
|
+
let publicSubnetRouteTable = EC2_RouteTable$PulumiAws.make(name + "PublicSubnetRouteTable", {
|
|
58
|
+
vpcId: vpc.id,
|
|
59
|
+
routes: [EC2_RouteTable$PulumiAws.Route.makeInternetGatewayRoute("0.0.0.0/0", internetGateway.id)]
|
|
60
|
+
}, opts);
|
|
61
|
+
let privateSubnetRouteTable = EC2_RouteTable$PulumiAws.make(name + "PrivateSubnetRouteTable", {
|
|
62
|
+
vpcId: vpc.id,
|
|
63
|
+
routes: [EC2_RouteTable$PulumiAws.Route.makeNatGatewayRoute("0.0.0.0/0", natGateway.id)]
|
|
64
|
+
}, opts);
|
|
65
|
+
let publicSubnetRouteTableAssociation = EC2_RouteTableAssociation$PulumiAws.make(name + "PublicSubnetRouteTableAssociation", {
|
|
66
|
+
routeTableId: publicSubnetRouteTable.id,
|
|
67
|
+
subnetId: publicSubnet.id
|
|
68
|
+
}, opts);
|
|
69
|
+
let privateSubnetRouteTableAssociation = EC2_RouteTableAssociation$PulumiAws.make(name + "PrivateSubnetRouteTableAssociation", {
|
|
70
|
+
routeTableId: privateSubnetRouteTable.id,
|
|
71
|
+
subnetId: privateSubnet.id
|
|
72
|
+
}, opts);
|
|
73
|
+
let region = Aws.getRegion();
|
|
74
|
+
let service = async serviceName => `com.amazonaws.` + (await region).name + `.` + serviceName;
|
|
75
|
+
let routeTableIds = [
|
|
76
|
+
publicSubnetRouteTable.id,
|
|
77
|
+
privateSubnetRouteTable.id
|
|
78
|
+
];
|
|
79
|
+
let s3Endpoint = EC2_VpcEndpoint$PulumiAws.make(name + "S3Endpoint", {
|
|
80
|
+
routeTableIds: routeTableIds,
|
|
81
|
+
serviceName: service("s3"),
|
|
82
|
+
vpcId: vpc.id
|
|
83
|
+
}, opts);
|
|
84
|
+
let dynamoDbEndpoint = EC2_VpcEndpoint$PulumiAws.make(name + "DynamoDbEndpoint", {
|
|
85
|
+
routeTableIds: routeTableIds,
|
|
86
|
+
serviceName: service("dynamodb"),
|
|
87
|
+
vpcId: vpc.id
|
|
88
|
+
}, opts);
|
|
89
|
+
let self$1 = {
|
|
90
|
+
dynamoDbEndpoint: dynamoDbEndpoint,
|
|
91
|
+
eip: eip,
|
|
92
|
+
internetGateway: internetGateway,
|
|
93
|
+
natGateway: natGateway,
|
|
94
|
+
privateSubnet: privateSubnet,
|
|
95
|
+
privateSubnetRouteTable: privateSubnetRouteTable,
|
|
96
|
+
privateSubnetRouteTableAssociation: privateSubnetRouteTableAssociation,
|
|
97
|
+
publicSubnet: publicSubnet,
|
|
98
|
+
publicSubnetRouteTable: publicSubnetRouteTable,
|
|
99
|
+
publicSubnetRouteTableAssociation: publicSubnetRouteTableAssociation,
|
|
100
|
+
s3Endpoint: s3Endpoint,
|
|
101
|
+
securityGroup: securityGroup,
|
|
102
|
+
vpc: vpc
|
|
103
|
+
};
|
|
104
|
+
self$1.setOutputs(self);
|
|
105
|
+
return self$1.registerOutputs(self);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function make(name, availabilityZone, opts) {
|
|
109
|
+
let prim0 = ComponentType$ReventlessCore.toString("Vpc");
|
|
110
|
+
let prim1 = ComponentType$ReventlessCore.name(name, "Vpc");
|
|
111
|
+
return new Component(prim0, prim1, construct, opts, availabilityZone);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export {
|
|
115
|
+
make,
|
|
116
|
+
}
|
|
117
|
+
/* ./Component Not a pure module */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type outputs = {
|
|
2
|
+
dynamoDbEndpoint: PulumiAws.EC2.VpcEndpoint.t,
|
|
3
|
+
eip: PulumiAws.EC2.Eip.t,
|
|
4
|
+
internetGateway: PulumiAws.EC2.InternetGateway.t,
|
|
5
|
+
natGateway: PulumiAws.EC2.NatGateway.t,
|
|
6
|
+
privateSubnet: PulumiAws.EC2.Subnet.t,
|
|
7
|
+
privateSubnetRouteTable: PulumiAws.EC2.RouteTable.t,
|
|
8
|
+
privateSubnetRouteTableAssociation: PulumiAws.EC2.RouteTableAssociation.t,
|
|
9
|
+
publicSubnet: PulumiAws.EC2.Subnet.t,
|
|
10
|
+
publicSubnetRouteTable: PulumiAws.EC2.RouteTable.t,
|
|
11
|
+
publicSubnetRouteTableAssociation: PulumiAws.EC2.RouteTableAssociation.t,
|
|
12
|
+
s3Endpoint: PulumiAws.EC2.VpcEndpoint.t,
|
|
13
|
+
securityGroup: PulumiAws.EC2.SecurityGroup.t,
|
|
14
|
+
vpc: PulumiAws.EC2.Vpc.t,
|
|
15
|
+
}
|
|
16
|
+
type t = outputs
|
|
17
|
+
|
|
18
|
+
let make: (
|
|
19
|
+
~name: string,
|
|
20
|
+
~availabilityZone: PulumiAws.Aws.AvailabilityZone.t=?,
|
|
21
|
+
~opts: Pulumi.ComponentResource.options=?,
|
|
22
|
+
) => t
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
type t =
|
|
2
|
+
| Transient(string)
|
|
3
|
+
| Permanent(string)
|
|
4
|
+
|
|
5
|
+
let isTransient = err =>
|
|
6
|
+
switch err {
|
|
7
|
+
| Transient(_) => true
|
|
8
|
+
| Permanent(_) => false
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let classify = (err: unknown): t => {
|
|
12
|
+
let msg = ReventlessCore.Util.Error.messageFromUnknown(err, "AppSync error")
|
|
13
|
+
if (
|
|
14
|
+
msg->String.includes("ConcurrentModificationException") ||
|
|
15
|
+
msg->String.includes("Schema is currently being altered") ||
|
|
16
|
+
msg->String.includes("ThrottlingException") ||
|
|
17
|
+
msg->String.includes("TooManyRequestsException") ||
|
|
18
|
+
msg->String.includes("ServiceUnavailable") ||
|
|
19
|
+
msg->String.includes("InternalFailureException")
|
|
20
|
+
) {
|
|
21
|
+
Transient(msg)
|
|
22
|
+
} else {
|
|
23
|
+
Permanent(msg)
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let message = err =>
|
|
28
|
+
switch err {
|
|
29
|
+
| Transient(msg) | Permanent(msg) => msg
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
let retrySchedule: Schedule.t<(Duration.t, int), t, unit> =
|
|
33
|
+
Schedule.exponential(Duration.millis(2000))
|
|
34
|
+
->Schedule.jittered
|
|
35
|
+
->Schedule.intersect(Schedule.recurs(6))
|
|
36
|
+
->Schedule.whileInput(isTransient)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Duration from "effect/Duration";
|
|
4
|
+
import * as Schedule from "effect/Schedule";
|
|
5
|
+
import * as Util_Error$ReventlessCore from "@reventlessdev/reventless-core/src/util/Util_Error.res.mjs";
|
|
6
|
+
|
|
7
|
+
function isTransient(err) {
|
|
8
|
+
return err.TAG === "Transient";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function classify(err) {
|
|
12
|
+
let msg = Util_Error$ReventlessCore.messageFromUnknown(err, "AppSync error");
|
|
13
|
+
if (msg.includes("ConcurrentModificationException") || msg.includes("Schema is currently being altered") || msg.includes("ThrottlingException") || msg.includes("TooManyRequestsException") || msg.includes("ServiceUnavailable") || msg.includes("InternalFailureException")) {
|
|
14
|
+
return {
|
|
15
|
+
TAG: "Transient",
|
|
16
|
+
_0: msg
|
|
17
|
+
};
|
|
18
|
+
} else {
|
|
19
|
+
return {
|
|
20
|
+
TAG: "Permanent",
|
|
21
|
+
_0: msg
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function message(err) {
|
|
27
|
+
return err._0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
let retrySchedule = Schedule.whileInput(Schedule.intersect(Schedule.jittered(Schedule.exponential(Duration.millis(2000))), Schedule.recurs(6)), isTransient);
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
isTransient,
|
|
34
|
+
classify,
|
|
35
|
+
message,
|
|
36
|
+
retrySchedule,
|
|
37
|
+
}
|
|
38
|
+
/* retrySchedule Not a pure module */
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
type t =
|
|
2
|
+
| Transient(string)
|
|
3
|
+
| Permanent(string)
|
|
4
|
+
|
|
5
|
+
let isTransient = err =>
|
|
6
|
+
switch err {
|
|
7
|
+
| Transient(_) => true
|
|
8
|
+
| Permanent(_) => false
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let classify = (err: unknown): t => {
|
|
12
|
+
let msg = ReventlessCore.Util.Error.messageFromUnknown(err, "Cognito error")
|
|
13
|
+
if (
|
|
14
|
+
msg->String.includes("ThrottlingException") ||
|
|
15
|
+
msg->String.includes("TooManyRequestsException") ||
|
|
16
|
+
msg->String.includes("ServiceUnavailable") ||
|
|
17
|
+
msg->String.includes("InternalErrorException") ||
|
|
18
|
+
msg->String.includes("InternalServerError") ||
|
|
19
|
+
msg->String.includes("RequestLimitExceeded")
|
|
20
|
+
) {
|
|
21
|
+
Transient(msg)
|
|
22
|
+
} else {
|
|
23
|
+
Permanent(msg)
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let message = err =>
|
|
28
|
+
switch err {
|
|
29
|
+
| Transient(msg) | Permanent(msg) => msg
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
let retrySchedule: Schedule.t<(Duration.t, int), t, unit> =
|
|
33
|
+
Schedule.exponential(Duration.millis(1000))
|
|
34
|
+
->Schedule.jittered
|
|
35
|
+
->Schedule.intersect(Schedule.recurs(5))
|
|
36
|
+
->Schedule.whileInput(isTransient)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Duration from "effect/Duration";
|
|
4
|
+
import * as Schedule from "effect/Schedule";
|
|
5
|
+
import * as Util_Error$ReventlessCore from "@reventlessdev/reventless-core/src/util/Util_Error.res.mjs";
|
|
6
|
+
|
|
7
|
+
function isTransient(err) {
|
|
8
|
+
return err.TAG === "Transient";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function classify(err) {
|
|
12
|
+
let msg = Util_Error$ReventlessCore.messageFromUnknown(err, "Cognito error");
|
|
13
|
+
if (msg.includes("ThrottlingException") || msg.includes("TooManyRequestsException") || msg.includes("ServiceUnavailable") || msg.includes("InternalErrorException") || msg.includes("InternalServerError") || msg.includes("RequestLimitExceeded")) {
|
|
14
|
+
return {
|
|
15
|
+
TAG: "Transient",
|
|
16
|
+
_0: msg
|
|
17
|
+
};
|
|
18
|
+
} else {
|
|
19
|
+
return {
|
|
20
|
+
TAG: "Permanent",
|
|
21
|
+
_0: msg
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function message(err) {
|
|
27
|
+
return err._0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
let retrySchedule = Schedule.whileInput(Schedule.intersect(Schedule.jittered(Schedule.exponential(Duration.millis(1000))), Schedule.recurs(5)), isTransient);
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
isTransient,
|
|
34
|
+
classify,
|
|
35
|
+
message,
|
|
36
|
+
retrySchedule,
|
|
37
|
+
}
|
|
38
|
+
/* retrySchedule Not a pure module */
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
open AwsSdk.DynamoDb.DocumentClient
|
|
2
|
+
|
|
3
|
+
type t =
|
|
4
|
+
| Transient(string)
|
|
5
|
+
| StaleState(string)
|
|
6
|
+
| Permanent(string)
|
|
7
|
+
|
|
8
|
+
let isTransient = err =>
|
|
9
|
+
switch err {
|
|
10
|
+
| Transient(_) => true
|
|
11
|
+
| StaleState(_) | Permanent(_) => false
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Shape for TransactWriteItems failures. AWS surfaces a top-level
|
|
15
|
+
// `TransactionCanceledException` whose `CancellationReasons` array carries
|
|
16
|
+
// per-item codes — `ConditionalCheckFailed` is the conflict signal.
|
|
17
|
+
type transactionCancellationReason = {
|
|
18
|
+
@as("Code") code?: string,
|
|
19
|
+
}
|
|
20
|
+
type transactionCanceledShape = {
|
|
21
|
+
@as("CancellationReasons") cancellationReasons?: array<transactionCancellationReason>,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let classify = (err: unknown): t => {
|
|
25
|
+
let jsErr: JsExn.t = Obj.magic(err)
|
|
26
|
+
let name = jsErr->JsExn.name->Option.getOr("")
|
|
27
|
+
if name == "TransactionCanceledException" {
|
|
28
|
+
let shape: transactionCanceledShape = jsErr->Obj.magic
|
|
29
|
+
let reasons = shape.cancellationReasons->Option.getOr([])
|
|
30
|
+
let codeMatches = code => reasons->Array.some(r => r.code->Option.getOr("") == code)
|
|
31
|
+
let msg = jsErr->ReventlessCore.Util.Error.message
|
|
32
|
+
if codeMatches("ConditionalCheckFailed") {
|
|
33
|
+
StaleState(msg)
|
|
34
|
+
} else if (
|
|
35
|
+
codeMatches("TransactionConflict") ||
|
|
36
|
+
codeMatches("ProvisionedThroughputExceeded") ||
|
|
37
|
+
codeMatches("ThrottlingError")
|
|
38
|
+
) {
|
|
39
|
+
Transient(msg)
|
|
40
|
+
} else {
|
|
41
|
+
Permanent(msg)
|
|
42
|
+
}
|
|
43
|
+
} else {
|
|
44
|
+
switch jsErr->PutError.classify {
|
|
45
|
+
| ConditionCheckFailedException(_) => StaleState(jsErr->ReventlessCore.Util.Error.message)
|
|
46
|
+
| InternalServerError(_)
|
|
47
|
+
| ProvisionedThroughputExceededException(_)
|
|
48
|
+
| RequestLimitExceeded(_)
|
|
49
|
+
| TransactionConflictException(_) =>
|
|
50
|
+
Transient(jsErr->ReventlessCore.Util.Error.message)
|
|
51
|
+
| _ =>
|
|
52
|
+
let msg = ReventlessCore.Util.Error.messageFromUnknown(err, "DynamoDB error")
|
|
53
|
+
if (
|
|
54
|
+
msg->String.includes("ThrottlingException") ||
|
|
55
|
+
msg->String.includes("ServiceUnavailable") ||
|
|
56
|
+
msg->String.includes("InternalServerError")
|
|
57
|
+
) {
|
|
58
|
+
Transient(msg)
|
|
59
|
+
} else {
|
|
60
|
+
Permanent(msg)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
let message = err =>
|
|
67
|
+
switch err {
|
|
68
|
+
| Transient(msg) | StaleState(msg) | Permanent(msg) => msg
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
let retrySchedule: Schedule.t<(Duration.t, int), t, unit> =
|
|
72
|
+
Schedule.exponential(Duration.millis(500))
|
|
73
|
+
->Schedule.jittered
|
|
74
|
+
->Schedule.intersect(Schedule.recurs(5))
|
|
75
|
+
->Schedule.whileInput(isTransient)
|