@kensio/yulin 1.17.1 → 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 (533) 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/apigatewayv2/api/integration/sim-http-api-lambda-uri.d.ts +23 -4
  18. package/dist/service/apigatewayv2/api/integration/sim-http-api-lambda-uri.d.ts.map +1 -1
  19. package/dist/service/apigatewayv2/api/integration/sim-http-api-lambda-uri.js +56 -14
  20. package/dist/service/apigatewayv2/api/integration/sim-http-api-lambda-uri.js.map +1 -1
  21. package/dist/service/apigatewayv2/serve/auth/sim-http-api-authorizer-invocation.d.ts +1 -1
  22. package/dist/service/apigatewayv2/serve/auth/sim-http-api-authorizer-invocation.d.ts.map +1 -1
  23. package/dist/service/apigatewayv2/serve/auth/sim-http-api-invoke-authorizer.d.ts +7 -3
  24. package/dist/service/apigatewayv2/serve/auth/sim-http-api-invoke-authorizer.d.ts.map +1 -1
  25. package/dist/service/apigatewayv2/serve/auth/sim-http-api-invoke-authorizer.js +6 -2
  26. package/dist/service/apigatewayv2/serve/auth/sim-http-api-invoke-authorizer.js.map +1 -1
  27. package/dist/service/apigatewayv2/serve/sim-api-gateway-v2-router.d.ts +11 -12
  28. package/dist/service/apigatewayv2/serve/sim-api-gateway-v2-router.d.ts.map +1 -1
  29. package/dist/service/apigatewayv2/serve/sim-api-gateway-v2-router.js +15 -7
  30. package/dist/service/apigatewayv2/serve/sim-api-gateway-v2-router.js.map +1 -1
  31. package/dist/service/apigatewayv2/serve/sim-http-api-function-target.d.ts +17 -0
  32. package/dist/service/apigatewayv2/serve/sim-http-api-function-target.d.ts.map +1 -0
  33. package/dist/service/apigatewayv2/serve/sim-http-api-function-target.js +2 -0
  34. package/dist/service/apigatewayv2/serve/sim-http-api-function-target.js.map +1 -0
  35. package/dist/service/apigatewayv2/serve/sim-http-api-integration-invocation.d.ts.map +1 -1
  36. package/dist/service/apigatewayv2/serve/sim-http-api-integration-invocation.js +1 -1
  37. package/dist/service/apigatewayv2/serve/sim-http-api-integration-invocation.js.map +1 -1
  38. package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-matcher.js +1 -1
  39. package/dist/service/cloudformation/bind/validate/sim-cfn-exec-binding-matcher.js.map +1 -1
  40. package/dist/service/cloudformation/command/create-stack/create-stack.handler.d.ts.map +1 -1
  41. package/dist/service/cloudformation/command/create-stack/create-stack.handler.js +2 -2
  42. package/dist/service/cloudformation/command/create-stack/create-stack.handler.js.map +1 -1
  43. package/dist/service/cloudformation/command/update-stack/update-stack.handler.d.ts.map +1 -1
  44. package/dist/service/cloudformation/command/update-stack/update-stack.handler.js +2 -2
  45. package/dist/service/cloudformation/command/update-stack/update-stack.handler.js.map +1 -1
  46. package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.d.ts.map +1 -1
  47. package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.js +3 -3
  48. package/dist/service/cloudformation/deploy/sim-cfn-template-file-loader.js.map +1 -1
  49. package/dist/service/cloudformation/deploy/sim-cfn-template-file-parse.d.ts +10 -0
  50. package/dist/service/cloudformation/deploy/sim-cfn-template-file-parse.d.ts.map +1 -0
  51. package/dist/service/cloudformation/deploy/sim-cfn-template-file-parse.js +30 -0
  52. package/dist/service/cloudformation/deploy/sim-cfn-template-file-parse.js.map +1 -0
  53. package/dist/service/cloudformation/deploy/sim-cfn-template-file-read.d.ts +2 -4
  54. package/dist/service/cloudformation/deploy/sim-cfn-template-file-read.d.ts.map +1 -1
  55. package/dist/service/cloudformation/deploy/sim-cfn-template-file-read.js +2 -3
  56. package/dist/service/cloudformation/deploy/sim-cfn-template-file-read.js.map +1 -1
  57. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.d.ts.map +1 -1
  58. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.js +11 -0
  59. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-cfn-value-adapter.js.map +1 -1
  60. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-alias-cfn.d.ts +29 -0
  61. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-alias-cfn.d.ts.map +1 -0
  62. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-alias-cfn.js +31 -0
  63. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-alias-cfn.js.map +1 -0
  64. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-version-cfn.d.ts +35 -0
  65. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-version-cfn.d.ts.map +1 -0
  66. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-version-cfn.js +40 -0
  67. package/dist/service/cloudformation/resource/cfn/lambda/sim-lambda-function-version-cfn.js.map +1 -0
  68. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-stage.d.ts +20 -0
  69. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-stage.d.ts.map +1 -0
  70. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-stage.js +80 -0
  71. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-stage.js.map +1 -0
  72. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-template.factory.d.ts +46 -0
  73. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-template.factory.d.ts.map +1 -0
  74. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-template.factory.js +103 -0
  75. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api-template.factory.js.map +1 -0
  76. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api.d.ts +28 -0
  77. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api.d.ts.map +1 -0
  78. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api.js +81 -0
  79. package/dist/service/cloudformation/sam/api/sim-cfn-sam-http-api.js.map +1 -0
  80. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-declared-event.d.ts +52 -0
  81. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-declared-event.d.ts.map +1 -0
  82. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-declared-event.js +38 -0
  83. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-declared-event.js.map +1 -0
  84. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-bridge-rule-event.d.ts +16 -0
  85. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-bridge-rule-event.d.ts.map +1 -0
  86. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-bridge-rule-event.js +21 -0
  87. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-bridge-rule-event.js.map +1 -0
  88. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-rule.d.ts +26 -0
  89. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-rule.d.ts.map +1 -0
  90. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-rule.js +84 -0
  91. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-rule.js.map +1 -0
  92. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-kind.d.ts +24 -0
  93. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-kind.d.ts.map +1 -0
  94. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-kind.js +41 -0
  95. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-kind.js.map +1 -0
  96. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-mapping-event.d.ts +20 -0
  97. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-mapping-event.d.ts.map +1 -0
  98. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-mapping-event.js +56 -0
  99. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-mapping-event.js.map +1 -0
  100. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-role.d.ts +11 -0
  101. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-role.d.ts.map +1 -0
  102. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-role.js +57 -0
  103. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source-role.js.map +1 -0
  104. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source.resources.d.ts +25 -0
  105. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source.resources.d.ts.map +1 -0
  106. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source.resources.js +42 -0
  107. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-source.resources.js.map +1 -0
  108. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-state.d.ts +17 -0
  109. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-state.d.ts.map +1 -0
  110. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-state.js +26 -0
  111. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-event-state.js.map +1 -0
  112. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-function-events.d.ts +32 -0
  113. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-function-events.d.ts.map +1 -0
  114. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-function-events.js +70 -0
  115. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-function-events.js.map +1 -0
  116. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-event.d.ts +20 -0
  117. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-event.d.ts.map +1 -0
  118. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-event.js +71 -0
  119. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-event.js.map +1 -0
  120. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-permission.d.ts +14 -0
  121. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-permission.d.ts.map +1 -0
  122. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-permission.js +38 -0
  123. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-permission.js.map +1 -0
  124. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-route.d.ts +18 -0
  125. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-route.d.ts.map +1 -0
  126. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-route.js +56 -0
  127. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-http-api-route.js.map +1 -0
  128. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-implicit-http-api.d.ts +20 -0
  129. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-implicit-http-api.d.ts.map +1 -0
  130. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-implicit-http-api.js +41 -0
  131. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-implicit-http-api.js.map +1 -0
  132. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-resource-edit.d.ts +29 -0
  133. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-resource-edit.d.ts.map +1 -0
  134. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-resource-edit.js +23 -0
  135. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-resource-edit.js.map +1 -0
  136. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-event.d.ts +33 -0
  137. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-event.d.ts.map +1 -0
  138. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-event.js +103 -0
  139. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-event.js.map +1 -0
  140. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-notified-bucket.d.ts +22 -0
  141. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-notified-bucket.d.ts.map +1 -0
  142. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-notified-bucket.js +76 -0
  143. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-s3-notified-bucket.js.map +1 -0
  144. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-event.d.ts +17 -0
  145. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-event.d.ts.map +1 -0
  146. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-event.js +22 -0
  147. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-event.js.map +1 -0
  148. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-v2-event.d.ts +15 -0
  149. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-v2-event.d.ts.map +1 -0
  150. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-v2-event.js +97 -0
  151. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-v2-event.js.map +1 -0
  152. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-sns-event.d.ts +23 -0
  153. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-sns-event.d.ts.map +1 -0
  154. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-sns-event.js +60 -0
  155. package/dist/service/cloudformation/sam/function/event/sim-cfn-sam-sns-event.js.map +1 -0
  156. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-policies.d.ts +31 -0
  157. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-policies.d.ts.map +1 -0
  158. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-policies.js +74 -0
  159. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-policies.js.map +1 -0
  160. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-properties.d.ts +24 -0
  161. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-properties.d.ts.map +1 -0
  162. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-properties.js +67 -0
  163. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-properties.js.map +1 -0
  164. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-role.d.ts +18 -0
  165. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-role.d.ts.map +1 -0
  166. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-role.js +35 -0
  167. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-role.js.map +1 -0
  168. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-template.factory.d.ts +45 -0
  169. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-template.factory.d.ts.map +1 -0
  170. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-template.factory.js +50 -0
  171. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-template.factory.js.map +1 -0
  172. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-url.d.ts +19 -0
  173. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-url.d.ts.map +1 -0
  174. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-url.js +37 -0
  175. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function-url.js.map +1 -0
  176. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function.d.ts +44 -0
  177. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function.d.ts.map +1 -0
  178. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function.js +74 -0
  179. package/dist/service/cloudformation/sam/function/sim-cfn-sam-function.js.map +1 -0
  180. package/dist/service/cloudformation/sam/sim-cfn-sam-expansion.d.ts +18 -0
  181. package/dist/service/cloudformation/sam/sim-cfn-sam-expansion.d.ts.map +1 -0
  182. package/dist/service/cloudformation/sam/sim-cfn-sam-expansion.js +83 -0
  183. package/dist/service/cloudformation/sam/sim-cfn-sam-expansion.js.map +1 -0
  184. package/dist/service/cloudformation/sam/sim-cfn-sam-globals.d.ts +36 -0
  185. package/dist/service/cloudformation/sam/sim-cfn-sam-globals.d.ts.map +1 -0
  186. package/dist/service/cloudformation/sam/sim-cfn-sam-globals.js +76 -0
  187. package/dist/service/cloudformation/sam/sim-cfn-sam-globals.js.map +1 -0
  188. package/dist/service/cloudformation/sam/sim-cfn-sam-picked.d.ts +10 -0
  189. package/dist/service/cloudformation/sam/sim-cfn-sam-picked.d.ts.map +1 -0
  190. package/dist/service/cloudformation/sam/sim-cfn-sam-picked.js +11 -0
  191. package/dist/service/cloudformation/sam/sim-cfn-sam-picked.js.map +1 -0
  192. package/dist/service/cloudformation/sam/sim-cfn-sam-record.d.ts +40 -0
  193. package/dist/service/cloudformation/sam/sim-cfn-sam-record.d.ts.map +1 -0
  194. package/dist/service/cloudformation/sam/sim-cfn-sam-record.js +50 -0
  195. package/dist/service/cloudformation/sam/sim-cfn-sam-record.js.map +1 -0
  196. package/dist/service/cloudformation/sam/sim-cfn-sam-transform.d.ts +23 -0
  197. package/dist/service/cloudformation/sam/sim-cfn-sam-transform.d.ts.map +1 -0
  198. package/dist/service/cloudformation/sam/sim-cfn-sam-transform.js +48 -0
  199. package/dist/service/cloudformation/sam/sim-cfn-sam-transform.js.map +1 -0
  200. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-key.d.ts +18 -0
  201. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-key.d.ts.map +1 -0
  202. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-key.js +52 -0
  203. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-key.js.map +1 -0
  204. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-template.factory.d.ts +40 -0
  205. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-template.factory.d.ts.map +1 -0
  206. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-template.factory.js +47 -0
  207. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table-template.factory.js.map +1 -0
  208. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table.d.ts +25 -0
  209. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table.d.ts.map +1 -0
  210. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table.js +77 -0
  211. package/dist/service/cloudformation/sam/table/sim-cfn-sam-simple-table.js.map +1 -0
  212. package/dist/service/cloudformation/template/sim-cfn-template-body-parse.d.ts +19 -0
  213. package/dist/service/cloudformation/template/sim-cfn-template-body-parse.d.ts.map +1 -0
  214. package/dist/service/cloudformation/template/sim-cfn-template-body-parse.js +36 -0
  215. package/dist/service/cloudformation/template/sim-cfn-template-body-parse.js.map +1 -0
  216. package/dist/service/cloudformation/template/sim-cfn-template.d.ts +11 -4
  217. package/dist/service/cloudformation/template/sim-cfn-template.d.ts.map +1 -1
  218. package/dist/service/cloudformation/template/sim-cfn-template.js +16 -13
  219. package/dist/service/cloudformation/template/sim-cfn-template.js.map +1 -1
  220. package/dist/service/cloudformation/template/yaml/sim-cfn-template-yaml.d.ts +11 -0
  221. package/dist/service/cloudformation/template/yaml/sim-cfn-template-yaml.d.ts.map +1 -0
  222. package/dist/service/cloudformation/template/yaml/sim-cfn-template-yaml.js +41 -0
  223. package/dist/service/cloudformation/template/yaml/sim-cfn-template-yaml.js.map +1 -0
  224. package/dist/service/cloudformation/template/yaml/sim-cfn-yaml-short-forms.d.ts +17 -0
  225. package/dist/service/cloudformation/template/yaml/sim-cfn-yaml-short-forms.d.ts.map +1 -0
  226. package/dist/service/cloudformation/template/yaml/sim-cfn-yaml-short-forms.js +70 -0
  227. package/dist/service/cloudformation/template/yaml/sim-cfn-yaml-short-forms.js.map +1 -0
  228. package/dist/service/cloudfront/cff/adapter/sim-cff-request-metadata-adapter.d.ts +23 -0
  229. package/dist/service/cloudfront/cff/adapter/sim-cff-request-metadata-adapter.d.ts.map +1 -1
  230. package/dist/service/cloudfront/cff/adapter/sim-cff-request-metadata-adapter.js +64 -22
  231. package/dist/service/cloudfront/cff/adapter/sim-cff-request-metadata-adapter.js.map +1 -1
  232. package/dist/service/cloudfront/typings/cloudfront-functions.namespace.d.ts +1 -1
  233. package/dist/service/cloudfront/typings/cloudfront-functions.namespace.d.ts.map +1 -1
  234. package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.d.ts +1 -1
  235. package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.d.ts.map +1 -1
  236. package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.js +26 -19
  237. package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.js.map +1 -1
  238. package/dist/service/elbv2/serve/sim-elbv2-invoke-authorizer.js +1 -1
  239. package/dist/service/elbv2/serve/sim-elbv2-invoke-authorizer.js.map +1 -1
  240. package/dist/service/eventbridge/delivery/sim-event-bridge-delivery-function.d.ts +5 -3
  241. package/dist/service/eventbridge/delivery/sim-event-bridge-delivery-function.d.ts.map +1 -1
  242. package/dist/service/eventbridge/delivery/sim-event-bridge-delivery-function.js +14 -9
  243. package/dist/service/eventbridge/delivery/sim-event-bridge-delivery-function.js.map +1 -1
  244. package/dist/service/eventbridge/target/sim-event-target-arn.d.ts +13 -6
  245. package/dist/service/eventbridge/target/sim-event-target-arn.d.ts.map +1 -1
  246. package/dist/service/eventbridge/target/sim-event-target-arn.js +17 -7
  247. package/dist/service/eventbridge/target/sim-event-target-arn.js.map +1 -1
  248. package/dist/service/lambda/cfn/alias/sim-cfn-lambda-alias-creator.d.ts +30 -0
  249. package/dist/service/lambda/cfn/alias/sim-cfn-lambda-alias-creator.d.ts.map +1 -0
  250. package/dist/service/lambda/cfn/alias/sim-cfn-lambda-alias-creator.js +41 -0
  251. package/dist/service/lambda/cfn/alias/sim-cfn-lambda-alias-creator.js.map +1 -0
  252. package/dist/service/lambda/cfn/function/sim-cfn-lambda-code-input.js +1 -1
  253. package/dist/service/lambda/cfn/function/sim-cfn-lambda-code-input.js.map +1 -1
  254. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.d.ts +12 -1
  255. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.d.ts.map +1 -1
  256. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.js +15 -3
  257. package/dist/service/lambda/cfn/function/sim-cfn-lambda-target-function.js.map +1 -1
  258. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-creator.d.ts +6 -1
  259. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-creator.d.ts.map +1 -1
  260. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-creator.js +11 -5
  261. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-creator.js.map +1 -1
  262. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-revoker.d.ts +12 -0
  263. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-revoker.d.ts.map +1 -0
  264. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-revoker.js +22 -0
  265. package/dist/service/lambda/cfn/permission/sim-cfn-lambda-permission-revoker.js.map +1 -0
  266. package/dist/service/lambda/cfn/sim-cfn-lambda-created-resource.d.ts +10 -0
  267. package/dist/service/lambda/cfn/sim-cfn-lambda-created-resource.d.ts.map +1 -0
  268. package/dist/service/lambda/cfn/sim-cfn-lambda-created-resource.js +14 -0
  269. package/dist/service/lambda/cfn/sim-cfn-lambda-created-resource.js.map +1 -0
  270. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-deleter.d.ts +2 -6
  271. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-deleter.d.ts.map +1 -1
  272. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-deleter.js +24 -19
  273. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-deleter.js.map +1 -1
  274. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.d.ts +2 -0
  275. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.d.ts.map +1 -1
  276. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.js +12 -0
  277. package/dist/service/lambda/cfn/sim-cfn-lambda-resource-factory.js.map +1 -1
  278. package/dist/service/lambda/cfn/version/sim-cfn-lambda-version-creator.d.ts +31 -0
  279. package/dist/service/lambda/cfn/version/sim-cfn-lambda-version-creator.d.ts.map +1 -0
  280. package/dist/service/lambda/cfn/version/sim-cfn-lambda-version-creator.js +40 -0
  281. package/dist/service/lambda/cfn/version/sim-cfn-lambda-version-creator.js.map +1 -0
  282. package/dist/service/lambda/command/add-permission/add-permission.command.d.ts +1 -0
  283. package/dist/service/lambda/command/add-permission/add-permission.command.d.ts.map +1 -1
  284. package/dist/service/lambda/command/add-permission/add-permission.handler.d.ts +8 -1
  285. package/dist/service/lambda/command/add-permission/add-permission.handler.d.ts.map +1 -1
  286. package/dist/service/lambda/command/add-permission/add-permission.handler.js +13 -6
  287. package/dist/service/lambda/command/add-permission/add-permission.handler.js.map +1 -1
  288. package/dist/service/lambda/command/alias/alias-input.d.ts +21 -0
  289. package/dist/service/lambda/command/alias/alias-input.d.ts.map +1 -0
  290. package/dist/service/lambda/command/alias/alias-input.js +30 -0
  291. package/dist/service/lambda/command/alias/alias-input.js.map +1 -0
  292. package/dist/service/lambda/command/alias/sim-lambda-alias-commands.d.ts +52 -0
  293. package/dist/service/lambda/command/alias/sim-lambda-alias-commands.d.ts.map +1 -0
  294. package/dist/service/lambda/command/alias/sim-lambda-alias-commands.js +49 -0
  295. package/dist/service/lambda/command/alias/sim-lambda-alias-commands.js.map +1 -0
  296. package/dist/service/lambda/command/authorize/sim-lambda-resource-policies.d.ts +9 -7
  297. package/dist/service/lambda/command/authorize/sim-lambda-resource-policies.d.ts.map +1 -1
  298. package/dist/service/lambda/command/authorize/sim-lambda-resource-policies.js +11 -9
  299. package/dist/service/lambda/command/authorize/sim-lambda-resource-policies.js.map +1 -1
  300. package/dist/service/lambda/command/authorize/sim-lambda-service-invoke-authorizer.d.ts +10 -2
  301. package/dist/service/lambda/command/authorize/sim-lambda-service-invoke-authorizer.d.ts.map +1 -1
  302. package/dist/service/lambda/command/authorize/sim-lambda-service-invoke-authorizer.js +2 -2
  303. package/dist/service/lambda/command/authorize/sim-lambda-service-invoke-authorizer.js.map +1 -1
  304. package/dist/service/lambda/command/create-alias/create-alias.command.d.ts +31 -0
  305. package/dist/service/lambda/command/create-alias/create-alias.command.d.ts.map +1 -0
  306. package/dist/service/lambda/command/create-alias/create-alias.command.js +5 -0
  307. package/dist/service/lambda/command/create-alias/create-alias.command.js.map +1 -0
  308. package/dist/service/lambda/command/create-alias/create-alias.handler.d.ts +35 -0
  309. package/dist/service/lambda/command/create-alias/create-alias.handler.d.ts.map +1 -0
  310. package/dist/service/lambda/command/create-alias/create-alias.handler.js +52 -0
  311. package/dist/service/lambda/command/create-alias/create-alias.handler.js.map +1 -0
  312. package/dist/service/lambda/command/create-function/create-function.command.d.ts +1 -1
  313. package/dist/service/lambda/command/create-function/create-function.command.d.ts.map +1 -1
  314. package/dist/service/lambda/command/create-function/create-function.handler.d.ts.map +1 -1
  315. package/dist/service/lambda/command/create-function/create-function.handler.js +2 -1
  316. package/dist/service/lambda/command/create-function/create-function.handler.js.map +1 -1
  317. package/dist/service/lambda/command/delete-alias/delete-alias.command.d.ts +24 -0
  318. package/dist/service/lambda/command/delete-alias/delete-alias.command.d.ts.map +1 -0
  319. package/dist/service/lambda/command/delete-alias/delete-alias.command.js +5 -0
  320. package/dist/service/lambda/command/delete-alias/delete-alias.command.js.map +1 -0
  321. package/dist/service/lambda/command/delete-alias/delete-alias.handler.d.ts +37 -0
  322. package/dist/service/lambda/command/delete-alias/delete-alias.handler.d.ts.map +1 -0
  323. package/dist/service/lambda/command/delete-alias/delete-alias.handler.js +44 -0
  324. package/dist/service/lambda/command/delete-alias/delete-alias.handler.js.map +1 -0
  325. package/dist/service/lambda/command/delete-function/delete-function.handler.d.ts +6 -2
  326. package/dist/service/lambda/command/delete-function/delete-function.handler.d.ts.map +1 -1
  327. package/dist/service/lambda/command/delete-function/delete-function.handler.js +7 -3
  328. package/dist/service/lambda/command/delete-function/delete-function.handler.js.map +1 -1
  329. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts +8 -0
  330. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.d.ts.map +1 -1
  331. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js +11 -2
  332. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping-input.js.map +1 -1
  333. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.d.ts.map +1 -1
  334. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js +13 -6
  335. package/dist/service/lambda/command/event-source-mapping/create-event-source-mapping.handler.js.map +1 -1
  336. package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +3 -1
  337. package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts.map +1 -1
  338. package/dist/service/lambda/command/function/sim-lambda-function-commands.js +1 -1
  339. package/dist/service/lambda/command/function/sim-lambda-function-commands.js.map +1 -1
  340. package/dist/service/lambda/command/get-alias/get-alias.command.d.ts +25 -0
  341. package/dist/service/lambda/command/get-alias/get-alias.command.d.ts.map +1 -0
  342. package/dist/service/lambda/command/get-alias/get-alias.command.js +5 -0
  343. package/dist/service/lambda/command/get-alias/get-alias.command.js.map +1 -0
  344. package/dist/service/lambda/command/get-alias/get-alias.handler.d.ts +34 -0
  345. package/dist/service/lambda/command/get-alias/get-alias.handler.d.ts.map +1 -0
  346. package/dist/service/lambda/command/get-alias/get-alias.handler.js +38 -0
  347. package/dist/service/lambda/command/get-alias/get-alias.handler.js.map +1 -0
  348. package/dist/service/lambda/command/get-function/get-function.command.d.ts +2 -1
  349. package/dist/service/lambda/command/get-function/get-function.command.d.ts.map +1 -1
  350. package/dist/service/lambda/command/get-function/get-function.handler.d.ts +6 -2
  351. package/dist/service/lambda/command/get-function/get-function.handler.d.ts.map +1 -1
  352. package/dist/service/lambda/command/get-function/get-function.handler.js +13 -6
  353. package/dist/service/lambda/command/get-function/get-function.handler.js.map +1 -1
  354. package/dist/service/lambda/command/get-policy/get-policy.command.d.ts +1 -0
  355. package/dist/service/lambda/command/get-policy/get-policy.command.d.ts.map +1 -1
  356. package/dist/service/lambda/command/get-policy/get-policy.handler.d.ts +8 -3
  357. package/dist/service/lambda/command/get-policy/get-policy.handler.d.ts.map +1 -1
  358. package/dist/service/lambda/command/get-policy/get-policy.handler.js +11 -6
  359. package/dist/service/lambda/command/get-policy/get-policy.handler.js.map +1 -1
  360. package/dist/service/lambda/command/invoke/invoke-authorizer.d.ts +11 -8
  361. package/dist/service/lambda/command/invoke/invoke-authorizer.d.ts.map +1 -1
  362. package/dist/service/lambda/command/invoke/invoke-authorizer.js +11 -8
  363. package/dist/service/lambda/command/invoke/invoke-authorizer.js.map +1 -1
  364. package/dist/service/lambda/command/invoke/invoke-dispatcher.d.ts +3 -0
  365. package/dist/service/lambda/command/invoke/invoke-dispatcher.d.ts.map +1 -1
  366. package/dist/service/lambda/command/invoke/invoke-dispatcher.js +5 -2
  367. package/dist/service/lambda/command/invoke/invoke-dispatcher.js.map +1 -1
  368. package/dist/service/lambda/command/invoke/invoke.handler.d.ts +9 -2
  369. package/dist/service/lambda/command/invoke/invoke.handler.d.ts.map +1 -1
  370. package/dist/service/lambda/command/invoke/invoke.handler.js +20 -10
  371. package/dist/service/lambda/command/invoke/invoke.handler.js.map +1 -1
  372. package/dist/service/lambda/command/list-aliases/list-aliases.command.d.ts +30 -0
  373. package/dist/service/lambda/command/list-aliases/list-aliases.command.d.ts.map +1 -0
  374. package/dist/service/lambda/command/list-aliases/list-aliases.command.js +5 -0
  375. package/dist/service/lambda/command/list-aliases/list-aliases.command.js.map +1 -0
  376. package/dist/service/lambda/command/list-aliases/list-aliases.handler.d.ts +35 -0
  377. package/dist/service/lambda/command/list-aliases/list-aliases.handler.d.ts.map +1 -0
  378. package/dist/service/lambda/command/list-aliases/list-aliases.handler.js +44 -0
  379. package/dist/service/lambda/command/list-aliases/list-aliases.handler.js.map +1 -0
  380. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.command.d.ts +28 -0
  381. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.command.d.ts.map +1 -0
  382. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.command.js +5 -0
  383. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.command.js.map +1 -0
  384. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.handler.d.ts +35 -0
  385. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.handler.d.ts.map +1 -0
  386. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.handler.js +43 -0
  387. package/dist/service/lambda/command/list-versions-by-function/list-versions-by-function.handler.js.map +1 -0
  388. package/dist/service/lambda/command/permission/sim-lambda-permission-commands.d.ts +8 -3
  389. package/dist/service/lambda/command/permission/sim-lambda-permission-commands.d.ts.map +1 -1
  390. package/dist/service/lambda/command/permission/sim-lambda-permission-commands.js +6 -3
  391. package/dist/service/lambda/command/permission/sim-lambda-permission-commands.js.map +1 -1
  392. package/dist/service/lambda/command/publish-version/publish-version.command.d.ts +34 -0
  393. package/dist/service/lambda/command/publish-version/publish-version.command.d.ts.map +1 -0
  394. package/dist/service/lambda/command/publish-version/publish-version.command.js +5 -0
  395. package/dist/service/lambda/command/publish-version/publish-version.command.js.map +1 -0
  396. package/dist/service/lambda/command/publish-version/publish-version.handler.d.ts +37 -0
  397. package/dist/service/lambda/command/publish-version/publish-version.handler.d.ts.map +1 -0
  398. package/dist/service/lambda/command/publish-version/publish-version.handler.js +42 -0
  399. package/dist/service/lambda/command/publish-version/publish-version.handler.js.map +1 -0
  400. package/dist/service/lambda/command/remove-permission/remove-permission.command.d.ts +1 -0
  401. package/dist/service/lambda/command/remove-permission/remove-permission.command.d.ts.map +1 -1
  402. package/dist/service/lambda/command/remove-permission/remove-permission.handler.d.ts +8 -1
  403. package/dist/service/lambda/command/remove-permission/remove-permission.handler.d.ts.map +1 -1
  404. package/dist/service/lambda/command/remove-permission/remove-permission.handler.js +12 -5
  405. package/dist/service/lambda/command/remove-permission/remove-permission.handler.js.map +1 -1
  406. package/dist/service/lambda/command/sim-lambda-command.types.d.ts +7 -0
  407. package/dist/service/lambda/command/sim-lambda-command.types.d.ts.map +1 -1
  408. package/dist/service/lambda/command/update-alias/update-alias.command.d.ts +31 -0
  409. package/dist/service/lambda/command/update-alias/update-alias.command.d.ts.map +1 -0
  410. package/dist/service/lambda/command/update-alias/update-alias.command.js +5 -0
  411. package/dist/service/lambda/command/update-alias/update-alias.command.js.map +1 -0
  412. package/dist/service/lambda/command/update-alias/update-alias.handler.d.ts +35 -0
  413. package/dist/service/lambda/command/update-alias/update-alias.handler.d.ts.map +1 -0
  414. package/dist/service/lambda/command/update-alias/update-alias.handler.js +48 -0
  415. package/dist/service/lambda/command/update-alias/update-alias.handler.js.map +1 -0
  416. package/dist/service/lambda/command/version/sim-lambda-version-commands.d.ts +37 -0
  417. package/dist/service/lambda/command/version/sim-lambda-version-commands.d.ts.map +1 -0
  418. package/dist/service/lambda/command/version/sim-lambda-version-commands.js +28 -0
  419. package/dist/service/lambda/command/version/sim-lambda-version-commands.js.map +1 -0
  420. package/dist/service/lambda/command/version/version-authorizer.d.ts +29 -0
  421. package/dist/service/lambda/command/version/version-authorizer.d.ts.map +1 -0
  422. package/dist/service/lambda/command/version/version-authorizer.js +39 -0
  423. package/dist/service/lambda/command/version/version-authorizer.js.map +1 -0
  424. package/dist/service/lambda/event-source/poll/sim-lambda-dynamodb-stream-event-source-poller.d.ts.map +1 -1
  425. package/dist/service/lambda/event-source/poll/sim-lambda-dynamodb-stream-event-source-poller.js +2 -1
  426. package/dist/service/lambda/event-source/poll/sim-lambda-dynamodb-stream-event-source-poller.js.map +1 -1
  427. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-function.d.ts +13 -0
  428. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-function.d.ts.map +1 -0
  429. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-function.js +13 -0
  430. package/dist/service/lambda/event-source/poll/sim-lambda-event-source-function.js.map +1 -0
  431. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-consumer.d.ts.map +1 -1
  432. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-consumer.js +2 -1
  433. package/dist/service/lambda/event-source/poll/sim-lambda-sqs-event-source-consumer.js.map +1 -1
  434. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts +9 -1
  435. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.d.ts.map +1 -1
  436. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js +8 -0
  437. package/dist/service/lambda/event-source/sim-lambda-event-source-mapping.js.map +1 -1
  438. package/dist/service/lambda/function/invoke/sim-lambda-invoke-context-builder.d.ts +2 -0
  439. package/dist/service/lambda/function/invoke/sim-lambda-invoke-context-builder.d.ts.map +1 -1
  440. package/dist/service/lambda/function/invoke/sim-lambda-invoke-context-builder.js +2 -2
  441. package/dist/service/lambda/function/invoke/sim-lambda-invoke-context-builder.js.map +1 -1
  442. package/dist/service/lambda/function/policy/sim-lambda-policy-resource.d.ts +17 -0
  443. package/dist/service/lambda/function/policy/sim-lambda-policy-resource.d.ts.map +1 -0
  444. package/dist/service/lambda/function/policy/sim-lambda-policy-resource.js +2 -0
  445. package/dist/service/lambda/function/policy/sim-lambda-policy-resource.js.map +1 -0
  446. package/dist/service/lambda/function/sim-lambda-function-arn-parts.d.ts +3 -3
  447. package/dist/service/lambda/function/sim-lambda-function-configuration.d.ts +43 -0
  448. package/dist/service/lambda/function/sim-lambda-function-configuration.d.ts.map +1 -0
  449. package/dist/service/lambda/function/sim-lambda-function-configuration.js +22 -0
  450. package/dist/service/lambda/function/sim-lambda-function-configuration.js.map +1 -0
  451. package/dist/service/lambda/function/sim-lambda-function-name.d.ts +3 -1
  452. package/dist/service/lambda/function/sim-lambda-function-name.d.ts.map +1 -1
  453. package/dist/service/lambda/function/sim-lambda-function-name.js +3 -1
  454. package/dist/service/lambda/function/sim-lambda-function-name.js.map +1 -1
  455. package/dist/service/lambda/function/sim-lambda-function-reference.d.ts +36 -0
  456. package/dist/service/lambda/function/sim-lambda-function-reference.d.ts.map +1 -0
  457. package/dist/service/lambda/function/sim-lambda-function-reference.js +56 -0
  458. package/dist/service/lambda/function/sim-lambda-function-reference.js.map +1 -0
  459. package/dist/service/lambda/function/sim-lambda-function.d.ts +17 -31
  460. package/dist/service/lambda/function/sim-lambda-function.d.ts.map +1 -1
  461. package/dist/service/lambda/function/sim-lambda-function.js +28 -12
  462. package/dist/service/lambda/function/sim-lambda-function.js.map +1 -1
  463. package/dist/service/lambda/function/url/sim-lambda-function-lookup.d.ts +22 -3
  464. package/dist/service/lambda/function/url/sim-lambda-function-lookup.d.ts.map +1 -1
  465. package/dist/service/lambda/function/url/sim-lambda-function-lookup.js +24 -4
  466. package/dist/service/lambda/function/url/sim-lambda-function-lookup.js.map +1 -1
  467. package/dist/service/lambda/function/version/sim-lambda-function-alias-store.d.ts +55 -0
  468. package/dist/service/lambda/function/version/sim-lambda-function-alias-store.d.ts.map +1 -0
  469. package/dist/service/lambda/function/version/sim-lambda-function-alias-store.js +80 -0
  470. package/dist/service/lambda/function/version/sim-lambda-function-alias-store.js.map +1 -0
  471. package/dist/service/lambda/function/version/sim-lambda-function-alias.d.ts +60 -0
  472. package/dist/service/lambda/function/version/sim-lambda-function-alias.d.ts.map +1 -0
  473. package/dist/service/lambda/function/version/sim-lambda-function-alias.js +57 -0
  474. package/dist/service/lambda/function/version/sim-lambda-function-alias.js.map +1 -0
  475. package/dist/service/lambda/function/version/sim-lambda-function-target.d.ts +16 -0
  476. package/dist/service/lambda/function/version/sim-lambda-function-target.d.ts.map +1 -0
  477. package/dist/service/lambda/function/version/sim-lambda-function-target.js +2 -0
  478. package/dist/service/lambda/function/version/sim-lambda-function-target.js.map +1 -0
  479. package/dist/service/lambda/function/version/sim-lambda-function-version-store.d.ts +80 -0
  480. package/dist/service/lambda/function/version/sim-lambda-function-version-store.d.ts.map +1 -0
  481. package/dist/service/lambda/function/version/sim-lambda-function-version-store.js +114 -0
  482. package/dist/service/lambda/function/version/sim-lambda-function-version-store.js.map +1 -0
  483. package/dist/service/lambda/function/version/sim-lambda-function-versions.d.ts +61 -0
  484. package/dist/service/lambda/function/version/sim-lambda-function-versions.d.ts.map +1 -0
  485. package/dist/service/lambda/function/version/sim-lambda-function-versions.js +96 -0
  486. package/dist/service/lambda/function/version/sim-lambda-function-versions.js.map +1 -0
  487. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.d.ts.map +1 -1
  488. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js +28 -0
  489. package/dist/service/lambda/sdk/sim-lambda-sdk-command-router.js.map +1 -1
  490. package/dist/service/lambda/serve/api/sim-lambda-api-routes.d.ts +2 -1
  491. package/dist/service/lambda/serve/api/sim-lambda-api-routes.d.ts.map +1 -1
  492. package/dist/service/lambda/serve/api/sim-lambda-api-routes.js +2 -1
  493. package/dist/service/lambda/serve/api/sim-lambda-api-routes.js.map +1 -1
  494. package/dist/service/lambda/sim-lambda-commands.d.ts +8 -0
  495. package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -1
  496. package/dist/service/lambda/sim-lambda-commands.js +25 -0
  497. package/dist/service/lambda/sim-lambda-commands.js.map +1 -1
  498. package/dist/service/lambda/sim-lambda-inspection.d.ts +43 -0
  499. package/dist/service/lambda/sim-lambda-inspection.d.ts.map +1 -0
  500. package/dist/service/lambda/sim-lambda-inspection.js +50 -0
  501. package/dist/service/lambda/sim-lambda-inspection.js.map +1 -0
  502. package/dist/service/lambda/sim-lambda.d.ts +44 -80
  503. package/dist/service/lambda/sim-lambda.d.ts.map +1 -1
  504. package/dist/service/lambda/sim-lambda.js +55 -82
  505. package/dist/service/lambda/sim-lambda.js.map +1 -1
  506. package/dist/service/logs/subscription/lambda/sim-aws-logs-subscription-functions.d.ts.map +1 -1
  507. package/dist/service/logs/subscription/lambda/sim-aws-logs-subscription-functions.js +2 -2
  508. package/dist/service/logs/subscription/lambda/sim-aws-logs-subscription-functions.js.map +1 -1
  509. package/dist/service/logs/subscription/lambda/sim-logs-destination-permission.d.ts +7 -5
  510. package/dist/service/logs/subscription/lambda/sim-logs-destination-permission.d.ts.map +1 -1
  511. package/dist/service/logs/subscription/lambda/sim-logs-destination-permission.js +15 -9
  512. package/dist/service/logs/subscription/lambda/sim-logs-destination-permission.js.map +1 -1
  513. package/dist/service/logs/subscription/lambda/sim-logs-subscription-function-arn.d.ts +9 -0
  514. package/dist/service/logs/subscription/lambda/sim-logs-subscription-function-arn.d.ts.map +1 -1
  515. package/dist/service/logs/subscription/lambda/sim-logs-subscription-function-arn.js +11 -5
  516. package/dist/service/logs/subscription/lambda/sim-logs-subscription-function-arn.js.map +1 -1
  517. package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.d.ts +1 -1
  518. package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.d.ts.map +1 -1
  519. package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.js +23 -10
  520. package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.js.map +1 -1
  521. package/dist/service/s3/notification/destination/lambda/sim-s3-notification-function-arn.d.ts +8 -4
  522. package/dist/service/s3/notification/destination/lambda/sim-s3-notification-function-arn.d.ts.map +1 -1
  523. package/dist/service/s3/notification/destination/lambda/sim-s3-notification-function-arn.js +12 -12
  524. package/dist/service/s3/notification/destination/lambda/sim-s3-notification-function-arn.js.map +1 -1
  525. package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.d.ts +5 -4
  526. package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.d.ts.map +1 -1
  527. package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.js +16 -11
  528. package/dist/service/sns/delivery/lambda/sim-sns-delivery-function.js.map +1 -1
  529. package/dist/service/sns/subscription/sim-sns-function-endpoint-arn.d.ts +8 -4
  530. package/dist/service/sns/subscription/sim-sns-function-endpoint-arn.d.ts.map +1 -1
  531. package/dist/service/sns/subscription/sim-sns-function-endpoint-arn.js +11 -10
  532. package/dist/service/sns/subscription/sim-sns-function-endpoint-arn.js.map +1 -1
  533. package/package.json +4 -2
