@kensio/yulin 1.17.0 → 1.17.2

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 (830) hide show
  1. package/README.md +1 -0
  2. package/dist/serve/http/local-server/sim-aws-local-location.d.ts +55 -0
  3. package/dist/serve/http/local-server/sim-aws-local-location.d.ts.map +1 -0
  4. package/dist/serve/http/local-server/sim-aws-local-location.js +80 -0
  5. package/dist/serve/http/local-server/sim-aws-local-location.js.map +1 -0
  6. package/dist/serve/http/local-server/sim-aws-local-request-handler.d.ts +7 -0
  7. package/dist/serve/http/local-server/sim-aws-local-request-handler.d.ts.map +1 -1
  8. package/dist/serve/http/local-server/sim-aws-local-request-handler.js +10 -3
  9. package/dist/serve/http/local-server/sim-aws-local-request-handler.js.map +1 -1
  10. package/dist/serve/http/local-server/sim-aws-local-server.d.ts.map +1 -1
  11. package/dist/serve/http/local-server/sim-aws-local-server.js +5 -0
  12. package/dist/serve/http/local-server/sim-aws-local-server.js.map +1 -1
  13. package/dist/serve/http/node-fetch-http-adapter.d.ts +9 -0
  14. package/dist/serve/http/node-fetch-http-adapter.d.ts.map +1 -1
  15. package/dist/serve/http/node-fetch-http-adapter.js +17 -1
  16. package/dist/serve/http/node-fetch-http-adapter.js.map +1 -1
  17. package/dist/service/acm/certificate/register-sim-acm-certificate.d.ts +41 -0
  18. package/dist/service/acm/certificate/register-sim-acm-certificate.d.ts.map +1 -0
  19. package/dist/service/acm/certificate/register-sim-acm-certificate.js +60 -0
  20. package/dist/service/acm/certificate/register-sim-acm-certificate.js.map +1 -0
  21. package/dist/service/acm/command/request-certificate/request-certificate.handler.d.ts +9 -0
  22. package/dist/service/acm/command/request-certificate/request-certificate.handler.d.ts.map +1 -1
  23. package/dist/service/acm/command/request-certificate/request-certificate.handler.js +18 -1
  24. package/dist/service/acm/command/request-certificate/request-certificate.handler.js.map +1 -1
  25. package/dist/service/acm/sim-acm.d.ts +15 -0
  26. package/dist/service/acm/sim-acm.d.ts.map +1 -1
  27. package/dist/service/acm/sim-acm.js +21 -0
  28. package/dist/service/acm/sim-acm.js.map +1 -1
  29. package/dist/service/apigatewayv2/api/integration/sim-http-api-lambda-uri.d.ts +23 -4
  30. package/dist/service/apigatewayv2/api/integration/sim-http-api-lambda-uri.d.ts.map +1 -1
  31. package/dist/service/apigatewayv2/api/integration/sim-http-api-lambda-uri.js +56 -14
  32. package/dist/service/apigatewayv2/api/integration/sim-http-api-lambda-uri.js.map +1 -1
  33. package/dist/service/apigatewayv2/serve/auth/sim-http-api-authorizer-invocation.d.ts +1 -1
  34. package/dist/service/apigatewayv2/serve/auth/sim-http-api-authorizer-invocation.d.ts.map +1 -1
  35. package/dist/service/apigatewayv2/serve/auth/sim-http-api-invoke-authorizer.d.ts +7 -3
  36. package/dist/service/apigatewayv2/serve/auth/sim-http-api-invoke-authorizer.d.ts.map +1 -1
  37. package/dist/service/apigatewayv2/serve/auth/sim-http-api-invoke-authorizer.js +6 -2
  38. package/dist/service/apigatewayv2/serve/auth/sim-http-api-invoke-authorizer.js.map +1 -1
  39. package/dist/service/apigatewayv2/serve/sim-api-gateway-v2-router.d.ts +11 -12
  40. package/dist/service/apigatewayv2/serve/sim-api-gateway-v2-router.d.ts.map +1 -1
  41. package/dist/service/apigatewayv2/serve/sim-api-gateway-v2-router.js +15 -7
  42. package/dist/service/apigatewayv2/serve/sim-api-gateway-v2-router.js.map +1 -1
  43. package/dist/service/apigatewayv2/serve/sim-http-api-function-target.d.ts +17 -0
  44. package/dist/service/apigatewayv2/serve/sim-http-api-function-target.d.ts.map +1 -0
  45. package/dist/service/apigatewayv2/serve/sim-http-api-function-target.js +2 -0
  46. package/dist/service/apigatewayv2/serve/sim-http-api-function-target.js.map +1 -0
  47. package/dist/service/apigatewayv2/serve/sim-http-api-integration-invocation.d.ts.map +1 -1
  48. package/dist/service/apigatewayv2/serve/sim-http-api-integration-invocation.js +1 -1
  49. package/dist/service/apigatewayv2/serve/sim-http-api-integration-invocation.js.map +1 -1
  50. package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-matcher.js +1 -1
  51. package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-matcher.js.map +1 -1
  52. package/dist/service/cloudformation/cdk/sim-cdk-assembly-selection.d.ts +4 -0
  53. package/dist/service/cloudformation/cdk/sim-cdk-assembly-selection.d.ts.map +1 -1
  54. package/dist/service/cloudformation/cdk/sim-cdk-assembly-selection.js +7 -2
  55. package/dist/service/cloudformation/cdk/sim-cdk-assembly-selection.js.map +1 -1
  56. package/dist/service/cloudformation/command/create-stack/create-stack.handler.d.ts.map +1 -1
  57. package/dist/service/cloudformation/command/create-stack/create-stack.handler.js +2 -2
  58. package/dist/service/cloudformation/command/create-stack/create-stack.handler.js.map +1 -1
  59. package/dist/service/cloudformation/command/update-stack/update-stack.handler.d.ts.map +1 -1
  60. package/dist/service/cloudformation/command/update-stack/update-stack.handler.js +2 -2
  61. package/dist/service/cloudformation/command/update-stack/update-stack.handler.js.map +1 -1
  62. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-deployer.d.ts +1 -1
  63. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-deployer.d.ts.map +1 -1
  64. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-deployer.js +6 -4
  65. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-deployer.js.map +1 -1
  66. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-plan.d.ts +4 -0
  67. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-plan.d.ts.map +1 -1
  68. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-plan.js.map +1 -1
  69. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-stack-options.d.ts +25 -2
  70. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-stack-options.d.ts.map +1 -1
  71. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-stack-options.js +13 -0
  72. package/dist/service/cloudformation/deploy/sim-cfn-cdk-out-stack-options.js.map +1 -1
  73. package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.d.ts.map +1 -1
  74. package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.js +3 -3
  75. package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.js.map +1 -1
  76. package/dist/service/cloudformation/deploy/sim-cfn-template-file-parse.d.ts +10 -0
  77. package/dist/service/cloudformation/deploy/sim-cfn-template-file-parse.d.ts.map +1 -0
  78. package/dist/service/cloudformation/deploy/sim-cfn-template-file-parse.js +30 -0
  79. package/dist/service/cloudformation/deploy/sim-cfn-template-file-parse.js.map +1 -0
  80. package/dist/service/cloudformation/deploy/sim-cfn-template-file-read.d.ts +2 -4
  81. package/dist/service/cloudformation/deploy/sim-cfn-template-file-read.d.ts.map +1 -1
  82. package/dist/service/cloudformation/deploy/sim-cfn-template-file-read.js +2 -3
  83. package/dist/service/cloudformation/deploy/sim-cfn-template-file-read.js.map +1 -1
  84. package/dist/service/cloudformation/index.d.ts +1 -1
  85. package/dist/service/cloudformation/index.d.ts.map +1 -1
  86. package/dist/service/cloudformation/resource/cfn/iam/sim-iam-cfn-value-adapter.d.ts.map +1 -1
  87. package/dist/service/cloudformation/resource/cfn/iam/sim-iam-cfn-value-adapter.js +4 -0
  88. package/dist/service/cloudformation/resource/cfn/iam/sim-iam-cfn-value-adapter.js.map +1 -1
  89. package/dist/service/cloudformation/resource/cfn/iam/sim-iam-user-cfn.d.ts +28 -0
  90. package/dist/service/cloudformation/resource/cfn/iam/sim-iam-user-cfn.d.ts.map +1 -0
  91. package/dist/service/cloudformation/resource/cfn/iam/sim-iam-user-cfn.js +33 -0
  92. package/dist/service/cloudformation/resource/cfn/iam/sim-iam-user-cfn.js.map +1 -0
  93. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.d.ts.map +1 -1
  94. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.js +11 -0
  95. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.js.map +1 -1
  96. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-alias-cfn.d.ts +29 -0
  97. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-alias-cfn.d.ts.map +1 -0
  98. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-alias-cfn.js +31 -0
  99. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-alias-cfn.js.map +1 -0
  100. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-version-cfn.d.ts +35 -0
  101. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-version-cfn.d.ts.map +1 -0
  102. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-version-cfn.js +40 -0
  103. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-version-cfn.js.map +1 -0
  104. package/dist/service/cloudformation/resource/resolve/property/sim-cfn-resource-property-resolver.d.ts +6 -0
  105. package/dist/service/cloudformation/resource/resolve/property/sim-cfn-resource-property-resolver.d.ts.map +1 -1
  106. package/dist/service/cloudformation/resource/resolve/property/sim-cfn-resource-property-resolver.js +3 -0
  107. package/dist/service/cloudformation/resource/resolve/property/sim-cfn-resource-property-resolver.js.map +1 -1
  108. package/dist/service/cloudformation/resource/sim-cfn-resource-record.d.ts.map +1 -1
  109. package/dist/service/cloudformation/resource/sim-cfn-resource-record.js +1 -0
  110. package/dist/service/cloudformation/resource/sim-cfn-resource-record.js.map +1 -1
  111. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-stage.d.ts +20 -0
  112. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-stage.d.ts.map +1 -0
  113. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-stage.js +80 -0
  114. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-stage.js.map +1 -0
  115. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-template.factory.d.ts +46 -0
  116. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-template.factory.d.ts.map +1 -0
  117. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-template.factory.js +103 -0
  118. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-template.factory.js.map +1 -0
  119. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api.d.ts +28 -0
  120. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api.d.ts.map +1 -0
  121. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api.js +81 -0
  122. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api.js.map +1 -0
  123. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-declared-event.d.ts +52 -0
  124. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-declared-event.d.ts.map +1 -0
  125. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-declared-event.js +38 -0
  126. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-declared-event.js.map +1 -0
  127. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-bridge-rule-event.d.ts +16 -0
  128. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-bridge-rule-event.d.ts.map +1 -0
  129. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-bridge-rule-event.js +21 -0
  130. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-bridge-rule-event.js.map +1 -0
  131. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-rule.d.ts +26 -0
  132. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-rule.d.ts.map +1 -0
  133. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-rule.js +84 -0
  134. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-rule.js.map +1 -0
  135. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-kind.d.ts +24 -0
  136. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-kind.d.ts.map +1 -0
  137. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-kind.js +41 -0
  138. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-kind.js.map +1 -0
  139. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-mapping-event.d.ts +20 -0
  140. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-mapping-event.d.ts.map +1 -0
  141. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-mapping-event.js +56 -0
  142. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-mapping-event.js.map +1 -0
  143. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-role.d.ts +11 -0
  144. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-role.d.ts.map +1 -0
  145. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-role.js +57 -0
  146. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-role.js.map +1 -0
  147. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source.resources.d.ts +25 -0
  148. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source.resources.d.ts.map +1 -0
  149. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source.resources.js +42 -0
  150. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source.resources.js.map +1 -0
  151. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-state.d.ts +17 -0
  152. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-state.d.ts.map +1 -0
  153. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-state.js +26 -0
  154. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-state.js.map +1 -0
  155. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-function-events.d.ts +32 -0
  156. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-function-events.d.ts.map +1 -0
  157. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-function-events.js +70 -0
  158. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-function-events.js.map +1 -0
  159. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-event.d.ts +20 -0
  160. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-event.d.ts.map +1 -0
  161. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-event.js +71 -0
  162. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-event.js.map +1 -0
  163. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-permission.d.ts +14 -0
  164. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-permission.d.ts.map +1 -0
  165. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-permission.js +38 -0
  166. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-permission.js.map +1 -0
  167. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-route.d.ts +18 -0
  168. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-route.d.ts.map +1 -0
  169. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-route.js +56 -0
  170. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-route.js.map +1 -0
  171. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-implicit-http-api.d.ts +20 -0
  172. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-implicit-http-api.d.ts.map +1 -0
  173. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-implicit-http-api.js +41 -0
  174. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-implicit-http-api.js.map +1 -0
  175. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-resource-edit.d.ts +29 -0
  176. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-resource-edit.d.ts.map +1 -0
  177. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-resource-edit.js +23 -0
  178. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-resource-edit.js.map +1 -0
  179. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-event.d.ts +33 -0
  180. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-event.d.ts.map +1 -0
  181. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-event.js +103 -0
  182. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-event.js.map +1 -0
  183. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-notified-bucket.d.ts +22 -0
  184. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-notified-bucket.d.ts.map +1 -0
  185. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-notified-bucket.js +76 -0
  186. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-notified-bucket.js.map +1 -0
  187. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-event.d.ts +17 -0
  188. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-event.d.ts.map +1 -0
  189. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-event.js +22 -0
  190. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-event.js.map +1 -0
  191. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-v2-event.d.ts +15 -0
  192. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-v2-event.d.ts.map +1 -0
  193. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-v2-event.js +97 -0
  194. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-v2-event.js.map +1 -0
  195. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-sns-event.d.ts +23 -0
  196. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-sns-event.d.ts.map +1 -0
  197. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-sns-event.js +60 -0
  198. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-sns-event.js.map +1 -0
  199. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-policies.d.ts +31 -0
  200. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-policies.d.ts.map +1 -0
  201. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-policies.js +74 -0
  202. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-policies.js.map +1 -0
  203. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-properties.d.ts +24 -0
  204. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-properties.d.ts.map +1 -0
  205. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-properties.js +67 -0
  206. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-properties.js.map +1 -0
  207. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-role.d.ts +18 -0
  208. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-role.d.ts.map +1 -0
  209. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-role.js +35 -0
  210. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-role.js.map +1 -0
  211. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-template.factory.d.ts +45 -0
  212. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-template.factory.d.ts.map +1 -0
  213. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-template.factory.js +50 -0
  214. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-template.factory.js.map +1 -0
  215. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-url.d.ts +19 -0
  216. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-url.d.ts.map +1 -0
  217. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-url.js +37 -0
  218. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-url.js.map +1 -0
  219. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function.d.ts +44 -0
  220. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function.d.ts.map +1 -0
  221. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function.js +74 -0
  222. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function.js.map +1 -0
  223. package/dist/service/cloudformation/sam/sim-cfn-sam-expansion.d.ts +18 -0
  224. package/dist/service/cloudformation/sam/sim-cfn-sam-expansion.d.ts.map +1 -0
  225. package/dist/service/cloudformation/sam/sim-cfn-sam-expansion.js +83 -0
  226. package/dist/service/cloudformation/sam/sim-cfn-sam-expansion.js.map +1 -0
  227. package/dist/service/cloudformation/sam/sim-cfn-sam-globals.d.ts +36 -0
  228. package/dist/service/cloudformation/sam/sim-cfn-sam-globals.d.ts.map +1 -0
  229. package/dist/service/cloudformation/sam/sim-cfn-sam-globals.js +76 -0
  230. package/dist/service/cloudformation/sam/sim-cfn-sam-globals.js.map +1 -0
  231. package/dist/service/cloudformation/sam/sim-cfn-sam-picked.d.ts +10 -0
  232. package/dist/service/cloudformation/sam/sim-cfn-sam-picked.d.ts.map +1 -0
  233. package/dist/service/cloudformation/sam/sim-cfn-sam-picked.js +11 -0
  234. package/dist/service/cloudformation/sam/sim-cfn-sam-picked.js.map +1 -0
  235. package/dist/service/cloudformation/sam/sim-cfn-sam-record.d.ts +40 -0
  236. package/dist/service/cloudformation/sam/sim-cfn-sam-record.d.ts.map +1 -0
  237. package/dist/service/cloudformation/sam/sim-cfn-sam-record.js +50 -0
  238. package/dist/service/cloudformation/sam/sim-cfn-sam-record.js.map +1 -0
  239. package/dist/service/cloudformation/sam/sim-cfn-sam-transform.d.ts +23 -0
  240. package/dist/service/cloudformation/sam/sim-cfn-sam-transform.d.ts.map +1 -0
  241. package/dist/service/cloudformation/sam/sim-cfn-sam-transform.js +48 -0
  242. package/dist/service/cloudformation/sam/sim-cfn-sam-transform.js.map +1 -0
  243. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-key.d.ts +18 -0
  244. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-key.d.ts.map +1 -0
  245. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-key.js +52 -0
  246. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-key.js.map +1 -0
  247. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-template.factory.d.ts +40 -0
  248. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-template.factory.d.ts.map +1 -0
  249. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-template.factory.js +47 -0
  250. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-template.factory.js.map +1 -0
  251. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table.d.ts +25 -0
  252. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table.d.ts.map +1 -0
  253. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table.js +77 -0
  254. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table.js.map +1 -0
  255. package/dist/service/cloudformation/template/dynamic/make-sim-cfn-dynamic-references.d.ts +1 -0
  256. package/dist/service/cloudformation/template/dynamic/make-sim-cfn-dynamic-references.d.ts.map +1 -1
  257. package/dist/service/cloudformation/template/dynamic/make-sim-cfn-dynamic-references.js +2 -1
  258. package/dist/service/cloudformation/template/dynamic/make-sim-cfn-dynamic-references.js.map +1 -1
  259. package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-reference-resolvers.d.ts.map +1 -1
  260. package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-reference-resolvers.js +4 -0
  261. package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-reference-resolvers.js.map +1 -1
  262. package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-reference.type.d.ts +19 -1
  263. package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-reference.type.d.ts.map +1 -1
  264. package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-references.d.ts +6 -0
  265. package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-references.d.ts.map +1 -1
  266. package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-references.js +9 -3
  267. package/dist/service/cloudformation/template/dynamic/sim-cfn-dynamic-references.js.map +1 -1
  268. package/dist/service/cloudformation/template/sim-cfn-template-body-parse.d.ts +19 -0
  269. package/dist/service/cloudformation/template/sim-cfn-template-body-parse.d.ts.map +1 -0
  270. package/dist/service/cloudformation/template/sim-cfn-template-body-parse.js +36 -0
  271. package/dist/service/cloudformation/template/sim-cfn-template-body-parse.js.map +1 -0
  272. package/dist/service/cloudformation/template/sim-cfn-template.d.ts +11 -4
  273. package/dist/service/cloudformation/template/sim-cfn-template.d.ts.map +1 -1
  274. package/dist/service/cloudformation/template/sim-cfn-template.js +16 -13
  275. package/dist/service/cloudformation/template/sim-cfn-template.js.map +1 -1
  276. package/dist/service/cloudformation/template/yaml/sim-cfn-template-yaml.d.ts +11 -0
  277. package/dist/service/cloudformation/template/yaml/sim-cfn-template-yaml.d.ts.map +1 -0
  278. package/dist/service/cloudformation/template/yaml/sim-cfn-template-yaml.js +41 -0
  279. package/dist/service/cloudformation/template/yaml/sim-cfn-template-yaml.js.map +1 -0
  280. package/dist/service/cloudformation/template/yaml/sim-cfn-yaml-short-forms.d.ts +17 -0
  281. package/dist/service/cloudformation/template/yaml/sim-cfn-yaml-short-forms.d.ts.map +1 -0
  282. package/dist/service/cloudformation/template/yaml/sim-cfn-yaml-short-forms.js +70 -0
  283. package/dist/service/cloudformation/template/yaml/sim-cfn-yaml-short-forms.js.map +1 -0
  284. package/dist/service/cloudfront/cff/adapter/sim-cff-request-metadata-adapter.d.ts +23 -0
  285. package/dist/service/cloudfront/cff/adapter/sim-cff-request-metadata-adapter.d.ts.map +1 -1
  286. package/dist/service/cloudfront/cff/adapter/sim-cff-request-metadata-adapter.js +64 -22
  287. package/dist/service/cloudfront/cff/adapter/sim-cff-request-metadata-adapter.js.map +1 -1
  288. package/dist/service/cloudfront/command/create-function/create-function-code-size.d.ts +23 -0
  289. package/dist/service/cloudfront/command/create-function/create-function-code-size.d.ts.map +1 -0
  290. package/dist/service/cloudfront/command/create-function/create-function-code-size.js +33 -0
  291. package/dist/service/cloudfront/command/create-function/create-function-code-size.js.map +1 -0
  292. package/dist/service/cloudfront/command/create-function/create-function.handler.d.ts.map +1 -1
  293. package/dist/service/cloudfront/command/create-function/create-function.handler.js +2 -0
  294. package/dist/service/cloudfront/command/create-function/create-function.handler.js.map +1 -1
  295. package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts +11 -0
  296. package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts.map +1 -1
  297. package/dist/service/cloudfront/error/sim-cloudfront.error.js +13 -0
  298. package/dist/service/cloudfront/error/sim-cloudfront.error.js.map +1 -1
  299. package/dist/service/cloudfront/index.d.ts +1 -1
  300. package/dist/service/cloudfront/index.d.ts.map +1 -1
  301. package/dist/service/cloudfront/index.js +1 -1
  302. package/dist/service/cloudfront/index.js.map +1 -1
  303. package/dist/service/cloudfront/typings/cloudfront-functions.namespace.d.ts +1 -1
  304. package/dist/service/cloudfront/typings/cloudfront-functions.namespace.d.ts.map +1 -1
  305. package/dist/service/cognito/command/sim-cognito-commands.d.ts +6 -0
  306. package/dist/service/cognito/command/sim-cognito-commands.d.ts.map +1 -1
  307. package/dist/service/cognito/command/sim-cognito-commands.js +22 -6
  308. package/dist/service/cognito/command/sim-cognito-commands.js.map +1 -1
  309. package/dist/service/cognito/error/sim-cognito.error.d.ts +22 -0
  310. package/dist/service/cognito/error/sim-cognito.error.d.ts.map +1 -1
  311. package/dist/service/cognito/error/sim-cognito.error.js +26 -0
  312. package/dist/service/cognito/error/sim-cognito.error.js.map +1 -1
  313. package/dist/service/cognito/index.d.ts +2 -1
  314. package/dist/service/cognito/index.d.ts.map +1 -1
  315. package/dist/service/cognito/index.js +1 -1
  316. package/dist/service/cognito/index.js.map +1 -1
  317. package/dist/service/cognito/sim-cognito-identity-provider.d.ts +24 -0
  318. package/dist/service/cognito/sim-cognito-identity-provider.d.ts.map +1 -1
  319. package/dist/service/cognito/sim-cognito-identity-provider.js +26 -0
  320. package/dist/service/cognito/sim-cognito-identity-provider.js.map +1 -1
  321. package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-factory.d.ts +9 -0
  322. package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-factory.d.ts.map +1 -1
  323. package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-factory.js +2 -2
  324. package/dist/service/cognito/user-pool/client/sim-cognito-user-pool-client-factory.js.map +1 -1
  325. package/dist/service/cognito/user-pool/register-sim-cognito-user-pool-client.d.ts +22 -0
  326. package/dist/service/cognito/user-pool/register-sim-cognito-user-pool-client.d.ts.map +1 -0
  327. package/dist/service/cognito/user-pool/register-sim-cognito-user-pool-client.js +36 -0
  328. package/dist/service/cognito/user-pool/register-sim-cognito-user-pool-client.js.map +1 -0
  329. package/dist/service/cognito/user-pool/register-sim-cognito-user-pool.d.ts +25 -0
  330. package/dist/service/cognito/user-pool/register-sim-cognito-user-pool.d.ts.map +1 -0
  331. package/dist/service/cognito/user-pool/register-sim-cognito-user-pool.js +30 -0
  332. package/dist/service/cognito/user-pool/register-sim-cognito-user-pool.js.map +1 -0
  333. package/dist/service/cognito/user-pool/sim-cognito-registration.types.d.ts +40 -0
  334. package/dist/service/cognito/user-pool/sim-cognito-registration.types.d.ts.map +1 -0
  335. package/dist/service/cognito/user-pool/sim-cognito-registration.types.js +2 -0
  336. package/dist/service/cognito/user-pool/sim-cognito-registration.types.js.map +1 -0
  337. package/dist/service/cognito/user-pool/sim-cognito-registrations.d.ts +34 -0
  338. package/dist/service/cognito/user-pool/sim-cognito-registrations.d.ts.map +1 -0
  339. package/dist/service/cognito/user-pool/sim-cognito-registrations.js +28 -0
  340. package/dist/service/cognito/user-pool/sim-cognito-registrations.js.map +1 -0
  341. package/dist/service/cognito/user-pool/sim-cognito-user-pool-factory.d.ts +9 -0
  342. package/dist/service/cognito/user-pool/sim-cognito-user-pool-factory.d.ts.map +1 -1
  343. package/dist/service/cognito/user-pool/sim-cognito-user-pool-factory.js +3 -2
  344. package/dist/service/cognito/user-pool/sim-cognito-user-pool-factory.js.map +1 -1
  345. package/dist/service/cognito/user-pool/sim-cognito-user-pool-id.d.ts +9 -0
  346. package/dist/service/cognito/user-pool/sim-cognito-user-pool-id.d.ts.map +1 -1
  347. package/dist/service/cognito/user-pool/sim-cognito-user-pool-id.js +18 -0
  348. package/dist/service/cognito/user-pool/sim-cognito-user-pool-id.js.map +1 -1
  349. package/dist/service/cognito/user-pool/sim-cognito-user-pool-store.d.ts +8 -0
  350. package/dist/service/cognito/user-pool/sim-cognito-user-pool-store.d.ts.map +1 -1
  351. package/dist/service/cognito/user-pool/sim-cognito-user-pool-store.js +15 -1
  352. package/dist/service/cognito/user-pool/sim-cognito-user-pool-store.js.map +1 -1
  353. package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.d.ts +1 -1
  354. package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.d.ts.map +1 -1
  355. package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.js +26 -19
  356. package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.js.map +1 -1
  357. package/dist/service/elbv2/serve/sim-elbv2-invoke-authorizer.js +1 -1
  358. package/dist/service/elbv2/serve/sim-elbv2-invoke-authorizer.js.map +1 -1
  359. package/dist/service/eventbridge/delivery/sim-event-bridge-delivery-function.d.ts +5 -3
  360. package/dist/service/eventbridge/delivery/sim-event-bridge-delivery-function.d.ts.map +1 -1
  361. package/dist/service/eventbridge/delivery/sim-event-bridge-delivery-function.js +14 -9
  362. package/dist/service/eventbridge/delivery/sim-event-bridge-delivery-function.js.map +1 -1
  363. package/dist/service/eventbridge/target/sim-event-target-arn.d.ts +13 -6
  364. package/dist/service/eventbridge/target/sim-event-target-arn.d.ts.map +1 -1
  365. package/dist/service/eventbridge/target/sim-event-target-arn.js +17 -7
  366. package/dist/service/eventbridge/target/sim-event-target-arn.js.map +1 -1
  367. package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-attacher.d.ts +40 -0
  368. package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-attacher.d.ts.map +1 -0
  369. package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-attacher.js +65 -0
  370. package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-attacher.js.map +1 -0
  371. package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.d.ts +1 -0
  372. package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.d.ts.map +1 -1
  373. package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.js +5 -0
  374. package/dist/service/iam/cfn/managed-policy/sim-cfn-iam-managed-policy-creator.js.map +1 -1
  375. package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-creator.d.ts +11 -20
  376. package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-creator.d.ts.map +1 -1
  377. package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-creator.js +29 -61
  378. package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-creator.js.map +1 -1
  379. package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-properties-parser.d.ts +38 -0
  380. package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-properties-parser.d.ts.map +1 -0
  381. package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-properties-parser.js +79 -0
  382. package/dist/service/iam/cfn/policy/sim-cfn-iam-policy-properties-parser.js.map +1 -0
  383. package/dist/service/iam/cfn/role/sim-cfn-iam-role-properties-parser.d.ts +2 -2
  384. package/dist/service/iam/cfn/role/sim-cfn-iam-role-properties-parser.d.ts.map +1 -1
  385. package/dist/service/iam/cfn/role/sim-cfn-iam-role-properties-parser.js +4 -2
  386. package/dist/service/iam/cfn/role/sim-cfn-iam-role-properties-parser.js.map +1 -1
  387. package/dist/service/iam/cfn/sim-cfn-iam-policies-parser.d.ts +35 -0
  388. package/dist/service/iam/cfn/sim-cfn-iam-policies-parser.d.ts.map +1 -0
  389. package/dist/service/iam/cfn/{role/sim-cfn-iam-role-policies-parser.js → sim-cfn-iam-policies-parser.js} +17 -12
  390. package/dist/service/iam/cfn/sim-cfn-iam-policies-parser.js.map +1 -0
  391. package/dist/service/iam/cfn/sim-cfn-iam-resource-deleter.d.ts +11 -0
  392. package/dist/service/iam/cfn/sim-cfn-iam-resource-deleter.d.ts.map +1 -1
  393. package/dist/service/iam/cfn/sim-cfn-iam-resource-deleter.js +25 -0
  394. package/dist/service/iam/cfn/sim-cfn-iam-resource-deleter.js.map +1 -1
  395. package/dist/service/iam/cfn/sim-cfn-iam-resource-factory.d.ts +1 -0
  396. package/dist/service/iam/cfn/sim-cfn-iam-resource-factory.d.ts.map +1 -1
  397. package/dist/service/iam/cfn/sim-cfn-iam-resource-factory.js +6 -0
  398. package/dist/service/iam/cfn/sim-cfn-iam-resource-factory.js.map +1 -1
  399. package/dist/service/iam/cfn/user/sim-cfn-iam-user-creator.d.ts +28 -0
  400. package/dist/service/iam/cfn/user/sim-cfn-iam-user-creator.d.ts.map +1 -0
  401. package/dist/service/iam/cfn/user/sim-cfn-iam-user-creator.js +67 -0
  402. package/dist/service/iam/cfn/user/sim-cfn-iam-user-creator.js.map +1 -0
  403. package/dist/service/iam/cfn/user/sim-cfn-iam-user-deleter.d.ts +26 -0
  404. package/dist/service/iam/cfn/user/sim-cfn-iam-user-deleter.d.ts.map +1 -0
  405. package/dist/service/iam/cfn/user/sim-cfn-iam-user-deleter.js +29 -0
  406. package/dist/service/iam/cfn/user/sim-cfn-iam-user-deleter.js.map +1 -0
  407. package/dist/service/iam/cfn/user/sim-cfn-iam-user-properties-parser.d.ts +38 -0
  408. package/dist/service/iam/cfn/user/sim-cfn-iam-user-properties-parser.d.ts.map +1 -0
  409. package/dist/service/iam/cfn/user/sim-cfn-iam-user-properties-parser.js +80 -0
  410. package/dist/service/iam/cfn/user/sim-cfn-iam-user-properties-parser.js.map +1 -0
  411. package/dist/service/iam/command/sim-iam-command.types.d.ts +3 -0
  412. package/dist/service/iam/command/sim-iam-command.types.d.ts.map +1 -1
  413. package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.command.d.ts +9 -0
  414. package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.command.d.ts.map +1 -0
  415. package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.command.js +2 -0
  416. package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.command.js.map +1 -0
  417. package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.handler.d.ts +30 -0
  418. package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.handler.d.ts.map +1 -0
  419. package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.handler.js +44 -0
  420. package/dist/service/iam/command/user/attach-user-policy/attach-user-policy.handler.js.map +1 -0
  421. package/dist/service/iam/command/user/create-login-profile/create-login-profile.command.d.ts +16 -0
  422. package/dist/service/iam/command/user/create-login-profile/create-login-profile.command.d.ts.map +1 -0
  423. package/dist/service/iam/command/user/create-login-profile/create-login-profile.command.js +2 -0
  424. package/dist/service/iam/command/user/create-login-profile/create-login-profile.command.js.map +1 -0
  425. package/dist/service/iam/command/user/create-login-profile/create-login-profile.handler.d.ts +32 -0
  426. package/dist/service/iam/command/user/create-login-profile/create-login-profile.handler.d.ts.map +1 -0
  427. package/dist/service/iam/command/user/create-login-profile/create-login-profile.handler.js +59 -0
  428. package/dist/service/iam/command/user/create-login-profile/create-login-profile.handler.js.map +1 -0
  429. package/dist/service/iam/command/user/create-user/create-user-record-factory.d.ts.map +1 -1
  430. package/dist/service/iam/command/user/create-user/create-user-record-factory.js +1 -0
  431. package/dist/service/iam/command/user/create-user/create-user-record-factory.js.map +1 -1
  432. package/dist/service/iam/command/user/delete-user/delete-user.command.d.ts +19 -0
  433. package/dist/service/iam/command/user/delete-user/delete-user.command.d.ts.map +1 -0
  434. package/dist/service/iam/command/user/delete-user/delete-user.command.js +2 -0
  435. package/dist/service/iam/command/user/delete-user/delete-user.command.js.map +1 -0
  436. package/dist/service/iam/command/user/delete-user/delete-user.handler.d.ts +34 -0
  437. package/dist/service/iam/command/user/delete-user/delete-user.handler.d.ts.map +1 -0
  438. package/dist/service/iam/command/user/delete-user/delete-user.handler.js +51 -0
  439. package/dist/service/iam/command/user/delete-user/delete-user.handler.js.map +1 -0
  440. package/dist/service/iam/command/user/sim-iam-user-command-handlers.d.ts +15 -0
  441. package/dist/service/iam/command/user/sim-iam-user-command-handlers.d.ts.map +1 -1
  442. package/dist/service/iam/command/user/sim-iam-user-command-handlers.js +36 -0
  443. package/dist/service/iam/command/user/sim-iam-user-command-handlers.js.map +1 -1
  444. package/dist/service/iam/sdk/sim-iam-sdk-command-router.d.ts.map +1 -1
  445. package/dist/service/iam/sdk/sim-iam-sdk-command-router.js +12 -0
  446. package/dist/service/iam/sdk/sim-iam-sdk-command-router.js.map +1 -1
  447. package/dist/service/iam/sim-iam.d.ts +12 -0
  448. package/dist/service/iam/sim-iam.d.ts.map +1 -1
  449. package/dist/service/iam/sim-iam.js +18 -0
  450. package/dist/service/iam/sim-iam.js.map +1 -1
  451. package/dist/service/iam/user/sim-iam-user-login-profile.d.ts +14 -0
  452. package/dist/service/iam/user/sim-iam-user-login-profile.d.ts.map +1 -0
  453. package/dist/service/iam/user/sim-iam-user-login-profile.js +2 -0
  454. package/dist/service/iam/user/sim-iam-user-login-profile.js.map +1 -0
  455. package/dist/service/iam/user/sim-iam-user.d.ts +8 -0
  456. package/dist/service/iam/user/sim-iam-user.d.ts.map +1 -1
  457. package/dist/service/lambda/cfn/alias/sim-cfn-lambda-alias-creator.d.ts +30 -0
  458. package/dist/service/lambda/cfn/alias/sim-cfn-lambda-alias-creator.d.ts.map +1 -0
  459. package/dist/service/lambda/cfn/alias/sim-cfn-lambda-alias-creator.js +41 -0
  460. package/dist/service/lambda/cfn/alias/sim-cfn-lambda-alias-creator.js.map +1 -0
  461. package/dist/service/lambda/cfn/function/sim-cfn-lambda-code-input.js +1 -1
  462. package/dist/service/lambda/cfn/function/sim-cfn-lambda-code-input.js.map +1 -1
  463. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.d.ts +12 -1
  464. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.d.ts.map +1 -1
  465. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.js +15 -3
  466. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.js.map +1 -1
  467. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-creator.d.ts +6 -1
  468. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-creator.d.ts.map +1 -1
  469. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-creator.js +11 -5
  470. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-creator.js.map +1 -1
  471. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-revoker.d.ts +12 -0
  472. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-revoker.d.ts.map +1 -0
  473. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-revoker.js +22 -0
  474. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-revoker.js.map +1 -0
  475. package/dist/service/lambda/cfn/sim-cfn-lambda-created-resource.d.ts +10 -0
  476. package/dist/service/lambda/cfn/sim-cfn-lambda-created-resource.d.ts.map +1 -0
  477. package/dist/service/lambda/cfn/sim-cfn-lambda-created-resource.js +14 -0
  478. package/dist/service/lambda/cfn/sim-cfn-lambda-created-resource.js.map +1 -0
  479. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-deleter.d.ts +2 -6
  480. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-deleter.d.ts.map +1 -1
  481. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-deleter.js +24 -19
  482. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-deleter.js.map +1 -1
  483. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.d.ts +2 -0
  484. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.d.ts.map +1 -1
  485. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.js +12 -0
  486. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.js.map +1 -1
  487. package/dist/service/lambda/cfn/version/sim-cfn-lambda-version-creator.d.ts +31 -0
  488. package/dist/service/lambda/cfn/version/sim-cfn-lambda-version-creator.d.ts.map +1 -0
  489. package/dist/service/lambda/cfn/version/sim-cfn-lambda-version-creator.js +40 -0
  490. package/dist/service/lambda/cfn/version/sim-cfn-lambda-version-creator.js.map +1 -0
  491. package/dist/service/lambda/command/add-permission/add-permission.command.d.ts +1 -0
  492. package/dist/service/lambda/command/add-permission/add-permission.command.d.ts.map +1 -1
  493. package/dist/service/lambda/command/add-permission/add-permission.handler.d.ts +8 -1
  494. package/dist/service/lambda/command/add-permission/add-permission.handler.d.ts.map +1 -1
  495. package/dist/service/lambda/command/add-permission/add-permission.handler.js +13 -6
  496. package/dist/service/lambda/command/add-permission/add-permission.handler.js.map +1 -1
  497. package/dist/service/lambda/command/alias/alias-input.d.ts +21 -0
  498. package/dist/service/lambda/command/alias/alias-input.d.ts.map +1 -0
  499. package/dist/service/lambda/command/alias/alias-input.js +30 -0
  500. package/dist/service/lambda/command/alias/alias-input.js.map +1 -0
  501. package/dist/service/lambda/command/alias/sim-lambda-alias-commands.d.ts +52 -0
  502. package/dist/service/lambda/command/alias/sim-lambda-alias-commands.d.ts.map +1 -0
  503. package/dist/service/lambda/command/alias/sim-lambda-alias-commands.js +49 -0
  504. package/dist/service/lambda/command/alias/sim-lambda-alias-commands.js.map +1 -0
  505. package/dist/service/lambda/command/authorize/sim-lambda-resource-policies.d.ts +9 -7
  506. package/dist/service/lambda/command/authorize/sim-lambda-resource-policies.d.ts.map +1 -1
  507. package/dist/service/lambda/command/authorize/sim-lambda-resource-policies.js +11 -9
  508. package/dist/service/lambda/command/authorize/sim-lambda-resource-policies.js.map +1 -1
  509. package/dist/service/lambda/command/authorize/sim-lambda-service-invoke-authorizer.d.ts +10 -2
  510. package/dist/service/lambda/command/authorize/sim-lambda-service-invoke-authorizer.d.ts.map +1 -1
  511. package/dist/service/lambda/command/authorize/sim-lambda-service-invoke-authorizer.js +2 -2
  512. package/dist/service/lambda/command/authorize/sim-lambda-service-invoke-authorizer.js.map +1 -1
  513. package/dist/service/lambda/command/create-alias/create-alias.command.d.ts +31 -0
  514. package/dist/service/lambda/command/create-alias/create-alias.command.d.ts.map +1 -0
  515. package/dist/service/lambda/command/create-alias/create-alias.command.js +5 -0
  516. package/dist/service/lambda/command/create-alias/create-alias.command.js.map +1 -0
  517. package/dist/service/lambda/command/create-alias/create-alias.handler.d.ts +35 -0
  518. package/dist/service/lambda/command/create-alias/create-alias.handler.d.ts.map +1 -0
  519. package/dist/service/lambda/command/create-alias/create-alias.handler.js +52 -0
  520. package/dist/service/lambda/command/create-alias/create-alias.handler.js.map +1 -0
  521. package/dist/service/lambda/command/create-function/create-function.command.d.ts +1 -1
  522. package/dist/service/lambda/command/create-function/create-function.command.d.ts.map +1 -1
  523. package/dist/service/lambda/command/create-function/create-function.handler.d.ts.map +1 -1
  524. package/dist/service/lambda/command/create-function/create-function.handler.js +2 -1
  525. package/dist/service/lambda/command/create-function/create-function.handler.js.map +1 -1
  526. package/dist/service/lambda/command/delete-alias/delete-alias.command.d.ts +24 -0
  527. package/dist/service/lambda/command/delete-alias/delete-alias.command.d.ts.map +1 -0
  528. package/dist/service/lambda/command/delete-alias/delete-alias.command.js +5 -0
  529. package/dist/service/lambda/command/delete-alias/delete-alias.command.js.map +1 -0
  530. package/dist/service/lambda/command/delete-alias/delete-alias.handler.d.ts +37 -0
  531. package/dist/service/lambda/command/delete-alias/delete-alias.handler.d.ts.map +1 -0
  532. package/dist/service/lambda/command/delete-alias/delete-alias.handler.js +44 -0
  533. package/dist/service/lambda/command/delete-alias/delete-alias.handler.js.map +1 -0
  534. package/dist/service/lambda/command/delete-function/delete-function.handler.d.ts +6 -2
  535. package/dist/service/lambda/command/delete-function/delete-function.handler.d.ts.map +1 -1
  536. package/dist/service/lambda/command/delete-function/delete-function.handler.js +7 -3
  537. package/dist/service/lambda/command/delete-function/delete-function.handler.js.map +1 -1
  538. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts +8 -0
  539. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts.map +1 -1
  540. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js +11 -2
  541. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js.map +1 -1
  542. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.d.ts.map +1 -1
  543. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js +13 -6
  544. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js.map +1 -1
  545. package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +3 -1
  546. package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts.map +1 -1
  547. package/dist/service/lambda/command/function/sim-lambda-function-commands.js +1 -1
  548. package/dist/service/lambda/command/function/sim-lambda-function-commands.js.map +1 -1
  549. package/dist/service/lambda/command/get-alias/get-alias.command.d.ts +25 -0
  550. package/dist/service/lambda/command/get-alias/get-alias.command.d.ts.map +1 -0
  551. package/dist/service/lambda/command/get-alias/get-alias.command.js +5 -0
  552. package/dist/service/lambda/command/get-alias/get-alias.command.js.map +1 -0
  553. package/dist/service/lambda/command/get-alias/get-alias.handler.d.ts +34 -0
  554. package/dist/service/lambda/command/get-alias/get-alias.handler.d.ts.map +1 -0
  555. package/dist/service/lambda/command/get-alias/get-alias.handler.js +38 -0
  556. package/dist/service/lambda/command/get-alias/get-alias.handler.js.map +1 -0
  557. package/dist/service/lambda/command/get-function/get-function.command.d.ts +2 -1
  558. package/dist/service/lambda/command/get-function/get-function.command.d.ts.map +1 -1
  559. package/dist/service/lambda/command/get-function/get-function.handler.d.ts +6 -2
  560. package/dist/service/lambda/command/get-function/get-function.handler.d.ts.map +1 -1
  561. package/dist/service/lambda/command/get-function/get-function.handler.js +13 -6
  562. package/dist/service/lambda/command/get-function/get-function.handler.js.map +1 -1
  563. package/dist/service/lambda/command/get-policy/get-policy.command.d.ts +1 -0
  564. package/dist/service/lambda/command/get-policy/get-policy.command.d.ts.map +1 -1
  565. package/dist/service/lambda/command/get-policy/get-policy.handler.d.ts +8 -3
  566. package/dist/service/lambda/command/get-policy/get-policy.handler.d.ts.map +1 -1
  567. package/dist/service/lambda/command/get-policy/get-policy.handler.js +11 -6
  568. package/dist/service/lambda/command/get-policy/get-policy.handler.js.map +1 -1
  569. package/dist/service/lambda/command/invoke/invoke-authorizer.d.ts +11 -8
  570. package/dist/service/lambda/command/invoke/invoke-authorizer.d.ts.map +1 -1
  571. package/dist/service/lambda/command/invoke/invoke-authorizer.js +11 -8
  572. package/dist/service/lambda/command/invoke/invoke-authorizer.js.map +1 -1
  573. package/dist/service/lambda/command/invoke/invoke-dispatcher.d.ts +3 -0
  574. package/dist/service/lambda/command/invoke/invoke-dispatcher.d.ts.map +1 -1
  575. package/dist/service/lambda/command/invoke/invoke-dispatcher.js +5 -2
  576. package/dist/service/lambda/command/invoke/invoke-dispatcher.js.map +1 -1
  577. package/dist/service/lambda/command/invoke/invoke.handler.d.ts +9 -2
  578. package/dist/service/lambda/command/invoke/invoke.handler.d.ts.map +1 -1
  579. package/dist/service/lambda/command/invoke/invoke.handler.js +20 -10
  580. package/dist/service/lambda/command/invoke/invoke.handler.js.map +1 -1
  581. package/dist/service/lambda/command/list-aliases/list-aliases.command.d.ts +30 -0
  582. package/dist/service/lambda/command/list-aliases/list-aliases.command.d.ts.map +1 -0
  583. package/dist/service/lambda/command/list-aliases/list-aliases.command.js +5 -0
  584. package/dist/service/lambda/command/list-aliases/list-aliases.command.js.map +1 -0
  585. package/dist/service/lambda/command/list-aliases/list-aliases.handler.d.ts +35 -0
  586. package/dist/service/lambda/command/list-aliases/list-aliases.handler.d.ts.map +1 -0
  587. package/dist/service/lambda/command/list-aliases/list-aliases.handler.js +44 -0
  588. package/dist/service/lambda/command/list-aliases/list-aliases.handler.js.map +1 -0
  589. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.command.d.ts +28 -0
  590. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.command.d.ts.map +1 -0
  591. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.command.js +5 -0
  592. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.command.js.map +1 -0
  593. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.handler.d.ts +35 -0
  594. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.handler.d.ts.map +1 -0
  595. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.handler.js +43 -0
  596. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.handler.js.map +1 -0
  597. package/dist/service/lambda/command/permission/sim-lambda-permission-commands.d.ts +8 -3
  598. package/dist/service/lambda/command/permission/sim-lambda-permission-commands.d.ts.map +1 -1
  599. package/dist/service/lambda/command/permission/sim-lambda-permission-commands.js +6 -3
  600. package/dist/service/lambda/command/permission/sim-lambda-permission-commands.js.map +1 -1
  601. package/dist/service/lambda/command/publish-version/publish-version.command.d.ts +34 -0
  602. package/dist/service/lambda/command/publish-version/publish-version.command.d.ts.map +1 -0
  603. package/dist/service/lambda/command/publish-version/publish-version.command.js +5 -0
  604. package/dist/service/lambda/command/publish-version/publish-version.command.js.map +1 -0
  605. package/dist/service/lambda/command/publish-version/publish-version.handler.d.ts +37 -0
  606. package/dist/service/lambda/command/publish-version/publish-version.handler.d.ts.map +1 -0
  607. package/dist/service/lambda/command/publish-version/publish-version.handler.js +42 -0
  608. package/dist/service/lambda/command/publish-version/publish-version.handler.js.map +1 -0
  609. package/dist/service/lambda/command/remove-permission/remove-permission.command.d.ts +1 -0
  610. package/dist/service/lambda/command/remove-permission/remove-permission.command.d.ts.map +1 -1
  611. package/dist/service/lambda/command/remove-permission/remove-permission.handler.d.ts +8 -1
  612. package/dist/service/lambda/command/remove-permission/remove-permission.handler.d.ts.map +1 -1
  613. package/dist/service/lambda/command/remove-permission/remove-permission.handler.js +12 -5
  614. package/dist/service/lambda/command/remove-permission/remove-permission.handler.js.map +1 -1
  615. package/dist/service/lambda/command/sim-lambda-command.types.d.ts +7 -0
  616. package/dist/service/lambda/command/sim-lambda-command.types.d.ts.map +1 -1
  617. package/dist/service/lambda/command/update-alias/update-alias.command.d.ts +31 -0
  618. package/dist/service/lambda/command/update-alias/update-alias.command.d.ts.map +1 -0
  619. package/dist/service/lambda/command/update-alias/update-alias.command.js +5 -0
  620. package/dist/service/lambda/command/update-alias/update-alias.command.js.map +1 -0
  621. package/dist/service/lambda/command/update-alias/update-alias.handler.d.ts +35 -0
  622. package/dist/service/lambda/command/update-alias/update-alias.handler.d.ts.map +1 -0
  623. package/dist/service/lambda/command/update-alias/update-alias.handler.js +48 -0
  624. package/dist/service/lambda/command/update-alias/update-alias.handler.js.map +1 -0
  625. package/dist/service/lambda/command/version/sim-lambda-version-commands.d.ts +37 -0
  626. package/dist/service/lambda/command/version/sim-lambda-version-commands.d.ts.map +1 -0
  627. package/dist/service/lambda/command/version/sim-lambda-version-commands.js +28 -0
  628. package/dist/service/lambda/command/version/sim-lambda-version-commands.js.map +1 -0
  629. package/dist/service/lambda/command/version/version-authorizer.d.ts +29 -0
  630. package/dist/service/lambda/command/version/version-authorizer.d.ts.map +1 -0
  631. package/dist/service/lambda/command/version/version-authorizer.js +39 -0
  632. package/dist/service/lambda/command/version/version-authorizer.js.map +1 -0
  633. package/dist/service/lambda/event-source/poll/sim-lambda-dynamodb-stream-event-source-poller.d.ts.map +1 -1
  634. package/dist/service/lambda/event-source/poll/sim-lambda-dynamodb-stream-event-source-poller.js +2 -1
  635. package/dist/service/lambda/event-source/poll/sim-lambda-dynamodb-stream-event-source-poller.js.map +1 -1
  636. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-function.d.ts +13 -0
  637. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-function.d.ts.map +1 -0
  638. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-function.js +13 -0
  639. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-function.js.map +1 -0
  640. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-consumer.d.ts.map +1 -1
  641. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-consumer.js +2 -1
  642. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-consumer.js.map +1 -1
  643. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts +9 -1
  644. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts.map +1 -1
  645. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js +8 -0
  646. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js.map +1 -1
  647. package/dist/service/lambda/function/code/sim-lambda-executable-code.d.ts +6 -5
  648. package/dist/service/lambda/function/code/sim-lambda-executable-code.d.ts.map +1 -1
  649. package/dist/service/lambda/function/code/sim-lambda-executable-code.js +7 -6
  650. package/dist/service/lambda/function/code/sim-lambda-executable-code.js.map +1 -1
  651. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts +11 -3
  652. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts.map +1 -1
  653. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js +13 -7
  654. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js.map +1 -1
  655. package/dist/service/lambda/function/invoke/sim-lambda-invoke-context-builder.d.ts +2 -0
  656. package/dist/service/lambda/function/invoke/sim-lambda-invoke-context-builder.d.ts.map +1 -1
  657. package/dist/service/lambda/function/invoke/sim-lambda-invoke-context-builder.js +2 -2
  658. package/dist/service/lambda/function/invoke/sim-lambda-invoke-context-builder.js.map +1 -1
  659. package/dist/service/lambda/function/invoke/sim-lambda-process-output.d.ts +104 -0
  660. package/dist/service/lambda/function/invoke/sim-lambda-process-output.d.ts.map +1 -0
  661. package/dist/service/lambda/function/invoke/sim-lambda-process-output.js +133 -0
  662. package/dist/service/lambda/function/invoke/sim-lambda-process-output.js.map +1 -0
  663. package/dist/service/lambda/function/logging/sim-lambda-function-logging.d.ts +10 -0
  664. package/dist/service/lambda/function/logging/sim-lambda-function-logging.d.ts.map +1 -1
  665. package/dist/service/lambda/function/logging/sim-lambda-function-logging.js +11 -0
  666. package/dist/service/lambda/function/logging/sim-lambda-function-logging.js.map +1 -1
  667. package/dist/service/lambda/function/policy/sim-lambda-policy-resource.d.ts +17 -0
  668. package/dist/service/lambda/function/policy/sim-lambda-policy-resource.d.ts.map +1 -0
  669. package/dist/service/lambda/function/policy/sim-lambda-policy-resource.js +2 -0
  670. package/dist/service/lambda/function/policy/sim-lambda-policy-resource.js.map +1 -0
  671. package/dist/service/lambda/function/sim-lambda-function-arn-parts.d.ts +3 -3
  672. package/dist/service/lambda/function/sim-lambda-function-configuration.d.ts +43 -0
  673. package/dist/service/lambda/function/sim-lambda-function-configuration.d.ts.map +1 -0
  674. package/dist/service/lambda/function/sim-lambda-function-configuration.js +22 -0
  675. package/dist/service/lambda/function/sim-lambda-function-configuration.js.map +1 -0
  676. package/dist/service/lambda/function/sim-lambda-function-name.d.ts +3 -1
  677. package/dist/service/lambda/function/sim-lambda-function-name.d.ts.map +1 -1
  678. package/dist/service/lambda/function/sim-lambda-function-name.js +3 -1
  679. package/dist/service/lambda/function/sim-lambda-function-name.js.map +1 -1
  680. package/dist/service/lambda/function/sim-lambda-function-reference.d.ts +36 -0
  681. package/dist/service/lambda/function/sim-lambda-function-reference.d.ts.map +1 -0
  682. package/dist/service/lambda/function/sim-lambda-function-reference.js +56 -0
  683. package/dist/service/lambda/function/sim-lambda-function-reference.js.map +1 -0
  684. package/dist/service/lambda/function/sim-lambda-function.d.ts +19 -32
  685. package/dist/service/lambda/function/sim-lambda-function.d.ts.map +1 -1
  686. package/dist/service/lambda/function/sim-lambda-function.js +33 -14
  687. package/dist/service/lambda/function/sim-lambda-function.js.map +1 -1
  688. package/dist/service/lambda/function/url/sim-lambda-function-lookup.d.ts +22 -3
  689. package/dist/service/lambda/function/url/sim-lambda-function-lookup.d.ts.map +1 -1
  690. package/dist/service/lambda/function/url/sim-lambda-function-lookup.js +24 -4
  691. package/dist/service/lambda/function/url/sim-lambda-function-lookup.js.map +1 -1
  692. package/dist/service/lambda/function/version/sim-lambda-function-alias-store.d.ts +55 -0
  693. package/dist/service/lambda/function/version/sim-lambda-function-alias-store.d.ts.map +1 -0
  694. package/dist/service/lambda/function/version/sim-lambda-function-alias-store.js +80 -0
  695. package/dist/service/lambda/function/version/sim-lambda-function-alias-store.js.map +1 -0
  696. package/dist/service/lambda/function/version/sim-lambda-function-alias.d.ts +60 -0
  697. package/dist/service/lambda/function/version/sim-lambda-function-alias.d.ts.map +1 -0
  698. package/dist/service/lambda/function/version/sim-lambda-function-alias.js +57 -0
  699. package/dist/service/lambda/function/version/sim-lambda-function-alias.js.map +1 -0
  700. package/dist/service/lambda/function/version/sim-lambda-function-target.d.ts +16 -0
  701. package/dist/service/lambda/function/version/sim-lambda-function-target.d.ts.map +1 -0
  702. package/dist/service/lambda/function/version/sim-lambda-function-target.js +2 -0
  703. package/dist/service/lambda/function/version/sim-lambda-function-target.js.map +1 -0
  704. package/dist/service/lambda/function/version/sim-lambda-function-version-store.d.ts +80 -0
  705. package/dist/service/lambda/function/version/sim-lambda-function-version-store.d.ts.map +1 -0
  706. package/dist/service/lambda/function/version/sim-lambda-function-version-store.js +114 -0
  707. package/dist/service/lambda/function/version/sim-lambda-function-version-store.js.map +1 -0
  708. package/dist/service/lambda/function/version/sim-lambda-function-versions.d.ts +61 -0
  709. package/dist/service/lambda/function/version/sim-lambda-function-versions.d.ts.map +1 -0
  710. package/dist/service/lambda/function/version/sim-lambda-function-versions.js +96 -0
  711. package/dist/service/lambda/function/version/sim-lambda-function-versions.js.map +1 -0
  712. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.d.ts.map +1 -1
  713. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js +28 -0
  714. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js.map +1 -1
  715. package/dist/service/lambda/serve/api/sim-lambda-api-routes.d.ts +2 -1
  716. package/dist/service/lambda/serve/api/sim-lambda-api-routes.d.ts.map +1 -1
  717. package/dist/service/lambda/serve/api/sim-lambda-api-routes.js +2 -1
  718. package/dist/service/lambda/serve/api/sim-lambda-api-routes.js.map +1 -1
  719. package/dist/service/lambda/sim-lambda-commands.d.ts +8 -0
  720. package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -1
  721. package/dist/service/lambda/sim-lambda-commands.js +25 -0
  722. package/dist/service/lambda/sim-lambda-commands.js.map +1 -1
  723. package/dist/service/lambda/sim-lambda-inspection.d.ts +43 -0
  724. package/dist/service/lambda/sim-lambda-inspection.d.ts.map +1 -0
  725. package/dist/service/lambda/sim-lambda-inspection.js +50 -0
  726. package/dist/service/lambda/sim-lambda-inspection.js.map +1 -0
  727. package/dist/service/lambda/sim-lambda.d.ts +44 -80
  728. package/dist/service/lambda/sim-lambda.d.ts.map +1 -1
  729. package/dist/service/lambda/sim-lambda.js +55 -82
  730. package/dist/service/lambda/sim-lambda.js.map +1 -1
  731. package/dist/service/logs/subscription/lambda/sim-aws-logs-subscription-functions.d.ts.map +1 -1
  732. package/dist/service/logs/subscription/lambda/sim-aws-logs-subscription-functions.js +2 -2
  733. package/dist/service/logs/subscription/lambda/sim-aws-logs-subscription-functions.js.map +1 -1
  734. package/dist/service/logs/subscription/lambda/sim-logs-destination-permission.d.ts +7 -5
  735. package/dist/service/logs/subscription/lambda/sim-logs-destination-permission.d.ts.map +1 -1
  736. package/dist/service/logs/subscription/lambda/sim-logs-destination-permission.js +15 -9
  737. package/dist/service/logs/subscription/lambda/sim-logs-destination-permission.js.map +1 -1
  738. package/dist/service/logs/subscription/lambda/sim-logs-subscription-function-arn.d.ts +9 -0
  739. package/dist/service/logs/subscription/lambda/sim-logs-subscription-function-arn.d.ts.map +1 -1
  740. package/dist/service/logs/subscription/lambda/sim-logs-subscription-function-arn.js +11 -5
  741. package/dist/service/logs/subscription/lambda/sim-logs-subscription-function-arn.js.map +1 -1
  742. package/dist/service/s3/command/get-object/get-object-loader.d.ts +5 -3
  743. package/dist/service/s3/command/get-object/get-object-loader.d.ts.map +1 -1
  744. package/dist/service/s3/command/get-object/get-object-loader.js +19 -4
  745. package/dist/service/s3/command/get-object/get-object-loader.js.map +1 -1
  746. package/dist/service/s3/command/get-object/get-object.command.d.ts +13 -0
  747. package/dist/service/s3/command/get-object/get-object.command.d.ts.map +1 -1
  748. package/dist/service/s3/command/get-object/get-object.handler.d.ts +3 -0
  749. package/dist/service/s3/command/get-object/get-object.handler.d.ts.map +1 -1
  750. package/dist/service/s3/command/get-object/get-object.handler.js +4 -1
  751. package/dist/service/s3/command/get-object/get-object.handler.js.map +1 -1
  752. package/dist/service/s3/error/sim-s3.error.d.ts +13 -0
  753. package/dist/service/s3/error/sim-s3.error.d.ts.map +1 -1
  754. package/dist/service/s3/error/sim-s3.error.js +15 -0
  755. package/dist/service/s3/error/sim-s3.error.js.map +1 -1
  756. package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.d.ts +1 -1
  757. package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.d.ts.map +1 -1
  758. package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.js +23 -10
  759. package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.js.map +1 -1
  760. package/dist/service/s3/notification/destination/lambda/sim-s3-notification-function-arn.d.ts +8 -4
  761. package/dist/service/s3/notification/destination/lambda/sim-s3-notification-function-arn.d.ts.map +1 -1
  762. package/dist/service/s3/notification/destination/lambda/sim-s3-notification-function-arn.js +12 -12
  763. package/dist/service/s3/notification/destination/lambda/sim-s3-notification-function-arn.js.map +1 -1
  764. package/dist/service/s3/object/s3-object-range.d.ts +26 -0
  765. package/dist/service/s3/object/s3-object-range.d.ts.map +1 -0
  766. package/dist/service/s3/object/s3-object-range.js +89 -0
  767. package/dist/service/s3/object/s3-object-range.js.map +1 -0
  768. package/dist/service/s3/object/s3-object-response-headers.d.ts +7 -1
  769. package/dist/service/s3/object/s3-object-response-headers.d.ts.map +1 -1
  770. package/dist/service/s3/object/s3-object-response-headers.js +5 -1
  771. package/dist/service/s3/object/s3-object-response-headers.js.map +1 -1
  772. package/dist/service/s3/serve/api/sim-s3-api-input.d.ts +0 -14
  773. package/dist/service/s3/serve/api/sim-s3-api-input.d.ts.map +1 -1
  774. package/dist/service/s3/serve/api/sim-s3-api-input.js +0 -29
  775. package/dist/service/s3/serve/api/sim-s3-api-input.js.map +1 -1
  776. package/dist/service/s3/serve/api/sim-s3-api-object-input.d.ts +27 -0
  777. package/dist/service/s3/serve/api/sim-s3-api-object-input.d.ts.map +1 -0
  778. package/dist/service/s3/serve/api/sim-s3-api-object-input.js +47 -0
  779. package/dist/service/s3/serve/api/sim-s3-api-object-input.js.map +1 -0
  780. package/dist/service/s3/serve/api/sim-s3-api-object-output.d.ts +5 -0
  781. package/dist/service/s3/serve/api/sim-s3-api-object-output.d.ts.map +1 -1
  782. package/dist/service/s3/serve/api/sim-s3-api-object-output.js +8 -1
  783. package/dist/service/s3/serve/api/sim-s3-api-object-output.js.map +1 -1
  784. package/dist/service/s3/serve/api/sim-s3-api-object-routes.d.ts.map +1 -1
  785. package/dist/service/s3/serve/api/sim-s3-api-object-routes.js +2 -2
  786. package/dist/service/s3/serve/api/sim-s3-api-object-routes.js.map +1 -1
  787. package/dist/service/s3/serve/sim-s3-rest-object-reader.d.ts +5 -0
  788. package/dist/service/s3/serve/sim-s3-rest-object-reader.d.ts.map +1 -1
  789. package/dist/service/s3/serve/sim-s3-rest-object-reader.js +20 -3
  790. package/dist/service/s3/serve/sim-s3-rest-object-reader.js.map +1 -1
  791. package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.d.ts +5 -4
  792. package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.d.ts.map +1 -1
  793. package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.js +16 -11
  794. package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.js.map +1 -1
  795. package/dist/service/sns/subscription/sim-sns-function-endpoint-arn.d.ts +8 -4
  796. package/dist/service/sns/subscription/sim-sns-function-endpoint-arn.d.ts.map +1 -1
  797. package/dist/service/sns/subscription/sim-sns-function-endpoint-arn.js +11 -10
  798. package/dist/service/sns/subscription/sim-sns-function-endpoint-arn.js.map +1 -1
  799. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-dynamic-reference-resolver.d.ts +0 -7
  800. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-dynamic-reference-resolver.d.ts.map +1 -1
  801. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-dynamic-reference-resolver.js +7 -41
  802. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-dynamic-reference-resolver.js.map +1 -1
  803. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-body.d.ts +14 -0
  804. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-body.d.ts.map +1 -0
  805. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-body.js +26 -0
  806. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-body.js.map +1 -0
  807. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-stand-in.d.ts +11 -0
  808. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-stand-in.d.ts.map +1 -0
  809. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-stand-in.js +16 -0
  810. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-reference-stand-in.js.map +1 -0
  811. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-dynamic-reference-resolver.d.ts +40 -0
  812. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-dynamic-reference-resolver.d.ts.map +1 -0
  813. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-dynamic-reference-resolver.js +67 -0
  814. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-dynamic-reference-resolver.js.map +1 -0
  815. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-reference-properties.d.ts +8 -0
  816. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-reference-properties.d.ts.map +1 -0
  817. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-reference-properties.js +61 -0
  818. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-reference-properties.js.map +1 -0
  819. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-refusals.d.ts +19 -0
  820. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-refusals.d.ts.map +1 -0
  821. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-refusals.js +37 -0
  822. package/dist/service/ssm/cfn/dynamic/sim-cfn-ssm-secure-refusals.js.map +1 -0
  823. package/dist/service/ssm/sim-ssm.d.ts +5 -0
  824. package/dist/service/ssm/sim-ssm.d.ts.map +1 -1
  825. package/dist/service/ssm/sim-ssm.js +7 -0
  826. package/dist/service/ssm/sim-ssm.js.map +1 -1
  827. package/package.json +4 -2
  828. package/dist/service/iam/cfn/role/sim-cfn-iam-role-policies-parser.d.ts +0 -25
  829. package/dist/service/iam/cfn/role/sim-cfn-iam-role-policies-parser.d.ts.map +0 -1
  830. package/dist/service/iam/cfn/role/sim-cfn-iam-role-policies-parser.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-template-body-parse.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudformation/template/sim-cfn-template-body-parse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGnE,UAAU,iCAAiC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,MAAM,EACpB,UAAU,GAAE,iCAAsC,GACjD,qBAAqB,CAoBvB"}
