@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.
Files changed (408) hide show
  1. package/README.md +1 -0
  2. package/dist/sdk/router/resolve-sim-sdk-command-router.d.ts.map +1 -1
  3. package/dist/sdk/router/resolve-sim-sdk-command-router.js +3 -0
  4. package/dist/sdk/router/resolve-sim-sdk-command-router.js.map +1 -1
  5. package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts +11 -0
  6. package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts.map +1 -1
  7. package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +19 -0
  8. package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
  9. package/dist/service/aws/factory/sim-aws-service-factory.d.ts +3 -0
  10. package/dist/service/aws/factory/sim-aws-service-factory.d.ts.map +1 -1
  11. package/dist/service/aws/factory/sim-aws-service-factory.js +4 -0
  12. package/dist/service/aws/factory/sim-aws-service-factory.js.map +1 -1
  13. package/dist/service/aws/sim-aws-account-region-scope.d.ts +5 -0
  14. package/dist/service/aws/sim-aws-account-region-scope.d.ts.map +1 -1
  15. package/dist/service/aws/sim-aws-account-region-scope.js +6 -0
  16. package/dist/service/aws/sim-aws-account-region-scope.js.map +1 -1
  17. package/dist/service/aws/sim-aws.d.ts +3 -0
  18. package/dist/service/aws/sim-aws.d.ts.map +1 -1
  19. package/dist/service/aws/sim-aws.js +4 -0
  20. package/dist/service/aws/sim-aws.js.map +1 -1
  21. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.d.ts.map +1 -1
  22. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.js +8 -0
  23. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.js.map +1 -1
  24. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-event-source-mapping-cfn.d.ts +28 -0
  25. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-event-source-mapping-cfn.d.ts.map +1 -0
  26. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-event-source-mapping-cfn.js +33 -0
  27. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-event-source-mapping-cfn.js.map +1 -0
  28. package/dist/service/cloudformation/resource/cfn/sim-cfn-resource-value-adapter.d.ts.map +1 -1
  29. package/dist/service/cloudformation/resource/cfn/sim-cfn-resource-value-adapter.js +2 -0
  30. package/dist/service/cloudformation/resource/cfn/sim-cfn-resource-value-adapter.js.map +1 -1
  31. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-cfn-value-adapter.d.ts +6 -0
  32. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-cfn-value-adapter.d.ts.map +1 -0
  33. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-cfn-value-adapter.js +13 -0
  34. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-cfn-value-adapter.js.map +1 -0
  35. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-queue-cfn.d.ts +28 -0
  36. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-queue-cfn.d.ts.map +1 -0
  37. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-queue-cfn.js +40 -0
  38. package/dist/service/cloudformation/resource/cfn/sqs/sim-sqs-queue-cfn.js.map +1 -0
  39. package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-resolver.d.ts.map +1 -1
  40. package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-resolver.js +3 -0
  41. package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-resolver.js.map +1 -1
  42. package/dist/service/cloudformation/resource/sim-cfn-resource.d.ts +3 -0
  43. package/dist/service/cloudformation/resource/sim-cfn-resource.d.ts.map +1 -1
  44. package/dist/service/cloudformation/resource/sim-cfn-resource.js +4 -1
  45. package/dist/service/cloudformation/resource/sim-cfn-resource.js.map +1 -1
  46. package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-map.d.ts.map +1 -1
  47. package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-map.js +1 -0
  48. package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-map.js.map +1 -1
  49. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.d.ts +26 -0
  50. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.d.ts.map +1 -0
  51. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.js +33 -0
  52. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-creator.js.map +1 -0
  53. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.d.ts +28 -0
  54. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.d.ts.map +1 -0
  55. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.js +38 -0
  56. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-properties.js.map +1 -0
  57. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.d.ts +17 -0
  58. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.d.ts.map +1 -0
  59. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.js +71 -0
  60. package/dist/service/lambda/cfn/event-source-mapping/sim-cfn-lambda-event-source-mapping-property-rules.js.map +1 -0
  61. package/dist/service/lambda/cfn/function/sim-cfn-lambda-property-parser.d.ts +4 -0
  62. package/dist/service/lambda/cfn/function/sim-cfn-lambda-property-parser.d.ts.map +1 -1
  63. package/dist/service/lambda/cfn/function/sim-cfn-lambda-property-parser.js +12 -0
  64. package/dist/service/lambda/cfn/function/sim-cfn-lambda-property-parser.js.map +1 -1
  65. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.d.ts +5 -6
  66. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.d.ts.map +1 -1
  67. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.js +7 -13
  68. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.js.map +1 -1
  69. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.d.ts +1 -0
  70. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.d.ts.map +1 -1
  71. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.js +8 -0
  72. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.js.map +1 -1
  73. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts +25 -0
  74. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts.map +1 -0
  75. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js +55 -0
  76. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js.map +1 -0
  77. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.d.ts +6 -0
  78. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.d.ts.map +1 -0
  79. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.js +64 -0
  80. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-refusals.js.map +1 -0
  81. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.d.ts +17 -0
  82. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.d.ts.map +1 -0
  83. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.js +47 -0
  84. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-values.js.map +1 -0
  85. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.d.ts +53 -0
  86. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.d.ts.map +1 -0
  87. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js +77 -0
  88. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js.map +1 -0
  89. package/dist/service/lambda/command/event-source-mapping/event-source-mapping-access.d.ts +41 -0
  90. package/dist/service/lambda/command/event-source-mapping/event-source-mapping-access.d.ts.map +1 -0
  91. package/dist/service/lambda/command/event-source-mapping/event-source-mapping-access.js +51 -0
  92. package/dist/service/lambda/command/event-source-mapping/event-source-mapping-access.js.map +1 -0
  93. package/dist/service/lambda/command/event-source-mapping/event-source-mapping.command.d.ts +91 -0
  94. package/dist/service/lambda/command/event-source-mapping/event-source-mapping.command.d.ts.map +1 -0
  95. package/dist/service/lambda/command/event-source-mapping/event-source-mapping.command.js +8 -0
  96. package/dist/service/lambda/command/event-source-mapping/event-source-mapping.command.js.map +1 -0
  97. package/dist/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.d.ts +60 -0
  98. package/dist/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.d.ts.map +1 -0
  99. package/dist/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.js +89 -0
  100. package/dist/service/lambda/command/event-source-mapping/sim-lambda-event-source-mapping-commands.js.map +1 -0
  101. package/dist/service/lambda/command/sim-lambda-command.types.d.ts +1 -0
  102. package/dist/service/lambda/command/sim-lambda-command.types.d.ts.map +1 -1
  103. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.d.ts +27 -0
  104. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.d.ts.map +1 -0
  105. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.js +32 -0
  106. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-delivery.js.map +1 -0
  107. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.d.ts +40 -0
  108. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.d.ts.map +1 -0
  109. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.js +55 -0
  110. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poll-schedule.js.map +1 -0
  111. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.d.ts +85 -0
  112. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.d.ts.map +1 -0
  113. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.js +136 -0
  114. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-poller.js.map +1 -0
  115. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.d.ts +49 -0
  116. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.d.ts.map +1 -0
  117. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.js +97 -0
  118. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-batch-response.js.map +1 -0
  119. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event.d.ts +56 -0
  120. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event.d.ts.map +1 -0
  121. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event.js +55 -0
  122. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event.js.map +1 -0
  123. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queue-service.d.ts +49 -0
  124. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queue-service.d.ts.map +1 -0
  125. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queue-service.js +2 -0
  126. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queue-service.js.map +1 -0
  127. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queues.d.ts +118 -0
  128. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queues.d.ts.map +1 -0
  129. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queues.js +49 -0
  130. package/dist/service/lambda/event-source/queue/sim-lambda-event-source-queues.js.map +1 -0
  131. package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.d.ts +32 -0
  132. package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.d.ts.map +1 -0
  133. package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.js +52 -0
  134. package/dist/service/lambda/event-source/queue/sim-lambda-sqs-event-source-arn.js.map +1 -0
  135. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queue-attributes.d.ts +29 -0
  136. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queue-attributes.d.ts.map +1 -0
  137. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queue-attributes.js +49 -0
  138. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queue-attributes.js.map +1 -0
  139. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queues.d.ts +57 -0
  140. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queues.d.ts.map +1 -0
  141. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queues.js +89 -0
  142. package/dist/service/lambda/event-source/queue/sim-sqs-event-source-queues.js.map +1 -0
  143. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping-store.d.ts +46 -0
  144. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping-store.d.ts.map +1 -0
  145. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping-store.js +57 -0
  146. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping-store.js.map +1 -0
  147. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts +101 -0
  148. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts.map +1 -0
  149. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js +93 -0
  150. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js.map +1 -0
  151. package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.d.ts +37 -0
  152. package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.d.ts.map +1 -0
  153. package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.js +44 -0
  154. package/dist/service/lambda/event-source/sim-lambda-event-source-pollers.js.map +1 -0
  155. package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.d.ts +23 -0
  156. package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.d.ts.map +1 -0
  157. package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.js +46 -0
  158. package/dist/service/lambda/event-source/sim-lambda-event-source-role-permissions.js.map +1 -0
  159. package/dist/service/lambda/function/sim-lambda-function-name.d.ts +10 -0
  160. package/dist/service/lambda/function/sim-lambda-function-name.d.ts.map +1 -0
  161. package/dist/service/lambda/function/sim-lambda-function-name.js +18 -0
  162. package/dist/service/lambda/function/sim-lambda-function-name.js.map +1 -0
  163. package/dist/service/lambda/function/url/sim-lambda-function-lookup.d.ts +4 -0
  164. package/dist/service/lambda/function/url/sim-lambda-function-lookup.d.ts.map +1 -1
  165. package/dist/service/lambda/function/url/sim-lambda-function-lookup.js +6 -0
  166. package/dist/service/lambda/function/url/sim-lambda-function-lookup.js.map +1 -1
  167. package/dist/service/lambda/index.d.ts +1 -0
  168. package/dist/service/lambda/index.d.ts.map +1 -1
  169. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.d.ts.map +1 -1
  170. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js +16 -0
  171. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js.map +1 -1
  172. package/dist/service/lambda/sim-lambda-commands.d.ts +51 -0
  173. package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -0
  174. package/dist/service/lambda/sim-lambda-commands.js +84 -0
  175. package/dist/service/lambda/sim-lambda-commands.js.map +1 -0
  176. package/dist/service/lambda/sim-lambda.d.ts +35 -39
  177. package/dist/service/lambda/sim-lambda.d.ts.map +1 -1
  178. package/dist/service/lambda/sim-lambda.js +47 -65
  179. package/dist/service/lambda/sim-lambda.js.map +1 -1
  180. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.d.ts +25 -0
  181. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.d.ts.map +1 -0
  182. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.js +33 -0
  183. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.js.map +1 -0
  184. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.d.ts +45 -0
  185. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.d.ts.map +1 -0
  186. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.js +67 -0
  187. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.js.map +1 -0
  188. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.d.ts +44 -0
  189. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.d.ts.map +1 -0
  190. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.js +72 -0
  191. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.js.map +1 -0
  192. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.d.ts +47 -0
  193. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.d.ts.map +1 -0
  194. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.js +122 -0
  195. package/dist/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.js.map +1 -0
  196. package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.d.ts +24 -0
  197. package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.d.ts.map +1 -0
  198. package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.js +29 -0
  199. package/dist/service/sqs/cfn/sim-sqs-cfn-resource-factory.js.map +1 -0
  200. package/dist/service/sqs/command/authorize/sim-sqs-authorizer.d.ts +41 -0
  201. package/dist/service/sqs/command/authorize/sim-sqs-authorizer.d.ts.map +1 -0
  202. package/dist/service/sqs/command/authorize/sim-sqs-authorizer.js +51 -0
  203. package/dist/service/sqs/command/authorize/sim-sqs-authorizer.js.map +1 -0
  204. package/dist/service/sqs/command/message/consume.command.d.ts +61 -0
  205. package/dist/service/sqs/command/message/consume.command.d.ts.map +1 -0
  206. package/dist/service/sqs/command/message/consume.command.js +2 -0
  207. package/dist/service/sqs/command/message/consume.command.js.map +1 -0
  208. package/dist/service/sqs/command/message/receive.command.d.ts +40 -0
  209. package/dist/service/sqs/command/message/receive.command.d.ts.map +1 -0
  210. package/dist/service/sqs/command/message/receive.command.js +2 -0
  211. package/dist/service/sqs/command/message/receive.command.js.map +1 -0
  212. package/dist/service/sqs/command/message/send.command.d.ts +80 -0
  213. package/dist/service/sqs/command/message/send.command.d.ts.map +1 -0
  214. package/dist/service/sqs/command/message/send.command.js +2 -0
  215. package/dist/service/sqs/command/message/send.command.js.map +1 -0
  216. package/dist/service/sqs/command/message/sim-sqs-batch-entries.d.ts +39 -0
  217. package/dist/service/sqs/command/message/sim-sqs-batch-entries.d.ts.map +1 -0
  218. package/dist/service/sqs/command/message/sim-sqs-batch-entries.js +67 -0
  219. package/dist/service/sqs/command/message/sim-sqs-batch-entries.js.map +1 -0
  220. package/dist/service/sqs/command/message/sim-sqs-change-message-visibility.d.ts +31 -0
  221. package/dist/service/sqs/command/message/sim-sqs-change-message-visibility.d.ts.map +1 -0
  222. package/dist/service/sqs/command/message/sim-sqs-change-message-visibility.js +51 -0
  223. package/dist/service/sqs/command/message/sim-sqs-change-message-visibility.js.map +1 -0
  224. package/dist/service/sqs/command/message/sim-sqs-delete-message-commands.d.ts +38 -0
  225. package/dist/service/sqs/command/message/sim-sqs-delete-message-commands.d.ts.map +1 -0
  226. package/dist/service/sqs/command/message/sim-sqs-delete-message-commands.js +58 -0
  227. package/dist/service/sqs/command/message/sim-sqs-delete-message-commands.js.map +1 -0
  228. package/dist/service/sqs/command/message/sim-sqs-message-handles.d.ts +28 -0
  229. package/dist/service/sqs/command/message/sim-sqs-message-handles.d.ts.map +1 -0
  230. package/dist/service/sqs/command/message/sim-sqs-message-handles.js +36 -0
  231. package/dist/service/sqs/command/message/sim-sqs-message-handles.js.map +1 -0
  232. package/dist/service/sqs/command/message/sim-sqs-receive-limits.d.ts +27 -0
  233. package/dist/service/sqs/command/message/sim-sqs-receive-limits.d.ts.map +1 -0
  234. package/dist/service/sqs/command/message/sim-sqs-receive-limits.js +70 -0
  235. package/dist/service/sqs/command/message/sim-sqs-receive-limits.js.map +1 -0
  236. package/dist/service/sqs/command/message/sim-sqs-receive-message.d.ts +32 -0
  237. package/dist/service/sqs/command/message/sim-sqs-receive-message.d.ts.map +1 -0
  238. package/dist/service/sqs/command/message/sim-sqs-receive-message.js +33 -0
  239. package/dist/service/sqs/command/message/sim-sqs-receive-message.js.map +1 -0
  240. package/dist/service/sqs/command/message/sim-sqs-receive-request.d.ts +33 -0
  241. package/dist/service/sqs/command/message/sim-sqs-receive-request.d.ts.map +1 -0
  242. package/dist/service/sqs/command/message/sim-sqs-receive-request.js +55 -0
  243. package/dist/service/sqs/command/message/sim-sqs-receive-request.js.map +1 -0
  244. package/dist/service/sqs/command/message/sim-sqs-received-message-view.d.ts +25 -0
  245. package/dist/service/sqs/command/message/sim-sqs-received-message-view.d.ts.map +1 -0
  246. package/dist/service/sqs/command/message/sim-sqs-received-message-view.js +38 -0
  247. package/dist/service/sqs/command/message/sim-sqs-received-message-view.js.map +1 -0
  248. package/dist/service/sqs/command/message/sim-sqs-send-message-commands.d.ts +32 -0
  249. package/dist/service/sqs/command/message/sim-sqs-send-message-commands.d.ts.map +1 -0
  250. package/dist/service/sqs/command/message/sim-sqs-send-message-commands.js +56 -0
  251. package/dist/service/sqs/command/message/sim-sqs-send-message-commands.js.map +1 -0
  252. package/dist/service/sqs/command/message/sim-sqs-sent-message.d.ts +18 -0
  253. package/dist/service/sqs/command/message/sim-sqs-sent-message.d.ts.map +1 -0
  254. package/dist/service/sqs/command/message/sim-sqs-sent-message.js +37 -0
  255. package/dist/service/sqs/command/message/sim-sqs-sent-message.js.map +1 -0
  256. package/dist/service/sqs/command/queue/queue.command.d.ts +114 -0
  257. package/dist/service/sqs/command/queue/queue.command.d.ts.map +1 -0
  258. package/dist/service/sqs/command/queue/queue.command.js +2 -0
  259. package/dist/service/sqs/command/queue/queue.command.js.map +1 -0
  260. package/dist/service/sqs/command/queue/sim-sqs-create-queue.d.ts +51 -0
  261. package/dist/service/sqs/command/queue/sim-sqs-create-queue.d.ts.map +1 -0
  262. package/dist/service/sqs/command/queue/sim-sqs-create-queue.js +70 -0
  263. package/dist/service/sqs/command/queue/sim-sqs-create-queue.js.map +1 -0
  264. package/dist/service/sqs/command/queue/sim-sqs-queue-access.d.ts +63 -0
  265. package/dist/service/sqs/command/queue/sim-sqs-queue-access.d.ts.map +1 -0
  266. package/dist/service/sqs/command/queue/sim-sqs-queue-access.js +98 -0
  267. package/dist/service/sqs/command/queue/sim-sqs-queue-access.js.map +1 -0
  268. package/dist/service/sqs/command/queue/sim-sqs-queue-attribute-commands.d.ts +45 -0
  269. package/dist/service/sqs/command/queue/sim-sqs-queue-attribute-commands.d.ts.map +1 -0
  270. package/dist/service/sqs/command/queue/sim-sqs-queue-attribute-commands.js +74 -0
  271. package/dist/service/sqs/command/queue/sim-sqs-queue-attribute-commands.js.map +1 -0
  272. package/dist/service/sqs/command/queue/sim-sqs-queue-commands.d.ts +47 -0
  273. package/dist/service/sqs/command/queue/sim-sqs-queue-commands.d.ts.map +1 -0
  274. package/dist/service/sqs/command/queue/sim-sqs-queue-commands.js +55 -0
  275. package/dist/service/sqs/command/queue/sim-sqs-queue-commands.js.map +1 -0
  276. package/dist/service/sqs/command/queue/sim-sqs-queue-page.d.ts +27 -0
  277. package/dist/service/sqs/command/queue/sim-sqs-queue-page.d.ts.map +1 -0
  278. package/dist/service/sqs/command/queue/sim-sqs-queue-page.js +54 -0
  279. package/dist/service/sqs/command/queue/sim-sqs-queue-page.js.map +1 -0
  280. package/dist/service/sqs/command/queue/sim-sqs-unsimulated-queue-input.d.ts +18 -0
  281. package/dist/service/sqs/command/queue/sim-sqs-unsimulated-queue-input.d.ts.map +1 -0
  282. package/dist/service/sqs/command/queue/sim-sqs-unsimulated-queue-input.js +27 -0
  283. package/dist/service/sqs/command/queue/sim-sqs-unsimulated-queue-input.js.map +1 -0
  284. package/dist/service/sqs/command/sim-sqs-command.types.d.ts +8 -0
  285. package/dist/service/sqs/command/sim-sqs-command.types.d.ts.map +1 -0
  286. package/dist/service/sqs/command/sim-sqs-command.types.js +2 -0
  287. package/dist/service/sqs/command/sim-sqs-command.types.js.map +1 -0
  288. package/dist/service/sqs/error/sim-sqs.error.d.ts +162 -0
  289. package/dist/service/sqs/error/sim-sqs.error.d.ts.map +1 -0
  290. package/dist/service/sqs/error/sim-sqs.error.js +191 -0
  291. package/dist/service/sqs/error/sim-sqs.error.js.map +1 -0
  292. package/dist/service/sqs/index.d.ts +14 -0
  293. package/dist/service/sqs/index.d.ts.map +1 -0
  294. package/dist/service/sqs/index.js +13 -0
  295. package/dist/service/sqs/index.js.map +1 -0
  296. package/dist/service/sqs/message/sim-sqs-message-attribute-payload.d.ts +56 -0
  297. package/dist/service/sqs/message/sim-sqs-message-attribute-payload.d.ts.map +1 -0
  298. package/dist/service/sqs/message/sim-sqs-message-attribute-payload.js +42 -0
  299. package/dist/service/sqs/message/sim-sqs-message-attribute-payload.js.map +1 -0
  300. package/dist/service/sqs/message/sim-sqs-message-attribute-rules.d.ts +23 -0
  301. package/dist/service/sqs/message/sim-sqs-message-attribute-rules.d.ts.map +1 -0
  302. package/dist/service/sqs/message/sim-sqs-message-attribute-rules.js +68 -0
  303. package/dist/service/sqs/message/sim-sqs-message-attribute-rules.js.map +1 -0
  304. package/dist/service/sqs/message/sim-sqs-message-attribute-value.d.ts +17 -0
  305. package/dist/service/sqs/message/sim-sqs-message-attribute-value.d.ts.map +1 -0
  306. package/dist/service/sqs/message/sim-sqs-message-attribute-value.js +2 -0
  307. package/dist/service/sqs/message/sim-sqs-message-attribute-value.js.map +1 -0
  308. package/dist/service/sqs/message/sim-sqs-message-attribute.d.ts +29 -0
  309. package/dist/service/sqs/message/sim-sqs-message-attribute.d.ts.map +1 -0
  310. package/dist/service/sqs/message/sim-sqs-message-attribute.js +56 -0
  311. package/dist/service/sqs/message/sim-sqs-message-attribute.js.map +1 -0
  312. package/dist/service/sqs/message/sim-sqs-message-attributes.d.ts +44 -0
  313. package/dist/service/sqs/message/sim-sqs-message-attributes.d.ts.map +1 -0
  314. package/dist/service/sqs/message/sim-sqs-message-attributes.js +93 -0
  315. package/dist/service/sqs/message/sim-sqs-message-attributes.js.map +1 -0
  316. package/dist/service/sqs/message/sim-sqs-message-body.d.ts +18 -0
  317. package/dist/service/sqs/message/sim-sqs-message-body.d.ts.map +1 -0
  318. package/dist/service/sqs/message/sim-sqs-message-body.js +66 -0
  319. package/dist/service/sqs/message/sim-sqs-message-body.js.map +1 -0
  320. package/dist/service/sqs/message/sim-sqs-message-store.d.ts +74 -0
  321. package/dist/service/sqs/message/sim-sqs-message-store.d.ts.map +1 -0
  322. package/dist/service/sqs/message/sim-sqs-message-store.js +99 -0
  323. package/dist/service/sqs/message/sim-sqs-message-store.js.map +1 -0
  324. package/dist/service/sqs/message/sim-sqs-message-system-attributes.d.ts +28 -0
  325. package/dist/service/sqs/message/sim-sqs-message-system-attributes.d.ts.map +1 -0
  326. package/dist/service/sqs/message/sim-sqs-message-system-attributes.js +75 -0
  327. package/dist/service/sqs/message/sim-sqs-message-system-attributes.js.map +1 -0
  328. package/dist/service/sqs/message/sim-sqs-message-visibility.d.ts +56 -0
  329. package/dist/service/sqs/message/sim-sqs-message-visibility.d.ts.map +1 -0
  330. package/dist/service/sqs/message/sim-sqs-message-visibility.js +79 -0
  331. package/dist/service/sqs/message/sim-sqs-message-visibility.js.map +1 -0
  332. package/dist/service/sqs/message/sim-sqs-message-writer.d.ts +41 -0
  333. package/dist/service/sqs/message/sim-sqs-message-writer.d.ts.map +1 -0
  334. package/dist/service/sqs/message/sim-sqs-message-writer.js +56 -0
  335. package/dist/service/sqs/message/sim-sqs-message-writer.js.map +1 -0
  336. package/dist/service/sqs/message/sim-sqs-message.d.ts +96 -0
  337. package/dist/service/sqs/message/sim-sqs-message.d.ts.map +1 -0
  338. package/dist/service/sqs/message/sim-sqs-message.js +136 -0
  339. package/dist/service/sqs/message/sim-sqs-message.js.map +1 -0
  340. package/dist/service/sqs/message/sim-sqs-receipt-handle.d.ts +10 -0
  341. package/dist/service/sqs/message/sim-sqs-receipt-handle.d.ts.map +1 -0
  342. package/dist/service/sqs/message/sim-sqs-receipt-handle.js +14 -0
  343. package/dist/service/sqs/message/sim-sqs-receipt-handle.js.map +1 -0
  344. package/dist/service/sqs/queue/sim-sqs-dead-letter-targets.d.ts +51 -0
  345. package/dist/service/sqs/queue/sim-sqs-dead-letter-targets.d.ts.map +1 -0
  346. package/dist/service/sqs/queue/sim-sqs-dead-letter-targets.js +62 -0
  347. package/dist/service/sqs/queue/sim-sqs-dead-letter-targets.js.map +1 -0
  348. package/dist/service/sqs/queue/sim-sqs-deleted-queue-names.d.ts +20 -0
  349. package/dist/service/sqs/queue/sim-sqs-deleted-queue-names.d.ts.map +1 -0
  350. package/dist/service/sqs/queue/sim-sqs-deleted-queue-names.js +42 -0
  351. package/dist/service/sqs/queue/sim-sqs-deleted-queue-names.js.map +1 -0
  352. package/dist/service/sqs/queue/sim-sqs-queue-activity.d.ts +65 -0
  353. package/dist/service/sqs/queue/sim-sqs-queue-activity.d.ts.map +1 -0
  354. package/dist/service/sqs/queue/sim-sqs-queue-activity.js +57 -0
  355. package/dist/service/sqs/queue/sim-sqs-queue-activity.js.map +1 -0
  356. package/dist/service/sqs/queue/sim-sqs-queue-arn.d.ts +41 -0
  357. package/dist/service/sqs/queue/sim-sqs-queue-arn.d.ts.map +1 -0
  358. package/dist/service/sqs/queue/sim-sqs-queue-arn.js +47 -0
  359. package/dist/service/sqs/queue/sim-sqs-queue-arn.js.map +1 -0
  360. package/dist/service/sqs/queue/sim-sqs-queue-attribute-names.d.ts +27 -0
  361. package/dist/service/sqs/queue/sim-sqs-queue-attribute-names.d.ts.map +1 -0
  362. package/dist/service/sqs/queue/sim-sqs-queue-attribute-names.js +83 -0
  363. package/dist/service/sqs/queue/sim-sqs-queue-attribute-names.js.map +1 -0
  364. package/dist/service/sqs/queue/sim-sqs-queue-attribute-numbers.d.ts +34 -0
  365. package/dist/service/sqs/queue/sim-sqs-queue-attribute-numbers.d.ts.map +1 -0
  366. package/dist/service/sqs/queue/sim-sqs-queue-attribute-numbers.js +93 -0
  367. package/dist/service/sqs/queue/sim-sqs-queue-attribute-numbers.js.map +1 -0
  368. package/dist/service/sqs/queue/sim-sqs-queue-attribute-specs.d.ts +20 -0
  369. package/dist/service/sqs/queue/sim-sqs-queue-attribute-specs.d.ts.map +1 -0
  370. package/dist/service/sqs/queue/sim-sqs-queue-attribute-specs.js +37 -0
  371. package/dist/service/sqs/queue/sim-sqs-queue-attribute-specs.js.map +1 -0
  372. package/dist/service/sqs/queue/sim-sqs-queue-attributes.d.ts +60 -0
  373. package/dist/service/sqs/queue/sim-sqs-queue-attributes.d.ts.map +1 -0
  374. package/dist/service/sqs/queue/sim-sqs-queue-attributes.js +96 -0
  375. package/dist/service/sqs/queue/sim-sqs-queue-attributes.js.map +1 -0
  376. package/dist/service/sqs/queue/sim-sqs-queue-name.d.ts +21 -0
  377. package/dist/service/sqs/queue/sim-sqs-queue-name.d.ts.map +1 -0
  378. package/dist/service/sqs/queue/sim-sqs-queue-name.js +47 -0
  379. package/dist/service/sqs/queue/sim-sqs-queue-name.js.map +1 -0
  380. package/dist/service/sqs/queue/sim-sqs-queue-report.d.ts +22 -0
  381. package/dist/service/sqs/queue/sim-sqs-queue-report.d.ts.map +1 -0
  382. package/dist/service/sqs/queue/sim-sqs-queue-report.js +29 -0
  383. package/dist/service/sqs/queue/sim-sqs-queue-report.js.map +1 -0
  384. package/dist/service/sqs/queue/sim-sqs-queue-store.d.ts +60 -0
  385. package/dist/service/sqs/queue/sim-sqs-queue-store.d.ts.map +1 -0
  386. package/dist/service/sqs/queue/sim-sqs-queue-store.js +87 -0
  387. package/dist/service/sqs/queue/sim-sqs-queue-store.js.map +1 -0
  388. package/dist/service/sqs/queue/sim-sqs-queue-url.d.ts +24 -0
  389. package/dist/service/sqs/queue/sim-sqs-queue-url.d.ts.map +1 -0
  390. package/dist/service/sqs/queue/sim-sqs-queue-url.js +36 -0
  391. package/dist/service/sqs/queue/sim-sqs-queue-url.js.map +1 -0
  392. package/dist/service/sqs/queue/sim-sqs-queue.d.ts +130 -0
  393. package/dist/service/sqs/queue/sim-sqs-queue.d.ts.map +1 -0
  394. package/dist/service/sqs/queue/sim-sqs-queue.js +188 -0
  395. package/dist/service/sqs/queue/sim-sqs-queue.js.map +1 -0
  396. package/dist/service/sqs/queue/sim-sqs-redrive-policy.d.ts +30 -0
  397. package/dist/service/sqs/queue/sim-sqs-redrive-policy.d.ts.map +1 -0
  398. package/dist/service/sqs/queue/sim-sqs-redrive-policy.js +118 -0
  399. package/dist/service/sqs/queue/sim-sqs-redrive-policy.js.map +1 -0
  400. package/dist/service/sqs/sdk/sim-sqs-sdk-command-router.d.ts +18 -0
  401. package/dist/service/sqs/sdk/sim-sqs-sdk-command-router.d.ts.map +1 -0
  402. package/dist/service/sqs/sdk/sim-sqs-sdk-command-router.js +76 -0
  403. package/dist/service/sqs/sdk/sim-sqs-sdk-command-router.js.map +1 -0
  404. package/dist/service/sqs/sim-sqs.d.ts +119 -0
  405. package/dist/service/sqs/sim-sqs.d.ts.map +1 -0
  406. package/dist/service/sqs/sim-sqs.js +213 -0
  407. package/dist/service/sqs/sim-sqs.js.map +1 -0
  408. package/package.json +6 -1
