@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,742 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Stdlib_JSON from "@rescript/runtime/lib/es6/Stdlib_JSON.js";
|
|
4
|
+
import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
|
|
5
|
+
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
6
|
+
import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
|
|
7
|
+
import * as Message$ReventlessCore from "@reventlessdev/reventless-core/src/Message.res.mjs";
|
|
8
|
+
import * as DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws from "../src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb_Runtime.res.mjs";
|
|
9
|
+
|
|
10
|
+
function tag(key, value) {
|
|
11
|
+
return {
|
|
12
|
+
key: key,
|
|
13
|
+
value: value
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function testMeta() {
|
|
18
|
+
return Message$ReventlessCore.generateMeta("test", undefined, undefined, undefined, undefined, undefined, undefined, undefined);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let table = {
|
|
22
|
+
id: "test-table-id",
|
|
23
|
+
name: "TestTable",
|
|
24
|
+
arn: "arn:aws:dynamodb:eu-west-1:000000000000:table/TestTable",
|
|
25
|
+
hashKey: "id"
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
globalThis.describe("Runtime.fencePartitionKey", () => {
|
|
29
|
+
globalThis.test("formats the fence partition key", () => {
|
|
30
|
+
globalThis.expect(DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.fencePartitionKey({
|
|
31
|
+
key: "orderId",
|
|
32
|
+
value: "ord-1"
|
|
33
|
+
})).toBe("fence#orderId:ord-1");
|
|
34
|
+
});
|
|
35
|
+
globalThis.test("does not collide with event partition keys", () => {
|
|
36
|
+
let fenceId = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.fencePartitionKey({
|
|
37
|
+
key: "orderId",
|
|
38
|
+
value: "ord-1"
|
|
39
|
+
});
|
|
40
|
+
globalThis.expect(fenceId === "orderId:ord-1").toBe(false);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
globalThis.describe("Runtime.fenceKey", () => {
|
|
45
|
+
globalThis.test("returns key with id and FENCE sort key", () => {
|
|
46
|
+
let key = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.fenceKey({
|
|
47
|
+
key: "orderId",
|
|
48
|
+
value: "ord-1"
|
|
49
|
+
});
|
|
50
|
+
globalThis.expect(key["id"]).toEqual("fence#orderId:ord-1");
|
|
51
|
+
globalThis.expect(key["position"]).toEqual("FENCE");
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
globalThis.describe("Runtime.collectQueryTags", () => {
|
|
56
|
+
globalThis.test("returns empty array for empty query", () => {
|
|
57
|
+
globalThis.expect(DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.collectQueryTags([])).toEqual([]);
|
|
58
|
+
});
|
|
59
|
+
globalThis.test("returns empty array when no queryItem has tags", () => {
|
|
60
|
+
let q = [{
|
|
61
|
+
eventTypes: ["Foo"]
|
|
62
|
+
}];
|
|
63
|
+
globalThis.expect(DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.collectQueryTags(q)).toEqual([]);
|
|
64
|
+
});
|
|
65
|
+
globalThis.test("collects tags from a single queryItem", () => {
|
|
66
|
+
let q = [{
|
|
67
|
+
tags: [
|
|
68
|
+
{
|
|
69
|
+
key: "orderId",
|
|
70
|
+
value: "o1"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
key: "customerId",
|
|
74
|
+
value: "c1"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}];
|
|
78
|
+
let result = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.collectQueryTags(q);
|
|
79
|
+
globalThis.expect(result.length).toBe(2);
|
|
80
|
+
});
|
|
81
|
+
globalThis.test("dedupes same tag value across queryItems", () => {
|
|
82
|
+
let q = [
|
|
83
|
+
{
|
|
84
|
+
tags: [{
|
|
85
|
+
key: "productId",
|
|
86
|
+
value: "p1"
|
|
87
|
+
}]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
tags: [{
|
|
91
|
+
key: "productId",
|
|
92
|
+
value: "p1"
|
|
93
|
+
}]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
tags: [{
|
|
97
|
+
key: "productId",
|
|
98
|
+
value: "p2"
|
|
99
|
+
}]
|
|
100
|
+
}
|
|
101
|
+
];
|
|
102
|
+
let result = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.collectQueryTags(q);
|
|
103
|
+
globalThis.expect(result.length).toBe(2);
|
|
104
|
+
});
|
|
105
|
+
globalThis.test("ignores queryItems without tags but keeps others", () => {
|
|
106
|
+
let q = [
|
|
107
|
+
{
|
|
108
|
+
eventTypes: ["Foo"]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
tags: [{
|
|
112
|
+
key: "orderId",
|
|
113
|
+
value: "o1"
|
|
114
|
+
}]
|
|
115
|
+
}
|
|
116
|
+
];
|
|
117
|
+
let result = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.collectQueryTags(q);
|
|
118
|
+
globalThis.expect(result.length).toBe(1);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
globalThis.describe("Runtime.collectEventTags", () => {
|
|
123
|
+
globalThis.test("returns empty array for no events", () => {
|
|
124
|
+
globalThis.expect(DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.collectEventTags([])).toEqual([]);
|
|
125
|
+
});
|
|
126
|
+
globalThis.test("dedupes tag values across events", () => {
|
|
127
|
+
let event1_data = {};
|
|
128
|
+
let event1_tags = [
|
|
129
|
+
{
|
|
130
|
+
key: "productId",
|
|
131
|
+
value: "p1"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
key: "categoryId",
|
|
135
|
+
value: "c1"
|
|
136
|
+
}
|
|
137
|
+
];
|
|
138
|
+
let event1_meta = testMeta();
|
|
139
|
+
let event1 = {
|
|
140
|
+
eventType: "ProductAdded",
|
|
141
|
+
data: event1_data,
|
|
142
|
+
tags: event1_tags,
|
|
143
|
+
meta: event1_meta
|
|
144
|
+
};
|
|
145
|
+
let event2_data = {};
|
|
146
|
+
let event2_tags = [
|
|
147
|
+
{
|
|
148
|
+
key: "productId",
|
|
149
|
+
value: "p1"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
key: "categoryId",
|
|
153
|
+
value: "c2"
|
|
154
|
+
}
|
|
155
|
+
];
|
|
156
|
+
let event2_meta = testMeta();
|
|
157
|
+
let event2 = {
|
|
158
|
+
eventType: "ProductAdded",
|
|
159
|
+
data: event2_data,
|
|
160
|
+
tags: event2_tags,
|
|
161
|
+
meta: event2_meta
|
|
162
|
+
};
|
|
163
|
+
let result = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.collectEventTags([
|
|
164
|
+
event1,
|
|
165
|
+
event2
|
|
166
|
+
]);
|
|
167
|
+
globalThis.expect(result.length).toBe(3);
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
globalThis.describe("Runtime.buildConditionalFenceUpdate", () => {
|
|
172
|
+
globalThis.test("after=Some: per-consumed-type OCC check, bumps only produced types", () => {
|
|
173
|
+
let update = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildConditionalFenceUpdate("TestTable", {
|
|
174
|
+
key: "productId",
|
|
175
|
+
value: "p1"
|
|
176
|
+
}, [
|
|
177
|
+
"ProductAdded",
|
|
178
|
+
"ProductNameChanged"
|
|
179
|
+
], ["ProductNameChanged"], "100", "50");
|
|
180
|
+
globalThis.expect(update.ConditionExpression).toEqual("(attribute_not_exists(#c0) OR #c0 <= :after) AND (attribute_not_exists(#c1) OR #c1 <= :after)");
|
|
181
|
+
globalThis.expect(update.UpdateExpression).toBe("SET #p0 = :new");
|
|
182
|
+
globalThis.expect(update.ExpressionAttributeNames).toEqual(Object.fromEntries([
|
|
183
|
+
[
|
|
184
|
+
"#p0",
|
|
185
|
+
"pos#ProductNameChanged"
|
|
186
|
+
],
|
|
187
|
+
[
|
|
188
|
+
"#c0",
|
|
189
|
+
"pos#ProductAdded"
|
|
190
|
+
],
|
|
191
|
+
[
|
|
192
|
+
"#c1",
|
|
193
|
+
"pos#ProductNameChanged"
|
|
194
|
+
]
|
|
195
|
+
]));
|
|
196
|
+
globalThis.expect(Stdlib_Option.flatMap(update.ExpressionAttributeValues, v => v[":after"])).toEqual("50");
|
|
197
|
+
globalThis.expect(Stdlib_Option.flatMap(update.ExpressionAttributeValues, v => v[":new"])).toEqual("100");
|
|
198
|
+
});
|
|
199
|
+
globalThis.test("after=Some: a non-read type is never referenced in the condition", () => {
|
|
200
|
+
let update = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildConditionalFenceUpdate("TestTable", {
|
|
201
|
+
key: "productId",
|
|
202
|
+
value: "p1"
|
|
203
|
+
}, [
|
|
204
|
+
"ProductAdded",
|
|
205
|
+
"ProductNameChanged"
|
|
206
|
+
], ["ProductNameChanged"], "100", "50");
|
|
207
|
+
let referenced = Object.values(Stdlib_Option.getOr(update.ExpressionAttributeNames, {}));
|
|
208
|
+
globalThis.expect(referenced.includes("pos#ProductPriceChanged")).toBe(false);
|
|
209
|
+
});
|
|
210
|
+
globalThis.test("after=None: folded create guard over consumed ∪ produced types", () => {
|
|
211
|
+
let update = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildConditionalFenceUpdate("TestTable", {
|
|
212
|
+
key: "productId",
|
|
213
|
+
value: "p1"
|
|
214
|
+
}, ["ProductAdded"], ["ProductAdded"], "100", undefined);
|
|
215
|
+
globalThis.expect(update.ConditionExpression).toEqual("attribute_not_exists(#c0)");
|
|
216
|
+
globalThis.expect(update.UpdateExpression).toBe("SET #p0 = :new");
|
|
217
|
+
globalThis.expect(Stdlib_Option.flatMap(update.ExpressionAttributeValues, v => v[":after"])).toEqual(undefined);
|
|
218
|
+
});
|
|
219
|
+
globalThis.test("targets the fence sentinel item", () => {
|
|
220
|
+
let update = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildConditionalFenceUpdate("TestTable", {
|
|
221
|
+
key: "orderId",
|
|
222
|
+
value: "o1"
|
|
223
|
+
}, ["OrderPlaced"], ["OrderPlaced"], "100", undefined);
|
|
224
|
+
globalThis.expect(update.Key["id"]).toEqual("fence#orderId:o1");
|
|
225
|
+
globalThis.expect(update.Key["position"]).toEqual("FENCE");
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
globalThis.describe("Runtime.buildUnconditionalFenceUpdate", () => {
|
|
230
|
+
globalThis.test("does not set a conditionExpression", () => {
|
|
231
|
+
let update = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildUnconditionalFenceUpdate("TestTable", {
|
|
232
|
+
key: "orderId",
|
|
233
|
+
value: "o1"
|
|
234
|
+
}, ["OrderPlaced"], "100");
|
|
235
|
+
globalThis.expect(update.ConditionExpression).toEqual(undefined);
|
|
236
|
+
});
|
|
237
|
+
globalThis.test("bumps each produced type's position attribute", () => {
|
|
238
|
+
let update = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildUnconditionalFenceUpdate("TestTable", {
|
|
239
|
+
key: "orderId",
|
|
240
|
+
value: "o1"
|
|
241
|
+
}, [
|
|
242
|
+
"OrderPlaced",
|
|
243
|
+
"OrderShipped"
|
|
244
|
+
], "100");
|
|
245
|
+
globalThis.expect(update.UpdateExpression).toBe("SET #p0 = :new, #p1 = :new");
|
|
246
|
+
globalThis.expect(update.ExpressionAttributeNames).toEqual(Object.fromEntries([
|
|
247
|
+
[
|
|
248
|
+
"#p0",
|
|
249
|
+
"pos#OrderPlaced"
|
|
250
|
+
],
|
|
251
|
+
[
|
|
252
|
+
"#p1",
|
|
253
|
+
"pos#OrderShipped"
|
|
254
|
+
]
|
|
255
|
+
]));
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
globalThis.describe("Runtime.buildQueryByPartitionKeyInput", () => {
|
|
260
|
+
globalThis.test("omits consistentRead by default (eventually consistent)", () => {
|
|
261
|
+
let input = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildQueryByPartitionKeyInput(table, "orderId:o1", undefined, undefined);
|
|
262
|
+
globalThis.expect(input.ConsistentRead).toEqual(undefined);
|
|
263
|
+
});
|
|
264
|
+
globalThis.test("omits consistentRead when ~strongConsistency=false", () => {
|
|
265
|
+
let input = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildQueryByPartitionKeyInput(table, "orderId:o1", undefined, false);
|
|
266
|
+
globalThis.expect(input.ConsistentRead).toEqual(undefined);
|
|
267
|
+
});
|
|
268
|
+
globalThis.test("sets consistentRead=true when ~strongConsistency=true", () => {
|
|
269
|
+
let input = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildQueryByPartitionKeyInput(table, "orderId:o1", undefined, true);
|
|
270
|
+
globalThis.expect(input.ConsistentRead).toEqual(true);
|
|
271
|
+
});
|
|
272
|
+
globalThis.test("does not target a GSI (uses base table)", () => {
|
|
273
|
+
let input = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildQueryByPartitionKeyInput(table, "orderId:o1", undefined, true);
|
|
274
|
+
globalThis.expect(input.IndexName).toEqual(undefined);
|
|
275
|
+
});
|
|
276
|
+
globalThis.test("threads ~after into the key condition without dropping consistentRead", () => {
|
|
277
|
+
let input = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildQueryByPartitionKeyInput(table, "orderId:o1", "50", true);
|
|
278
|
+
globalThis.expect(input.ConsistentRead).toEqual(true);
|
|
279
|
+
globalThis.expect(input.KeyConditionExpression).toEqual("id = :pk AND #pos > :after");
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
globalThis.describe("Runtime.buildScanFilter — excludes fence sentinels (Issue 12)", () => {
|
|
284
|
+
globalThis.test("tagless, type-less scan still guards against fence# items", () => {
|
|
285
|
+
let filter = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildScanFilter(undefined);
|
|
286
|
+
globalThis.expect(filter.filterExpression).toEqual("attribute_exists(#evt)");
|
|
287
|
+
globalThis.expect(filter.expressionAttributeNames).toEqual(Object.fromEntries([[
|
|
288
|
+
"#evt",
|
|
289
|
+
"event"
|
|
290
|
+
]]));
|
|
291
|
+
globalThis.expect(filter.expressionAttributeValues).toEqual(undefined);
|
|
292
|
+
});
|
|
293
|
+
globalThis.test("an empty event-type list yields only the fence guard, not a degenerate ()", () => {
|
|
294
|
+
let filter = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildScanFilter([]);
|
|
295
|
+
globalThis.expect(filter.filterExpression).toEqual("attribute_exists(#evt)");
|
|
296
|
+
globalThis.expect(filter.expressionAttributeValues).toEqual(undefined);
|
|
297
|
+
});
|
|
298
|
+
globalThis.test("an event-type filter is AND-ed after the fence guard", () => {
|
|
299
|
+
let filter = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildScanFilter([
|
|
300
|
+
"OrderPlaced",
|
|
301
|
+
"OrderShipped"
|
|
302
|
+
]);
|
|
303
|
+
globalThis.expect(filter.filterExpression).toEqual("attribute_exists(#evt) AND (#evt = :type0 OR #evt = :type1)");
|
|
304
|
+
globalThis.expect(filter.expressionAttributeValues).toEqual(Object.fromEntries([
|
|
305
|
+
[
|
|
306
|
+
":type0",
|
|
307
|
+
"OrderPlaced"
|
|
308
|
+
],
|
|
309
|
+
[
|
|
310
|
+
":type1",
|
|
311
|
+
"OrderShipped"
|
|
312
|
+
]
|
|
313
|
+
]));
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
globalThis.describe("Runtime.buildEventPuts", () => {
|
|
318
|
+
let event = (eventType, tags) => ({
|
|
319
|
+
eventType: eventType,
|
|
320
|
+
data: {},
|
|
321
|
+
tags: tags,
|
|
322
|
+
meta: testMeta()
|
|
323
|
+
});
|
|
324
|
+
globalThis.test("emits one Put per event with the table name", () => {
|
|
325
|
+
let puts = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildEventPuts(table, [
|
|
326
|
+
event("Created", [{
|
|
327
|
+
key: "orderId",
|
|
328
|
+
value: "o1"
|
|
329
|
+
}]),
|
|
330
|
+
event("Shipped", [{
|
|
331
|
+
key: "orderId",
|
|
332
|
+
value: "o1"
|
|
333
|
+
}])
|
|
334
|
+
], "100", undefined);
|
|
335
|
+
globalThis.expect(puts.length).toBe(2);
|
|
336
|
+
let first = puts[0];
|
|
337
|
+
globalThis.expect(Stdlib_Option.map(first.Put, p => p.TableName)).toEqual("TestTable");
|
|
338
|
+
});
|
|
339
|
+
globalThis.test("returns no Puts when events is empty", () => {
|
|
340
|
+
let puts = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildEventPuts(table, [], "100", undefined);
|
|
341
|
+
globalThis.expect(puts.length).toBe(0);
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
globalThis.describe("Runtime.appendUnconditional", () => {
|
|
346
|
+
globalThis.test("rejects appends exceeding 100 items with a clear error", async () => {
|
|
347
|
+
let manyTags = Stdlib_Array.fromInitializer(100, i => ({
|
|
348
|
+
key: "k",
|
|
349
|
+
value: `v` + i.toString()
|
|
350
|
+
}));
|
|
351
|
+
let events = manyTags.map(t => {
|
|
352
|
+
let eventType = "Foo";
|
|
353
|
+
let tags = [t];
|
|
354
|
+
return {
|
|
355
|
+
eventType: eventType,
|
|
356
|
+
data: {},
|
|
357
|
+
tags: tags,
|
|
358
|
+
meta: testMeta()
|
|
359
|
+
};
|
|
360
|
+
});
|
|
361
|
+
let result = await DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.appendUnconditional(table, events, undefined);
|
|
362
|
+
if (result.TAG === "Ok") {
|
|
363
|
+
globalThis.expect("expected Error, got Ok").toBe("");
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
globalThis.expect(result._0.includes("limit exceeded")).toBe(true);
|
|
367
|
+
});
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
globalThis.describe("Runtime.buildConditionalTransactItems — fence-scope = read-scope", () => {
|
|
371
|
+
let event = (eventType, tags) => ({
|
|
372
|
+
eventType: eventType,
|
|
373
|
+
data: {},
|
|
374
|
+
tags: tags,
|
|
375
|
+
meta: testMeta()
|
|
376
|
+
});
|
|
377
|
+
let findFence = (items, fenceId) => items.find(it => {
|
|
378
|
+
let idOf = key => Primitive_object.equal(key["id"], fenceId);
|
|
379
|
+
let match = it.Update;
|
|
380
|
+
let match$1 = it.ConditionCheck;
|
|
381
|
+
if (match !== undefined) {
|
|
382
|
+
return idOf(match.Key);
|
|
383
|
+
} else if (match$1 !== undefined) {
|
|
384
|
+
return idOf(match$1.Key);
|
|
385
|
+
} else {
|
|
386
|
+
return false;
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
let isUpdate = it => Stdlib_Option.isSome(Stdlib_Option.flatMap(it, i => i.Update));
|
|
390
|
+
let isCheck = it => Stdlib_Option.isSome(Stdlib_Option.flatMap(it, i => i.ConditionCheck));
|
|
391
|
+
globalThis.describe("PlaceOrder shape: OrderPlaced partitioned by orderId, reads orderId + productId", () => {
|
|
392
|
+
let orderPlaced = event("OrderPlaced", [
|
|
393
|
+
{
|
|
394
|
+
key: "orderId",
|
|
395
|
+
value: "o1"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
key: "customerId",
|
|
399
|
+
value: "c1"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
key: "productId",
|
|
403
|
+
value: "p5"
|
|
404
|
+
}
|
|
405
|
+
]);
|
|
406
|
+
let cond_query = [
|
|
407
|
+
{
|
|
408
|
+
eventTypes: ["OrderPlaced"],
|
|
409
|
+
tags: [{
|
|
410
|
+
key: "orderId",
|
|
411
|
+
value: "o1"
|
|
412
|
+
}]
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
eventTypes: [
|
|
416
|
+
"OrderPlaced",
|
|
417
|
+
"CatalogProductSynced"
|
|
418
|
+
],
|
|
419
|
+
tags: [{
|
|
420
|
+
key: "productId",
|
|
421
|
+
value: "p5"
|
|
422
|
+
}]
|
|
423
|
+
}
|
|
424
|
+
];
|
|
425
|
+
let cond_after = "50";
|
|
426
|
+
let cond = {
|
|
427
|
+
query: cond_query,
|
|
428
|
+
after: cond_after
|
|
429
|
+
};
|
|
430
|
+
let items = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildConditionalTransactItems(table, [orderPlaced], cond, "100", {
|
|
431
|
+
TAG: "Simple",
|
|
432
|
+
_0: {
|
|
433
|
+
key: "orderId"
|
|
434
|
+
}
|
|
435
|
+
}, undefined);
|
|
436
|
+
globalThis.test("partition tag (orderId) is a conditional Update that bumps the fence", () => {
|
|
437
|
+
globalThis.expect(isUpdate(findFence(items, "fence#orderId:o1"))).toBe(true);
|
|
438
|
+
});
|
|
439
|
+
globalThis.test("non-partition read tag (productId) is a ConditionCheck, not a bump", () => {
|
|
440
|
+
let it = findFence(items, "fence#productId:p5");
|
|
441
|
+
globalThis.expect(isCheck(it)).toBe(true);
|
|
442
|
+
globalThis.expect(isUpdate(it)).toBe(false);
|
|
443
|
+
});
|
|
444
|
+
globalThis.test("secondary event tag (customerId) is not fenced at all", () => {
|
|
445
|
+
globalThis.expect(Stdlib_Option.isSome(findFence(items, "fence#customerId:c1"))).toBe(false);
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
globalThis.describe("composite (multi-tag) read keeps check+bump on all its tags", () => {
|
|
449
|
+
let demand = event("ProductDemandRecorded", [
|
|
450
|
+
{
|
|
451
|
+
key: "productId",
|
|
452
|
+
value: "p1"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
key: "orderId",
|
|
456
|
+
value: "o1"
|
|
457
|
+
}
|
|
458
|
+
]);
|
|
459
|
+
let cond_query = [{
|
|
460
|
+
eventTypes: ["ProductDemandRecorded"],
|
|
461
|
+
tags: [
|
|
462
|
+
{
|
|
463
|
+
key: "productId",
|
|
464
|
+
value: "p1"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
key: "orderId",
|
|
468
|
+
value: "o1"
|
|
469
|
+
}
|
|
470
|
+
]
|
|
471
|
+
}];
|
|
472
|
+
let cond_after = "50";
|
|
473
|
+
let cond = {
|
|
474
|
+
query: cond_query,
|
|
475
|
+
after: cond_after
|
|
476
|
+
};
|
|
477
|
+
let items = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildConditionalTransactItems(table, [demand], cond, "100", {
|
|
478
|
+
TAG: "Simple",
|
|
479
|
+
_0: {
|
|
480
|
+
key: "productId"
|
|
481
|
+
}
|
|
482
|
+
}, undefined);
|
|
483
|
+
globalThis.test("partition tag (productId) is a conditional Update", () => {
|
|
484
|
+
globalThis.expect(isUpdate(findFence(items, "fence#productId:p1"))).toBe(true);
|
|
485
|
+
});
|
|
486
|
+
globalThis.test("other composite tag (orderId) is also a conditional Update — OCC preserved", () => {
|
|
487
|
+
globalThis.expect(isUpdate(findFence(items, "fence#orderId:o1"))).toBe(true);
|
|
488
|
+
});
|
|
489
|
+
});
|
|
490
|
+
globalThis.describe("cross-partition secondary tag (studentId) is check+bump, not read-only", () => {
|
|
491
|
+
let subscribed = event("StudentSubscribed", [
|
|
492
|
+
{
|
|
493
|
+
key: "courseId",
|
|
494
|
+
value: "C1"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
key: "studentId",
|
|
498
|
+
value: "S1"
|
|
499
|
+
}
|
|
500
|
+
]);
|
|
501
|
+
let partitionTag = {
|
|
502
|
+
TAG: "Simple",
|
|
503
|
+
_0: {
|
|
504
|
+
key: "courseId"
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
let cond_query = [
|
|
508
|
+
{
|
|
509
|
+
eventTypes: ["StudentSubscribed"],
|
|
510
|
+
tags: [{
|
|
511
|
+
key: "courseId",
|
|
512
|
+
value: "C1"
|
|
513
|
+
}]
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
eventTypes: ["StudentSubscribed"],
|
|
517
|
+
tags: [{
|
|
518
|
+
key: "studentId",
|
|
519
|
+
value: "S1"
|
|
520
|
+
}]
|
|
521
|
+
}
|
|
522
|
+
];
|
|
523
|
+
let cond_after = "50";
|
|
524
|
+
let cond = {
|
|
525
|
+
query: cond_query,
|
|
526
|
+
after: cond_after
|
|
527
|
+
};
|
|
528
|
+
globalThis.test("with studentId cross-partition, its fence is a conditional Update (bump)", () => {
|
|
529
|
+
let items = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildConditionalTransactItems(table, [subscribed], cond, "100", partitionTag, ["studentId"]);
|
|
530
|
+
globalThis.expect(isUpdate(findFence(items, "fence#courseId:C1"))).toBe(true);
|
|
531
|
+
globalThis.expect(isUpdate(findFence(items, "fence#studentId:S1"))).toBe(true);
|
|
532
|
+
});
|
|
533
|
+
globalThis.test("without the cross-partition flag, studentId is only a read-only ConditionCheck", () => {
|
|
534
|
+
let items = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildConditionalTransactItems(table, [subscribed], cond, "100", partitionTag, undefined);
|
|
535
|
+
let it = findFence(items, "fence#studentId:S1");
|
|
536
|
+
globalThis.expect(isCheck(it)).toBe(true);
|
|
537
|
+
globalThis.expect(isUpdate(it)).toBe(false);
|
|
538
|
+
});
|
|
539
|
+
});
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
globalThis.describe("Runtime.buildConditionalTransactItems — folded create guard (after=None)", () => {
|
|
543
|
+
let event = (eventType, tags) => ({
|
|
544
|
+
eventType: eventType,
|
|
545
|
+
data: {},
|
|
546
|
+
tags: tags,
|
|
547
|
+
meta: testMeta()
|
|
548
|
+
});
|
|
549
|
+
let fenceUpdate = (items, fenceId) => Stdlib_Array.findMap(items, it => {
|
|
550
|
+
let u = it.Update;
|
|
551
|
+
if (u !== undefined && Primitive_object.equal(u.Key["id"], fenceId)) {
|
|
552
|
+
return u;
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
let hasCreateRow = items => items.some(it => {
|
|
556
|
+
let u = it.Update;
|
|
557
|
+
if (u !== undefined) {
|
|
558
|
+
return Stdlib_Option.mapOr(Stdlib_Option.flatMap(u.Key["id"], Stdlib_JSON.Decode.string), false, id => id.startsWith("create#"));
|
|
559
|
+
} else {
|
|
560
|
+
return false;
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
let referencedAttrs = u => Object.values(Stdlib_Option.getOr(u.ExpressionAttributeNames, {}));
|
|
564
|
+
globalThis.describe("first write of a create slice (consumes == produces)", () => {
|
|
565
|
+
let added = event("ProductAdded", [{
|
|
566
|
+
key: "productId",
|
|
567
|
+
value: "p1"
|
|
568
|
+
}]);
|
|
569
|
+
let cond_query = [{
|
|
570
|
+
eventTypes: ["ProductAdded"],
|
|
571
|
+
tags: [{
|
|
572
|
+
key: "productId",
|
|
573
|
+
value: "p1"
|
|
574
|
+
}]
|
|
575
|
+
}];
|
|
576
|
+
let cond = {
|
|
577
|
+
query: cond_query
|
|
578
|
+
};
|
|
579
|
+
let items = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildConditionalTransactItems(table, [added], cond, "100", {
|
|
580
|
+
TAG: "Simple",
|
|
581
|
+
_0: {
|
|
582
|
+
key: "productId"
|
|
583
|
+
}
|
|
584
|
+
}, undefined);
|
|
585
|
+
globalThis.test("no separate create# row is emitted (guard folded into the fence)", () => {
|
|
586
|
+
globalThis.expect(hasCreateRow(items)).toBe(false);
|
|
587
|
+
});
|
|
588
|
+
globalThis.test("the partition fence is a conditional Update gated on attribute_not_exists", () => {
|
|
589
|
+
let u = Stdlib_Option.getOrThrow(fenceUpdate(items, "fence#productId:p1"), undefined);
|
|
590
|
+
globalThis.expect(u.ConditionExpression).toEqual("attribute_not_exists(#c0)");
|
|
591
|
+
globalThis.expect(u.UpdateExpression).toBe("SET #p0 = :new");
|
|
592
|
+
globalThis.expect(Stdlib_Option.flatMap(u.ExpressionAttributeValues, v => v[":after"])).toEqual(undefined);
|
|
593
|
+
});
|
|
594
|
+
globalThis.test("the guard references only the produced/consumed type", () => {
|
|
595
|
+
let u = Stdlib_Option.getOrThrow(fenceUpdate(items, "fence#productId:p1"), undefined);
|
|
596
|
+
let referenced = referencedAttrs(u);
|
|
597
|
+
globalThis.expect(referenced.includes("pos#ProductAdded")).toBe(true);
|
|
598
|
+
globalThis.expect(referenced.includes("pos#ProductPriceChanged")).toBe(false);
|
|
599
|
+
});
|
|
600
|
+
});
|
|
601
|
+
globalThis.describe("produced-not-consumed (the double-create gate — analysis con #1)", () => {
|
|
602
|
+
let started = event("OrderStarted", [{
|
|
603
|
+
key: "orderId",
|
|
604
|
+
value: "o1"
|
|
605
|
+
}]);
|
|
606
|
+
let cond_query = [{
|
|
607
|
+
eventTypes: ["OrderDrafted"],
|
|
608
|
+
tags: [{
|
|
609
|
+
key: "orderId",
|
|
610
|
+
value: "o1"
|
|
611
|
+
}]
|
|
612
|
+
}];
|
|
613
|
+
let cond = {
|
|
614
|
+
query: cond_query
|
|
615
|
+
};
|
|
616
|
+
let items = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildConditionalTransactItems(table, [started], cond, "100", {
|
|
617
|
+
TAG: "Simple",
|
|
618
|
+
_0: {
|
|
619
|
+
key: "orderId"
|
|
620
|
+
}
|
|
621
|
+
}, undefined);
|
|
622
|
+
globalThis.test("the produced type is in the guard even though it is not consumed", () => {
|
|
623
|
+
let u = Stdlib_Option.getOrThrow(fenceUpdate(items, "fence#orderId:o1"), undefined);
|
|
624
|
+
let referenced = referencedAttrs(u);
|
|
625
|
+
globalThis.expect(referenced.includes("pos#OrderStarted")).toBe(true);
|
|
626
|
+
globalThis.expect(referenced.includes("pos#OrderDrafted")).toBe(true);
|
|
627
|
+
});
|
|
628
|
+
globalThis.test("the bump advances the produced type", () => {
|
|
629
|
+
let u = Stdlib_Option.getOrThrow(fenceUpdate(items, "fence#orderId:o1"), undefined);
|
|
630
|
+
globalThis.expect(u.UpdateExpression).toBe("SET #p0 = :new");
|
|
631
|
+
globalThis.expect(Stdlib_Option.flatMap(u.ExpressionAttributeNames, n => n["#p0"])).toEqual("pos#OrderStarted");
|
|
632
|
+
});
|
|
633
|
+
});
|
|
634
|
+
globalThis.describe("at after=Some (entity exists)", () => {
|
|
635
|
+
let changed = event("ProductNameChanged", [{
|
|
636
|
+
key: "productId",
|
|
637
|
+
value: "p1"
|
|
638
|
+
}]);
|
|
639
|
+
let cond_query = [{
|
|
640
|
+
eventTypes: [
|
|
641
|
+
"ProductAdded",
|
|
642
|
+
"ProductNameChanged"
|
|
643
|
+
],
|
|
644
|
+
tags: [{
|
|
645
|
+
key: "productId",
|
|
646
|
+
value: "p1"
|
|
647
|
+
}]
|
|
648
|
+
}];
|
|
649
|
+
let cond_after = "50";
|
|
650
|
+
let cond = {
|
|
651
|
+
query: cond_query,
|
|
652
|
+
after: cond_after
|
|
653
|
+
};
|
|
654
|
+
let items = DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.buildConditionalTransactItems(table, [changed], cond, "100", {
|
|
655
|
+
TAG: "Simple",
|
|
656
|
+
_0: {
|
|
657
|
+
key: "productId"
|
|
658
|
+
}
|
|
659
|
+
}, undefined);
|
|
660
|
+
globalThis.test("emits no create# row", () => {
|
|
661
|
+
globalThis.expect(hasCreateRow(items)).toBe(false);
|
|
662
|
+
});
|
|
663
|
+
globalThis.test("the fence check covers consumed types but not unrelated ones (Issue 4 fix)", () => {
|
|
664
|
+
let u = Stdlib_Option.getOrThrow(fenceUpdate(items, "fence#productId:p1"), undefined);
|
|
665
|
+
let referenced = referencedAttrs(u);
|
|
666
|
+
globalThis.expect(referenced.includes("pos#ProductAdded")).toBe(true);
|
|
667
|
+
globalThis.expect(referenced.includes("pos#ProductNameChanged")).toBe(true);
|
|
668
|
+
globalThis.expect(referenced.includes("pos#ProductPriceChanged")).toBe(false);
|
|
669
|
+
});
|
|
670
|
+
});
|
|
671
|
+
});
|
|
672
|
+
|
|
673
|
+
globalThis.describe("Runtime.appendConditional", () => {
|
|
674
|
+
globalThis.test("rejects tagless conditions with a clear error", async () => {
|
|
675
|
+
let cond_query = [{
|
|
676
|
+
eventTypes: ["Foo"]
|
|
677
|
+
}];
|
|
678
|
+
let cond = {
|
|
679
|
+
query: cond_query
|
|
680
|
+
};
|
|
681
|
+
let result = await DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.appendConditional(table, [], cond, undefined, undefined);
|
|
682
|
+
if (result.TAG === "Ok") {
|
|
683
|
+
globalThis.expect("expected Error, got Ok").toBe("");
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
686
|
+
globalThis.expect(result._0.includes("tagless")).toBe(true);
|
|
687
|
+
});
|
|
688
|
+
globalThis.test("rejects appends exceeding 100 items with a clear error", async () => {
|
|
689
|
+
let manyTags = Stdlib_Array.fromInitializer(100, i => ({
|
|
690
|
+
key: "k",
|
|
691
|
+
value: `v` + i.toString()
|
|
692
|
+
}));
|
|
693
|
+
let cond_query = manyTags.map(t => ({
|
|
694
|
+
eventTypes: ["Foo"],
|
|
695
|
+
tags: [t]
|
|
696
|
+
}));
|
|
697
|
+
let cond_after = "0";
|
|
698
|
+
let cond = {
|
|
699
|
+
query: cond_query,
|
|
700
|
+
after: cond_after
|
|
701
|
+
};
|
|
702
|
+
let event_data = {};
|
|
703
|
+
let event_tags = [{
|
|
704
|
+
key: "k",
|
|
705
|
+
value: "v0"
|
|
706
|
+
}];
|
|
707
|
+
let event_meta = testMeta();
|
|
708
|
+
let event = {
|
|
709
|
+
eventType: "Foo",
|
|
710
|
+
data: event_data,
|
|
711
|
+
tags: event_tags,
|
|
712
|
+
meta: event_meta
|
|
713
|
+
};
|
|
714
|
+
let result = await DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.appendConditional(table, [event], cond, undefined, undefined);
|
|
715
|
+
if (result.TAG === "Ok") {
|
|
716
|
+
globalThis.expect("expected Error, got Ok").toBe("");
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
719
|
+
globalThis.expect(result._0.includes("limit exceeded")).toBe(true);
|
|
720
|
+
});
|
|
721
|
+
});
|
|
722
|
+
|
|
723
|
+
globalThis.describe("Runtime.indexKeepsFullProjection", () => {
|
|
724
|
+
globalThis.test("tag_composite keeps a full projection", () => {
|
|
725
|
+
globalThis.expect(DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.indexKeepsFullProjection("tag_composite")).toBe(true);
|
|
726
|
+
});
|
|
727
|
+
globalThis.test("per-tag GSIs are KEYS_ONLY (no full projection)", () => {
|
|
728
|
+
globalThis.expect(DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.indexKeepsFullProjection("tag_orderId")).toBe(false);
|
|
729
|
+
globalThis.expect(DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.indexKeepsFullProjection("tag_customerId")).toBe(false);
|
|
730
|
+
globalThis.expect(DcbEventLogStorage_DynamoDb_Runtime$ReventlessAws.indexKeepsFullProjection("tag_productId")).toBe(false);
|
|
731
|
+
});
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
let Runtime;
|
|
735
|
+
|
|
736
|
+
export {
|
|
737
|
+
Runtime,
|
|
738
|
+
tag,
|
|
739
|
+
testMeta,
|
|
740
|
+
table,
|
|
741
|
+
}
|
|
742
|
+
/* Not a pure module */
|