@kensio/yulin 0.43.0 → 0.44.0
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/README.md +1 -0
- package/dist/sdk/router/resolve-sim-sdk-command-router.d.ts.map +1 -1
- package/dist/sdk/router/resolve-sim-sdk-command-router.js +3 -0
- package/dist/sdk/router/resolve-sim-sdk-command-router.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts +11 -0
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +19 -0
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts +3 -0
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-service-factory.js +4 -0
- package/dist/service/aws/factory/sim-aws-service-factory.js.map +1 -1
- package/dist/service/aws/sim-aws-account-region-scope.d.ts +5 -0
- package/dist/service/aws/sim-aws-account-region-scope.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-account-region-scope.js +6 -0
- package/dist/service/aws/sim-aws-account-region-scope.js.map +1 -1
- package/dist/service/aws/sim-aws.d.ts +3 -0
- package/dist/service/aws/sim-aws.d.ts.map +1 -1
- package/dist/service/aws/sim-aws.js +4 -0
- package/dist/service/aws/sim-aws.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.js +8 -0
- package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-event-source-mapping-cfn.d.ts +28 -0
- package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-event-source-mapping-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-event-source-mapping-cfn.js +33 -0
- package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-event-source-mapping-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/sim-cfn-resource-value-adapter.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/cfn/sim-cfn-resource-value-adapter.js +2 -0
- package/dist/service/cloudformation/resource/cfn/sim-cfn-resource-value-adapter.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-cfn-value-adapter.d.ts +6 -0
- package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-cfn-value-adapter.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-cfn-value-adapter.js +13 -0
- package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-cfn-value-adapter.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-queue-cfn.d.ts +28 -0
- package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-queue-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-queue-cfn.js +40 -0
- package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-queue-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-resolver.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-resolver.js +3 -0
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-resolver.js.map +1 -1
- package/dist/service/cloudformation/resource/sim-cfn-resource.d.ts +3 -0
- package/dist/service/cloudformation/resource/sim-cfn-resource.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/sim-cfn-resource.js +4 -1
- package/dist/service/cloudformation/resource/sim-cfn-resource.js.map +1 -1
- package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-map.d.ts.map +1 -1
- package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-map.js +1 -0
- package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-map.js.map +1 -1
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.d.ts +26 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.d.ts.map +1 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.js +33 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.js.map +1 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.d.ts +28 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.d.ts.map +1 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.js +38 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.js.map +1 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.d.ts +17 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.d.ts.map +1 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.js +71 -0
- package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.js.map +1 -0
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-property-parser.d.ts +4 -0
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-property-parser.d.ts.map +1 -1
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-property-parser.js +12 -0
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-property-parser.js.map +1 -1
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.d.ts +5 -6
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.d.ts.map +1 -1
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.js +7 -13
- package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.js.map +1 -1
- package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.d.ts +1 -0
- package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.d.ts.map +1 -1
- package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.js +8 -0
- package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.js.map +1 -1
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts +25 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js +55 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.d.ts +6 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.d.ts.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.js +64 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.js.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.d.ts +17 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.d.ts.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.js +47 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.js.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.d.ts +53 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.d.ts.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js +77 -0
- package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/event-source-mapping-access.d.ts +41 -0
- package/dist/service/lambda/command/event-source-mapping/event-source-mapping-access.d.ts.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/event-source-mapping-access.js +51 -0
- package/dist/service/lambda/command/event-source-mapping/event-source-mapping-access.js.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/event-source-mapping.command.d.ts +91 -0
- package/dist/service/lambda/command/event-source-mapping/event-source-mapping.command.d.ts.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/event-source-mapping.command.js +8 -0
- package/dist/service/lambda/command/event-source-mapping/event-source-mapping.command.js.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.d.ts +60 -0
- package/dist/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.d.ts.map +1 -0
- package/dist/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.js +89 -0
- package/dist/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.js.map +1 -0
- package/dist/service/lambda/command/sim-lambda-command.types.d.ts +1 -0
- package/dist/service/lambda/command/sim-lambda-command.types.d.ts.map +1 -1
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.d.ts +27 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.d.ts.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.js +32 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.js.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.d.ts +40 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.d.ts.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.js +55 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.js.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.d.ts +85 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.d.ts.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.js +136 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.js.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.d.ts +49 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.d.ts.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.js +97 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.js.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event.d.ts +56 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event.d.ts.map +1 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event.js +55 -0
- package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event.js.map +1 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queue-service.d.ts +49 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queue-service.d.ts.map +1 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queue-service.js +2 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queue-service.js.map +1 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queues.d.ts +118 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queues.d.ts.map +1 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queues.js +49 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queues.js.map +1 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.d.ts +32 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.d.ts.map +1 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.js +52 -0
- package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.js.map +1 -0
- package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queue-attributes.d.ts +29 -0
- package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queue-attributes.d.ts.map +1 -0
- package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queue-attributes.js +49 -0
- package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queue-attributes.js.map +1 -0
- package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queues.d.ts +57 -0
- package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queues.d.ts.map +1 -0
- package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queues.js +89 -0
- package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queues.js.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping-store.d.ts +46 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping-store.d.ts.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping-store.js +57 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping-store.js.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts +101 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js +93 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.d.ts +37 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.d.ts.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.js +44 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.js.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.d.ts +23 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.d.ts.map +1 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.js +46 -0
- package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.js.map +1 -0
- package/dist/service/lambda/function/sim-lambda-function-name.d.ts +10 -0
- package/dist/service/lambda/function/sim-lambda-function-name.d.ts.map +1 -0
- package/dist/service/lambda/function/sim-lambda-function-name.js +18 -0
- package/dist/service/lambda/function/sim-lambda-function-name.js.map +1 -0
- package/dist/service/lambda/function/url/sim-lambda-function-lookup.d.ts +4 -0
- package/dist/service/lambda/function/url/sim-lambda-function-lookup.d.ts.map +1 -1
- package/dist/service/lambda/function/url/sim-lambda-function-lookup.js +6 -0
- package/dist/service/lambda/function/url/sim-lambda-function-lookup.js.map +1 -1
- package/dist/service/lambda/index.d.ts +1 -0
- package/dist/service/lambda/index.d.ts.map +1 -1
- package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.d.ts.map +1 -1
- package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js +16 -0
- package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js.map +1 -1
- package/dist/service/lambda/sim-lambda-commands.d.ts +51 -0
- package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -0
- package/dist/service/lambda/sim-lambda-commands.js +84 -0
- package/dist/service/lambda/sim-lambda-commands.js.map +1 -0
- package/dist/service/lambda/sim-lambda.d.ts +35 -39
- package/dist/service/lambda/sim-lambda.d.ts.map +1 -1
- package/dist/service/lambda/sim-lambda.js +47 -65
- package/dist/service/lambda/sim-lambda.js.map +1 -1
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.d.ts +25 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.d.ts.map +1 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.js +33 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.js.map +1 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.d.ts +45 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.d.ts.map +1 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.js +67 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.js.map +1 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.d.ts +44 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.d.ts.map +1 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.js +72 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.js.map +1 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.d.ts +47 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.d.ts.map +1 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.js +122 -0
- package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.js.map +1 -0
- package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.d.ts +24 -0
- package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.d.ts.map +1 -0
- package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.js +29 -0
- package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.js.map +1 -0
- package/dist/service/sqs/command/authorize/sim-sqs-authorizer.d.ts +41 -0
- package/dist/service/sqs/command/authorize/sim-sqs-authorizer.d.ts.map +1 -0
- package/dist/service/sqs/command/authorize/sim-sqs-authorizer.js +51 -0
- package/dist/service/sqs/command/authorize/sim-sqs-authorizer.js.map +1 -0
- package/dist/service/sqs/command/message/consume.command.d.ts +61 -0
- package/dist/service/sqs/command/message/consume.command.d.ts.map +1 -0
- package/dist/service/sqs/command/message/consume.command.js +2 -0
- package/dist/service/sqs/command/message/consume.command.js.map +1 -0
- package/dist/service/sqs/command/message/receive.command.d.ts +40 -0
- package/dist/service/sqs/command/message/receive.command.d.ts.map +1 -0
- package/dist/service/sqs/command/message/receive.command.js +2 -0
- package/dist/service/sqs/command/message/receive.command.js.map +1 -0
- package/dist/service/sqs/command/message/send.command.d.ts +80 -0
- package/dist/service/sqs/command/message/send.command.d.ts.map +1 -0
- package/dist/service/sqs/command/message/send.command.js +2 -0
- package/dist/service/sqs/command/message/send.command.js.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-batch-entries.d.ts +39 -0
- package/dist/service/sqs/command/message/sim-sqs-batch-entries.d.ts.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-batch-entries.js +67 -0
- package/dist/service/sqs/command/message/sim-sqs-batch-entries.js.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-change-message-visibility.d.ts +31 -0
- package/dist/service/sqs/command/message/sim-sqs-change-message-visibility.d.ts.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-change-message-visibility.js +51 -0
- package/dist/service/sqs/command/message/sim-sqs-change-message-visibility.js.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-delete-message-commands.d.ts +38 -0
- package/dist/service/sqs/command/message/sim-sqs-delete-message-commands.d.ts.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-delete-message-commands.js +58 -0
- package/dist/service/sqs/command/message/sim-sqs-delete-message-commands.js.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-message-handles.d.ts +28 -0
- package/dist/service/sqs/command/message/sim-sqs-message-handles.d.ts.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-message-handles.js +36 -0
- package/dist/service/sqs/command/message/sim-sqs-message-handles.js.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-receive-limits.d.ts +27 -0
- package/dist/service/sqs/command/message/sim-sqs-receive-limits.d.ts.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-receive-limits.js +70 -0
- package/dist/service/sqs/command/message/sim-sqs-receive-limits.js.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-receive-message.d.ts +32 -0
- package/dist/service/sqs/command/message/sim-sqs-receive-message.d.ts.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-receive-message.js +33 -0
- package/dist/service/sqs/command/message/sim-sqs-receive-message.js.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-receive-request.d.ts +33 -0
- package/dist/service/sqs/command/message/sim-sqs-receive-request.d.ts.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-receive-request.js +55 -0
- package/dist/service/sqs/command/message/sim-sqs-receive-request.js.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-received-message-view.d.ts +25 -0
- package/dist/service/sqs/command/message/sim-sqs-received-message-view.d.ts.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-received-message-view.js +38 -0
- package/dist/service/sqs/command/message/sim-sqs-received-message-view.js.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-send-message-commands.d.ts +32 -0
- package/dist/service/sqs/command/message/sim-sqs-send-message-commands.d.ts.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-send-message-commands.js +56 -0
- package/dist/service/sqs/command/message/sim-sqs-send-message-commands.js.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-sent-message.d.ts +18 -0
- package/dist/service/sqs/command/message/sim-sqs-sent-message.d.ts.map +1 -0
- package/dist/service/sqs/command/message/sim-sqs-sent-message.js +37 -0
- package/dist/service/sqs/command/message/sim-sqs-sent-message.js.map +1 -0
- package/dist/service/sqs/command/queue/queue.command.d.ts +114 -0
- package/dist/service/sqs/command/queue/queue.command.d.ts.map +1 -0
- package/dist/service/sqs/command/queue/queue.command.js +2 -0
- package/dist/service/sqs/command/queue/queue.command.js.map +1 -0
- package/dist/service/sqs/command/queue/sim-sqs-create-queue.d.ts +51 -0
- package/dist/service/sqs/command/queue/sim-sqs-create-queue.d.ts.map +1 -0
- package/dist/service/sqs/command/queue/sim-sqs-create-queue.js +70 -0
- package/dist/service/sqs/command/queue/sim-sqs-create-queue.js.map +1 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-access.d.ts +63 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-access.d.ts.map +1 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-access.js +98 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-access.js.map +1 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-attribute-commands.d.ts +45 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-attribute-commands.d.ts.map +1 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-attribute-commands.js +74 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-attribute-commands.js.map +1 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-commands.d.ts +47 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-commands.d.ts.map +1 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-commands.js +55 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-commands.js.map +1 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-page.d.ts +27 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-page.d.ts.map +1 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-page.js +54 -0
- package/dist/service/sqs/command/queue/sim-sqs-queue-page.js.map +1 -0
- package/dist/service/sqs/command/queue/sim-sqs-unsimulated-queue-input.d.ts +18 -0
- package/dist/service/sqs/command/queue/sim-sqs-unsimulated-queue-input.d.ts.map +1 -0
- package/dist/service/sqs/command/queue/sim-sqs-unsimulated-queue-input.js +27 -0
- package/dist/service/sqs/command/queue/sim-sqs-unsimulated-queue-input.js.map +1 -0
- package/dist/service/sqs/command/sim-sqs-command.types.d.ts +8 -0
- package/dist/service/sqs/command/sim-sqs-command.types.d.ts.map +1 -0
- package/dist/service/sqs/command/sim-sqs-command.types.js +2 -0
- package/dist/service/sqs/command/sim-sqs-command.types.js.map +1 -0
- package/dist/service/sqs/error/sim-sqs.error.d.ts +162 -0
- package/dist/service/sqs/error/sim-sqs.error.d.ts.map +1 -0
- package/dist/service/sqs/error/sim-sqs.error.js +191 -0
- package/dist/service/sqs/error/sim-sqs.error.js.map +1 -0
- package/dist/service/sqs/index.d.ts +14 -0
- package/dist/service/sqs/index.d.ts.map +1 -0
- package/dist/service/sqs/index.js +13 -0
- package/dist/service/sqs/index.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute-payload.d.ts +56 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute-payload.d.ts.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute-payload.js +42 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute-payload.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute-rules.d.ts +23 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute-rules.d.ts.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute-rules.js +68 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute-rules.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute-value.d.ts +17 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute-value.d.ts.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute-value.js +2 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute-value.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute.d.ts +29 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute.d.ts.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute.js +56 -0
- package/dist/service/sqs/message/sim-sqs-message-attribute.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-attributes.d.ts +44 -0
- package/dist/service/sqs/message/sim-sqs-message-attributes.d.ts.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-attributes.js +93 -0
- package/dist/service/sqs/message/sim-sqs-message-attributes.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-body.d.ts +18 -0
- package/dist/service/sqs/message/sim-sqs-message-body.d.ts.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-body.js +66 -0
- package/dist/service/sqs/message/sim-sqs-message-body.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-store.d.ts +74 -0
- package/dist/service/sqs/message/sim-sqs-message-store.d.ts.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-store.js +99 -0
- package/dist/service/sqs/message/sim-sqs-message-store.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-system-attributes.d.ts +28 -0
- package/dist/service/sqs/message/sim-sqs-message-system-attributes.d.ts.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-system-attributes.js +75 -0
- package/dist/service/sqs/message/sim-sqs-message-system-attributes.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-visibility.d.ts +56 -0
- package/dist/service/sqs/message/sim-sqs-message-visibility.d.ts.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-visibility.js +79 -0
- package/dist/service/sqs/message/sim-sqs-message-visibility.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-writer.d.ts +41 -0
- package/dist/service/sqs/message/sim-sqs-message-writer.d.ts.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-writer.js +56 -0
- package/dist/service/sqs/message/sim-sqs-message-writer.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message.d.ts +96 -0
- package/dist/service/sqs/message/sim-sqs-message.d.ts.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message.js +136 -0
- package/dist/service/sqs/message/sim-sqs-message.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-receipt-handle.d.ts +10 -0
- package/dist/service/sqs/message/sim-sqs-receipt-handle.d.ts.map +1 -0
- package/dist/service/sqs/message/sim-sqs-receipt-handle.js +14 -0
- package/dist/service/sqs/message/sim-sqs-receipt-handle.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-dead-letter-targets.d.ts +51 -0
- package/dist/service/sqs/queue/sim-sqs-dead-letter-targets.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-dead-letter-targets.js +62 -0
- package/dist/service/sqs/queue/sim-sqs-dead-letter-targets.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-deleted-queue-names.d.ts +20 -0
- package/dist/service/sqs/queue/sim-sqs-deleted-queue-names.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-deleted-queue-names.js +42 -0
- package/dist/service/sqs/queue/sim-sqs-deleted-queue-names.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-activity.d.ts +65 -0
- package/dist/service/sqs/queue/sim-sqs-queue-activity.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-activity.js +57 -0
- package/dist/service/sqs/queue/sim-sqs-queue-activity.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-arn.d.ts +41 -0
- package/dist/service/sqs/queue/sim-sqs-queue-arn.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-arn.js +47 -0
- package/dist/service/sqs/queue/sim-sqs-queue-arn.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attribute-names.d.ts +27 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attribute-names.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attribute-names.js +83 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attribute-names.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attribute-numbers.d.ts +34 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attribute-numbers.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attribute-numbers.js +93 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attribute-numbers.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attribute-specs.d.ts +20 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attribute-specs.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attribute-specs.js +37 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attribute-specs.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attributes.d.ts +60 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attributes.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attributes.js +96 -0
- package/dist/service/sqs/queue/sim-sqs-queue-attributes.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-name.d.ts +21 -0
- package/dist/service/sqs/queue/sim-sqs-queue-name.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-name.js +47 -0
- package/dist/service/sqs/queue/sim-sqs-queue-name.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-report.d.ts +22 -0
- package/dist/service/sqs/queue/sim-sqs-queue-report.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-report.js +29 -0
- package/dist/service/sqs/queue/sim-sqs-queue-report.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-store.d.ts +60 -0
- package/dist/service/sqs/queue/sim-sqs-queue-store.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-store.js +87 -0
- package/dist/service/sqs/queue/sim-sqs-queue-store.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-url.d.ts +24 -0
- package/dist/service/sqs/queue/sim-sqs-queue-url.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue-url.js +36 -0
- package/dist/service/sqs/queue/sim-sqs-queue-url.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue.d.ts +130 -0
- package/dist/service/sqs/queue/sim-sqs-queue.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-queue.js +188 -0
- package/dist/service/sqs/queue/sim-sqs-queue.js.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-redrive-policy.d.ts +30 -0
- package/dist/service/sqs/queue/sim-sqs-redrive-policy.d.ts.map +1 -0
- package/dist/service/sqs/queue/sim-sqs-redrive-policy.js +118 -0
- package/dist/service/sqs/queue/sim-sqs-redrive-policy.js.map +1 -0
- package/dist/service/sqs/sdk/sim-sqs-sdk-command-router.d.ts +18 -0
- package/dist/service/sqs/sdk/sim-sqs-sdk-command-router.d.ts.map +1 -0
- package/dist/service/sqs/sdk/sim-sqs-sdk-command-router.js +76 -0
- package/dist/service/sqs/sdk/sim-sqs-sdk-command-router.js.map +1 -0
- package/dist/service/sqs/sim-sqs.d.ts +119 -0
- package/dist/service/sqs/sim-sqs.d.ts.map +1 -0
- package/dist/service/sqs/sim-sqs.js +213 -0
- package/dist/service/sqs/sim-sqs.js.map +1 -0
- package/package.json +6 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The AWS::SQS::Queue properties carrying a queue attribute of the same name.
|
|
3
|
+
*
|
|
4
|
+
* CloudFormation names these exactly as the SQS API names the attributes, so
|
|
5
|
+
* they are handed to CreateQueue rather than applied here. That leaves the
|
|
6
|
+
* ranges and defaults in one place: the ones simulated SQS already validates.
|
|
7
|
+
*/
|
|
8
|
+
const attributePropertyNames = new Set([
|
|
9
|
+
"DelaySeconds",
|
|
10
|
+
"MaximumMessageSize",
|
|
11
|
+
"MessageRetentionPeriod",
|
|
12
|
+
"ReceiveMessageWaitTimeSeconds",
|
|
13
|
+
"VisibilityTimeout",
|
|
14
|
+
]);
|
|
15
|
+
/**
|
|
16
|
+
* Real AWS::SQS::Queue properties this simulation does not model.
|
|
17
|
+
*
|
|
18
|
+
* A queue deployed without its redrive policy would look like a queue with a
|
|
19
|
+
* dead-letter queue to the template and have none, so these fail the Resource
|
|
20
|
+
* rather than being dropped on the way through.
|
|
21
|
+
*/
|
|
22
|
+
const unsimulatedPropertyNames = new Set([
|
|
23
|
+
"ContentBasedDeduplication",
|
|
24
|
+
"DeduplicationScope",
|
|
25
|
+
"FifoThroughputLimit",
|
|
26
|
+
"KmsDataKeyReusePeriodSeconds",
|
|
27
|
+
"KmsMasterKeyId",
|
|
28
|
+
"RedriveAllowPolicy",
|
|
29
|
+
"RedrivePolicy",
|
|
30
|
+
"SqsManagedSseEnabled",
|
|
31
|
+
"Tags",
|
|
32
|
+
]);
|
|
33
|
+
/**
|
|
34
|
+
* The FifoQueue values that ask for a FIFO queue. CloudFormation carries a
|
|
35
|
+
* boolean property as either, depending on where the value came from.
|
|
36
|
+
*/
|
|
37
|
+
const fifoQueueValues = new Set([
|
|
38
|
+
true,
|
|
39
|
+
"true",
|
|
40
|
+
]);
|
|
41
|
+
/**
|
|
42
|
+
* The FifoQueue values that ask for a standard queue, which is the only kind
|
|
43
|
+
* this simulation creates.
|
|
44
|
+
*/
|
|
45
|
+
const standardQueueValues = new Set([
|
|
46
|
+
false,
|
|
47
|
+
"false",
|
|
48
|
+
]);
|
|
49
|
+
/**
|
|
50
|
+
* Build the error a property of an AWS::SQS::Queue Resource is refused with.
|
|
51
|
+
*
|
|
52
|
+
* The wording matters. Sim CloudFormation skips a Resource whose error reads as
|
|
53
|
+
* an unsupported Resource type, and skipping is the wrong answer for a queue
|
|
54
|
+
* that cannot be created as the template asks: the stack would deploy without
|
|
55
|
+
* it.
|
|
56
|
+
*/
|
|
57
|
+
export function sqsQueuePropertyError(logicalId, reason) {
|
|
58
|
+
return new Error(`Invalid AWS::SQS::Queue Resource ${logicalId}: ${reason}`);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Which AWS::SQS::Queue properties simulated SQS can act on.
|
|
62
|
+
*
|
|
63
|
+
* Anything else fails the Resource. Being stricter than CloudFormation shows up
|
|
64
|
+
* as a puzzling deployment failure here; being looser shows up as a queue
|
|
65
|
+
* behaving one way in a test and another way on AWS.
|
|
66
|
+
*/
|
|
67
|
+
export class SimCfnSqsQueuePropertyRules {
|
|
68
|
+
logicalId;
|
|
69
|
+
properties;
|
|
70
|
+
constructor(properties) {
|
|
71
|
+
this.logicalId = properties.logicalId;
|
|
72
|
+
this.properties = properties.properties;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Whether a property carries a queue attribute of the same name.
|
|
76
|
+
*/
|
|
77
|
+
isAttributeProperty(name) {
|
|
78
|
+
return attributePropertyNames.has(name);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Refuse everything about this Resource that is not simulated.
|
|
82
|
+
*/
|
|
83
|
+
assertSimulated() {
|
|
84
|
+
this.refuseFifoQueue();
|
|
85
|
+
for (const name of Object.keys(this.properties)) {
|
|
86
|
+
this.assertSimulatedProperty(name);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Refuse a FIFO queue.
|
|
91
|
+
*
|
|
92
|
+
* Only standard queues are simulated, and a FIFO queue quietly created as a
|
|
93
|
+
* standard one would take messages in an order the deployment does not
|
|
94
|
+
* promise, so the Resource fails instead. A value that is neither true nor
|
|
95
|
+
* false is refused as well, rather than read as false: CloudFormation would
|
|
96
|
+
* refuse it too, and the queue it asked for is not knowable.
|
|
97
|
+
*/
|
|
98
|
+
refuseFifoQueue() {
|
|
99
|
+
const fifo = this.properties["FifoQueue"];
|
|
100
|
+
if (fifo === undefined || standardQueueValues.has(fifo)) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (fifoQueueValues.has(fifo)) {
|
|
104
|
+
throw sqsQueuePropertyError(this.logicalId, "FifoQueue names a FIFO queue, which simulated SQS does not " +
|
|
105
|
+
"simulate. Only standard queues are simulated, so the queue is not " +
|
|
106
|
+
"created rather than created as a standard queue");
|
|
107
|
+
}
|
|
108
|
+
throw sqsQueuePropertyError(this.logicalId, "FifoQueue must be true or false");
|
|
109
|
+
}
|
|
110
|
+
assertSimulatedProperty(name) {
|
|
111
|
+
if (unsimulatedPropertyNames.has(name)) {
|
|
112
|
+
throw sqsQueuePropertyError(this.logicalId, `${name} is a real AWS::SQS::Queue property that simulated SQS does ` +
|
|
113
|
+
`not simulate, so it is refused rather than ignored`);
|
|
114
|
+
}
|
|
115
|
+
if (name !== "QueueName" &&
|
|
116
|
+
name !== "FifoQueue" &&
|
|
117
|
+
!this.isAttributeProperty(name)) {
|
|
118
|
+
throw sqsQueuePropertyError(this.logicalId, `${name} is not an AWS::SQS::Queue property`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=sim-cfn-sqs-queue-property-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-cfn-sqs-queue-property-rules.js","sourceRoot":"","sources":["../../../../../src/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,MAAM,sBAAsB,GAAwB,IAAI,GAAG,CAAC;IAC1D,cAAc;IACd,oBAAoB;IACpB,wBAAwB;IACxB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AAC,WAAW,CAAC,CAAC;QAE1C,IAAI,IAAI,KAAK,SAAS,IAAI,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACxD,OAAO;QACT,CAAC;QAED,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9B,MAAM,qBAAqB,CACzB,IAAI,CAAC,SAAS,EACd,6DAA6D;gBAC3D,oEAAoE;gBACpE,iDAAiD,CACpD,CAAC;QACJ,CAAC;QAED,MAAM,qBAAqB,CACzB,IAAI,CAAC,SAAS,EACd,iCAAiC,CAClC,CAAC;IACJ,CAAC;IAEO,uBAAuB,CAAC,IAAY;QAC1C,IAAI,wBAAwB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACvC,MAAM,qBAAqB,CACzB,IAAI,CAAC,SAAS,EACd,GAAG,IAAI,8DAA8D;gBACnE,oDAAoD,CACvD,CAAC;QACJ,CAAC;QAED,IACE,IAAI,KAAK,WAAW;YACpB,IAAI,KAAK,WAAW;YACpB,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAC/B,CAAC;YACD,MAAM,qBAAqB,CACzB,IAAI,CAAC,SAAS,EACd,GAAG,IAAI,qCAAqC,CAC7C,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SimCfnServiceResourceFactory } from "../../cloudformation/resource/factory/sim-cfn-resource-factory.type.js";
|
|
2
|
+
import type { SimCfnResource, SimCloudFormationResourceCreateContext } from "../../cloudformation/resource/sim-cfn-resource.js";
|
|
3
|
+
import type { SimSqs } from "../sim-sqs.js";
|
|
4
|
+
interface SimSqsCfnResourceFactoryProperties {
|
|
5
|
+
readonly sqs: SimSqs;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* CloudFormation Resource factory for simulated SQS resources.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SimSqsCfnResourceFactory implements SimCfnServiceResourceFactory {
|
|
11
|
+
private readonly queueCreator;
|
|
12
|
+
constructor(properties: SimSqsCfnResourceFactoryProperties);
|
|
13
|
+
/**
|
|
14
|
+
* Create a simulated SQS resource from a CloudFormation Resource.
|
|
15
|
+
*
|
|
16
|
+
* The queue is the only AWS::SQS::* Resource type this simulation models. A
|
|
17
|
+
* queue policy grants cross-account access, which is not simulated, so
|
|
18
|
+
* AWS::SQS::QueuePolicy is reported as unsupported and skipped rather than
|
|
19
|
+
* quietly treated as deployed.
|
|
20
|
+
*/
|
|
21
|
+
create(resourceTypeName: string, resource: SimCfnResource, context: SimCloudFormationResourceCreateContext): Promise<object | undefined>;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=sim-sqs-cfn-resource-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sqs-cfn-resource-factory.d.ts","sourceRoot":"","sources":["../../../../src/service/sqs/cfn/sim-sqs-cfn-resource-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wEAAwE,CAAC;AAC3H,OAAO,KAAK,EACV,cAAc,EACd,sCAAsC,EACvC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAG5C,UAAU,kCAAkC;IAC1C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,wBAAyB,YAAW,4BAA4B;IAC3E,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAwB;IAErD,YAAY,UAAU,EAAE,kCAAkC,EAEzD;IAED;;;;;;;OAOG;IACG,MAAM,CACV,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,sCAAsC,GAC9C,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAc7B;CACF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SimCfnSqsQueueCreator } from "./queue/sim-cfn-sqs-queue-creator.js";
|
|
2
|
+
/**
|
|
3
|
+
* CloudFormation Resource factory for simulated SQS resources.
|
|
4
|
+
*/
|
|
5
|
+
export class SimSqsCfnResourceFactory {
|
|
6
|
+
queueCreator;
|
|
7
|
+
constructor(properties) {
|
|
8
|
+
this.queueCreator = new SimCfnSqsQueueCreator({ sqs: properties.sqs });
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Create a simulated SQS resource from a CloudFormation Resource.
|
|
12
|
+
*
|
|
13
|
+
* The queue is the only AWS::SQS::* Resource type this simulation models. A
|
|
14
|
+
* queue policy grants cross-account access, which is not simulated, so
|
|
15
|
+
* AWS::SQS::QueuePolicy is reported as unsupported and skipped rather than
|
|
16
|
+
* quietly treated as deployed.
|
|
17
|
+
*/
|
|
18
|
+
async create(resourceTypeName, resource, context) {
|
|
19
|
+
switch (resourceTypeName) {
|
|
20
|
+
case "Queue": {
|
|
21
|
+
return await this.queueCreator.create(resource, context.resolvedProperties ?? resource.properties);
|
|
22
|
+
}
|
|
23
|
+
default: {
|
|
24
|
+
throw new Error(`Unsupported sim SQS CloudFormation Resource ${resourceTypeName}`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=sim-sqs-cfn-resource-factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sqs-cfn-resource-factory.js","sourceRoot":"","sources":["../../../../src/service/sqs/cfn/sim-sqs-cfn-resource-factory.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAM7E;;GAEG;AACH,MAAM,OAAO,wBAAwB;IAClB,YAAY,CAAwB;IAErD,YAAY,UAA8C;QACxD,IAAI,CAAC,YAAY,GAAG,IAAI,qBAAqB,CAAC,EAAE,GAAG,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,MAAM,CACV,gBAAwB,EACxB,QAAwB,EACxB,OAA+C;QAE/C,QAAQ,gBAAgB,EAAE,CAAC;YACzB,KAAK,OAAO,EAAE,CAAC;gBACb,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CACnC,QAAQ,EACR,OAAO,CAAC,kBAAkB,IAAI,QAAQ,CAAC,UAAU,CAClD,CAAC;YACJ,CAAC;YACD,SAAS,CAAC;gBACR,MAAM,IAAI,KAAK,CACb,+CAA+C,gBAAgB,EAAE,CAClE,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
|
|
2
|
+
import type { SimAwsResolvedCaller } from "../../../aws/caller/sim-aws-caller-resolver.js";
|
|
3
|
+
import type { SimAwsAccountRegionScope } from "../../../aws/sim-aws-account-region-scope.js";
|
|
4
|
+
import type { SimIamInterServiceAuthZ } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
5
|
+
interface SimSqsAuthorizerProperties {
|
|
6
|
+
readonly iam: SimIamInterServiceAuthZ;
|
|
7
|
+
readonly accountRegionScope: SimAwsAccountRegionScope;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Applies simulated IAM authorization to SQS requests.
|
|
11
|
+
*
|
|
12
|
+
* A queue ARN has no resource type in it, so the resource an operation
|
|
13
|
+
* authorizes against is `arn:aws:sqs:region:account:queue-name`. A policy
|
|
14
|
+
* written with a `queue/` in the resource matches nothing here, as it matches
|
|
15
|
+
* nothing on real AWS.
|
|
16
|
+
*
|
|
17
|
+
* ListQueues is the exception: real SQS gives it no queue-level permission, so
|
|
18
|
+
* it authorizes against every queue in the account and region rather than one of
|
|
19
|
+
* them. A policy naming a single queue ARN therefore allows no listing.
|
|
20
|
+
*/
|
|
21
|
+
export declare class SimSqsAuthorizer {
|
|
22
|
+
private readonly iam;
|
|
23
|
+
private readonly accountRegionScope;
|
|
24
|
+
constructor(properties: SimSqsAuthorizerProperties);
|
|
25
|
+
/**
|
|
26
|
+
* Ensure the caller may perform an action on a queue, named by its ARN.
|
|
27
|
+
*
|
|
28
|
+
* The queue need not exist. Real IAM evaluates a request before the service
|
|
29
|
+
* handles it, so a caller with no permission is refused whether or not the
|
|
30
|
+
* queue is there, and CreateQueue authorizes against the ARN the queue is
|
|
31
|
+
* about to have.
|
|
32
|
+
*/
|
|
33
|
+
authorizeQueue(action: string, queueArn: string, caller?: SimAwsCaller): SimAwsResolvedCaller;
|
|
34
|
+
/**
|
|
35
|
+
* Ensure the caller may perform an action that names no particular queue.
|
|
36
|
+
*/
|
|
37
|
+
authorizeAnyQueue(action: string, caller?: SimAwsCaller): SimAwsResolvedCaller;
|
|
38
|
+
private authorizeResource;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=sim-sqs-authorizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sqs-authorizer.d.ts","sourceRoot":"","sources":["../../../../../src/service/sqs/command/authorize/sim-sqs-authorizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAItG,UAAU,0BAA0B;IAClC,QAAQ,CAAC,GAAG,EAAE,uBAAuB,CAAC;IACtC,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;CACvD;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA0B;IAC9C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA2B;IAE9D,YAAY,UAAU,EAAE,0BAA0B,EAGjD;IAED;;;;;;;OAOG;IACH,cAAc,CACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,YAAY,GACpB,oBAAoB,CAEtB;IAED;;OAEG;IACH,iBAAiB,CACf,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,YAAY,GACpB,oBAAoB,CAMtB;IAED,OAAO,CAAC,iBAAiB;CAiB1B"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { SimIamAccessDenied } from "../../../iam/error/sim-iam.error.js";
|
|
2
|
+
import { sqsAnyQueueArn } from "../../queue/sim-sqs-queue-arn.js";
|
|
3
|
+
/**
|
|
4
|
+
* Applies simulated IAM authorization to SQS requests.
|
|
5
|
+
*
|
|
6
|
+
* A queue ARN has no resource type in it, so the resource an operation
|
|
7
|
+
* authorizes against is `arn:aws:sqs:region:account:queue-name`. A policy
|
|
8
|
+
* written with a `queue/` in the resource matches nothing here, as it matches
|
|
9
|
+
* nothing on real AWS.
|
|
10
|
+
*
|
|
11
|
+
* ListQueues is the exception: real SQS gives it no queue-level permission, so
|
|
12
|
+
* it authorizes against every queue in the account and region rather than one of
|
|
13
|
+
* them. A policy naming a single queue ARN therefore allows no listing.
|
|
14
|
+
*/
|
|
15
|
+
export class SimSqsAuthorizer {
|
|
16
|
+
iam;
|
|
17
|
+
accountRegionScope;
|
|
18
|
+
constructor(properties) {
|
|
19
|
+
this.iam = properties.iam;
|
|
20
|
+
this.accountRegionScope = properties.accountRegionScope;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Ensure the caller may perform an action on a queue, named by its ARN.
|
|
24
|
+
*
|
|
25
|
+
* The queue need not exist. Real IAM evaluates a request before the service
|
|
26
|
+
* handles it, so a caller with no permission is refused whether or not the
|
|
27
|
+
* queue is there, and CreateQueue authorizes against the ARN the queue is
|
|
28
|
+
* about to have.
|
|
29
|
+
*/
|
|
30
|
+
authorizeQueue(action, queueArn, caller) {
|
|
31
|
+
return this.authorizeResource(action, queueArn, caller);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Ensure the caller may perform an action that names no particular queue.
|
|
35
|
+
*/
|
|
36
|
+
authorizeAnyQueue(action, caller) {
|
|
37
|
+
return this.authorizeResource(action, sqsAnyQueueArn(this.accountRegionScope), caller);
|
|
38
|
+
}
|
|
39
|
+
authorizeResource(action, resource, caller) {
|
|
40
|
+
const decision = this.iam.authorize({ action, resource, caller });
|
|
41
|
+
if (decision.isDenied) {
|
|
42
|
+
throw new SimIamAccessDenied({
|
|
43
|
+
principal: decision.caller.principal,
|
|
44
|
+
action,
|
|
45
|
+
resource,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return decision.caller;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=sim-sqs-authorizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sqs-authorizer.js","sourceRoot":"","sources":["../../../../../src/service/sqs/command/authorize/sim-sqs-authorizer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAOlE;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,gBAAgB;IACV,GAAG,CAA0B;IAC7B,kBAAkB,CAA2B;IAE9D,YAAY,UAAsC;QAChD,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC;QAC1B,IAAI,CAAC,kBAAkB,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAC1D,CAAC;IAED;;;;;;;OAOG;IACH,cAAc,CACZ,MAAc,EACd,QAAgB,EAChB,MAAqB;QAErB,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;IAED;;OAEG;IACH,iBAAiB,CACf,MAAc,EACd,MAAqB;QAErB,OAAO,IAAI,CAAC,iBAAiB,CAC3B,MAAM,EACN,cAAc,CAAC,IAAI,CAAC,kBAAkB,CAAC,EACvC,MAAM,CACP,CAAC;IACJ,CAAC;IAEO,iBAAiB,CACvB,MAAc,EACd,QAAgB,EAChB,MAAgC;QAEhC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QAElE,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACtB,MAAM,IAAI,kBAAkB,CAAC;gBAC3B,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS;gBACpC,MAAM;gBACN,QAAQ;aACT,CAAC,CAAC;QACL,CAAC;QAED,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { SimResponseMetadata } from "../../../aws/metadata/response-metadata.type.js";
|
|
2
|
+
import type { SimSqsBatchResultErrorEntry } from "./send.command.js";
|
|
3
|
+
/**
|
|
4
|
+
* Minimal structural sim SQS DeleteMessage command.
|
|
5
|
+
*
|
|
6
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sqs/command/DeleteMessageCommand/
|
|
7
|
+
*/
|
|
8
|
+
export interface SimDeleteMessageCommand {
|
|
9
|
+
readonly input: SimDeleteMessageCommandInput;
|
|
10
|
+
}
|
|
11
|
+
export interface SimDeleteMessageCommandInput {
|
|
12
|
+
readonly QueueUrl?: string | undefined;
|
|
13
|
+
readonly ReceiptHandle?: string | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface SimDeleteMessageCommandOutput {
|
|
16
|
+
readonly $metadata: SimResponseMetadata;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* One entry of a DeleteMessageBatch request.
|
|
20
|
+
*/
|
|
21
|
+
export interface SimSqsDeleteMessageBatchEntry {
|
|
22
|
+
readonly Id?: string | undefined;
|
|
23
|
+
readonly ReceiptHandle?: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Minimal structural sim SQS DeleteMessageBatch command.
|
|
27
|
+
*
|
|
28
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sqs/command/DeleteMessageBatchCommand/
|
|
29
|
+
*/
|
|
30
|
+
export interface SimDeleteMessageBatchCommand {
|
|
31
|
+
readonly input: SimDeleteMessageBatchCommandInput;
|
|
32
|
+
}
|
|
33
|
+
export interface SimDeleteMessageBatchCommandInput {
|
|
34
|
+
readonly QueueUrl?: string | undefined;
|
|
35
|
+
readonly Entries?: readonly SimSqsDeleteMessageBatchEntry[] | undefined;
|
|
36
|
+
}
|
|
37
|
+
export interface SimSqsDeleteMessageBatchResultEntry {
|
|
38
|
+
readonly Id: string;
|
|
39
|
+
}
|
|
40
|
+
export interface SimDeleteMessageBatchCommandOutput {
|
|
41
|
+
readonly Successful?: readonly SimSqsDeleteMessageBatchResultEntry[] | undefined;
|
|
42
|
+
readonly Failed?: readonly SimSqsBatchResultErrorEntry[] | undefined;
|
|
43
|
+
readonly $metadata: SimResponseMetadata;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Minimal structural sim SQS ChangeMessageVisibility command.
|
|
47
|
+
*
|
|
48
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sqs/command/ChangeMessageVisibilityCommand/
|
|
49
|
+
*/
|
|
50
|
+
export interface SimChangeMessageVisibilityCommand {
|
|
51
|
+
readonly input: SimChangeMessageVisibilityCommandInput;
|
|
52
|
+
}
|
|
53
|
+
export interface SimChangeMessageVisibilityCommandInput {
|
|
54
|
+
readonly QueueUrl?: string | undefined;
|
|
55
|
+
readonly ReceiptHandle?: string | undefined;
|
|
56
|
+
readonly VisibilityTimeout?: number | undefined;
|
|
57
|
+
}
|
|
58
|
+
export interface SimChangeMessageVisibilityCommandOutput {
|
|
59
|
+
readonly $metadata: SimResponseMetadata;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=consume.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consume.command.d.ts","sourceRoot":"","sources":["../../../../../src/service/sqs/command/message/consume.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAErE;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,4BAA4B,CAAC;CAC9C;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,iCAAiC,CAAC;CACnD;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,6BAA6B,EAAE,GAAG,SAAS,CAAC;CACzE;AAED,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,UAAU,CAAC,EAClB,SAAS,mCAAmC,EAAE,GAAG,SAAS,CAAC;IAC7D,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,2BAA2B,EAAE,GAAG,SAAS,CAAC;IACrE,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC;AAED;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,KAAK,EAAE,sCAAsC,CAAC;CACxD;AAED,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjD;AAED,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consume.command.js","sourceRoot":"","sources":["../../../../../src/service/sqs/command/message/consume.command.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { SimResponseMetadata } from "../../../aws/metadata/response-metadata.type.js";
|
|
2
|
+
import type { SimSqsMessageAttributeValue } from "../../message/sim-sqs-message-attribute-value.js";
|
|
3
|
+
/**
|
|
4
|
+
* One message as sim SQS reports it in a receive response.
|
|
5
|
+
*
|
|
6
|
+
* https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_Message.html
|
|
7
|
+
*/
|
|
8
|
+
export interface SimSqsReceivedMessage {
|
|
9
|
+
readonly MessageId: string;
|
|
10
|
+
readonly ReceiptHandle: string;
|
|
11
|
+
readonly MD5OfBody: string;
|
|
12
|
+
readonly Body: string;
|
|
13
|
+
readonly Attributes?: Record<string, string> | undefined;
|
|
14
|
+
readonly MessageAttributes?: Record<string, SimSqsMessageAttributeValue> | undefined;
|
|
15
|
+
readonly MD5OfMessageAttributes?: string | undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Minimal structural sim SQS ReceiveMessage command.
|
|
19
|
+
*
|
|
20
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sqs/command/ReceiveMessageCommand/
|
|
21
|
+
*/
|
|
22
|
+
export interface SimReceiveMessageCommand {
|
|
23
|
+
readonly input: SimReceiveMessageCommandInput;
|
|
24
|
+
}
|
|
25
|
+
export interface SimReceiveMessageCommandInput {
|
|
26
|
+
readonly QueueUrl?: string | undefined;
|
|
27
|
+
readonly MaxNumberOfMessages?: number | undefined;
|
|
28
|
+
readonly VisibilityTimeout?: number | undefined;
|
|
29
|
+
readonly WaitTimeSeconds?: number | undefined;
|
|
30
|
+
readonly MessageAttributeNames?: readonly string[] | undefined;
|
|
31
|
+
readonly MessageSystemAttributeNames?: readonly string[] | undefined;
|
|
32
|
+
/** Discontinued by real SQS, and the same thing as the name above. */
|
|
33
|
+
readonly AttributeNames?: readonly string[] | undefined;
|
|
34
|
+
readonly ReceiveRequestAttemptId?: string | undefined;
|
|
35
|
+
}
|
|
36
|
+
export interface SimReceiveMessageCommandOutput {
|
|
37
|
+
readonly Messages?: readonly SimSqsReceivedMessage[] | undefined;
|
|
38
|
+
readonly $metadata: SimResponseMetadata;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=receive.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receive.command.d.ts","sourceRoot":"","sources":["../../../../../src/service/sqs/command/message/receive.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAEpG;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CA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 @@
|
|
|
1
|
+
{"version":3,"file":"receive.command.js","sourceRoot":"","sources":["../../../../../src/service/sqs/command/message/receive.command.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { SimResponseMetadata } from "../../../aws/metadata/response-metadata.type.js";
|
|
2
|
+
import type { SimSqsMessageAttributeInput } from "../../message/sim-sqs-message-attribute-value.js";
|
|
3
|
+
/**
|
|
4
|
+
* A message system attribute as a send request carries it.
|
|
5
|
+
*
|
|
6
|
+
* Real SQS accepts only `AWSTraceHeader` here. Simulated SQS models no message
|
|
7
|
+
* system attributes on send, so a request carrying one is refused.
|
|
8
|
+
*/
|
|
9
|
+
export interface SimSqsMessageSystemAttributeInput {
|
|
10
|
+
readonly DataType?: string | undefined;
|
|
11
|
+
readonly StringValue?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The message fields shared by SendMessage and one SendMessageBatch entry.
|
|
15
|
+
*/
|
|
16
|
+
export interface SimSqsSentMessage {
|
|
17
|
+
readonly MessageBody?: string | undefined;
|
|
18
|
+
readonly DelaySeconds?: number | undefined;
|
|
19
|
+
readonly MessageAttributes?: SimSqsMessageAttributeInput | undefined;
|
|
20
|
+
readonly MessageSystemAttributes?: Readonly<Record<string, SimSqsMessageSystemAttributeInput | undefined>> | undefined;
|
|
21
|
+
readonly MessageDeduplicationId?: string | undefined;
|
|
22
|
+
readonly MessageGroupId?: string | undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Minimal structural sim SQS SendMessage command.
|
|
26
|
+
*
|
|
27
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sqs/command/SendMessageCommand/
|
|
28
|
+
*/
|
|
29
|
+
export interface SimSendMessageCommand {
|
|
30
|
+
readonly input: SimSendMessageCommandInput;
|
|
31
|
+
}
|
|
32
|
+
export interface SimSendMessageCommandInput extends SimSqsSentMessage {
|
|
33
|
+
readonly QueueUrl?: string | undefined;
|
|
34
|
+
}
|
|
35
|
+
export interface SimSendMessageCommandOutput {
|
|
36
|
+
readonly MessageId?: string | undefined;
|
|
37
|
+
readonly MD5OfMessageBody?: string | undefined;
|
|
38
|
+
readonly MD5OfMessageAttributes?: string | undefined;
|
|
39
|
+
readonly $metadata: SimResponseMetadata;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* One entry of a SendMessageBatch request.
|
|
43
|
+
*/
|
|
44
|
+
export interface SimSqsSendMessageBatchEntry extends SimSqsSentMessage {
|
|
45
|
+
readonly Id?: string | undefined;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Minimal structural sim SQS SendMessageBatch command.
|
|
49
|
+
*
|
|
50
|
+
* https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sqs/command/SendMessageBatchCommand/
|
|
51
|
+
*/
|
|
52
|
+
export interface SimSendMessageBatchCommand {
|
|
53
|
+
readonly input: SimSendMessageBatchCommandInput;
|
|
54
|
+
}
|
|
55
|
+
export interface SimSendMessageBatchCommandInput {
|
|
56
|
+
readonly QueueUrl?: string | undefined;
|
|
57
|
+
readonly Entries?: readonly SimSqsSendMessageBatchEntry[] | undefined;
|
|
58
|
+
}
|
|
59
|
+
export interface SimSqsSendMessageBatchResultEntry {
|
|
60
|
+
readonly Id: string;
|
|
61
|
+
readonly MessageId: string;
|
|
62
|
+
readonly MD5OfMessageBody: string;
|
|
63
|
+
readonly MD5OfMessageAttributes?: string | undefined;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* One entry of a batch request that failed on its own, while the rest of the
|
|
67
|
+
* batch went through.
|
|
68
|
+
*/
|
|
69
|
+
export interface SimSqsBatchResultErrorEntry {
|
|
70
|
+
readonly Id: string;
|
|
71
|
+
readonly SenderFault: boolean;
|
|
72
|
+
readonly Code: string;
|
|
73
|
+
readonly Message?: string | undefined;
|
|
74
|
+
}
|
|
75
|
+
export interface SimSendMessageBatchCommandOutput {
|
|
76
|
+
readonly Successful?: readonly SimSqsSendMessageBatchResultEntry[] | undefined;
|
|
77
|
+
readonly Failed?: readonly SimSqsBatchResultErrorEntry[] | undefined;
|
|
78
|
+
readonly $metadata: SimResponseMetadata;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=send.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send.command.d.ts","sourceRoot":"","sources":["../../../../../src/service/sqs/command/message/send.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAEpG;;;;;GAKG;AACH,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;IACrE,QAAQ,CAAC,uBAAuB,CAAC,EAC7B,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,iCAAiC,GAAG,SAAS,CAAC,CAAC,GACvE,SAAS,CAAC;IACd,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9C;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,EAAE,0BAA0B,CAAC;CAC5C;AAED,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,QAAQ,CAA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,SAAS,iCAAiC,EAAE,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,2BAA2B,EAAE,GAAG,SAAS,CAAC;IACrE,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send.command.js","sourceRoot":"","sources":["../../../../../src/service/sqs/command/message/send.command.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { SimSqsBatchResultErrorEntry } from "./send.command.js";
|
|
2
|
+
/**
|
|
3
|
+
* What every batch request entry carries: an id the response reports it under.
|
|
4
|
+
*/
|
|
5
|
+
export interface SimSqsIdentifiedEntry {
|
|
6
|
+
readonly Id?: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* One entry of a batch request whose id has been checked.
|
|
10
|
+
*/
|
|
11
|
+
export interface SimSqsBatchEntry<T> {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly entry: T;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The outcome of running a batch: what went through, and what failed on its own.
|
|
17
|
+
*/
|
|
18
|
+
export interface SimSqsBatchOutcome<T> {
|
|
19
|
+
readonly successful: readonly T[];
|
|
20
|
+
readonly failed: readonly SimSqsBatchResultErrorEntry[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Check the entries of a batch request the way real SQS checks them.
|
|
24
|
+
*
|
|
25
|
+
* These are the failures that take the whole request down rather than one entry:
|
|
26
|
+
* an empty batch, too many entries, a malformed id, or two entries sharing one.
|
|
27
|
+
* Everything else is a per-entry failure, reported in `Failed` while the rest of
|
|
28
|
+
* the batch goes through.
|
|
29
|
+
*/
|
|
30
|
+
export declare function requireBatchEntries<T extends SimSqsIdentifiedEntry>(entries: readonly T[] | undefined, operation: string): readonly SimSqsBatchEntry<T>[];
|
|
31
|
+
/**
|
|
32
|
+
* Run every entry of a batch, keeping one entry's failure out of the way of the
|
|
33
|
+
* others.
|
|
34
|
+
*
|
|
35
|
+
* Real SQS answers a batch request with two lists rather than failing it, so a
|
|
36
|
+
* message too large for the queue does not stop the nine beside it being sent.
|
|
37
|
+
*/
|
|
38
|
+
export declare function runBatch<T, R>(entries: readonly SimSqsBatchEntry<T>[], run: (entry: T, id: string) => R): SimSqsBatchOutcome<R>;
|
|
39
|
+
//# sourceMappingURL=sim-sqs-batch-entries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sqs-batch-entries.d.ts","sourceRoot":"","sources":["../../../../../src/service/sqs/command/message/sim-sqs-batch-entries.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAMrE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,SAAS,2BAA2B,EAAE,CAAC;CACzD;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,qBAAqB,EACjE,OAAO,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS,EACjC,SAAS,EAAE,MAAM,GAChB,SAAS,gBAAgB,CAAC,CAAC,CAAC,EAAE,CA2BhC;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAC3B,OAAO,EAAE,SAAS,gBAAgB,CAAC,CAAC,CAAC,EAAE,EACvC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,KAAK,CAAC,GAC/B,kBAAkB,CAAC,CAAC,CAAC,CAwBvB"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { SimSqsBatchEntryIdsNotDistinct, SimSqsEmptyBatchRequest, SimSqsError, SimSqsInvalidBatchEntryId, SimSqsTooManyEntriesInBatchRequest, } from "../../error/sim-sqs.error.js";
|
|
2
|
+
const maximumEntries = 10;
|
|
3
|
+
const entryIdPattern = /^[\w-]{1,80}$/;
|
|
4
|
+
/**
|
|
5
|
+
* Check the entries of a batch request the way real SQS checks them.
|
|
6
|
+
*
|
|
7
|
+
* These are the failures that take the whole request down rather than one entry:
|
|
8
|
+
* an empty batch, too many entries, a malformed id, or two entries sharing one.
|
|
9
|
+
* Everything else is a per-entry failure, reported in `Failed` while the rest of
|
|
10
|
+
* the batch goes through.
|
|
11
|
+
*/
|
|
12
|
+
export function requireBatchEntries(entries, operation) {
|
|
13
|
+
if (entries === undefined || entries.length === 0) {
|
|
14
|
+
throw new SimSqsEmptyBatchRequest(`There should be at least one ${operation}BatchRequestEntry in the request`);
|
|
15
|
+
}
|
|
16
|
+
if (entries.length > maximumEntries) {
|
|
17
|
+
throw new SimSqsTooManyEntriesInBatchRequest(`Maximum number of entries per request is ${String(maximumEntries)}. ` +
|
|
18
|
+
`You have sent ${String(entries.length)}.`);
|
|
19
|
+
}
|
|
20
|
+
const checked = entries.map((entry) => ({
|
|
21
|
+
id: requireEntryId(entry.Id),
|
|
22
|
+
entry,
|
|
23
|
+
}));
|
|
24
|
+
const ids = new Set(checked.map(({ id }) => id));
|
|
25
|
+
if (ids.size !== checked.length) {
|
|
26
|
+
throw new SimSqsBatchEntryIdsNotDistinct("Two or more batch entries in the request have the same Id");
|
|
27
|
+
}
|
|
28
|
+
return checked;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Run every entry of a batch, keeping one entry's failure out of the way of the
|
|
32
|
+
* others.
|
|
33
|
+
*
|
|
34
|
+
* Real SQS answers a batch request with two lists rather than failing it, so a
|
|
35
|
+
* message too large for the queue does not stop the nine beside it being sent.
|
|
36
|
+
*/
|
|
37
|
+
export function runBatch(entries, run) {
|
|
38
|
+
const successful = [];
|
|
39
|
+
const failed = [];
|
|
40
|
+
for (const { id, entry } of entries) {
|
|
41
|
+
try {
|
|
42
|
+
successful.push(run(entry, id));
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
// Only an SQS failure belongs to one entry. Anything else, an IAM denial
|
|
46
|
+
// above all, is about the request as a whole.
|
|
47
|
+
if (!(error instanceof SimSqsError)) {
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
failed.push({
|
|
51
|
+
Id: id,
|
|
52
|
+
SenderFault: true,
|
|
53
|
+
Code: error.name,
|
|
54
|
+
Message: error.message,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return { successful, failed };
|
|
59
|
+
}
|
|
60
|
+
function requireEntryId(id) {
|
|
61
|
+
if (id === undefined || !entryIdPattern.test(id)) {
|
|
62
|
+
throw new SimSqsInvalidBatchEntryId(`A batch entry id is required, and may contain up to 80 alphanumeric ` +
|
|
63
|
+
`characters, hyphens and underscores. Got '${String(id)}'.`);
|
|
64
|
+
}
|
|
65
|
+
return id;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=sim-sqs-batch-entries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-sqs-batch-entries.js","sourceRoot":"","sources":["../../../../../src/service/sqs/command/message/sim-sqs-batch-entries.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,EACvB,WAAW,EACX,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,8BAA8B,CAAC;AAGtC,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,MAAM,cAAc,GAAG,eAAe,CAAC;AAyBvC;;;;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