@@ -0,0 +1,22 @@
1
+ import { samEventRuleResources } from "./sim-cfn-sam-event-rule.js";
2
+ /**
3
+ * Expand one `Schedule` event into the rule that fires the function on a
4
+ * timer.
5
+ *
6
+ * The event's `Schedule` is the rule's `ScheduleExpression`, which is the
7
+ * whole of what a `Schedule` event says beyond what every rule event says. A
8
+ * rate or cron expression the rule refuses is refused by the rule, naming
9
+ * itself, rather than being read here.
10
+ *
11
+ * An event stating no `Schedule` expands into a rule with nothing to fire it,
12
+ * which the rule then refuses. A schedule guessed for an event that named none
13
+ * would be a function firing on a timer nobody asked for.
14
+ */
15
+ export function samScheduleEventResources(event) {
16
+ const expression = event.properties["Schedule"];
17
+ return samEventRuleResources({
18
+ event,
19
+ trigger: expression === undefined ? {} : { ScheduleExpression: expression },
20
+ });
21
+ }
22
+ //# sourceMappingURL=sim-cfn-sam-schedule-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-schedule-event.js","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAuB;IAEvB,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAEhD,OAAO,qBAAqB,CAAC;QAC3B,KAAK;QACL,OAAO,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,UAAU,EAAE;KAC5E,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { SimCfnTemplateValue } from "../../../template/value/sim-cfn-template-value.js";
2
+ import type { SamFunctionEvent } from "./sim-cfn-sam-function-events.js";
3
+ /**
4
+ * Expand one `ScheduleV2` event into the EventBridge Scheduler schedule that
5
+ * invokes the function.
6
+ *
7
+ * This is the other way to put a function on a timer, and it expands into an
8
+ * `AWS::Scheduler::Schedule` rather than a rule. The difference that shows is
9
+ * how the invocation is authorized. A schedule assumes an execution role and
10
+ * invokes as that role, where a rule arrives as a service principal and the
11
+ * function's resource policy decides. So this expands a Role rather than a
12
+ * permission, unless the event named a `RoleArn` of its own to run as.
13
+ */
14
+ export declare function samScheduleV2EventResources(event: SamFunctionEvent): Record<string, SimCfnTemplateValue>;
15
+ //# sourceMappingURL=sim-cfn-sam-schedule-v2-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-schedule-v2-event.d.ts","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-v2-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,mDAAmD,CAAC;AAG3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAsBzE;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,gBAAgB,GACtB,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAyBrC"}
@@ -0,0 +1,97 @@
1
+ import { samPickedProperties } from "../../sim-cfn-sam-picked.js";
2
+ import { samEventStateProperty } from "./sim-cfn-sam-event-state.js";
3
+ /**
4
+ * The properties an event and a schedule name the same thing, so expanding
5
+ * them is carrying them across.
6
+ */
7
+ const carriedProperties = new Set([
8
+ "Description",
9
+ "EndDate",
10
+ "GroupName",
11
+ "KmsKeyArn",
12
+ "Name",
13
+ "ScheduleExpression",
14
+ "ScheduleExpressionTimezone",
15
+ "StartDate",
16
+ ]);
17
+ /**
18
+ * The time window AWS requires on a schedule, for an event stating none.
19
+ */
20
+ const fixedTimeWindow = { Mode: "OFF" };
21
+ /**
22
+ * Expand one `ScheduleV2` event into the EventBridge Scheduler schedule that
23
+ * invokes the function.
24
+ *
25
+ * This is the other way to put a function on a timer, and it expands into an
26
+ * `AWS::Scheduler::Schedule` rather than a rule. The difference that shows is
27
+ * how the invocation is authorized. A schedule assumes an execution role and
28
+ * invokes as that role, where a rule arrives as a service principal and the
29
+ * function's resource policy decides. So this expands a Role rather than a
30
+ * permission, unless the event named a `RoleArn` of its own to run as.
31
+ */
32
+ export function samScheduleV2EventResources(event) {
33
+ const prefix = `${event.functionLogicalId}${event.eventName}`;
34
+ const roleLogicalId = `${prefix}ScheduleRole`;
35
+ const declaredRoleArn = event.properties["RoleArn"];
36
+ return {
37
+ [`${prefix}Schedule`]: {
38
+ Type: "AWS::Scheduler::Schedule",
39
+ ...event.condition,
40
+ Properties: {
41
+ ...samPickedProperties(event.properties, carriedProperties),
42
+ ...samEventStateProperty(event.properties),
43
+ FlexibleTimeWindow: event.properties["FlexibleTimeWindow"] ?? fixedTimeWindow,
44
+ Target: {
45
+ Arn: { "Fn::GetAtt": [event.functionLogicalId, "Arn"] },
46
+ RoleArn: declaredRoleArn ?? { "Fn::GetAtt": [roleLogicalId, "Arn"] },
47
+ ...samPickedProperties(event.properties, new Set(["Input"])),
48
+ },
49
+ },
50
+ },
51
+ ...(declaredRoleArn === undefined && {
52
+ [roleLogicalId]: samScheduleV2RoleResource(event, prefix),
53
+ }),
54
+ };
55
+ }
56
+ /**
57
+ * The AWS::IAM::Role the schedule invokes the function as.
58
+ *
59
+ * Scheduler assumes this role for every invocation, so it trusts the Scheduler
60
+ * service principal and may invoke the one function the event was declared on.
61
+ * A role granting `lambda:InvokeFunction` on everything would be the same
62
+ * schedule with a wider grant than the event asked for.
63
+ */
64
+ function samScheduleV2RoleResource(event, prefix) {
65
+ return {
66
+ Type: "AWS::IAM::Role",
67
+ ...event.condition,
68
+ Properties: {
69
+ AssumeRolePolicyDocument: {
70
+ Version: "2012-10-17",
71
+ Statement: [
72
+ {
73
+ Effect: "Allow",
74
+ Principal: { Service: "scheduler.amazonaws.com" },
75
+ Action: "sts:AssumeRole",
76
+ },
77
+ ],
78
+ },
79
+ Policies: [
80
+ {
81
+ PolicyName: `${prefix}ScheduleRolePolicy`,
82
+ PolicyDocument: {
83
+ Version: "2012-10-17",
84
+ Statement: [
85
+ {
86
+ Effect: "Allow",
87
+ Action: "lambda:InvokeFunction",
88
+ Resource: { "Fn::GetAtt": [event.functionLogicalId, "Arn"] },
89
+ },
90
+ ],
91
+ },
92
+ },
93
+ ],
94
+ },
95
+ };
96
+ }
97
+ //# sourceMappingURL=sim-cfn-sam-schedule-v2-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-schedule-v2-event.js","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/sam/function/event/sim-cfn-sam-schedule-v2-event.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAGrE;;;GAGG;AACH,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,aAAa;IACb,SAAS;IACT,WAAW;IACX,WAAW;IACX,MAAM;IACN,oBAAoB;IACpB,4BAA4B;IAC5B,WAAW;CACZ,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,eAAe,GAA8B,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAEnE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,2BAA2B,CACzC,KAAuB;IAEvB,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;IAC9D,MAAM,aAAa,GAAG,GAAG,MAAM,cAAc,CAAC;IAC9C,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAEpD,OAAO;QACL,CAAC,GAAG,MAAM,UAAU,CAAC,EAAE;YACrB,IAAI,EAAE,0BAA0B;YAChC,GAAG,KAAK,CAAC,SAAS;YAClB,UAAU,EAAE;gBACV,GAAG,mBAAmB,CAAC,KAAK,CAAC,UAAU,EAAE,iBAAiB,CAAC;gBAC3D,GAAG,qBAAqB,CAAC,KAAK,CAAC,UAAU,CAAC;gBAC1C,kBAAkB,EAChB,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,IAAI,eAAe;gBAC3D,MAAM,EAAE;oBACN,GAAG,EAAE,EAAE,YAAY,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,EAAE;oBACvD,OAAO,EAAE,eAAe,IAAI,EAAE,YAAY,EAAE,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE;oBACpE,GAAG,mBAAmB,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;iBAC7D;aACF;SACF;QACD,GAAG,CAAC,eAAe,KAAK,SAAS,IAAI;YACnC,CAAC,aAAa,CAAC,EAAE,yBAAyB,CAAC,KAAK,EAAE,MAAM,CAAC;SAC1D,CAAC;KACH,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,yBAAyB,CAChC,KAAuB,EACvB,MAAc;IAEd,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,GAAG,KAAK,CAAC,SAAS;QAClB,UAAU,EAAE;YACV,wBAAwB,EAAE;gBACxB,OAAO,EAAE,YAAY;gBACrB,SAAS,EAAE;oBACT;wBACE,MAAM,EAAE,OAAO;wBACf,SAAS,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE;wBACjD,MAAM,EAAE,gBAAgB;qBACzB;iBACF;aACF;YACD,QAAQ,EAAE;gBACR;oBACE,UAAU,EAAE,GAAG,MAAM,oBAAoB;oBACzC,cAAc,EAAE;wBACd,OAAO,EAAE,YAAY;wBACrB,SAAS,EAAE;4BACT;gCACE,MAAM,EAAE,OAAO;gCACf,MAAM,EAAE,uBAAuB;gCAC/B,QAAQ,EAAE,EAAE,YAAY,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,EAAE;6BAC7D;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { SimCfnTemplateValue } from "../../../template/value/sim-cfn-template-value.js";
2
+ import type { SamFunctionEvent } from "./sim-cfn-sam-function-events.js";
3
+ /**
4
+ * Expand one `SNS` event into the subscription that delivers the topic's
5
+ * messages to the function.
6
+ *
7
+ * The subscription is the function itself rather than a queue in front of it,
8
+ * so the protocol is `lambda` and the endpoint is the function's ARN. SNS
9
+ * consults the function's resource policy on every delivery, so the permission
10
+ * admitting SNS comes with it. Without one the topic has a subscription it
11
+ * cannot deliver to.
12
+ *
13
+ * Everything the event states beside `Topic` goes onto the subscription under
14
+ * the name it already carries, which is how `FilterPolicy` and its scope
15
+ * arrive. `SqsSubscription`, which asks for a queue between the two, is not a
16
+ * subscription property and is refused by the subscription rather than
17
+ * silently deploying the direct delivery the event did not ask for.
18
+ *
19
+ * An event naming no topic expands into nothing, the way a mapping with no
20
+ * source does.
21
+ */
22
+ export declare function samSnsEventResources(event: SamFunctionEvent): Record<string, SimCfnTemplateValue>;
23
+ //# sourceMappingURL=sim-cfn-sam-sns-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-sns-event.d.ts","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/sam/function/event/sim-cfn-sam-sns-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,mDAAmD,CAAC;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEzE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,gBAAgB,GACtB,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAarC"}
@@ -0,0 +1,60 @@
1
+ import { samRecordWithout } from "../../sim-cfn-sam-record.js";
2
+ /**
3
+ * Expand one `SNS` event into the subscription that delivers the topic's
4
+ * messages to the function.
5
+ *
6
+ * The subscription is the function itself rather than a queue in front of it,
7
+ * so the protocol is `lambda` and the endpoint is the function's ARN. SNS
8
+ * consults the function's resource policy on every delivery, so the permission
9
+ * admitting SNS comes with it. Without one the topic has a subscription it
10
+ * cannot deliver to.
11
+ *
12
+ * Everything the event states beside `Topic` goes onto the subscription under
13
+ * the name it already carries, which is how `FilterPolicy` and its scope
14
+ * arrive. `SqsSubscription`, which asks for a queue between the two, is not a
15
+ * subscription property and is refused by the subscription rather than
16
+ * silently deploying the direct delivery the event did not ask for.
17
+ *
18
+ * An event naming no topic expands into nothing, the way a mapping with no
19
+ * source does.
20
+ */
21
+ export function samSnsEventResources(event) {
22
+ const topic = event.properties["Topic"];
23
+ if (topic === undefined) {
24
+ return {};
25
+ }
26
+ const prefix = `${event.functionLogicalId}${event.eventName}Sns`;
27
+ return {
28
+ [`${prefix}Subscription`]: subscriptionResource(event, topic),
29
+ [`${prefix}Permission`]: permissionResource(event, topic),
30
+ };
31
+ }
32
+ function subscriptionResource(event, topic) {
33
+ return {
34
+ Type: "AWS::SNS::Subscription",
35
+ ...event.condition,
36
+ Properties: {
37
+ ...samRecordWithout(event.properties, "Topic"),
38
+ TopicArn: topic,
39
+ Protocol: "lambda",
40
+ Endpoint: { "Fn::GetAtt": [event.functionLogicalId, "Arn"] },
41
+ },
42
+ };
43
+ }
44
+ /**
45
+ * The AWS::Lambda::Permission the topic invokes the function under, granted
46
+ * for that topic alone.
47
+ */
48
+ function permissionResource(event, topic) {
49
+ return {
50
+ Type: "AWS::Lambda::Permission",
51
+ ...event.condition,
52
+ Properties: {
53
+ Action: "lambda:InvokeFunction",
54
+ FunctionName: { "Fn::GetAtt": [event.functionLogicalId, "Arn"] },
55
+ Principal: "sns.amazonaws.com",
56
+ SourceArn: topic,
57
+ },
58
+ };
59
+ }
60
+ //# sourceMappingURL=sim-cfn-sam-sns-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-sns-event.js","sourceRoot":"","sources":["../../../../../../src/service/cloudformation/sam/function/event/sim-cfn-sam-sns-event.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,oBAAoB,CAClC,KAAuB;IAEvB,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAExC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC,SAAS,KAAK,CAAC;IAEjE,OAAO;QACL,CAAC,GAAG,MAAM,cAAc,CAAC,EAAE,oBAAoB,CAAC,KAAK,EAAE,KAAK,CAAC;QAC7D,CAAC,GAAG,MAAM,YAAY,CAAC,EAAE,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC;KAC1D,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAC3B,KAAuB,EACvB,KAA0B;IAE1B,OAAO;QACL,IAAI,EAAE,wBAAwB;QAC9B,GAAG,KAAK,CAAC,SAAS;QAClB,UAAU,EAAE;YACV,GAAG,gBAAgB,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC;YAC9C,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,QAAQ;YAClB,QAAQ,EAAE,EAAE,YAAY,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,EAAE;SAC7D;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,kBAAkB,CACzB,KAAuB,EACvB,KAA0B;IAE1B,OAAO;QACL,IAAI,EAAE,yBAAyB;QAC/B,GAAG,KAAK,CAAC,SAAS;QAClB,UAAU,EAAE;YACV,MAAM,EAAE,uBAAuB;YAC/B,YAAY,EAAE,EAAE,YAAY,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,EAAE;YAChE,SAAS,EAAE,mBAAmB;YAC9B,SAAS,EAAE,KAAK;SACjB;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { SimCfnTemplateValue, SimCfnTemplateValueRecord } from "../../template/value/sim-cfn-template-value.js";
2
+ /**
3
+ * The trust policy the Role carries, which lets Lambda assume it.
4
+ */
5
+ export declare const lambdaAssumeRolePolicyDocument: SimCfnTemplateValueRecord;
6
+ /**
7
+ * The managed policy SAM attaches to every function Role it generates.
8
+ */
9
+ export declare const basicExecutionPolicyArn: SimCfnTemplateValueRecord;
10
+ /**
11
+ * What the `Policies` of a SAM function say about the Role it is expanded
12
+ * with.
13
+ */
14
+ export interface SamFunctionPolicies {
15
+ /** Policy documents, named the way SAM names them. */
16
+ readonly inlinePolicies: readonly SimCfnTemplateValueRecord[];
17
+ /** Managed policy ARNs the Role attaches. */
18
+ readonly managedPolicyArns: readonly string[];
19
+ }
20
+ /**
21
+ * Read the `Policies` of a SAM function into the two lists an AWS::IAM::Role
22
+ * carries.
23
+ *
24
+ * `Policies` holds one entry or a list of them, and an entry is a policy
25
+ * document, a managed policy ARN, or a SAM policy template naming permissions
26
+ * to generate. The templates are not expanded here. There are around a hundred
27
+ * of them, and the default `SimIamAllowAllAuth` means a Role missing their
28
+ * statements authorizes the same calls either way.
29
+ */
30
+ export declare function samFunctionPolicies(logicalId: string, policies: SimCfnTemplateValue | undefined): SamFunctionPolicies;
31
+ //# sourceMappingURL=sim-cfn-sam-function-policies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-function-policies.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudformation/sam/function/sim-cfn-sam-function-policies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,gDAAgD,CAAC;AAGxD;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,yBAS5C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,yBASrC,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,sDAAsD;IACtD,QAAQ,CAAC,cAAc,EAAE,SAAS,yBAAyB,EAAE,CAAC;IAC9D,6CAA6C;IAC7C,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/C;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,mBAAmB,GAAG,SAAS,GACxC,mBAAmB,CAYrB"}
@@ -0,0 +1,74 @@
1
+ import { isSamTemplateRecord } from "../sim-cfn-sam-record.js";
2
+ /**
3
+ * The trust policy the Role carries, which lets Lambda assume it.
4
+ */
5
+ export const lambdaAssumeRolePolicyDocument = {
6
+ Version: "2012-10-17",
7
+ Statement: [
8
+ {
9
+ Effect: "Allow",
10
+ Principal: { Service: "lambda.amazonaws.com" },
11
+ Action: "sts:AssumeRole",
12
+ },
13
+ ],
14
+ };
15
+ /**
16
+ * The managed policy SAM attaches to every function Role it generates.
17
+ */
18
+ export const basicExecutionPolicyArn = {
19
+ "Fn::Join": [
20
+ "",
21
+ [
22
+ "arn:",
23
+ { Ref: "AWS::Partition" },
24
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
25
+ ],
26
+ ],
27
+ };
28
+ /**
29
+ * Read the `Policies` of a SAM function into the two lists an AWS::IAM::Role
30
+ * carries.
31
+ *
32
+ * `Policies` holds one entry or a list of them, and an entry is a policy
33
+ * document, a managed policy ARN, or a SAM policy template naming permissions
34
+ * to generate. The templates are not expanded here. There are around a hundred
35
+ * of them, and the default `SimIamAllowAllAuth` means a Role missing their
36
+ * statements authorizes the same calls either way.
37
+ */
38
+ export function samFunctionPolicies(logicalId, policies) {
39
+ const entries = policyEntries(policies);
40
+ return {
41
+ inlinePolicies: entries
42
+ .filter((entry) => isPolicyDocument(entry))
43
+ .map((document, index) => ({
44
+ PolicyName: `${logicalId}RolePolicy${String(index)}`,
45
+ PolicyDocument: document,
46
+ })),
47
+ managedPolicyArns: entries.filter((entry) => isManagedPolicyArn(entry)),
48
+ };
49
+ }
50
+ /**
51
+ * The `Policies` property as a list, since SAM accepts a single entry in place
52
+ * of one.
53
+ */
54
+ function policyEntries(policies) {
55
+ if (policies === undefined) {
56
+ return [];
57
+ }
58
+ return Array.isArray(policies) ? policies : [policies];
59
+ }
60
+ /**
61
+ * Whether an entry is a policy document. A policy template is an object of one
62
+ * key naming the template.
63
+ */
64
+ function isPolicyDocument(entry) {
65
+ return isSamTemplateRecord(entry) && "Statement" in entry;
66
+ }
67
+ /**
68
+ * Whether an entry is a managed policy ARN. A policy template arrives as a
69
+ * bare name.
70
+ */
71
+ function isManagedPolicyArn(entry) {
72
+ return typeof entry === "string" && entry.startsWith("arn:");
73
+ }
74
+ //# sourceMappingURL=sim-cfn-sam-function-policies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-function-policies.js","sourceRoot":"","sources":["../../../../../src/service/cloudformation/sam/function/sim-cfn-sam-function-policies.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAA8B;IACvE,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE;QACT;YACE,MAAM,EAAE,OAAO;YACf,SAAS,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE;YAC9C,MAAM,EAAE,gBAAgB;SACzB;KACF;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAA8B;IAChE,UAAU,EAAE;QACV,EAAE;QACF;YACE,MAAM;YACN,EAAE,GAAG,EAAE,gBAAgB,EAAE;YACzB,2DAA2D;SAC5D;KACF;CACF,CAAC;AAaF;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CACjC,SAAiB,EACjB,QAAyC;IAEzC,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;IAExC,OAAO;QACL,cAAc,EAAE,OAAO;aACpB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;aAC1C,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YACzB,UAAU,EAAE,GAAG,SAAS,aAAa,MAAM,CAAC,KAAK,CAAC,EAAE;YACpD,cAAc,EAAE,QAAQ;SACzB,CAAC,CAAC;QACL,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;KACxE,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,aAAa,CACpB,QAAyC;IAEzC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,SAAS,gBAAgB,CACvB,KAA0B;IAE1B,OAAO,mBAAmB,CAAC,KAAK,CAAC,IAAI,WAAW,IAAI,KAAK,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACH,SAAS,kBAAkB,CAAC,KAA0B;IACpD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { SimCfnTemplateValue, SimCfnTemplateValueRecord } from "../../template/value/sim-cfn-template-value.js";
2
+ /**
3
+ * The `Properties` of the SAM Resource. A function taking everything it has
4
+ * from `Globals` can leave the section out.
5
+ */
6
+ export declare function samResourceProperties(resource: SimCfnTemplateValueRecord): SimCfnTemplateValueRecord;
7
+ /**
8
+ * The Resource attributes the expanded Lambda function carries.
9
+ */
10
+ export declare function samCarriedAttributes(resource: SimCfnTemplateValueRecord): SimCfnTemplateValueRecord;
11
+ /**
12
+ * The `Condition` attribute a Resource expanded beside the function carries.
13
+ *
14
+ * Everything the function was expanded with exists because the function does,
15
+ * so a function the template conditioned out leaves none of them behind for
16
+ * the Stack to create.
17
+ */
18
+ export declare function samConditionAttribute(condition: SimCfnTemplateValue | undefined): SimCfnTemplateValueRecord;
19
+ /**
20
+ * The properties the expanded Lambda function carries, from the SAM function
21
+ * properties the `Globals` defaults have already been merged into.
22
+ */
23
+ export declare function samCarriedProperties(functionProperties: SimCfnTemplateValueRecord): SimCfnTemplateValueRecord;
24
+ //# sourceMappingURL=sim-cfn-sam-function-properties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-function-properties.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudformation/sam/function/sim-cfn-sam-function-properties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,gDAAgD,CAAC;AAuBxD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,yBAAyB,GAClC,yBAAyB,CAI3B;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,yBAAyB,GAClC,yBAAyB,CAE3B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,mBAAmB,GAAG,SAAS,GACzC,yBAAyB,CAE3B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,kBAAkB,EAAE,yBAAyB,GAC5C,yBAAyB,CAK3B"}
@@ -0,0 +1,67 @@
1
+ import { isSamTemplateRecord } from "../sim-cfn-sam-record.js";
2
+ /**
3
+ * The Resource attributes the Lambda function carries over. They are the ones
4
+ * saying whether it is created at all and what has to exist first.
5
+ */
6
+ const attributeNames = new Set(["Condition", "DependsOn"]);
7
+ /**
8
+ * The properties whose names and meanings are the same on both Resource types,
9
+ * so expanding them is carrying them across.
10
+ */
11
+ const propertyNames = new Set([
12
+ "Description",
13
+ "Environment",
14
+ "FunctionName",
15
+ "Handler",
16
+ "MemorySize",
17
+ "Runtime",
18
+ "Timeout",
19
+ ]);
20
+ /**
21
+ * The `Properties` of the SAM Resource. A function taking everything it has
22
+ * from `Globals` can leave the section out.
23
+ */
24
+ export function samResourceProperties(resource) {
25
+ const properties = resource["Properties"];
26
+ return isSamTemplateRecord(properties) ? properties : {};
27
+ }
28
+ /**
29
+ * The Resource attributes the expanded Lambda function carries.
30
+ */
31
+ export function samCarriedAttributes(resource) {
32
+ return picked(resource, attributeNames);
33
+ }
34
+ /**
35
+ * The `Condition` attribute a Resource expanded beside the function carries.
36
+ *
37
+ * Everything the function was expanded with exists because the function does,
38
+ * so a function the template conditioned out leaves none of them behind for
39
+ * the Stack to create.
40
+ */
41
+ export function samConditionAttribute(condition) {
42
+ return condition === undefined ? {} : { Condition: condition };
43
+ }
44
+ /**
45
+ * The properties the expanded Lambda function carries, from the SAM function
46
+ * properties the `Globals` defaults have already been merged into.
47
+ */
48
+ export function samCarriedProperties(functionProperties) {
49
+ return {
50
+ ...picked(functionProperties, propertyNames),
51
+ ...inlineCode(functionProperties),
52
+ };
53
+ }
54
+ /**
55
+ * The `Code` of a function whose source the template holds inline.
56
+ */
57
+ function inlineCode(functionProperties) {
58
+ const source = functionProperties["InlineCode"];
59
+ return typeof source === "string" ? { Code: { ZipFile: source } } : {};
60
+ }
61
+ /**
62
+ * The entries of a record whose keys are in the given set.
63
+ */
64
+ function picked(record, names) {
65
+ return Object.fromEntries(Object.entries(record).filter(([name]) => names.has(name)));
66
+ }
67
+ //# sourceMappingURL=sim-cfn-sam-function-properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-function-properties.js","sourceRoot":"","sources":["../../../../../src/service/cloudformation/sam/function/sim-cfn-sam-function-properties.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;;GAGG;AACH,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;AAE3D;;;GAGG;AACH,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC;IAC5B,aAAa;IACb,aAAa;IACb,cAAc;IACd,SAAS;IACT,YAAY;IACZ,SAAS;IACT,SAAS;CACV,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,QAAmC;IAEnC,MAAM,UAAU,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;IAE1C,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAmC;IAEnC,OAAO,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,SAA0C;IAE1C,OAAO,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;AACjE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAClC,kBAA6C;IAE7C,OAAO;QACL,GAAG,MAAM,CAAC,kBAAkB,EAAE,aAAa,CAAC;QAC5C,GAAG,UAAU,CAAC,kBAAkB,CAAC;KAClC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,UAAU,CACjB,kBAA6C;IAE7C,MAAM,MAAM,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAEhD,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACzE,CAAC;AAED;;GAEG;AACH,SAAS,MAAM,CACb,MAAiC,EACjC,KAA0B;IAE1B,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAC3D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { SimCfnTemplateValue, SimCfnTemplateValueRecord } from "../../template/value/sim-cfn-template-value.js";
2
+ interface SamFunctionRoleProperties {
3
+ readonly logicalId: string;
4
+ readonly functionProperties: SimCfnTemplateValueRecord;
5
+ readonly condition: SimCfnTemplateValue | undefined;
6
+ }
7
+ /**
8
+ * The AWS::IAM::Role Resource a SAM function is expanded with, for a function
9
+ * that named no Role of its own.
10
+ *
11
+ * Every SAM function gets the basic execution policy, as SAM gives one, and
12
+ * whatever its `Policies` said on top. The Role is conditioned the way the
13
+ * function is. A function the template conditioned out leaves no Role behind
14
+ * for the Stack to create.
15
+ */
16
+ export declare function samFunctionRoleResource(properties: SamFunctionRoleProperties): SimCfnTemplateValueRecord;
17
+ export {};
18
+ //# sourceMappingURL=sim-cfn-sam-function-role.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-function-role.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudformation/sam/function/sim-cfn-sam-function-role.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,gDAAgD,CAAC;AAQxD,UAAU,yBAAyB;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,kBAAkB,EAAE,yBAAyB,CAAC;IACvD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,GAAG,SAAS,CAAC;CACrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,yBAAyB,GACpC,yBAAyB,CAmB3B"}
@@ -0,0 +1,35 @@
1
+ import { samConditionAttribute } from "./sim-cfn-sam-function-properties.js";
2
+ import { basicExecutionPolicyArn, lambdaAssumeRolePolicyDocument, samFunctionPolicies, } from "./sim-cfn-sam-function-policies.js";
3
+ /**
4
+ * The AWS::IAM::Role Resource a SAM function is expanded with, for a function
5
+ * that named no Role of its own.
6
+ *
7
+ * Every SAM function gets the basic execution policy, as SAM gives one, and
8
+ * whatever its `Policies` said on top. The Role is conditioned the way the
9
+ * function is. A function the template conditioned out leaves no Role behind
10
+ * for the Stack to create.
11
+ */
12
+ export function samFunctionRoleResource(properties) {
13
+ const { logicalId, functionProperties, condition } = properties;
14
+ const policies = samFunctionPolicies(logicalId, functionProperties["Policies"]);
15
+ return {
16
+ Type: "AWS::IAM::Role",
17
+ ...samConditionAttribute(condition),
18
+ Properties: {
19
+ AssumeRolePolicyDocument: lambdaAssumeRolePolicyDocument,
20
+ ManagedPolicyArns: [
21
+ basicExecutionPolicyArn,
22
+ ...policies.managedPolicyArns,
23
+ ],
24
+ ...inlinePolicies(policies.inlinePolicies),
25
+ },
26
+ };
27
+ }
28
+ /**
29
+ * The `Policies` property the Role carries, where the function stated policy
30
+ * documents to put there.
31
+ */
32
+ function inlinePolicies(policies) {
33
+ return policies.length > 0 ? { Policies: [...policies] } : {};
34
+ }
35
+ //# sourceMappingURL=sim-cfn-sam-function-role.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-function-role.js","sourceRoot":"","sources":["../../../../../src/service/cloudformation/sam/function/sim-cfn-sam-function-role.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EACL,uBAAuB,EACvB,8BAA8B,EAC9B,mBAAmB,GACpB,MAAM,oCAAoC,CAAC;AAQ5C;;;;;;;;GAQG;AACH,MAAM,UAAU,uBAAuB,CACrC,UAAqC;IAErC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC;IAChE,MAAM,QAAQ,GAAG,mBAAmB,CAClC,SAAS,EACT,kBAAkB,CAAC,UAAU,CAAC,CAC/B,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,GAAG,qBAAqB,CAAC,SAAS,CAAC;QACnC,UAAU,EAAE;YACV,wBAAwB,EAAE,8BAA8B;YACxD,iBAAiB,EAAE;gBACjB,uBAAuB;gBACvB,GAAG,QAAQ,CAAC,iBAAiB;aAC9B;YACD,GAAG,cAAc,CAAC,QAAQ,CAAC,cAAc,CAAC;SAC3C;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,cAAc,CACrB,QAA8C;IAE9C,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAChE,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { MappedFactory } from "@kensio/part-factory";
2
+ import type { CfnTemplateBodyRecord } from "../../template/sim-cfn-template.js";
3
+ import type { SimCfnTemplateValueRecord } from "../../template/value/sim-cfn-template-value.js";
4
+ /**
5
+ * What a test asks for when it wants a SAM template holding one function.
6
+ */
7
+ export interface SimCfnSamFunctionTemplateInput {
8
+ /**
9
+ * What this test is about, added to the properties of a function that
10
+ * already runs.
11
+ */
12
+ readonly functionProperties: SimCfnTemplateValueRecord;
13
+ /**
14
+ * The `Globals.Function` defaults the template states. A test stating none
15
+ * gets no `Globals` section.
16
+ */
17
+ readonly globals: SimCfnTemplateValueRecord;
18
+ /**
19
+ * Resources the template carries beside the function, such as the API an
20
+ * event names or a second function sharing one.
21
+ */
22
+ readonly resources: SimCfnTemplateValueRecord;
23
+ }
24
+ /**
25
+ * The logical ID the function carries, and so the name the Lambda function and
26
+ * its execution Role are expanded under.
27
+ */
28
+ export declare const samFunctionTemplateLogicalId = "Rates";
29
+ /**
30
+ * Builds a SAM template holding one AWS::Serverless::Function.
31
+ *
32
+ * ```typescript
33
+ * const stack = await simAws.cloudFormation().deployTemplate({
34
+ * stackName: "rates-stack",
35
+ * template: simCfnSamFunctionTemplateFactory.make({
36
+ * functionProperties: { Timeout: 30 },
37
+ * }),
38
+ * });
39
+ * ```
40
+ *
41
+ * The function runs as it comes, with its source inline and a handler and
42
+ * runtime naming it. What a test states is what the test is about.
43
+ */
44
+ export declare const simCfnSamFunctionTemplateFactory: MappedFactory<SimCfnSamFunctionTemplateInput, CfnTemplateBodyRecord, undefined>;
45
+ //# sourceMappingURL=sim-cfn-sam-function-template.factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-function-template.factory.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudformation/sam/function/sim-cfn-sam-function-template.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAIhG;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,QAAQ,CAAC,kBAAkB,EAAE,yBAAyB,CAAC;IACvD;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,yBAAyB,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,yBAAyB,CAAC;CAC/C;AAED;;;GAGG;AACH,eAAO,MAAM,4BAA4B,UAAU,CAAC;AASpD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,iFAgB5C,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { MappedFactory } from "@kensio/part-factory";
2
+ import { samTransformName } from "../sim-cfn-sam-transform.js";
3
+ import { samFunctionType } from "./sim-cfn-sam-function.js";
4
+ /**
5
+ * The logical ID the function carries, and so the name the Lambda function and
6
+ * its execution Role are expanded under.
7
+ */
8
+ export const samFunctionTemplateLogicalId = "Rates";
9
+ const workingFunction = {
10
+ FunctionName: "rates",
11
+ Handler: "index.handler",
12
+ Runtime: "nodejs22.x",
13
+ InlineCode: "exports.handler = async () => 'rates';",
14
+ };
15
+ /**
16
+ * Builds a SAM template holding one AWS::Serverless::Function.
17
+ *
18
+ * ```typescript
19
+ * const stack = await simAws.cloudFormation().deployTemplate({
20
+ * stackName: "rates-stack",
21
+ * template: simCfnSamFunctionTemplateFactory.make({
22
+ * functionProperties: { Timeout: 30 },
23
+ * }),
24
+ * });
25
+ * ```
26
+ *
27
+ * The function runs as it comes, with its source inline and a handler and
28
+ * runtime naming it. What a test states is what the test is about.
29
+ */
30
+ export const simCfnSamFunctionTemplateFactory = new MappedFactory(() => ({ functionProperties: {}, globals: {}, resources: {} }), (input) => ({
31
+ Transform: samTransformName,
32
+ ...globalsSection(input),
33
+ Resources: {
34
+ [samFunctionTemplateLogicalId]: {
35
+ Type: samFunctionType,
36
+ Properties: { ...workingFunction, ...input.functionProperties },
37
+ },
38
+ ...input.resources,
39
+ },
40
+ }));
41
+ /**
42
+ * The `Globals` section, for a template stating defaults to put in one.
43
+ */
44
+ function globalsSection(input) {
45
+ if (Object.keys(input.globals).length === 0) {
46
+ return {};
47
+ }
48
+ return { Globals: { Function: input.globals } };
49
+ }
50
+ //# sourceMappingURL=sim-cfn-sam-function-template.factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cfn-sam-function-template.factory.js","sourceRoot":"","sources":["../../../../../src/service/cloudformation/sam/function/sim-cfn-sam-function-template.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAuB5D;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAEpD,MAAM,eAAe,GAA8B;IACjD,YAAY,EAAE,OAAO;IACrB,OAAO,EAAE,eAAe;IACxB,OAAO,EAAE,YAAY;IACrB,UAAU,EAAE,wCAAwC;CACrD,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,IAAI,aAAa,CAI/D,GAAG,EAAE,CAAC,CAAC,EAAE,kBAAkB,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,EAC9D,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACV,SAAS,EAAE,gBAAgB;IAC3B,GAAG,cAAc,CAAC,KAAK,CAAC;IACxB,SAAS,EAAE;QACT,CAAC,4BAA4B,CAAC,EAAE;YAC9B,IAAI,EAAE,eAAe;YACrB,UAAU,EAAE,EAAE,GAAG,eAAe,EAAE,GAAG,KAAK,CAAC,kBAAkB,EAAE;SAChE;QACD,GAAG,KAAK,CAAC,SAAS;KACnB;CACF,CAAC,CACH,CAAC;AAEF;;GAEG;AACH,SAAS,cAAc,CACrB,KAAqC;IAErC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5C,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;AAClD,CAAC"}