@@ -1,137 +1,119 @@
1
- import { BackgroundTasks, } from "../../util/background/background.js";
2
- import { simAwsAccountRegionScopeFactory } from "../aws/sim-aws-account-region-scope.factory.js";
3
- import { SimIamAllowAllAuth, } from "../iam/authorize/sim-iam-inter-service-auth-z.js";
4
1
  import { SimLambdaCloudFormationResourceFactory } from "./cfn/sim-cfn-lambda-resource-factory.js";
5
- import { SimLambdaEnvironmentConflicts } from "./function/environment/sim-lambda-environment-conflicts.js";
6
- import { SimLambdaFunctionCommands } from "./command/function/sim-lambda-function-commands.js";
7
- import { SimLambdaFunctionUrlCommands } from "./command/function-url/sim-lambda-function-url-commands.js";
8
- import { SimLambdaPermissionCommands } from "./command/permission/sim-lambda-permission-commands.js";
9
- import { SimLambdaFunctionLookup } from "./function/url/sim-lambda-function-lookup.js";
10
- import { SimLambdaFunctionUrlStore } from "./function/url/sim-lambda-function-url-store.js";
11
- import { SimLambdaUrlRegistry } from "./registry/sim-lambda-url-registry.js";
2
+ import { SimLambdaCommands, } from "./sim-lambda-commands.js";
12
3
  import { SimLambdaSdkCommandRouter } from "./sdk/sim-lambda-sdk-command-router.js";