@@ -0,0 +1,36 @@
1
+ import { jsonParse } from "../../../util/type-guard/json.js";
2
+ import { parseSimCfnTemplateYaml } from "./yaml/sim-cfn-template-yaml.js";
3
+ /**
4
+ * Parse the `TemplateBody` a Stack command carries.
5
+ *
6
+ * CloudFormation takes that field as JSON or as YAML, and unlike a template
7
+ * file it carries no name to say which. The body is read as JSON, and as YAML
8
+ * when that fails. JSON goes first because it is the format CDK synthesizes,
9
+ * and a JSON template read by the YAML parser costs more for the same result.
10
+ *
11
+ * A body that fails both attempts is refused with what each of them made of
12
+ * it. One reason on its own would send whoever wrote the template looking at
13
+ * the wrong format.
14
+ */
15
+ export function parseSimCfnTemplateBody(templateBody, properties = {}) {
16
+ let jsonFailure;
17
+ try {
18
+ return jsonParse(templateBody);
19
+ }
20
+ catch (error) {
21
+ jsonFailure = error;
22
+ }
23
+ try {
24
+ return parseSimCfnTemplateYaml(templateBody);
25
+ }
26
+ catch (error) {
27
+ throw new Error(`Sim CloudFormation Stack ${properties.stackName ?? "unknown"} ` +
28
+ "TemplateBody must be valid JSON or YAML: " +
29
+ `as JSON, ${reasonFor(jsonFailure)}; ` +
30
+ `as YAML, ${reasonFor(error)}`, { cause: error });
31
+ }
32
+ }
33
+ function reasonFor(error) {
34
+ return error instanceof Error ? error.message : String(error);
35
+ }
36
+ //# sourceMappingURL=sim-cfn-template-body-parse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-template-body-parse.js","sourceRoot":"","sources":["../../../../src/service/cloudformation/template/sim-cfn-template-body-parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,kCAAkC,CAAC;AAE9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAM1E;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,uBAAuB,CACrC,YAAoB,EACpB,UAAU,GAAsC,EAAE;IAElD,IAAI,WAAoB,CAAC;IAEzB,IAAI,CAAC;QACH,OAAO,SAAS,CAAC,YAAiD,CAAC,CAAC;IACtE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,WAAW,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,CAAC;QACH,OAAO,uBAAuB,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,4BAA4B,UAAU,CAAC,SAAS,IAAI,SAAS,GAAG;YAC9D,2CAA2C;YAC3C,YAAY,SAAS,CAAC,WAAW,CAAC,IAAI;YACtC,YAAY,SAAS,CAAC,KAAK,CAAC,EAAE,EAChC,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { SimCfnParameters } from "../parameters/sim-cfn-parameters.js";
2
2
  import type { SimCfnTemplateValue, SimCfnTemplateValueRecord } from "./value/sim-cfn-template-value.js";