13
4
  /**
14
5
  * Simulated Lambda. Handles SDK commands. Emulates AWS behaviour and state.
15
6
  */
16
7
  export class SimLambda {
17
8
  functions = new Map();
18
- functionUrls;
19
- functionLookup;
20
- functionCommands;
21
- functionUrlCommands;
22
- permissionCommands;
23
- /**
24
- * Shared across function creations so a conflicting environment variable is
25
- * only reported once for this simulated Lambda.
26
- */
27
- environmentConflicts = new SimLambdaEnvironmentConflicts();
9
+ commands;
28
10
  cfnFactory = new SimLambdaCloudFormationResourceFactory(this);
29
11
  sdkRouter = new SimLambdaSdkCommandRouter(this);
30
12
  constructor(properties = {}) {
31
- const { accountRegionScope = simAwsAccountRegionScopeFactory.make(), iam = new SimIamAllowAllAuth(), background = new BackgroundTasks(), codeStore, vmSdkModuleProvider,
32
- // A standalone SimLambda is not reachable over HTTP, so its own
33
- // registry is enough; a SimAws-created one shares the environment-wide
34
- // registry the serving layer routes with.
35
- urlRegistry = new SimLambdaUrlRegistry(), } = properties;
36
- this.functionLookup = new SimLambdaFunctionLookup({
37
- accountRegionScope,
13
+ this.commands = new SimLambdaCommands({
14
+ ...properties,
38
15
  functions: this.functions,
39
- });
40
- this.functionUrls = new SimLambdaFunctionUrlStore({
41
- accountRegionScope,
42
- urlRegistry,
43
- clock: background,
44
- });
45
- this.functionUrlCommands = new SimLambdaFunctionUrlCommands({
46
- functionUrls: this.functionUrls,
47
- functions: this.functionLookup,
48
- iam,
49
- background,
50
- });
51
- this.permissionCommands = new SimLambdaPermissionCommands({
52
- functions: this.functionLookup,
53
- iam,
54
- background,
55
- });
56
- this.functionCommands = new SimLambdaFunctionCommands({
57
- accountRegionScope,
58
- functions: this.functions,
59
- iam,
60
- background,
61
16
  // Ambient execution-role callers are tracked per owning SimAws instance.
62
17
  // A standalone SimLambda is its own little universe, so it owns its own
63
18
  // ambient callers.
64
19
  runAsOwner: properties.runAsOwner ?? this,
65
- environmentConflicts: this.environmentConflicts,
66
- codeStore,
67
- vmSdkModuleProvider,
68
20
  });
69
21
  }
70
22
  /**
71
23
  * Handle a Create Function Command from the SDK.
72
24
  */
73
25
  async createFunction(command, options) {
74
- return await this.functionCommands.create(command, options);
26
+ return await this.commands.functions.create(command, options);
75
27
  }
76
28
  /**
77
29
  * Handle a Get Function Command from the SDK.
78
30
  */
79
31
  async getFunction(command, options) {
80
- return await this.functionCommands.get(command, options);
32
+ return await this.commands.functions.get(command, options);
81
33
  }
82
34
  /**
83
35
  * Handle an Invoke Command from the SDK.
84
36
  */
85
37
  async invoke(command, options) {
86
- return await this.functionCommands.invoke(command, options);
38
+ return await this.commands.functions.invoke(command, options);
87
39
  }
88
40
  /**
89
41
  * Handle a Create Function Url Config Command from the SDK.
90
42
  */
91
43
  async createFunctionUrlConfig(command, options) {
92
- return await this.functionUrlCommands.create(command, options);
44
+ return await this.commands.functionUrls.create(command, options);
93
45
  }
94
46
  /**
95
47
  * Handle a Get Function Url Config Command from the SDK.
96
48
  */
97
49
  async getFunctionUrlConfig(command, options) {
98
- return await this.functionUrlCommands.get(command, options);
50
+ return await this.commands.functionUrls.get(command, options);
99
51
  }
100
52
  /**
101
53
  * Handle an Update Function Url Config Command from the SDK.
102
54
  */
103
55
  async updateFunctionUrlConfig(command, options) {
104
- return await this.functionUrlCommands.update(command, options);
56
+ return await this.commands.functionUrls.update(command, options);
105
57
  }
106
58
  /**
107
59
  * Handle a Delete Function Url Config Command from the SDK.
108
60
  */
109
61
  async deleteFunctionUrlConfig(command, options) {
110
- return await this.functionUrlCommands.delete(command, options);
62
+ return await this.commands.functionUrls.delete(command, options);
111
63
  }
112
64
  /**
113
65
  * Handle a List Function Url Configs Command from the SDK.
114
66
  */
115
67
  async listFunctionUrlConfigs(command, options) {
116
- return await this.functionUrlCommands.list(command, options);
68
+ return await this.commands.functionUrls.list(command, options);
69
+ }
70
+ /**
71
+ * Handle a Create Event Source Mapping Command from the SDK.
72
+ */
73
+ async createEventSourceMapping(command, options) {
74
+ return await this.commands.eventSourceMappings.create(command, options);
75
+ }
76
+ /**
77
+ * Handle a Get Event Source Mapping Command from the SDK.
78
+ */
79
+ async getEventSourceMapping(command, options) {
80
+ return await this.commands.eventSourceMappings.get(command, options);
81
+ }
82
+ /**
83
+ * Handle a List Event Source Mappings Command from the SDK.
84
+ */
85
+ async listEventSourceMappings(command, options) {
86
+ return await this.commands.eventSourceMappings.list(command, options);
87
+ }
88
+ /**
89
+ * Handle a Delete Event Source Mapping Command from the SDK.
90
+ */
91
+ async deleteEventSourceMapping(command, options) {
92
+ return await this.commands.eventSourceMappings.delete(command, options);
117
93
  }
118
94
  /**
119
95
  * Handle an Add Permission Command from the SDK.
120
96
  */
121
97
  async addPermission(command, options) {
122
- return await this.permissionCommands.add(command, options);
98
+ return await this.commands.permissions.add(command, options);
123
99
  }
124
100
  /**
125
101
  * Handle a Remove Permission Command from the SDK.
126
102
  */
127
103
  async removePermission(command, options) {
128
- return await this.permissionCommands.remove(command, options);
104
+ return await this.commands.permissions.remove(command, options);
129
105
  }
130
106
  /**
131
107
  * Handle a Get Policy Command from the SDK.
132
108
  */
133
109
  async getPolicy(command, options) {
134
- return await this.permissionCommands.getPolicy(command, options);
110
+ return await this.commands.permissions.getPolicy(command, options);
111
+ }
112
+ /**
113
+ * Get a simulated event source mapping by its UUID.
114
+ */
115
+ getSimEventSourceMapping(uuid) {
116
+ return this.commands.eventSourceMappings.find(uuid);
135
117
  }
136
118
  /**
137
119
  * Get a simulated Lambda function instance by name.
@@ -143,7 +125,7 @@ export class SimLambda {
143
125
  * Get a simulated Lambda function's Function URL, if it has one.
144
126
  */
145
127
  getSimFunctionUrl(functionName) {
146
- return this.functionUrls.get(functionName);
128
+ return this.commands.functionUrlStore.get(functionName);
147
129
  }
148
130
  /**
149
131
  * Get a simulated Lambda Function URL by the id in its hostname.
@@ -152,7 +134,7 @@ export class SimLambda {
152
134
  * was addressed to, once the registry has named the owning Account.
153
135
  */
154
136
  getSimFunctionUrlById(urlId) {
155
- return this.functionUrls.byUrlId(urlId);
137
+ return this.commands.functionUrlStore.byUrlId(urlId);
156
138
  }
157
139
  /**
158
140
  * Get this service's CloudFormation Resource factory.
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda.js","sourceRoot":"","sources":["../../../src/service/lambda/sim-lambda.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAG7C,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AAEjG,OAAO,EACL,kBAAkB,GAEnB,MAAM,kDAAkD,CAAC;AAE1D,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AAGlG,OAAO,EAAE,6BAA6B,EAAE,MAAM,4DAA4D,CAAC;AAC3G,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAM/F,OAAO,EAAE,4BAA4B,EAAE,MAAM,4DAA4D,CAAC;AAC1G,OAAO,EAAE,2BAA2B,EAAE,MAAM,wDAAwD,CAAC;AAyBrG,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAK5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAgBnF;;GAEG;AACH,MAAM,OAAO,SAAS;IACH,SA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H,iBAAiB,CACf,YAA4C;QAE5C,OAAO,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;OAKG;IACH,qBAAqB,CACnB,KAA6B;QAE7B,OAAO,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF"}
@@ -0,0 +1,25 @@
1
+ import type { SimCfnResource } from "../../../cloudformation/resource/sim-cfn-resource.js";
2
+ import type { SimCfnTemplateValueRecord } from "../../../cloudformation/template/value/sim-cfn-template-value.js";
3
+ import type { SimSqs } from "../../sim-sqs.js";
4
+ import type { SimSqsQueue } from "../../queue/sim-sqs-queue.js";
5
+ interface SimCfnSqsQueueCreatorProperties {
6
+ readonly sqs: SimSqs;
7
+ }
8
+ /**
9
+ * Creates simulated queues from AWS::SQS::Queue Resources.
10
+ *
11
+ * The queue is created through the ordinary CreateQueue command rather than
12
+ * constructed directly, so a queue a template deployed is the same thing an SDK
13
+ * caller would have got: the same name validation, the same attribute ranges,
14
+ * the same refusals for what this simulation does not model.
15
+ */
16
+ export declare class SimCfnSqsQueueCreator {
17
+ private readonly sqs;
18
+ constructor(properties: SimCfnSqsQueueCreatorProperties);
19
+ /**
20
+ * Create a queue from an AWS::SQS::Queue Resource.
21
+ */
22
+ create(resource: SimCfnResource, properties: SimCfnTemplateValueRecord): Promise<SimSqsQueue>;
23
+ }
24
+ export {};
25
+ //# sourceMappingURL=sim-cfn-sqs-queue-creator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sqs-queue-creator.d.ts","sourceRoot":"","sources":["../../../../../src/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAClH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE,UAAU,+BAA+B;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAE7B,YAAY,UAAU,EAAE,+BAA+B,EAEtD;IAED;;OAEG;IACG,MAAM,CACV,QAAQ,EAAE,cAAc,EACxB,UAAU,EAAE,yBAAyB,GACpC,OAAO,CAAC,WAAW,CAAC,CAetB;CACF"}
@@ -0,0 +1,33 @@
1
+ import { assertDefined } from "../../../../util/type-guard/defined.js";
2
+ import { SimCfnSqsQueueProperties } from "./sim-cfn-sqs-queue-properties.js";
3
+ /**
4
+ * Creates simulated queues from AWS::SQS::Queue Resources.
5
+ *
6
+ * The queue is created through the ordinary CreateQueue command rather than
7
+ * constructed directly, so a queue a template deployed is the same thing an SDK
8
+ * caller would have got: the same name validation, the same attribute ranges,
9
+ * the same refusals for what this simulation does not model.
10
+ */
11
+ export class SimCfnSqsQueueCreator {
12
+ sqs;
13
+ constructor(properties) {
14
+ this.sqs = properties.sqs;
15
+ }
16
+ /**
17
+ * Create a queue from an AWS::SQS::Queue Resource.
18
+ */
19
+ async create(resource, properties) {
20
+ const queueProperties = new SimCfnSqsQueueProperties({
21
+ resource,
22
+ properties,
23
+ });
24
+ const name = queueProperties.name();
25
+ await this.sqs.createQueue({
26
+ input: { QueueName: name, Attributes: queueProperties.attributes() },
27
+ });
28
+ const queue = this.sqs.findQueue(name);
29
+ assertDefined(queue, `sim SQS queue ${name} after CloudFormation creation`);
30
+ return queue;
31
+ }
32
+ }
33
+ //# sourceMappingURL=sim-cfn-sqs-queue-creator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sqs-queue-creator.js","sourceRoot":"","sources":["../../../../../src/service/sqs/cfn/queue/sim-cfn-sqs-queue-creator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAKvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAM7E;;;;;;;GAOG;AACH,MAAM,OAAO,qBAAqB;IACf,GAAG,CAAS;IAE7B,YAAY,UAA2C;QACrD,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,QAAwB,EACxB,UAAqC;QAErC,MAAM,eAAe,GAAG,IAAI,wBAAwB,CAAC;YACnD,QAAQ;YACR,UAAU;SACX,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,EAAE,CAAC;QAEpC,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC;YACzB,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,eAAe,CAAC,UAAU,EAAE,EAAE;SACrE,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACvC,aAAa,CAAC,KAAK,EAAE,iBAAiB,IAAI,gCAAgC,CAAC,CAAC;QAE5E,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
@@ -0,0 +1,45 @@
1
+ interface SimCfnSqsQueueNameProperties {
2
+ readonly stackName: string | undefined;
3
+ readonly logicalId: string;
4
+ }
5
+ /**
6
+ * The name CloudFormation gives a queue whose template does not name it.
7
+ *
8
+ * Real CloudFormation generates `<stack name>-<logical ID>-<random>`. The
9
+ * random part is left out here so a test can predict the name, which is the one
10
+ * thing a template cannot rely on for real. Everything else follows AWS: two
11
+ * stacks deploying the same template get different queue names, because the
12
+ * stack name is part of it.
13
+ *
14
+ * A queue name is at most 80 characters, so a long stack name and logical ID
15
+ * together are trimmed to fit. The start is kept, since that is where the stack
16
+ * name is, and the trimmed name ends in a hash of the untrimmed one. CDK puts
17
+ * its own disambiguating hash at the end of a logical ID, which is exactly what
18
+ * trimming cuts off, so without that two queues in one stack could end up
19
+ * asking for the same name.
20
+ */
21
+ export declare class SimCfnSqsQueueName {
22
+ private readonly stackName;
23
+ private readonly logicalId;
24
+ constructor(properties: SimCfnSqsQueueNameProperties);
25
+ /**
26
+ * The generated queue name.
27
+ */
28
+ get value(): string;
29
+ /**
30
+ * The tail a trimmed name ends with, derived from the whole untrimmed name.
31
+ *
32
+ * It is a hash rather than the random characters real CloudFormation uses, so
33
+ * the name stays the same between deployments of the same template.
34
+ */
35
+ private distinguisher;
36
+ /**
37
+ * The name before it is trimmed to the length SQS allows.
38
+ *
39
+ * A Resource created outside a stack has no stack name to derive one from, so
40
+ * it falls back to the logical ID on its own.
41
+ */
42
+ private composed;
43
+ }
44
+ export {};
45
+ //# sourceMappingURL=sim-cfn-sqs-queue-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sqs-queue-name.d.ts","sourceRoot":"","sources":["../../../../../src/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.ts"],"names":[],"mappings":"AAUA,UAAU,4BAA4B;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;IAC/C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IAEnC,YAAY,UAAU,EAAE,4BAA4B,EAGnD;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAUlB;IAED;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAOrB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;CAOjB"}
@@ -0,0 +1,67 @@
1
+ import { createHash } from "node:crypto";
2
+ const maximumNameLength = 80;
3
+ /**
4
+ * How many characters of the hash of the untrimmed name a trimmed one ends
5
+ * with, so two long names that start the same do not become one name.
6
+ */
7
+ const distinguisherLength = 8;
8
+ /**
9
+ * The name CloudFormation gives a queue whose template does not name it.
10
+ *
11
+ * Real CloudFormation generates `<stack name>-<logical ID>-<random>`. The
12
+ * random part is left out here so a test can predict the name, which is the one
13
+ * thing a template cannot rely on for real. Everything else follows AWS: two
14
+ * stacks deploying the same template get different queue names, because the
15
+ * stack name is part of it.
16
+ *
17
+ * A queue name is at most 80 characters, so a long stack name and logical ID
18
+ * together are trimmed to fit. The start is kept, since that is where the stack
19
+ * name is, and the trimmed name ends in a hash of the untrimmed one. CDK puts
20
+ * its own disambiguating hash at the end of a logical ID, which is exactly what
21
+ * trimming cuts off, so without that two queues in one stack could end up
22
+ * asking for the same name.
23
+ */
24
+ export class SimCfnSqsQueueName {
25
+ stackName;
26
+ logicalId;
27
+ constructor(properties) {
28
+ this.stackName = properties.stackName;
29
+ this.logicalId = properties.logicalId;
30
+ }
31
+ /**
32
+ * The generated queue name.
33
+ */
34
+ get value() {
35
+ const composed = this.composed();
36
+ if (composed.length <= maximumNameLength) {
37
+ return composed;
38
+ }
39
+ const kept = composed.slice(0, maximumNameLength - distinguisherLength - 1);
40
+ return `${kept}-${this.distinguisher(composed)}`;
41
+ }
42
+ /**
43
+ * The tail a trimmed name ends with, derived from the whole untrimmed name.
44
+ *
45
+ * It is a hash rather than the random characters real CloudFormation uses, so
46
+ * the name stays the same between deployments of the same template.
47
+ */
48
+ distinguisher(composed) {
49
+ return createHash("sha1")
50
+ .update(composed)
51
+ .digest("hex")
52
+ .slice(0, distinguisherLength);
53
+ }
54
+ /**
55
+ * The name before it is trimmed to the length SQS allows.
56
+ *
57
+ * A Resource created outside a stack has no stack name to derive one from, so
58
+ * it falls back to the logical ID on its own.
59
+ */
60
+ composed() {
61
+ if (this.stackName === undefined || this.stackName === "") {
62
+ return this.logicalId;
63
+ }
64
+ return `${this.stackName}-${this.logicalId}`;
65
+ }
66
+ }
67
+ //# sourceMappingURL=sim-cfn-sqs-queue-name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sqs-queue-name.js","sourceRoot":"","sources":["../../../../../src/service/sqs/cfn/queue/sim-cfn-sqs-queue-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B;;;GAGG;AACH,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAO9B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,kBAAkB;IACZ,SAAS,CAAqB;IAC9B,SAAS,CAAS;IAEnC,YAAY,UAAwC;QAClD,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,IAAI,KAAK;QACP,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAEjC,IAAI,QAAQ,CAAC,MAAM,IAAI,iBAAiB,EAAE,CAAC;YACzC,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,CAAC,CAAC,CAAC;QAE5E,OAAO,GAAG,IAAI,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;IACnD,CAAC;IAED;;;;;OAKG;IACK,aAAa,CAAC,QAAgB;QACpC,OAAO,UAAU,CAAC,MAAM,CAAC;aACtB,MAAM,CAAC,QAAQ,CAAC;aAChB,MAAM,CAAC,KAAK,CAAC;aACb,KAAK,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACK,QAAQ;QACd,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,KAAK,EAAE,EAAE,CAAC;YAC1D,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;QAED,OAAO,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;IAC/C,CAAC;CACF"}
@@ -0,0 +1,44 @@
1
+ import type { SimCfnResource } from "../../../cloudformation/resource/sim-cfn-resource.js";
2
+ import type { SimCfnTemplateValueRecord } from "../../../cloudformation/template/value/sim-cfn-template-value.js";
3
+ import type { SimSqsQueueAttributeInput } from "../../queue/sim-sqs-queue-attributes.js";
4
+ interface SimCfnSqsQueuePropertiesProperties {
5
+ readonly resource: SimCfnResource;
6
+ readonly properties: SimCfnTemplateValueRecord;
7
+ }
8
+ /**
9
+ * Reads AWS::SQS::Queue CloudFormation properties into the shape CreateQueue
10
+ * takes.
11
+ *
12
+ * The queue attributes are passed through as the strings SQS carries them as,
13
+ * so the range each one is checked against is the range simulated SQS already
14
+ * applies to a CreateQueue request.
15
+ */
16
+ export declare class SimCfnSqsQueueProperties {
17
+ private readonly resource;
18
+ private readonly properties;
19
+ private readonly rules;
20
+ constructor(properties: SimCfnSqsQueuePropertiesProperties);
21
+ /**
22
+ * The queue name.
23
+ *
24
+ * An unnamed queue is named after the stack and the logical ID, as real
25
+ * CloudFormation names one.
26
+ */
27
+ name(): string;
28
+ /**
29
+ * The queue attributes the template sets, in the string form CreateQueue
30
+ * takes them in.
31
+ */
32
+ attributes(): SimSqsQueueAttributeInput;
33
+ /**
34
+ * Read a numeric property as the string an SQS attribute carries.
35
+ *
36
+ * CloudFormation carries these as numbers, and as strings when they came from
37
+ * a template Parameter, so both are accepted. What each number has to be is
38
+ * left to SQS.
39
+ */
40
+ private numberValue;
41
+ private propertyError;
42
+ }
43
+ export {};
44
+ //# sourceMappingURL=sim-cfn-sqs-queue-properties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sqs-queue-properties.d.ts","sourceRoot":"","sources":["../../../../../src/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,EAEV,yBAAyB,EAC1B,MAAM,kEAAkE,CAAC;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAOzF,UAAU,kCAAkC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,yBAAyB,CAAC;CAChD;AAED;;;;;;;GAOG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiB;IAC1C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA4B;IACvD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA8B;IAEpD,YAAY,UAAU,EAAE,kCAAkC,EAOzD;IAED;;;;;OAKG;IACH,IAAI,IAAI,MAAM,CAeb;IAED;;;OAGG;IACH,UAAU,IAAI,yBAAyB,CAQtC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,aAAa;CAGtB"}
@@ -0,0 +1,72 @@
1
+ import { SimCfnSqsQueueName } from "./sim-cfn-sqs-queue-name.js";
2
+ import { SimCfnSqsQueuePropertyRules, sqsQueuePropertyError, } from "./sim-cfn-sqs-queue-property-rules.js";
3
+ /**
4
+ * Reads AWS::SQS::Queue CloudFormation properties into the shape CreateQueue
5
+ * takes.
6
+ *
7
+ * The queue attributes are passed through as the strings SQS carries them as,
8
+ * so the range each one is checked against is the range simulated SQS already
9
+ * applies to a CreateQueue request.
10
+ */
11
+ export class SimCfnSqsQueueProperties {
12
+ resource;
13
+ properties;
14
+ rules;
15
+ constructor(properties) {
16
+ this.resource = properties.resource;
17
+ this.properties = properties.properties;
18
+ this.rules = new SimCfnSqsQueuePropertyRules({
19
+ logicalId: properties.resource.logicalId,
20
+ properties: properties.properties,
21
+ });
22
+ }
23
+ /**
24
+ * The queue name.
25
+ *
26
+ * An unnamed queue is named after the stack and the logical ID, as real
27
+ * CloudFormation names one.
28
+ */
29
+ name() {
30
+ const name = this.properties["QueueName"];
31
+ if (name === undefined) {
32
+ return new SimCfnSqsQueueName({
33
+ stackName: this.resource.stackName,
34
+ logicalId: this.resource.logicalId,
35
+ }).value;
36
+ }
37
+ if (typeof name !== "string") {
38
+ throw this.propertyError("QueueName must be a string");
39
+ }
40
+ return name;
41
+ }
42
+ /**
43
+ * The queue attributes the template sets, in the string form CreateQueue
44
+ * takes them in.
45
+ */
46
+ attributes() {
47
+ this.rules.assertSimulated();
48
+ return Object.fromEntries(Object.entries(this.properties)
49
+ .filter(([name]) => this.rules.isAttributeProperty(name))
50
+ .map(([name, value]) => [name, this.numberValue(value, name)]));
51
+ }
52
+ /**
53
+ * Read a numeric property as the string an SQS attribute carries.
54
+ *
55
+ * CloudFormation carries these as numbers, and as strings when they came from
56
+ * a template Parameter, so both are accepted. What each number has to be is
57
+ * left to SQS.
58
+ */
59
+ numberValue(value, name) {
60
+ if (typeof value === "number") {
61
+ return String(value);
62
+ }
63
+ if (typeof value === "string") {
64
+ return value;
65
+ }
66
+ throw this.propertyError(`${name} must be a number`);
67
+ }
68
+ propertyError(reason) {
69
+ return sqsQueuePropertyError(this.resource.logicalId, reason);
70
+ }
71
+ }
72
+ //# sourceMappingURL=sim-cfn-sqs-queue-properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sqs-queue-properties.js","sourceRoot":"","sources":["../../../../../src/service/sqs/cfn/queue/sim-cfn-sqs-queue-properties.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EACL,2BAA2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AAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CACjE,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACK,WAAW,CAAC,KAA0B,EAAE,IAAY;QAC1D,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,mBAAmB,CAAC,CAAC;IACvD,CAAC;IAEO,aAAa,CAAC,MAAc;QAClC,OAAO,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC;CACF"}
@@ -0,0 +1,47 @@
1
+ import type { SimCfnTemplateValueRecord } from "../../../cloudformation/template/value/sim-cfn-template-value.js";
2
+ /**
3
+ * Build the error a property of an AWS::SQS::Queue Resource is refused with.
4
+ *
5
+ * The wording matters. Sim CloudFormation skips a Resource whose error reads as
6
+ * an unsupported Resource type, and skipping is the wrong answer for a queue
7
+ * that cannot be created as the template asks: the stack would deploy without
8
+ * it.
9
+ */
10
+ export declare function sqsQueuePropertyError(logicalId: string, reason: string): Error;
11
+ interface SimCfnSqsQueuePropertyRulesProperties {
12
+ readonly logicalId: string;
13
+ readonly properties: SimCfnTemplateValueRecord;
14
+ }
15
+ /**
16
+ * Which AWS::SQS::Queue properties simulated SQS can act on.
17
+ *
18
+ * Anything else fails the Resource. Being stricter than CloudFormation shows up
19
+ * as a puzzling deployment failure here; being looser shows up as a queue
20
+ * behaving one way in a test and another way on AWS.
21
+ */
22
+ export declare class SimCfnSqsQueuePropertyRules {
23
+ private readonly logicalId;
24
+ private readonly properties;
25
+ constructor(properties: SimCfnSqsQueuePropertyRulesProperties);
26
+ /**
27
+ * Whether a property carries a queue attribute of the same name.
28
+ */
29
+ isAttributeProperty(name: string): boolean;
30
+ /**
31
+ * Refuse everything about this Resource that is not simulated.
32
+ */
33
+ assertSimulated(): void;
34
+ /**
35
+ * Refuse a FIFO queue.
36
+ *
37
+ * Only standard queues are simulated, and a FIFO queue quietly created as a
38
+ * standard one would take messages in an order the deployment does not
39
+ * promise, so the Resource fails instead. A value that is neither true nor
40
+ * false is refused as well, rather than read as false: CloudFormation would
41
+ * refuse it too, and the queue it asked for is not knowable.
42
+ */
43
+ private refuseFifoQueue;
44
+ private assertSimulatedProperty;
45
+ }
46
+ export {};
47
+ //# sourceMappingURL=sim-cfn-sqs-queue-property-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sqs-queue-property-rules.d.ts","sourceRoot":"","sources":["../../../../../src/service/sqs/cfn/queue/sim-cfn-sqs-queue-property-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,yBAAyB,EAC1B,MAAM,kEAAkE,CAAC;AAsD1E;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,KAAK,CAEP;AAED,UAAU,qCAAqC;IAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,yBAAyB,CAAC;CAChD;AAED;;;;;;GAMG;AACH,qBAAa,2BAA2B;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA4B;IAEvD,YAAY,UAAU,EAAE,qCAAqC,EAG5D;IAED;;OAEG;IACH,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEzC;IAED;;OAEG;IACH,eAAe,IAAI,IAAI,CAMtB;IAED;;;;;;;;OAQG;IACH,OAAO,CAAC,eAAe;IAsBvB,OAAO,CAAC,uBAAuB;CAoBhC"}