3
3
  import type { SimCfnParameterDefinition } from "../parameters/sim-cfn-parameters.type.js";
4
- import { type JSONString } from "../../../util/type-guard/json.js";
5
4
  import type { SimAwsAccountRegionScope } from "../../aws/sim-aws-account-region-scope.js";
6
5
  import { SimCfnPseudoParameters } from "../parameters/pseudo/sim-cfn-pseudo-parameters.js";
7
6
  import type { SimCfnMappings } from "./mapping/sim-cfn-mappings.js";
@@ -35,7 +34,7 @@ interface SimCfnTemplateProperties {
35
34
  readonly accountRegionScope?: SimAwsAccountRegionScope | undefined;
36
35
  readonly exports?: SimCfnExports | undefined;
37
36
  }
38
- interface SimCfnTemplateFromJsonProperties {
37
+ interface SimCfnTemplateFromBodyProperties {
39
38
  readonly stackName?: string | undefined;
40
39
  readonly parameters?: SimCfnParameters | undefined;
41
40
  readonly accountRegionScope?: SimAwsAccountRegionScope | undefined;
@@ -56,9 +55,17 @@ export declare class SimCfnTemplate {
56
55
  private evaluatedConditions;
57
56
  constructor(properties: SimCfnTemplateProperties);
58
57
  /**
59
- * Parse a JSON CloudFormation template body.
58
+ * Parse a CloudFormation template body written as JSON or as YAML.
59
+ *
60
+ * This is the `TemplateBody` a Stack command carries, in either of the two
61
+ * formats CloudFormation takes it in.
62
+ *
63
+ * A template naming the SAM transform is expanded on the way through, so
64
+ * what the Stack is deployed from holds the Resource types simulated AWS
65
+ * creates rather than the `AWS::Serverless::*` ones the author wrote. That
66
+ * holds for a YAML template as it does for a JSON one.
60
67
  */
61
- static fromJson(templateBody: JSONString<CfnTemplateBodyRecord>, properties?: SimCfnTemplateFromJsonProperties): SimCfnTemplate;
68
+ static fromTemplateBody(templateBody: string, properties?: SimCfnTemplateFromBodyProperties): SimCfnTemplate;
62
69
  /**
63
70
  * Get Resource template entries with CloudFormation value expressions resolved.
64
71
  *
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cfn-template.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudformation/template/sim-cfn-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAa,KAAK,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,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AAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACnD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACnE,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CAC9C;AAED;;;;GAIG;AACH,qBAAa,cAAc;IACzB,SAAgB,QAAQ,EAAE,qBAAqB,CAAC;IAChD,SAAgB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,SAAgB,UAAU,EAAE,gBAAgB,CAAC;IAC7C,uEAAuE;IACvE,SAAgB,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;IACnD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAuC;IAC1E,OAAO,CAAC,mBAAmB,CAA+B;IAE1D,YAAY,UAAU,EAAE,wBAAwB,EAe/C;IAED;;OAEG;IACH,MAAM,CAAC,QAAQ,CACb,YAAY,EAAE,UAAU,CAAC,qBAAqB,CAAC,EAC/C,UAAU,GAAE,gCAAqC,GAChD,cAAc,CAqBhB;IAED;;;;;;;;OAQG;IACH,iBAAiB,IAAI,4BAA4B,EAAE,CAwBlD;IAED;;;;;OAKG;IACH,eAAe,IAAI,0BAA0B,EAAE,CAc9C;IAED;;;;OAIG;IACH,gBAAgB,IAAI,sBAAsB,CAKzC;IAED;;;;;OAKG;IACH,UAAU,IAAI,gBAAgB,CAa7B;IAED,OAAO,CAAC,aAAa;CAStB"}
1
+ {"version":3,"file":"sim-cfn-template.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudformation/template/sim-cfn-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EAAE,yBAAy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B;IAED,OAAO,CAAC,aAAa;CAStB"}
@@ -2,10 +2,11 @@ import { SimCfnParameters } from "../parameters/sim-cfn-parameters.js";
2
2
  import { SimCfnTemplateValueResolver } from "./value/sim-cfn-template-value-resolver.js";
3
3
  import { isRecord } from "../../../util/type-guard/record.js";
4
4
  import { SimCfnTemplateBodyValidator } from "./sim-cfn-template-body-validator.js";
5
- import { jsonParse } from "../../../util/type-guard/json.js";
5
+ import { parseSimCfnTemplateBody } from "./sim-cfn-template-body-parse.js";
6
6
  import { SimCfnPseudoParameters } from "../parameters/pseudo/sim-cfn-pseudo-parameters.js";
7
7
  import { SimCfnConditionEvaluator } from "./condition/sim-cfn-condition-evaluator.js";
8
8
  import { SimCfnResourceConditions } from "./condition/sim-cfn-resource-conditions.js";
9
+ import { samExpandedTemplate } from "../sam/sim-cfn-sam-expansion.js";
9
10
  /**
10
11
  * Convenience wrapper over a plain parsed CloudFormation template object.
11
12
  *
@@ -30,20 +31,22 @@ export class SimCfnTemplate {
30
31
  this.parameters = (parameters ?? new SimCfnParameters({ stackName })).withDefinitions(this.template.Parameters);
31
32
  }
32
33
  /**
33
- * Parse a JSON CloudFormation template body.
34
+ * Parse a CloudFormation template body written as JSON or as YAML.
35
+ *
36
+ * This is the `TemplateBody` a Stack command carries, in either of the two
37
+ * formats CloudFormation takes it in.
38
+ *
39
+ * A template naming the SAM transform is expanded on the way through, so
40
+ * what the Stack is deployed from holds the Resource types simulated AWS
41
+ * creates rather than the `AWS::Serverless::*` ones the author wrote. That
42
+ * holds for a YAML template as it does for a JSON one.
34
43
  */
35
- static fromJson(templateBody, properties = {}) {
36
- let template;
37
- try {
38
- template = jsonParse(templateBody);
39
- }
40
- catch (error) {
41
- throw new Error(`Sim CloudFormation Stack ${properties.stackName ?? "unknown"} TemplateBody must be valid JSON`, {
42
- cause: error,
43
- });
44
- }
44
+ static fromTemplateBody(templateBody, properties = {}) {
45
+ const template = parseSimCfnTemplateBody(templateBody, {
46
+ stackName: properties.stackName,
47
+ });
45
48
  return new SimCfnTemplate({
46
- template,
49
+ template: samExpandedTemplate(template),
47
50
  parameters: properties.parameters,
48
51
  stackName: properties.stackName,
49
52
  accountRegionScope: properties.accountRegionScope,
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cfn-template.js","sourceRoot":"","sources":["../../../../src/service/cloudformation/template/sim-cfn-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AAKzF,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAEnF,OAAO,EAAE,SAAS,EAAmB,MAAM,kCAAkC,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAE3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAKtF,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AA8CtF;;;;GAIG;AACH,MAAM,OAAO,cAAc;IACT,QAAQ,CAAwB;IAChC,SAAS,CAAqB;IAC9B,UAAU,CAAmB;IAC7C,uEAAuE;IACvD,OAAO,CAA4B;IAClC,kBAAkB,CAAuC;IAClE,mBAAmB,CAA+B;IAE1D,YAAY,UAAoC;QAC9C,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,GACpE,UAAU,CAAC;QAEb,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,SAAS,GAAG,IAAI,2BAA2B,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;QA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E,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;YACrC,SAAS;YACT,QAAQ,EAAE,aAAa,CAAC,gBAAgB,CACtC,6BAA6B,SAAS,EAAE,EACxC,cAAc,CACf;SACF,CAAC,CAAC,CAAC;IACR,CAAC;IAED;;;;OAIG;IACH,gBAAgB;QACd,OAAO,IAAI,sBAAsB,CAAC;YAChC,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,UAAU;QACR,IAAI,CAAC,mBAAmB,KAAK,IAAI,wBAAwB,CAAC;YACxD,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU;YACpC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,aAAa,EAAE,IAAI,2BAA2B,CAAC;gBAC7C,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE;gBACzC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ;gBAChC,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;SACH,CAAC,CAAC,QAAQ,EAAE,CAAC;QAEd,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;IAEO,aAAa;QACnB,OAAO,IAAI,2BAA2B,CAAC;YACrC,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE;YACzC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ;YAChC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,11 @@
1
+ import type { CfnTemplateBodyRecord } from "../sim-cfn-template.js";
2
+ /**
3
+ * Parse a CloudFormation template written as YAML.
4
+ *
5
+ * What comes back is the template object the same infrastructure written as
6
+ * JSON parses to, with short-form intrinsic tags resolved to the objects their
7
+ * long forms are written as. Everything downstream reads one template shape,
8
+ * whichever format the template arrived in.
9
+ */
10
+ export declare function parseSimCfnTemplateYaml(body: string): CfnTemplateBodyRecord;
11
+ //# sourceMappingURL=sim-cfn-template-yaml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-template-yaml.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/yaml/sim-cfn-template-yaml.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAapE;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,CAqB3E"}
@@ -0,0 +1,41 @@
1
+ import { parseDocument } from "yaml";
2
+ import { isRecord } from "../../../../util/type-guard/record.js";
3
+ import { simCfnYamlShortFormTags } from "./sim-cfn-yaml-short-forms.js";
4
+ /**
5
+ * What a YAML parser calls a tag it has no entry for.
6
+ *
7
+ * A YAML parser calls that a warning and carries on with the value the tag was
8
+ * written against, which would read `!Base64 secret` as the string `secret`.
9
+ * It is a failure here, the way the long form of an intrinsic this simulation
10
+ * has no behaviour for fails the template that calls it.
11
+ */
12
+ const UNRESOLVED_TAG = "TAG_RESOLVE_FAILED";
13
+ /**
14
+ * Parse a CloudFormation template written as YAML.
15
+ *
16
+ * What comes back is the template object the same infrastructure written as
17
+ * JSON parses to, with short-form intrinsic tags resolved to the objects their
18
+ * long forms are written as. Everything downstream reads one template shape,
19
+ * whichever format the template arrived in.
20
+ */
21
+ export function parseSimCfnTemplateYaml(body) {
22
+ const document = parseDocument(body, {
23
+ customTags: simCfnYamlShortFormTags(),
24
+ });
25
+ const failures = [
26
+ ...document.errors,
27
+ ...document.warnings.filter((warning) => warning.code === UNRESOLVED_TAG),
28
+ ];
29
+ if (failures.length > 0) {
30
+ throw new Error(failureMessage(failures));
31
+ }
32
+ const template = document.toJS();
33
+ if (!isRecord(template)) {
34
+ throw new TypeError("a template must be a mapping of template sections");
35
+ }
36
+ return template;
37
+ }
38
+ function failureMessage(failures) {
39
+ return failures.map((failure) => failure.message).join("; ");
40
+ }
41
+ //# sourceMappingURL=sim-cfn-template-yaml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-template-yaml.js","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/yaml/sim-cfn-template-yaml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,MAAM,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AAEjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE;;;;;;;GAOG;AACH,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,EAAE;QACnC,UAAU,EAAE,uBAAuB,EAAE;KACtC,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG;QACf,GAAG,QAAQ,CAAC,MAAM;QAClB,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,cAAc,CAAC;KAC1E,CAAC;IAEF,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,QAAQ,GAAY,QAAQ,CAAC,IAAI,EAAE,CAAC;IAE1C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,SAAS,CAAC,mDAAmD,CAAC,CAAC;IAC3E,CAAC;IAED,OAAO,QAAiC,CAAC;AAC3C,CAAC;AAED,SAAS,cAAc,CAAC,QAA8B;IACpD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type CollectionTag, type ScalarTag } from "yaml";
2
+ /**
3
+ * The YAML tags that turn CloudFormation's short-form intrinsics into the
4
+ * objects their long forms are written as.
5
+ *
6
+ * `!GetAtt Bucket.Arn` becomes `{ "Fn::GetAtt": "Bucket.Arn" }`, and the rest
7
+ * of the simulator reads the template it would have read had the template been
8
+ * written in JSON.
9
+ *
10
+ * Every tag is registered against scalars, sequences and mappings alike, since
11
+ * the tag itself only says which function the value belongs to. What shape a
12
+ * function accepts is the business of the parser that reads its long form.
13
+ * That parser is where `!Ref [Bucket, Arn]` is refused, and it refuses the
14
+ * same template written in JSON.
15
+ */
16
+ export declare function simCfnYamlShortFormTags(): (ScalarTag | CollectionTag)[];
17
+ //# sourceMappingURL=sim-cfn-yaml-short-forms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-yaml-short-forms.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/yaml/sim-cfn-yaml-short-forms.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,SAAS,EAEf,MAAM,MAAM,CAAC;AA6Bd;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC,EAAE,CAMvE"}
@@ -0,0 +1,70 @@
1
+ import { Pair, YAMLMap, } from "yaml";
2
+ /**
3
+ * The short-form tag a YAML template can write an intrinsic function as, and
4
+ * the name the same function carries when it is written out in full.
5
+ *
6
+ * This is the set the simulator parses. The functions in
7
+ * `makeSimCfnFunctionParsers`, the `Ref` the node parser reads, and the
8
+ * functions a Condition is built from. A tag outside it is left unresolved. A
9
+ * template calling an intrinsic this simulation has no behaviour for is then
10
+ * refused as the file is read.
11
+ */
12
+ const SIM_CFN_YAML_SHORT_FORMS = new Map([
13
+ ["!Ref", "Ref"],
14
+ ["!GetAtt", "Fn::GetAtt"],
15
+ ["!Join", "Fn::Join"],
16
+ ["!Sub", "Fn::Sub"],
17
+ ["!FindInMap", "Fn::FindInMap"],
18
+ ["!If", "Fn::If"],
19
+ ["!Split", "Fn::Split"],
20
+ ["!Select", "Fn::Select"],
21
+ ["!ImportValue", "Fn::ImportValue"],
22
+ ["!And", "Fn::And"],
23
+ ["!Equals", "Fn::Equals"],
24
+ ["!Not", "Fn::Not"],
25
+ ["!Or", "Fn::Or"],
26
+ ["!Condition", "Condition"],
27
+ ]);
28
+ /**
29
+ * The YAML tags that turn CloudFormation's short-form intrinsics into the
30
+ * objects their long forms are written as.
31
+ *
32
+ * `!GetAtt Bucket.Arn` becomes `{ "Fn::GetAtt": "Bucket.Arn" }`, and the rest
33
+ * of the simulator reads the template it would have read had the template been
34
+ * written in JSON.
35
+ *
36
+ * Every tag is registered against scalars, sequences and mappings alike, since
37
+ * the tag itself only says which function the value belongs to. What shape a
38
+ * function accepts is the business of the parser that reads its long form.
39
+ * That parser is where `!Ref [Bucket, Arn]` is refused, and it refuses the
40
+ * same template written in JSON.
41
+ */
42
+ export function simCfnYamlShortFormTags() {
43
+ return [...SIM_CFN_YAML_SHORT_FORMS].flatMap(([tag, functionName]) => [
44
+ scalarShortFormTag(tag, functionName),
45
+ collectionShortFormTag(tag, functionName, "seq"),
46
+ collectionShortFormTag(tag, functionName, "map"),
47
+ ]);
48
+ }
49
+ function scalarShortFormTag(tag, functionName) {
50
+ return {
51
+ tag,
52
+ resolve: (value) => ({
53
+ [functionName]: value,
54
+ }),
55
+ };
56
+ }
57
+ function collectionShortFormTag(tag, functionName, collection) {
58
+ return {
59
+ tag,
60
+ collection,
61
+ // Wrapped as a node. A plain object would leave the values inside the
62
+ // collection as nodes when the document is turned into JavaScript.
63
+ resolve: (value) => {
64
+ const wrapped = new YAMLMap();
65
+ wrapped.add(new Pair(functionName, value));
66
+ return wrapped;
67
+ },
68
+ };
69
+ }
70
+ //# sourceMappingURL=sim-cfn-yaml-short-forms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-yaml-short-forms.js","sourceRoot":"","sources":["../../../../../src/service/cloudformation/template/yaml/sim-cfn-yaml-short-forms.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,OAAO,GAIR,MAAM,MAAM,CAAC;AAEd;;;;;;;;;GASG;AACH,MAAM,wBAAwB,GAAgC,IAAI,GAAG,CAAC;IACpE,CAAC,MAAM,EAAE,KAAK,CAAC;IACf,CAAC,SAAS,EAAE,YAAY,CAAC;IACzB,CAAC,OAAO,EAAE,UAAU,CAAC;IACrB,CAAC,MAAM,EAAE,SAAS,CAAC;IACnB,CAAC,YAAY,EAAE,eAAe,CAAC;IAC/B,CAAC,KAAK,EAAE,QAAQ,CAAC;IACjB,CAAC,QAAQ,EAAE,WAAW,CAAC;IACvB,CAAC,SAAS,EAAE,YAAY,CAAC;IACzB,CAAC,cAAc,EAAE,iBAAiB,CAAC;IACnC,CAAC,MAAM,EAAE,SAAS,CAAC;IACnB,CAAC,SAAS,EAAE,YAAY,CAAC;IACzB,CAAC,MAAM,EAAE,SAAS,CAAC;IACnB,CAAC,KAAK,EAAE,QAAQ,CAAC;IACjB,CAAC,YAAY,EAAE,WAAW,CAAC;CAC5B,CAAC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,CAAC,GAAG,wBAAwB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,YAAY,CAAC,EAAE,EAAE,CAAC;QACpE,kBAAkB,CAAC,GAAG,EAAE,YAAY,CAAC;QACrC,sBAAsB,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,CAAC;QAChD,sBAAsB,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,CAAC;KACjD,CAAC,CAAC;AACL,CAAC;AAED,SAAS,kBAAkB,CAAC,GAAW,EAAE,YAAoB;IAC3D,OAAO;QACL,GAAG;QACH,OAAO,EAAE,CAAC,KAAa,EAA0B,EAAE,CAAC,CAAC;YACnD,CAAC,YAAY,CAAC,EAAE,KAAK;SACtB,CAAC;KACH,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB,CAC7B,GAAW,EACX,YAAoB,EACpB,UAAyB;IAEzB,OAAO;QACL,GAAG;QACH,UAAU;QACV,sEAAsE;QACtE,mEAAmE;QACnE,OAAO,EAAE,CAAC,KAAwB,EAAW,EAAE;YAC7C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;YAE3C,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -23,6 +23,29 @@ export declare class SimCffRequestMetadataAdapter {
23
23
  * Extract CFF Cookies from Node fetch Headers.
24
24
  */
25
25
  toCffCookies(headers: Headers): CloudFrontFunction.Cookies;
26
+ /**
27
+ * Group header values under their lowercased name.
28
+ *
29
+ * A `Set-Cookie` header repeated on a response is the case this exists for.
30
+ * Node fetch Headers keep each one, and CloudFront presents a repeated
31
+ * header as one entry holding all of its values.
32
+ */
33
+ private headerValuesByName;
34
+ /**
35
+ * Present values in the shape CloudFront gives a repeated name.
36
+ *
37
+ * A single value is `value` alone. Repeated values keep the first in `value`
38
+ * and all of them in `multiValue`. That is what a Function reads for a header
39
+ * or a query parameter appearing more than once.
40
+ */
41
+ private toCffValue;
42
+ /**
43
+ * Read back the values a Function left under one name.
44
+ *
45
+ * A Function that means to send several values sets `multiValue`, and
46
+ * CloudFront sends those in place of `value`.
47
+ */
48
+ private fromCffValue;
26
49
  private fromCffCookies;
27
50
  }
28
51
  //# sourceMappingURL=sim-cff-request-metadata-adapter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cff-request-metadata-adapter.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/cff/adapter/sim-cff-request-metadata-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAE1F;;GAEG;AACH,qBAAa,4BAA4B;IACvC;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAQzD;IAED;;OAEG;IACH,cAAc,CACZ,OAAO,EAAE,kBAAkB,CAAC,OAAO,EACnC,OAAO,EAAE,kBAAkB,CAAC,OAAO,GAClC,OAAO,CAaT;IAED;;OAEG;IACH,gBAAgB,CACd,gBAAgB,EAAE,eAAe,GAChC,kBAAkB,CAAC,WAAW,CAsBhC;IAED;;OAEG;IACH,kBAAkB,CAAC,WAAW,EAAE,kBAAkB,CAAC,WAAW,GAAG,MAAM,CActE;IAED;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAsBzD;IAED,OAAO,CAAC,cAAc;CASvB"}
1
+ {"version":3,"file":"sim-cff-request-metadata-adapter.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/cff/adapter/sim-cff-request-metadata-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAE1F;;GAEG;AACH,qBAAa,4BAA4B;IACvC;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAYzD;IAED;;OAEG;IACH,cAAc,CACZ,OAAO,EAAE,kBAAkB,CAAC,OAAO,EACnC,OAAO,EAAE,kBAAkB,CAAC,OAAO,GAClC,OAAO,CAeT;IAED;;OAEG;IACH,gBAAgB,CACd,gBAAgB,EAAE,eAAe,GAChC,kBAAkB,CAAC,WAAW,CAahC;IAED;;OAEG;IACH,kBAAkB,CAAC,WAAW,EAAE,kBAAkB,CAAC,WAAW,GAAG,MAAM,CAUtE;IAED;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAsBzD;IAED;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAa1B;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IAkBlB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,cAAc;CASvB"}
@@ -7,8 +7,12 @@ export class SimCffRequestMetadataAdapter {
7
7
  */
8
8
  toCffHeaders(headers) {
9
9
  const cffHeaders = Object.create(null);
10
- for (const [name, value] of headers.entries()) {
11
- cffHeaders[name.toLowerCase()] = { value };
10
+ for (const [name, values] of this.headerValuesByName(headers)) {
11
+ const cffValue = this.toCffValue(values);
12
+ if (cffValue !== undefined) {
13
+ // oxlint-disable-next-line security/detect-object-injection
14
+ cffHeaders[name] = cffValue;
15
+ }
12
16
  }
13
17
  return cffHeaders;
14
18
  }
@@ -17,8 +21,10 @@ export class SimCffRequestMetadataAdapter {
17
21
  */
18
22
  fromCffHeaders(headers, cookies) {
19
23
  const nativeHeaders = new Headers();
20
- for (const [name, { value }] of Object.entries(headers)) {
21
- nativeHeaders.set(name, value);
24
+ for (const [name, valueOrMultiValue] of Object.entries(headers)) {
25
+ for (const value of this.fromCffValue(valueOrMultiValue)) {
26
+ nativeHeaders.append(name, value);
27
+ }
22
28
  }
23
29
  const cookieHeader = this.fromCffCookies(cookies);
24
30
  if (cookieHeader !== undefined) {
@@ -33,18 +39,10 @@ export class SimCffRequestMetadataAdapter {
33
39
  const queryString = Object.create(null);
34
40
  const searchParameterKeys = new Set(searchParameters.keys());
35
41
  for (const key of searchParameterKeys) {
36
- const values = searchParameters.getAll(key).map((value) => ({ value }));
37
- if (values[0] !== undefined) {
42
+ const cffValue = this.toCffValue(searchParameters.getAll(key));
43
+ if (cffValue !== undefined) {
38
44
  // oxlint-disable-next-line security/detect-object-injection
39
- queryString[key] = values[0];
40
- if (values.length > 1) {
41
- // Multi-value: first value as `value`, all values in `multiValue`
42
- // oxlint-disable-next-line security/detect-object-injection
43
- queryString[key] = {
44
- value: values[0].value,
45
- multiValue: values,
46
- };
47
- }
45
+ queryString[key] = cffValue;
48
46
  }
49
47
  }
50
48
  return queryString;
@@ -55,13 +53,8 @@ export class SimCffRequestMetadataAdapter {
55
53
  fromCffQueryString(querystring) {
56
54
  const searchParameters = new URLSearchParams();
57
55
  for (const [key, valueOrMultiValue] of Object.entries(querystring)) {
58
- if ("multiValue" in valueOrMultiValue) {
59
- for (const { value } of valueOrMultiValue.multiValue) {
60
- searchParameters.append(key, value);
61
- }
62
- }
63
- else {
64
- searchParameters.append(key, valueOrMultiValue.value);
56
+ for (const value of this.fromCffValue(valueOrMultiValue)) {
57
+ searchParameters.append(key, value);
65
58
  }
66
59
  }
67
60
  return searchParameters.toString();
@@ -88,6 +81,55 @@ export class SimCffRequestMetadataAdapter {
88
81
  }
89
82
  return cookies;
90
83
  }
84
+ /**
85
+ * Group header values under their lowercased name.
86
+ *
87
+ * A `Set-Cookie` header repeated on a response is the case this exists for.
88
+ * Node fetch Headers keep each one, and CloudFront presents a repeated
89
+ * header as one entry holding all of its values.
90
+ */
91
+ headerValuesByName(headers) {
92
+ const valuesByName = new Map();
93
+ for (const [name, value] of headers.entries()) {
94
+ const headerName = name.toLowerCase();
95
+ const values = valuesByName.get(headerName) ?? [];
96
+ values.push(value);
97
+ valuesByName.set(headerName, values);
98
+ }
99
+ return valuesByName;
100
+ }
101
+ /**
102
+ * Present values in the shape CloudFront gives a repeated name.
103
+ *
104
+ * A single value is `value` alone. Repeated values keep the first in `value`
105
+ * and all of them in `multiValue`. That is what a Function reads for a header
106
+ * or a query parameter appearing more than once.
107
+ */
108
+ toCffValue(values) {
109
+ const [first] = values;
110
+ if (first === undefined) {
111
+ return undefined;
112
+ }
113
+ if (values.length === 1) {
114
+ return { value: first };
115
+ }
116
+ return {
117
+ value: first,
118
+ multiValue: values.map((value) => ({ value })),
119
+ };
120
+ }
121
+ /**
122
+ * Read back the values a Function left under one name.
123
+ *
124
+ * A Function that means to send several values sets `multiValue`, and
125
+ * CloudFront sends those in place of `value`.
126
+ */
127
+ fromCffValue(valueOrMultiValue) {
128
+ if ("multiValue" in valueOrMultiValue) {
129
+ return valueOrMultiValue.multiValue.map(({ value }) => value);
130
+ }
131
+ return [valueOrMultiValue.value];
132
+ }
91
133
  fromCffCookies(cookies) {
92
134
  const cookiePairs = Object.entries(cookies).map(([name, { value }]) => `${name}=${value}`);
93
135
  return cookiePairs.length === 0 ? undefined : cookiePairs.join("; ");
@@ -1 +1 @@
1
- {"version":3,"file":"sim-cff-request-metadata-adapter.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/cff/adapter/sim-cff-request-metadata-adapter.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,OAAO,4BAA4B;IACvC;;OAEG;IACH,YAAY,CAAC,OAAgB;QAC3B,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAA+B,CAAC;QAErE,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;YAC9C,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC;QAC7C,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,cAAc,CACZ,OAAmC,EACnC,OAAmC;QAEnC,MAAM,aAAa,GAAG,IAAI,OAAO,EAAE,CAAC;QAEpC,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YACxD,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACjC,CAAC;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,YAAY,KAAK,S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EAAE,CAAC,GAAG,IAAI,IAAI,KAAK,EAAE,CAC1C,CAAC;QAEF,OAAO,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvE,CAAC;CACF"}
1
+ {"version":3,"file":"sim-cff-request-metadata-adapter.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/cff/adapter/sim-cff-request-metadata-adapter.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,OAAO,4BAA4B;IACvC;;OAEG;IACH,YAAY,CAAC,OAAgB;QAC3B,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAA+B,CAAC;QAErE,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACzC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,4DAA4D;gBAC5D,UAAU,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;YAC9B,CAAC;QACH,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,cAAc,CACZ,OAAmC,EACnC,OAAmC;QAEnC,MAAM,aAAa,GAAG,IAAI,OAAO,EAAE,CAAC;QAEpC,KAAK,MAAM,CAAC,IAAI,EAAE,iBAAiB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YAChE,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE,CAAC;gBACzD,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACpC,CAAC;QACH,CAAC;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CA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AE,CAAC;YACxB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC1B,CAAC;QAED,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;SAC/C,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACK,YAAY,CAClB,iBAA2E;QAE3E,IAAI,YAAY,IAAI,iBAAiB,EAAE,CAAC;YACtC,OAAO,iBAAiB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;QAChE,CAAC;QAED,OAAO,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAEO,cAAc,CACpB,OAAmC;QAEnC,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAC7C,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,KAAK,EAAE,CAC1C,CAAC;QAEF,OAAO,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvE,CAAC;CACF"}
@@ -0,0 +1,23 @@
1
+ import type { SimCreateFunctionCommandInput } from "./create-function.command.js";
2
+ /**
3
+ * The most Function source CloudFront takes.
4
+ *
5
+ * The quota is published as 10 KB and is not adjustable. AWS never says which
6
+ * byte count that means. 10,240 is the looser of the two readings, and it keeps
7
+ * the simulator from refusing a Function real CloudFront would take.
8
+ *
9
+ * https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html#limits-functions
10
+ */
11
+ export declare const maxCffCodeBytes = 10240;
12
+ /**
13
+ * Refuse Function source over the CloudFront size limit.
14
+ *
15
+ * The limit is on the source as uploaded, comments and all, and nothing
16
+ * minifies it on the way to CloudFront. A consumer who goes over otherwise
17
+ * finds out at deploy time, after the whole test suite has already passed.
18
+ *
19
+ * A stowaway carries a handler reference in place of source. It has no bytes to
20
+ * measure and goes unchecked.
21
+ */
22
+ export declare function assertCffCodeWithinSizeLimit(functionName: string, functionCode: SimCreateFunctionCommandInput["FunctionCode"]): void;
23
+ //# sourceMappingURL=create-function-code-size.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-function-code-size.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/create-function/create-function-code-size.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAElF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,6BAA6B,CAAC,cAAc,CAAC,GAC1D,IAAI,CAaN"}
@@ -0,0 +1,33 @@
1
+ import { CffUint8ArrayStowaway } from "../../cff/function-code-input/cff-function-code-input.js";
2
+ import { SimCloudFrontFunctionSizeLimitExceeded } from "../../error/sim-cloudfront.error.js";
3
+ /**
4
+ * The most Function source CloudFront takes.
5
+ *
6
+ * The quota is published as 10 KB and is not adjustable. AWS never says which
7
+ * byte count that means. 10,240 is the looser of the two readings, and it keeps
8
+ * the simulator from refusing a Function real CloudFront would take.
9
+ *
10
+ * https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html#limits-functions
11
+ */
12
+ export const maxCffCodeBytes = 10_240;
13
+ /**
14
+ * Refuse Function source over the CloudFront size limit.
15
+ *
16
+ * The limit is on the source as uploaded, comments and all, and nothing
17
+ * minifies it on the way to CloudFront. A consumer who goes over otherwise
18
+ * finds out at deploy time, after the whole test suite has already passed.
19
+ *
20
+ * A stowaway carries a handler reference in place of source. It has no bytes to
21
+ * measure and goes unchecked.
22
+ */
23
+ export function assertCffCodeWithinSizeLimit(functionName, functionCode) {
24
+ if (functionCode instanceof CffUint8ArrayStowaway) {
25
+ return;
26
+ }
27
+ const byteLength = functionCode?.byteLength ?? 0;
28
+ if (byteLength > maxCffCodeBytes) {
29
+ throw new SimCloudFrontFunctionSizeLimitExceeded(`CloudFront Function ${functionName} code is ${String(byteLength)} ` +
30
+ `bytes, over the ${String(maxCffCodeBytes)} CloudFront takes`);
31
+ }
32
+ }
33
+ //# sourceMappingURL=create-function-code-size.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-function-code-size.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/create-function/create-function-code-size.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,OAAO,EAAE,sCAAsC,EAAE,MAAM,qCAAqC,CAAC;AAG7F;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;AAEtC;;;;;;;;;GASG;AACH,MAAM,UAAU,4BAA4B,CAC1C,YAAoB,EACpB,YAA2D;IAE3D,IAAI,YAAY,YAAY,qBAAqB,EAAE,CAAC;QAClD,OAAO;IACT,CAAC;IAED,MAAM,UAAU,GAAG,YAAY,EAAE,UAAU,IAAI,CAAC,CAAC;IAEjD,IAAI,UAAU,GAAG,eAAe,EAAE,CAAC;QACjC,MAAM,IAAI,sCAAsC,CAC9C,uBAAuB,YAAY,YAAY,MAAM,CAAC,UAAU,CAAC,GAAG;YAClE,mBAAmB,MAAM,CAAC,eAAe,CAAC,mBAAmB,CAChE,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-function.handler.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/create-function/create-function.hand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EAkB7D;IAED;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,wBAAwB,EACjC,OAAO,CAAC,EAAE,mCAAmC,GAC5C,OAAO,CAAC,8BAA8B,CAAC,CA8CzC;CACF"}
1
+ {"version":3,"file":"create-function.handler.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/create-function/create-function.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,KAAK,EACV,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,qBAAqB,EACrB,KAAK,yBAAyB,EAC/B,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAI1E,OAAO,EAAE,kCAAkC,EAAE,MAAM,0DAA0D,CAAC;AAE9G,MAAM,MAAM,wBAAwB,GAAG,GAAG,CACxC,yBAAyB,EACzB,qBAAqB,CACtB,CAAC;AAEF,UAAU,sCAAsC;IAC9C,SAAS,EAAE,eAAe,CAAC;IAC3B,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,GAAG,CAAC,EAAE,uBAAuB,CAAC;IAC9B,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,cAAc,CAAC,EAAE,kCAAkC,CAAC;CACrD;AAED,UAAU,mCAAmC;IAC3C,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;GAIG;AACH,qBAAa,4BAA6B,YAAW,cAAc,CACjE,wBAAwB,EACxB,8BAA8B,CAC/B;IACC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkB;IAC5C,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA2B;IAC/D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA2B;IACtD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAyC;IAElF,YAAY,UAAU,EAAE,sCAAsC,EAkB7D;IAED;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,wBAAwB,EACjC,OAAO,CAAC,EAAE,mCAAmC,GAC5C,OAAO,CAAC,8BAA8B,CAAC,CAmDzC;CACF"}
@@ -6,6 +6,7 @@ import { BackgroundTasks, } from "../../../../util/background/background.js";
6
6
  import { SimIamAllowAllAuth, } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
7
7
  import { CreateFunctionAuthorizer } from "./create-function-authorizer.js";
8
8
  import { CreateFunctionKeyValueStoreAssociation } from "./create-function-kvs-association.js";
9
+ import { assertCffCodeWithinSizeLimit } from "./create-function-code-size.js";
9
10
  import { SimCloudFrontKeyValueStoreRegistry } from "../../key-value-store/sim-cf-key-value-store-registry.js";
10
11
  /**
11
12
  * Simulated CloudFront CreateFunctionCommand handler.
@@ -38,6 +39,7 @@ export class CreateFunctionCommandHandler {
38
39
  // Allow for potential non-deterministic sequencing of async events.
39
40
  await this.background.sequence();
40
41
  this.authorizer.authorize(command.input.Name, options?.caller);
42
+ assertCffCodeWithinSizeLimit(command.input.Name, command.input.FunctionCode);
41
43
  const keyValueStore = this.keyValueStoreAssociation.resolve(command.input.Name, command.input.FunctionConfig);
42
44
  // The extractor is given the store so that source code running in the vm
43
45
  // sandbox gets a `cf` bound to this Function's own association.
@@ -1 +1 @@
1
- {"version":3,"file":"create-function.handler.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/create-function/create-function.handler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EACL,qBAAqB,GAEtB,MAAM,sCAAsC,CAAC;A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AY,EAC1B,0CAA0C,CAC3C,CAAC;QAEF,oEAAoE;QACpE,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAEjC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAE/D,MAAM,aAAa,GAAG,IAAI,CAAC,wBAAwB,CAAC,OAAO,CACzD,OAAO,CAAC,KAAK,CAAC,IAAI,EAClB,OAAO,CAAC,KAAK,CAAC,cAAc,CAC7B,CAAC;QAEF,yEAAyE;QACzE,gEAAgE;QAChE,MAAM,SAAS,GAAG,IAAI,kCAAkC,CACtD,OAAO,CAAC,KAAK,CAAC,YAAY,EAC1B,mBAAmB,CAAC,aAAa,CAAC,CACnC,CAAC;QACF,MAAM,eAAe,GAAG,SAAS,CAAC,sBAAsB,EAAE,CAAC;QAC3D,MAAM,MAAM,GAAG,IAAI,qBAAqB,CAAC;YACvC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI;YACxB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,eAAe;YACf,aAAa;SACd,CAAC,CAAC;QAEH,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAElD,iDAAiD;QACjD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAEjD,OAAO;YACL,SAAS,EAAE,EAAE;YACb,eAAe,EAAE;gBACf,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB;YACD,gBAAgB,EAAE;gBAChB,WAAW,EAAE,MAAM,CAAC,GAAG;aACxB;SACF,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"create-function.handler.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/create-function/create-function.handler.ts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